@yugabytedb/perf-advisor-ui 1.0.72 → 1.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -7,5 +7,5 @@
7
7
  *
8
8
  * LICENSE
9
9
  * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
10
- */var Kh=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new md,o=n.renderer||"canvas";Xh[o]||(o=hu(Xh)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new Xh[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Ll.node||Ll.worker||s?null:new hh(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Ll.touchEventsSupported:!!c)&&(l=Eu(n.pointerSize,44)),this.handler=new od(i,a,u,a.root,l),this.animation=new Xp({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},e.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return hp(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=hp(t[i].color,1);return(n/=r)<.4}return!1}(e)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(e){var t,n=Yp();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=Yp();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Zh&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete $h[e]},e}();function Jh(e,t){var n=new Kh(eu(),e,t);return $h[n.id]=n,n}var ef=1e-4;function tf(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function nf(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return yu(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function rf(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function of(e){return e.sort((function(e,t){return e-t})),e}function af(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(e)}function sf(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function lf(e,t){var n=Math.max(af(e),af(t)),r=e+t;return n>20?r:rf(r,n)}function uf(e){var t=2*Math.PI;return(e%t+t)%t}function cf(e){return e>-1e-4&&e<ef}var df=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function pf(e){if(e instanceof Date)return e;if(yu(e)){var t=df.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function hf(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function ff(e,t){var n=hf(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function gf(e){var t=parseFloat(e);return t==e&&(0!==t||!yu(e)||e.indexOf("x")<=0)?t:NaN}function mf(){return Math.round(9*Math.random())}function vf(e,t){return 0===t?e:vf(t,e%t)}function yf(e,t){return null==e?t:null==t?e:e*t/vf(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function xf(e){throw new Error(e)}function _f(e,t,n){return(t-e)*n+e}var bf="series\0";function wf(e){return e instanceof Array?e:null==e?[]:[e]}function Sf(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var Cf=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Tf(e){return!bu(e)||mu(e)||e instanceof Date?e:e.value}function Mf(e){return bu(e)&&!(e instanceof Array)}function Af(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Uu();uu(t,(function(e,n){bu(e)||(t[n]=null)}));var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||kf(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){uu(r,(function(i,o){if(i&&null!=i.id){var a=If(i.id),s=n.get(a);if(null!=s){var l=e[s];ku(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}}))}(u,e,a,t),r&&function(e,t){uu(t,(function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var o=e[i].existing;if(!e[i].newOption&&o&&(null==o.id||null==n.id)&&!kf(n)&&!kf(o)&&Ef("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){uu(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||kf(r.existing)||r.existing&&null!=t.id&&!Ef("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}}))}(u,t,i):o&&function(e,t){uu(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=Uu(),uu(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),uu(s,(function(e){var t=e.newOption;ku(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})})),uu(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(bu(r)){if(i.name=null!=r.name?If(r.name):n?n.name:bf+t,n)i.id=If(n.id);else if(null!=r.id)i.id=If(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,e)}})),u}function Ef(e,t,n){var r=Df(t[e],null),i=Df(n[e],null);return null!=r&&null!=i&&r===i}function If(e){return Df(e,"")}function Df(e,t){return null==e?t:yu(e)?e:_u(e)||xu(e)?e+"":t}function Of(e){var t=e.name;return!(!t||!t.indexOf(bf))}function kf(e){return e&&null!=e.id&&0===If(e.id).indexOf("\0_ec_\0")}function Rf(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?mu(t.dataIndex)?cu(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?mu(t.name)?cu(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function Nf(){var e="__ec_inner_"+Lf++;return function(t){return t[e]||(t[e]={})}}var Lf=mf();function Bf(e,t,n){var r=Pf(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each((function(t,r){var i=Uf(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]})),a}function Pf(e,t){var n;if(yu(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Uu(),o={},a=!1;return uu(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&au(t.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e}else o[n]=e})),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var jf={useDefault:!0,enableAll:!1,enableNone:!1},Ff={useDefault:!1,enableAll:!0,enableNone:!0};function Uf(e,t,n,r){r=r||jf;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(ku(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(ku(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a}),s)}function zf(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var Hf="___EC__COMPONENT__CONTAINER___",Vf="___EC__EXTENDED_CLASS___";function Wf(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function Yf(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return vu(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return L(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),iu(t.prototype,e),t[Vf]=!0,t.extend=this.extend,t.superCall=Qf,t.superApply=Zf,t.superClass=r,t}}function Gf(e,t){e.extend=t.extend}var qf=Math.round(10*Math.random());function Qf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Zf(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Xf(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){ku(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=Wf(r);if(i.sub){if(i.sub!==Hf){var o=function(e){var n=t[e.main];n&&n[Hf]||((n=t[e.main]={})[Hf]=!0);return n}(i);o[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Hf]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=Wf(e),r=[],i=t[n.main];return i&&i[Hf]?uu(i,(function(e,t){t!==Hf&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=Wf(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return uu(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=Wf(e),r=t[n.main];return r&&r[Hf]}}function $f(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&au(r,s)>=0||i&&au(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var Kf=$f([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Jf=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Kf(this,e,t)},e}(),eg=new Qd(50);function tg(e){if("string"==typeof e){var t=eg.get(e);return t&&t.image}return e}function ng(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=eg.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!ig(t=o.image)&&o.pending.push(a):((t=zl.loadImage(e,rg,rg)).__zrImageSrc=e,eg.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function rg(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function ig(e){return e&&e.width&&e.height}var og=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function ag(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=sg(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=lg(o[a],i);return o.join("\n")}function sg(e,t,n,r){var i=iu({},r=r||{});i.font=t,n=Eu(n,"..."),i.maxIterations=Eu(r.maxIterations,2);var o=i.minChar=Eu(r.minChar,0);i.cnCharWidth=Ih("国",t);var a=i.ascCharWidth=Ih("a",t);i.placeholder=Eu(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Ih(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function lg(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=Ih(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?ug(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=Ih(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function ug(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}var cg=function(){},dg=function(e){this.tokens=[],e&&(this.tokens=e)},pg=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function hg(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Lh(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=mg(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new cg;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Ih(v,c),m||d)u.push(new dg([y]));else{var x=(u[u.length-1]||(u[0]=new dg)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var fg=du(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function gg(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!fg[e]}function mg(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=Ih(p,t),f=!r&&!gg(p);(o.length?c+h>n:i+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=h)):f?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var vg="__zr_style_"+Math.round(10*Math.random()),yg={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xg={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};yg[vg]=!0;var _g=["z","z2","invisible"],bg=["invisible"],wg=function(e){function t(t){return e.call(this,t)||this}var n;return L(t,e),t.prototype._init=function(t){for(var n=hu(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}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,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Sg.copy(e.getBoundingRect()),e.transform&&Sg.applyTransform(e.transform);return Cg.width=t,Cg.height=n,!Sg.intersect(Cg)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Qc(0,0,0,0)),t?Qc.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Qc(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){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:iu(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return zu(yg,e)},t.prototype.useStyle=function(e){e[vg]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[vg]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,_g)},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=hu(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=hu(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?bg:_g;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return iu(e,t),e},t.prototype.getAnimationStyleProps=function(){return xg},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(qh),Sg=new Qc(0,0,0,0),Cg=new Qc(0,0,0,0);var Tg=wg,Mg=Math.min,Ag=Math.max,Eg=Math.sin,Ig=Math.cos,Dg=2*Math.PI,Og=Gu(),kg=Gu(),Rg=Gu();function Ng(e,t,n,r,i,o){i[0]=Mg(e,n),i[1]=Mg(t,r),o[0]=Ag(e,n),o[1]=Ag(t,r)}var Lg=[],Bg=[];function Pg(e,t,n,r,i,o,a,s,l,u){var c=Nd,d=Od,p=c(e,n,i,a,Lg);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,i,a,Lg[h]);l[0]=Mg(f,l[0]),u[0]=Ag(f,u[0])}p=c(t,r,o,s,Bg);for(h=0;h<p;h++){var g=d(t,r,o,s,Bg[h]);l[1]=Mg(g,l[1]),u[1]=Ag(g,u[1])}l[0]=Mg(e,l[0]),u[0]=Ag(e,u[0]),l[0]=Mg(a,l[0]),u[0]=Ag(a,u[0]),l[1]=Mg(t,l[1]),u[1]=Ag(t,u[1]),l[1]=Mg(s,l[1]),u[1]=Ag(s,u[1])}function jg(e,t,n,r,i,o,a,s){var l=Fd,u=Pd,c=Ag(Mg(l(e,n,i),1),0),d=Ag(Mg(l(t,r,o),1),0),p=u(e,n,i,c),h=u(t,r,o,d);a[0]=Mg(e,i,p),a[1]=Mg(t,o,h),s[0]=Ag(e,i,p),s[1]=Ag(t,o,h)}function Fg(e,t,n,r,i,o,a,s,l){var u=nc,c=rc,d=Math.abs(i-o);if(d%Dg<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Og[0]=Ig(i)*n+e,Og[1]=Eg(i)*r+t,kg[0]=Ig(o)*n+e,kg[1]=Eg(o)*r+t,u(s,Og,kg),c(l,Og,kg),(i%=Dg)<0&&(i+=Dg),(o%=Dg)<0&&(o+=Dg),i>o&&!a?o+=Dg:i<o&&a&&(i+=Dg),a){var p=o;o=i,i=p}for(var h=0;h<o;h+=Math.PI/2)h>i&&(Rg[0]=Ig(h)*n+e,Rg[1]=Eg(h)*r+t,u(s,Rg,s),c(l,Rg,l))}var Ug={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zg=[],Hg=[],Vg=[],Wg=[],Yg=[],Gg=[],qg=Math.min,Qg=Math.max,Zg=Math.cos,Xg=Math.sin,$g=Math.abs,Kg=Math.PI,Jg=2*Kg,em="undefined"!=typeof Float32Array,tm=[];function nm(e){return Math.round(e/Kg*1e8)/1e8%2*Kg}var rm=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=$g(n/gh/e)||0,this._uy=$g(n/gh/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ug.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=$g(e-this._xi),r=$g(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Ug.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(Ug.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Ug.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),tm[0]=r,tm[1]=i,function(e,t){var n=nm(e[0]);n<0&&(n+=Jg);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Jg?i=n+Jg:t&&n-i>=Jg?i=n-Jg:!t&&n>i?i=n+(Jg-nm(n-i)):t&&n<i&&(i=n-(Jg-nm(i-n))),e[0]=n,e[1]=i}(tm,o),r=tm[0];var a=(i=tm[1])-r;return this.addData(Ug.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=Zg(i)*n+e,this._yi=Xg(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Ug.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ug.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!em||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();em&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},e.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,em&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Vg[0]=Vg[1]=Yg[0]=Yg[1]=Number.MAX_VALUE,Wg[0]=Wg[1]=Gg[0]=Gg[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(i=n=t[e],o=r=t[e+1]),a){case Ug.M:n=i=t[e++],r=o=t[e++],Yg[0]=i,Yg[1]=o,Gg[0]=i,Gg[1]=o;break;case Ug.L:Ng(n,r,t[e],t[e+1],Yg,Gg),n=t[e++],r=t[e++];break;case Ug.C:Pg(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Yg,Gg),n=t[e++],r=t[e++];break;case Ug.Q:jg(n,r,t[e++],t[e++],t[e],t[e+1],Yg,Gg),n=t[e++],r=t[e++];break;case Ug.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(i=Zg(p)*c+l,o=Xg(p)*d+u),Fg(l,u,c,d,p,h,f,Yg,Gg),n=Zg(h)*c+l,r=Xg(h)*d+u;break;case Ug.R:Ng(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],Yg,Gg);break;case Ug.Z:n=i,r=o}nc(Vg,Vg,Yg),rc(Wg,Wg,Gg)}return 0===e&&(Vg[0]=Vg[1]=Wg[0]=Wg[1]=0),new Qc(Vg[0],Vg[1],Wg[0]-Vg[0],Wg[1]-Vg[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(p){case Ug.M:i=a=e[d++],o=s=e[d++];break;case Ug.L:var g=e[d++],m=(x=e[d++])-o;($g(I=g-i)>n||$g(m)>r||d===t-1)&&(f=Math.sqrt(I*I+m*m),i=g,o=x);break;case Ug.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=Bd(i,o,v,y,g,x,_,b,10),i=_,o=b;break;case Ug.Q:f=zd(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case Ug.A:var w=e[d++],S=e[d++],C=e[d++],T=e[d++],M=e[d++],A=e[d++],E=A+M;d+=1,e[d++],h&&(a=Zg(M)*C+w,s=Xg(M)*T+S),f=Qg(C,T)*qg(Jg,Math.abs(A)),i=Zg(E)*C+w,o=Xg(E)*T+S;break;case Ug.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case Ug.Z:var I=a-i;m=s-o;f=Math.sqrt(I*I+m*m),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=p[_++],w=1===_;switch(w&&(n=i=p[_],r=o=p[_+1]),b!==Ug.L&&x>0&&(e.lineTo(c,d),x=0),b){case Ug.M:n=i=p[_++],r=o=p[_++],e.moveTo(i,o);break;case Ug.L:a=p[_++],s=p[_++];var S=$g(a-i),C=$g(s-o);if(S>h||C>f){if(m){if(v+(Q=l[y++])>u){var T=(u-v)/Q;e.lineTo(i*(1-T)+a*T,o*(1-T)+s*T);break e}v+=Q}e.lineTo(a,s),i=a,o=s,x=0}else{var M=S*S+C*C;M>x&&(c=a,d=s,x=M)}break;case Ug.C:var A=p[_++],E=p[_++],I=p[_++],D=p[_++],O=p[_++],k=p[_++];if(m){if(v+(Q=l[y++])>u){Ld(i,A,I,O,T=(u-v)/Q,zg),Ld(o,E,D,k,T,Hg),e.bezierCurveTo(zg[1],Hg[1],zg[2],Hg[2],zg[3],Hg[3]);break e}v+=Q}e.bezierCurveTo(A,E,I,D,O,k),i=O,o=k;break;case Ug.Q:A=p[_++],E=p[_++],I=p[_++],D=p[_++];if(m){if(v+(Q=l[y++])>u){Ud(i,A,I,T=(u-v)/Q,zg),Ud(o,E,D,T,Hg),e.quadraticCurveTo(zg[1],Hg[1],zg[2],Hg[2]);break e}v+=Q}e.quadraticCurveTo(A,E,I,D),i=I,o=D;break;case Ug.A:var R=p[_++],N=p[_++],L=p[_++],B=p[_++],P=p[_++],j=p[_++],F=p[_++],U=!p[_++],z=L>B?L:B,H=$g(L-B)>.001,V=P+j,W=!1;if(m)v+(Q=l[y++])>u&&(V=P+j*(u-v)/Q,W=!0),v+=Q;if(H&&e.ellipse?e.ellipse(R,N,L,B,F,P,V,U):e.arc(R,N,z,P,V,U),W)break e;w&&(n=Zg(P)*L+R,r=Xg(P)*B+N),i=Zg(V)*L+R,o=Xg(V)*B+N;break;case Ug.R:n=i=p[_],r=o=p[_+1],a=p[_++],s=p[_++];var Y=p[_++],G=p[_++];if(m){if(v+(Q=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+qg(q,Y),s),(q-=Y)>0&&e.lineTo(a+Y,s+qg(q,G)),(q-=G)>0&&e.lineTo(a+Qg(Y-q,0),s+G),(q-=Y)>0&&e.lineTo(a,s+Qg(G-q,0));break e}v+=Q}e.rect(a,s,Y,G);break;case Ug.Z:if(m){var Q;if(v+(Q=l[y++])>u){T=(u-v)/Q;e.lineTo(i*(1-T)+n*T,o*(1-T)+r*T);break e}v+=Q}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Ug,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),im=rm;function om(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function am(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;if(c>t+d&&c>r+d&&c>o+d&&c>s+d||c<t-d&&c<r-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)return!1;var p=function(e,t,n,r,i,o,a,s,l,u,c){var d,p,h,f,g,m=.005,v=1/0;Md[0]=l,Md[1]=u;for(var y=0;y<1;y+=.05)Ad[0]=Od(e,n,i,a,y),Ad[1]=Od(t,r,o,s,y),(f=ec(Md,Ad))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Sd);x++)p=d-m,h=d+m,Ad[0]=Od(e,n,i,a,p),Ad[1]=Od(t,r,o,s,p),f=ec(Ad,Md),p>=0&&f<v?(d=p,v=f):(Ed[0]=Od(e,n,i,a,h),Ed[1]=Od(t,r,o,s,h),g=ec(Ed,Md),h<=1&&g<v?(d=h,v=g):m*=.5);return c&&(c[0]=Od(e,n,i,a,d),c[1]=Od(t,r,o,s,d)),bd(v)}(e,t,n,r,i,o,a,s,u,c,null);return p<=d/2}function sm(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;if(l>t+u&&l>r+u&&l>o+u||l<t-u&&l<r-u&&l<o-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)return!1;var c=function(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Md[0]=a,Md[1]=s;for(var p=0;p<1;p+=.05)Ad[0]=Pd(e,n,i,p),Ad[1]=Pd(t,r,o,p),(m=ec(Md,Ad))<d&&(u=p,d=m);d=1/0;for(var h=0;h<32&&!(c<Sd);h++){var f=u-c,g=u+c;Ad[0]=Pd(e,n,i,f),Ad[1]=Pd(t,r,o,f);var m=ec(Ad,Md);if(f>=0&&m<d)u=f,d=m;else{Ed[0]=Pd(e,n,i,g),Ed[1]=Pd(t,r,o,g);var v=ec(Ed,Md);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=Pd(e,n,i,u),l[1]=Pd(t,r,o,u)),bd(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var lm=2*Math.PI;function um(e){return(e%=lm)<0&&(e+=lm),e}var cm=2*Math.PI;function dm(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%cm<1e-4)return!0;if(o){var d=r;r=um(i),i=um(d)}else r=um(r),i=um(i);r>i&&(i+=cm);var p=Math.atan2(l,s);return p<0&&(p+=cm),p>=r&&p<=i||p+cm>=r&&p+cm<=i}function pm(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r)return 0;if(r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var hm=im.CMD,fm=2*Math.PI;var gm=[-1,-1,-1],mm=[-1,-1];function vm(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c,d=Rd(t,r,o,s,u,gm);if(0===d)return 0;for(var p=0,h=-1,f=void 0,g=void 0,m=0;m<d;m++){var v=gm[m],y=0===v||1===v?.5:1;Od(e,n,i,a,v)<l||(h<0&&(h=Nd(t,r,o,s,mm),mm[1]<mm[0]&&h>1&&(c=void 0,c=mm[0],mm[0]=mm[1],mm[1]=c),f=Od(t,r,o,s,mm[0]),h>1&&(g=Od(t,r,o,s,mm[1]))),2===h?v<mm[0]?p+=f<t?y:-y:v<mm[1]?p+=g<f?y:-y:p+=s<g?y:-y:v<mm[0]?p+=f<t?y:-y:p+=s<f?y:-y)}return p}function ym(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(Id(o))Dd(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(Id(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=bd(u),p=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}(t,r,o,s,gm);if(0===l)return 0;var u=Fd(t,r,o);if(u>=0&&u<=1){for(var c=0,d=Pd(t,r,o,u),p=0;p<l;p++){var h=0===gm[p]||1===gm[p]?.5:1;Pd(e,n,i,gm[p])<a||(gm[p]<u?c+=d<t?h:-h:c+=o<d?h:-h)}return c}h=0===gm[0]||1===gm[0]?.5:1;return Pd(e,n,i,gm[0])<a?0:o<t?h:-h}function xm(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);gm[0]=-l,gm[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=fm-1e-4){r=0,i=fm;var c=o?1:-1;return a>=gm[0]+e&&a<=gm[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=fm,i+=fm);for(var p=0,h=0;h<2;h++){var f=gm[h];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=fm+g),(g>=r&&g<=i||g+fm>=r&&g+fm<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function _m(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,p=0,h=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===hm.M&&m>1&&(n||(d+=pm(p,h,f,g,r,i))),y&&(f=p=u[m],g=h=u[m+1]),v){case hm.M:p=f=u[m++],h=g=u[m++];break;case hm.L:if(n){if(om(p,h,u[m],u[m+1],t,r,i))return!0}else d+=pm(p,h,u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case hm.C:if(n){if(am(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=vm(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case hm.Q:if(n){if(sm(p,h,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=ym(p,h,u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case hm.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],S=u[m++],C=u[m++];m+=1;var T=!!(1-u[m++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):d+=pm(p,h,o,a,r,i);var M=(r-x)*w/b+x;if(n){if(dm(x,_,w,S,S+C,T,t,M,i))return!0}else d+=xm(x,_,w,S,S+C,T,M,i);p=Math.cos(S+C)*b+x,h=Math.sin(S+C)*w+_;break;case hm.R:if(f=p=u[m++],g=h=u[m++],o=f+u[m++],a=g+u[m++],n){if(om(f,g,o,g,t,r,i)||om(o,g,o,a,t,r,i)||om(o,a,f,a,t,r,i)||om(f,a,f,g,t,r,i))return!0}else d+=pm(o,g,o,a,r,i),d+=pm(f,a,f,g,r,i);break;case hm.Z:if(n){if(om(p,h,f,g,t,r,i))return!0}else d+=pm(p,h,f,g,r,i);p=f,h=g}}return n||(s=h,l=g,Math.abs(s-l)<1e-4)||(d+=pm(p,h,f,g,r,i)||0),0!==d}var bm=ou({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yg),wm={style:ou({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xg.style)},Sm=Mh.concat(["invisible","culling","z","z2","zlevel","parent"]),Cm=function(e){function t(t){return e.call(this,t)||this}var n;return L(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<Sm.length;++s)i[Sm[s]]=this[Sm[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=hu(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?iu(this.style,a):this.useStyle(a):"shape"===o?iu(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(yu(e)){var t=hp(e,0);return t>.5?mh:t>.2?"#eee":vh}if(e)return vh}return mh},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(yu(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===hp(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new im(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return _m(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return _m(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:iu(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return zu(bm,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=iu({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=iu({},r.shape),iu(s,n.shape)):(s=iu({},i?this.shape:r.shape),iu(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=iu({},this.shape);for(var u={},c=hu(s),d=0;d<c.length;d++){var p=c[d];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return wm},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return L(n,t),n.prototype.getDefaultStyle=function(){return nu(e.style)},n.prototype.getDefaultShape=function(){return nu(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Tg),Tm=Cm,Mm=ou({strokeFirst:!0,font:Pl,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},bm),Am=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return zu(Mm,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Oh(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Tg);Am.prototype.type="tspan";var Em=Am,Im=ou({x:0,y:0},yg),Dm={style:ou({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xg.style)};var Om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.createStyle=function(e){return zu(Im,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=function(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Dm},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Qc(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Tg);Om.prototype.type="image";var km=Om;var Rm=Math.round;function Nm(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(Rm(2*r)===Rm(2*i)&&(e.x1=e.x2=Bm(r,s,!0)),Rm(2*o)===Rm(2*a)&&(e.y1=e.y2=Bm(o,s,!0)),e):e}}function Lm(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Bm(r,s,!0),e.y=Bm(i,s,!0),e.width=Math.max(Bm(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(Bm(i+a,s,!1)-e.y,0===a?0:1),e):e}}function Bm(e,t,n){if(!t)return e;var r=Rm(2*e);return(r+Rm(t))%2==0?r/2:(r+(n?1:-1))/2}var Pm=function(){this.x=0,this.y=0,this.width=0,this.height=0},jm={},Fm=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new Pm},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Lm(jm,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=o=d:d instanceof Array?1===d.length?n=r=i=o=d[0]:2===d.length?(n=i=d[0],r=o=d[1]):3===d.length?(n=d[0],r=o=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],o=d[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Tm);Fm.prototype.type="rect";var Um=Fm,zm={fill:"#000"},Hm={style:ou({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},xg.style)},Vm=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=zm,n.attr(t),n}return L(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,Xm(e=this.style),uu(e.rich,Xm),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Qc(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||zm},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return iu(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=hu(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},iu(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Hm},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||Pl,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Nh(o),l=Eu(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,p=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?mg(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,h=Eu(t.height,p);if(p>h&&c){var f=Math.floor(h/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=sg(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=lg(n[m],g);var v=h,y=0;for(m=0;m<n.length;m++)y=Math.max(Ih(n[m],o),y);null==d&&(d=y);var x=y;return i&&(v+=i[0]+i[2],x+=i[1]+i[3],d+=i[1]+i[3]),u&&(x=d),{lines:n,height:h,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:p,width:d}}(ev(e),e),i=tv(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,v=Rh(h,r.contentHeight,g);if(i||n){var y=kh(p,s,f),x=Rh(h,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=Jm(p,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(Km("fill"in e?e.fill:(b=!0,d.fill))),S=($m("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),C=e.textShadowBlur>0,T=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,A=0;A<u.length;A++){var E=this._getOrCreateChild(Em),I=E.createStyle();E.useStyle(I),I.text=u[A],I.x=m,I.y=v,f&&(I.textAlign=f),I.textBaseline="middle",I.opacity=e.opacity,I.strokeFirst=!0,C&&(I.shadowBlur=e.textShadowBlur||0,I.shadowColor=e.textShadowColor||"transparent",I.shadowOffsetX=e.textShadowOffsetX||0,I.shadowOffsetY=e.textShadowOffsetY||0),I.stroke=S,I.fill=w,S&&(I.lineWidth=e.lineWidth||_,I.lineDash=e.lineDash,I.lineDashOffset=e.lineDashOffset||0),I.font=t,Qm(I,e),v+=c,T&&E.setBoundingRect(new Qc(kh(I.x,e.width,I.textAlign),Rh(I.y,M,I.textBaseline),l,M))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new pg;if(null!=e&&(e+=""),!e)return n;for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},l=og.lastIndex=0;null!=(r=og.exec(e));){var u=r.index;u>l&&hg(n,e.substring(l,u),t,s),hg(n,r[2],t,s,r[1]),l=og.lastIndex}l<e.length&&hg(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,_=0,b=0;b<y.tokens.length;b++){var w=(k=y.tokens[b]).styleName&&t.rich[k.styleName]||{},S=k.textPadding=w.padding,C=S?S[1]+S[3]:0,T=k.font=w.font||t.font;k.contentHeight=Nh(T);var M=Eu(w.height,k.contentHeight);if(k.innerHeight=M,S&&(M+=S[0]+S[2]),k.height=M,k.lineHeight=Iu(w.lineHeight,t.lineHeight,M),k.align=w&&w.align||t.align,k.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&d+k.lineHeight>o){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var A=w.width,E=null==A||"auto"===A;if("string"==typeof A&&"%"===A.charAt(A.length-1))k.percentWidth=A,c.push(k),k.contentWidth=Ih(k.text,T);else{if(E){var I=w.backgroundColor,D=I&&I.image;D&&ig(D=tg(D))&&(k.width=Math.max(k.width,D.width*M/D.height))}var O=f&&null!=i?i-_:null;null!=O&&O<k.width?!E||O<C?(k.text="",k.width=k.contentWidth=0):(k.text=ag(k.text,O-C,T,t.ellipsis,{minChar:t.truncateMinChar}),k.width=k.contentWidth=Ih(k.text,T)):k.contentWidth=Ih(k.text,T)}k.width+=C,_+=k.width,w&&(x=Math.max(x,k.lineHeight))}m(y,_,x)}for(n.outerWidth=n.width=Eu(i,p),n.outerHeight=n.height=Eu(o,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),v=0;v<c.length;v++){var k,R=(k=c[v]).percentWidth;k.width=parseInt(R,10)/100*n.width}return n}(ev(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=kh(a,r,u),p=Rh(s,i,c),h=d,f=p;o&&(h+=o[3],f+=o[0]);var g=h+n;tv(e)&&this._renderBackground(e,e,d,p,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,S=0,C=h,T=g,M=_-1,A=void 0;S<_&&(!(A=x[S]).align||"left"===A.align);)this._placeToken(A,e,b,f,C,"left",m),w-=A.width,C+=A.width,S++;for(;M>=0&&"right"===(A=x[M]).align;)this._placeToken(A,e,b,f,T,"right",m),w-=A.width,T-=A.width,M--;for(C+=(n-(C-h)-(g-T)-w)/2;S<=M;)A=x[S],this._placeToken(A,e,b,f,C+A.width/2,"center",m),C+=A.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&tv(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=Jm(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(Em),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,v=Km("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=$m("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=u,x&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||Pl,h.opacity=Iu(s.opacity,t.opacity,1),Qm(h,s),y&&(h.lineWidth=Iu(s.lineWidth,t.lineWidth,m),h.lineDash=Eu(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=y),v&&(h.fill=v);var _=e.contentWidth,b=e.contentHeight;p.setBoundingRect(new Qc(kh(h.x,_,h.textAlign),Rh(h.y,b,h.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild(Um)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=i,m.height=o,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=Eu(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(km)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Eu(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Iu(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Zm(e)&&(t=[e.fontStyle,e.fontWeight,qm(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Ru(t)||e.textFont||e.font},t}(Tg),Wm={left:!0,right:1,center:1},Ym={top:1,bottom:1,middle:1},Gm=["fontStyle","fontWeight","fontSize","fontFamily"];function qm(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function Qm(e,t){for(var n=0;n<Gm.length;n++){var r=Gm[n],i=t[r];null!=i&&(e[r]=i)}}function Zm(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function Xm(e){if(e){e.font=Vm.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||Wm[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Ym[n]?n:"top",e.padding&&(e.padding=Ou(e.padding))}}function $m(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Km(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Jm(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function ev(e){var t=e.text;return null!=t&&(t+=""),t}function tv(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var nv=Vm,rv=Nf(),iv=1,ov={},av=Nf(),sv=Nf(),lv=["emphasis","blur","select"],uv=["normal","emphasis","blur","select"],cv="highlight",dv="downplay",pv="select",hv="unselect",fv="toggleSelect";function gv(e){return null!=e&&"none"!==e}var mv=new Qd(100);function vv(e){if(yu(e)){var t=mv.get(e);return t||(t=up(e,-.1),mv.put(e,t)),t}if(Tu(e)){var n=iu({},e);return n.colorStops=cu(e.colorStops,(function(e){return{offset:e.offset,color:up(e.color,-.1)}})),n}return e}function yv(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function xv(e){yv(e,"emphasis",2)}function _v(e){2===e.hoverState&&yv(e,"normal",0)}function bv(e){yv(e,"blur",1)}function wv(e){1===e.hoverState&&yv(e,"normal",0)}function Sv(e){e.selected=!0}function Cv(e){e.selected=!1}function Tv(e,t,n){t(e,n)}function Mv(e,t,n){Tv(e,t,n),e.isGroup&&e.traverse((function(e){Tv(e,t,n)}))}function Av(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function Ev(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&au(n,"select")>=0,o=!1;if(e instanceof Tm){var a=av(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(gv(s)||gv(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=iu({},r),(u=iu({},u)).fill=s):!gv(u.fill)&&gv(s)?(o=!0,r=iu({},r),(u=iu({},u)).fill=vv(s)):!gv(u.stroke)&&gv(l)&&(o||(r=iu({},r),u=iu({},u)),u.stroke=vv(l)),r.style=u}}if(r&&null==r.z2){o||(r=iu({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=au(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=iu({},n),a=iu({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=iu({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function Iv(e){e.stateProxy=Ev;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Ev),n&&(n.stateProxy=Ev)}function Dv(e,t){!Pv(e,t)&&!e.__highByOuter&&Mv(e,xv)}function Ov(e,t){!Pv(e,t)&&!e.__highByOuter&&Mv(e,_v)}function kv(e,t){e.__highByOuter|=1<<(t||0),Mv(e,xv)}function Rv(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mv(e,_v)}function Nv(e){Mv(e,wv)}function Lv(e){Mv(e,Sv)}function Bv(e){Mv(e,Cv)}function Pv(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function jv(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=sv(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){wv(e)})),a&&n.push(i)),o.isBlured=!1})),uu(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Fv(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Nv(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries((function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&i&&"self"===t||bv(e)})),lu(t))o(e.getData(),t);else if(bu(t))for(var c=hu(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),sv(e).isBlured=!0}})),i.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}}))}}function Uv(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){sv(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){bv(e)}))}}}function zv(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var o=r.getModel().getComponent(e,t);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===rv(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Hv(e){uu(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Lv(t):Bv(t)}))}))}function Vv(e){var t=[];return e.eachSeries((function(e){uu(e.getAllData(),(function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function Wv(e,t,n){Zv(e,!0),Mv(e,Iv),function(e,t,n){var r=rv(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function Yv(e,t,n,r){r?function(e){Zv(e,!1)}(e):Wv(e,t,n)}var Gv=["emphasis","blur","select"],qv={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Qv(e,t,n,r){n=n||"itemStyle";for(var i=0;i<Gv.length;i++){var o=Gv[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[qv[n]]()}}function Zv(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function Xv(e){return!(!e||!e.__highDownDispatcher)}function $v(e){var t=e.type;return t===pv||t===hv||t===fv}function Kv(e){var t=e.type;return t===cv||t===dv}var Jv=im.CMD,ey=[[],[],[]],ty=Math.sqrt,ny=Math.atan2;var ry=Math.sqrt,iy=Math.sin,oy=Math.cos,ay=Math.PI;function sy(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ly(e,t){return(e[0]*t[0]+e[1]*t[1])/(sy(e)*sy(t))}function uy(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(ly(e,t))}function cy(e,t,n,r,i,o,a,s,l,u,c){var d=l*(ay/180),p=oy(d)*(e-n)/2+iy(d)*(t-r)/2,h=-1*iy(d)*(e-n)/2+oy(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=ry(f),s*=ry(f));var g=(i===o?-1:1)*ry((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,v=g*-s*p/a,y=(e+n)/2+oy(d)*m-iy(d)*v,x=(t+r)/2+iy(d)*m+oy(d)*v,_=uy([1,0],[(p-m)/a,(h-v)/s]),b=[(p-m)/a,(h-v)/s],w=[(-1*p-m)/a,(-1*h-v)/s],S=uy(b,w);if(ly(b,w)<=-1&&(S=ay),ly(b,w)>=1&&(S=0),S<0){var C=Math.round(S/ay*1e6)/1e6;S=2*ay+C%2*ay}c.addData(u,y,x,a,s,_,S,d,o)}var dy=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,py=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var hy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.applyTransform=function(e){},t}(Tm);function fy(e){return null!=e.setData}function gy(e,t){var n=function(e){var t=new im;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=im.CMD,l=e.match(dy);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(py)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=r,T=i,M=void 0,A=void 0;switch(d){case"l":r+=h[m++],i+=h[m++],p=s.L,t.addData(p,r,i);break;case"L":r=h[m++],i=h[m++],p=s.L,t.addData(p,r,i);break;case"m":r+=h[m++],i+=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="l";break;case"M":r=h[m++],i=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,i);break;case"H":r=h[m++],p=s.L,t.addData(p,r,i);break;case"v":i+=h[m++],p=s.L,t.addData(p,r,i);break;case"V":i=h[m++],p=s.L,t.addData(p,r,i);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],i=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i),r+=h[m-2],i+=h[m-1];break;case"S":v=r,y=i,M=t.len(),A=t.data,n===s.C&&(v+=r-A[M-4],y+=i-A[M-3]),p=s.C,C=h[m++],T=h[m++],r=h[m++],i=h[m++],t.addData(p,v,y,C,T,r,i);break;case"s":v=r,y=i,M=t.len(),A=t.data,n===s.C&&(v+=r-A[M-4],y+=i-A[M-3]),p=s.C,C=r+h[m++],T=i+h[m++],r+=h[m++],i+=h[m++],t.addData(p,v,y,C,T,r,i);break;case"Q":C=h[m++],T=h[m++],r=h[m++],i=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"q":C=h[m++]+r,T=h[m++]+i,r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"T":v=r,y=i,M=t.len(),A=t.data,n===s.Q&&(v+=r-A[M-4],y+=i-A[M-3]),r=h[m++],i=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"t":v=r,y=i,M=t.len(),A=t.data,n===s.Q&&(v+=r-A[M-4],y+=i-A[M-3]),r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"A":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],cy(C=r,T=i,r=h[m++],i=h[m++],w,S,x,_,b,p=s.A,t);break;case"a":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],cy(C=r,T=i,r+=h[m++],i+=h[m++],w,S,x,_,b,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=o,i=a),n=p}return t.toStatic(),t}(e),r=iu({},t);return r.buildPath=function(e){if(fy(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=Jv.M,d=Jv.C,p=Jv.L,h=Jv.R,f=Jv.A,g=Jv.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=ty(t[0]*t[0]+t[1]*t[1]),x=ty(t[2]*t[2]+t[3]*t[3]),_=ny(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=_,l[i++]+=_,o=i+=2;break;case h:s[0]=l[i++],s[1]=l[i++],tc(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],tc(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var b=ey[a];b[0]=l[i++],b[1]=l[i++],tc(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var my=function(){this.cx=0,this.cy=0,this.r=0},vy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new my},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Tm);vy.prototype.type="circle";var yy=vy,xy=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},_y=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new xy},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(r-o,i),e.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),e.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),e.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),e.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),e.closePath()},t}(Tm);_y.prototype.type="ellipse";var by=_y,wy=Math.PI,Sy=2*wy,Cy=Math.sin,Ty=Math.cos,My=Math.acos,Ay=Math.atan2,Ey=Math.abs,Iy=Math.sqrt,Dy=Math.max,Oy=Math.min,ky=1e-4;function Ry(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Iy(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,v=(h+g)/2,y=f-p,x=g-h,_=y*y+x*x,b=i-o,w=p*g-f*h,S=(x<0?-1:1)*Iy(Dy(0,b*b*_-w*w)),C=(w*x-y*S)/_,T=(-w*y-x*S)/_,M=(w*x+y*S)/_,A=(-w*y+x*S)/_,E=C-m,I=T-v,D=M-m,O=A-v;return E*E+I*I>D*D+O*O&&(C=M,T=A),{cx:C,cy:T,x0:-c,y0:-d,x1:C*(i/b-1),y1:T*(i/b-1)}}function Ny(e,t){var n,r=Dy(t.r,0),i=Dy(t.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,p=Ey(l-s),h=p>Sy&&p%Sy;if(h>ky&&(p=h),r>ky)if(p>Sy-ky)e.moveTo(u+r*Ty(s),c+r*Cy(s)),e.arc(u,c,r,s,l,!d),i>ky&&(e.moveTo(u+i*Ty(l),c+i*Cy(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=void 0,T=void 0,M=void 0,A=void 0,E=void 0,I=void 0,D=r*Ty(s),O=r*Cy(s),k=i*Ty(l),R=i*Cy(l),N=p>ky;if(N){var L=t.cornerRadius;L&&(n=function(e){var t;if(mu(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(L),f=n[0],g=n[1],m=n[2],v=n[3]);var B=Ey(r-i)/2;if(y=Oy(B,m),x=Oy(B,v),_=Oy(B,f),b=Oy(B,g),C=w=Dy(y,x),T=S=Dy(_,b),(w>ky||S>ky)&&(M=r*Ty(l),A=r*Cy(l),E=i*Ty(s),I=i*Cy(s),p<wy)){var P=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,p=d*l-c*u;if(!(p*p<ky))return[e+(p=(c*(t-o)-d*(e-i))/p)*l,t+p*u]}(D,O,E,I,M,A,k,R);if(P){var j=D-P[0],F=O-P[1],U=M-P[0],z=A-P[1],H=1/Cy(My((j*U+F*z)/(Iy(j*j+F*F)*Iy(U*U+z*z)))/2),V=Iy(P[0]*P[0]+P[1]*P[1]);C=Oy(w,(r-V)/(H+1)),T=Oy(S,(i-V)/(H-1))}}}if(N)if(C>ky){var W=Oy(m,C),Y=Oy(v,C),G=Ry(E,I,D,O,r,W,d),q=Ry(M,A,k,R,r,Y,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),C<w&&W===Y?e.arc(u+G.cx,c+G.cy,C,Ay(G.y0,G.x0),Ay(q.y0,q.x0),!d):(W>0&&e.arc(u+G.cx,c+G.cy,W,Ay(G.y0,G.x0),Ay(G.y1,G.x1),!d),e.arc(u,c,r,Ay(G.cy+G.y1,G.cx+G.x1),Ay(q.cy+q.y1,q.cx+q.x1),!d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,Ay(q.y1,q.x1),Ay(q.y0,q.x0),!d))}else e.moveTo(u+D,c+O),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+O);if(i>ky&&N)if(T>ky){W=Oy(f,T),G=Ry(k,R,M,A,i,-(Y=Oy(g,T)),d),q=Ry(D,O,E,I,i,-W,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),T<S&&W===Y?e.arc(u+G.cx,c+G.cy,T,Ay(G.y0,G.x0),Ay(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,Ay(G.y0,G.x0),Ay(G.y1,G.x1),!d),e.arc(u,c,i,Ay(G.cy+G.y1,G.cx+G.x1),Ay(q.cy+q.y1,q.cx+q.x1),d),W>0&&e.arc(u+q.cx,c+q.cy,W,Ay(q.y1,q.x1),Ay(q.y0,q.x0),!d))}else e.lineTo(u+k,c+R),e.arc(u,c,i,l,s,d);else e.lineTo(u+k,c+R)}else e.moveTo(u,c);e.closePath()}}}var Ly=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},By=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new Ly},t.prototype.buildPath=function(e,t){Ny(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Tm);By.prototype.type="sector";var Py=By,jy=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Fy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new jy},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Tm);Fy.prototype.type="ring";var Uy=Fy;function zy(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)nc(a,a,e[p]),rc(s,s,e[p]);nc(a,a,r[0]),rc(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)i=e[p?p-1:h-1],o=e[(p+1)%h];else{if(0===p||p===h-1){l.push(qu(e[p]));continue}i=e[p-1],o=e[p+1]}Zu(u,o,i),Xu(u,u,t);var g=Ku(f,i),m=Ku(f,o),v=g+m;0!==v&&(g/=v,m/=v),Xu(c,u,-g),Xu(d,u,m);var y=Qu([],f,c),x=Qu([],f,d);r&&(rc(y,y,a),nc(y,y,s),rc(x,x,a),nc(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Hy=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Vy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new Hy},t.prototype.buildPath=function(e,t){zy(e,t,!0)},t}(Tm);Vy.prototype.type="polygon";var Wy=Vy,Yy=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Gy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Yy},t.prototype.buildPath=function(e,t){zy(e,t,!1)},t}(Tm);Gy.prototype.type="polyline";var qy=Gy,Qy={},Zy=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Xy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Zy},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Nm(Qy,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Tm);Xy.prototype.type="line";var $y=Xy,Ky=[],Jy=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function ex(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?kd:Od)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?kd:Od)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?jd:Pd)(e.x1,e.cpx1,e.x2,t),(n?jd:Pd)(e.y1,e.cpy1,e.y2,t)]}var tx=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Jy},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(Ud(n,a,i,c,Ky),a=Ky[1],i=Ky[2],Ud(r,s,o,c,Ky),s=Ky[1],o=Ky[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Ld(n,a,l,i,c,Ky),a=Ky[1],l=Ky[2],i=Ky[3],Ld(r,s,u,o,c,Ky),s=Ky[1],u=Ky[2],o=Ky[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return ex(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=ex(this.shape,e,!0);return $u(t,t)},t}(Tm);tx.prototype.type="bezier-curve";var nx=tx,rx=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},ix=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new rx},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(Tm);ix.prototype.type="arc";var ox=ix,ax=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return L(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Tm.prototype.getBoundingRect.call(this)},t}(Tm),sx=ax,lx=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),ux=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return L(t,e),t}(lx),cx=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return L(t,e),t}(lx),dx=[0,0],px=[0,0],hx=new jc,fx=new jc,gx=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new jc;for(n=0;n<2;n++)this._axes[n]=new jc;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);jc.sub(r[0],n[1],n[0]),jc.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return hx.set(1/0,1/0),fx.set(0,0),!this._intersectCheckOneSide(this,e,hx,fx,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,hx,fx,r,-1)&&(n=!1,r)||r||jc.copy(t,n?hx:fx),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,dx),this._getProjMinMaxOnAxis(s,t._corners,px),dx[1]<px[0]||dx[0]>px[1]){if(a=!1,i)return a;var u=Math.abs(px[0]-dx[1]),c=Math.abs(dx[0]-px[1]);Math.min(u,c)>r.len()&&(u<c?jc.scale(r,l,-u*o):jc.scale(r,l,c*o))}else if(n){u=Math.abs(px[0]-dx[1]),c=Math.abs(dx[0]-px[1]);Math.min(u,c)<n.len()&&(u<c?jc.scale(n,l,u*o):jc.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),mx=gx,vx=[],yx=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return L(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Qc(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(vx)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Tg),xx=Nf();function _x(e,t,n,r,i,o,a){var s,l=!1;vu(i)?(a=o,o=i,i=null):bu(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=Eu(r.duration,200),u=Eu(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),vu(c)&&(c=c(n,i)),vu(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function bx(e,t,n,r,i,o){_x("update",e,t,n,r,i,o)}function Sx(e,t,n,r,i,o){_x("enter",e,t,n,r,i,o)}function Cx(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function Tx(e,t,n,r,i,o){Cx(e)||_x("leave",e,t,n,r,i,o)}function Mx(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Tx(e,{style:{opacity:0}},t,n,r)}function Ax(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||Mx(e,t,n,r)})):Mx(e,t,n,r)}function Ex(e){xx(e).oldStyle=e.style}var Ix=Math.max,Dx=Math.min,Ox={};var kx=function(e,t){var n=gy(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return L(t,e),t}(hy)};function Rx(e,t){Ox[e]=t}function Nx(e,t,n,r){var i=function(e,t){return new hy(gy(e,t))}(e,t);return n&&("center"===r&&(n=Bx(n,i.getBoundingRect())),jx(i,n)),i}function Lx(e,t,n){var r=new km({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(Bx(t,i))}}});return r}function Bx(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var Px=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new Tm(t);return a.createPathProxy(),a.buildPath=function(e){if(fy(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function jx(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function Fx(e,t){return Nm(e,e,{lineWidth:t}),e}var Ux=Bm;function zx(e,t){for(var n=kc([]);e&&e!==t;)Rc(n,e.getLocalTransform(),n),e=e.parent;return n}function Hx(e,t,n){return t&&!lu(t)&&(t=Th.getLocalTransform(t)),n&&(t=Bc([],t)),tc([],e,t)}function Vx(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return o=Hx(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Wx(e){return!e.isGroup}function Yx(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){Wx(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(Wx(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),bx(e,r,n,rv(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=iu({},e.shape)),t}}function Gx(e,t){return cu(e,(function(e){var n=e[0];n=Ix(n,t.x),n=Dx(n,t.x+t.width);var r=e[1];return r=Ix(r,t.y),[n,r=Dx(r,t.y+t.height)]}))}function qx(e,t,n){var r=iu({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),ou(i,n),new km(r)):Nx(e.replace("path://",""),r,n,"center")}function Qx(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(Zx(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function Zx(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,p=s-o,h=Xx(d,p,u,c);if((l=h)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=Xx(f,g,u,c)/h;if(m<0||m>1)return!1;var v=Xx(f,g,d,p)/h;return!(v<0||v>1)}function Xx(e,t,n,r){return e*r-n*t}function $x(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=yu(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&uu(hu(l),(function(e){Vu(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=rv(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:ou({content:r,formatterParams:s},i)}}function Kx(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Jx(e,t){if(e)if(mu(e))for(var n=0;n<e.length;n++)Kx(e[n],t);else Kx(e,t)}Rx("circle",yy),Rx("ellipse",by),Rx("sector",Py),Rx("ring",Uy),Rx("polygon",Wy),Rx("polyline",qy),Rx("rect",Um),Rx("line",$y),Rx("bezierCurve",nx),Rx("arc",ox);var e_=Object.freeze({__proto__:null,updateProps:bx,initProps:Sx,removeElement:Tx,removeElementWithFadeOut:Ax,isElementRemoved:Cx,extendShape:function(e){return Tm.extend(e)},extendPath:function(e,t){return kx(e,t)},registerShape:Rx,getShapeClass:function(e){if(Ox.hasOwnProperty(e))return Ox[e]},makePath:Nx,makeImage:Lx,mergePath:Px,resizePath:jx,subPixelOptimizeLine:Fx,subPixelOptimizeRect:function(e){return Lm(e.shape,e.shape,e.style),e},subPixelOptimize:Ux,getTransform:zx,applyTransform:Hx,transformDirection:Vx,groupTransition:Yx,clipPointsByRect:Gx,clipRectByRect:function(e,t){var n=Ix(e.x,t.x),r=Dx(e.x+e.width,t.x+t.width),i=Ix(e.y,t.y),o=Dx(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:qx,linePolygonIntersect:Qx,lineLineIntersect:Zx,setTooltipConfig:$x,traverseElements:Jx,Group:Zh,Image:km,Text:nv,Circle:yy,Ellipse:by,Sector:Py,Ring:Uy,Polygon:Wy,Polyline:qy,Rect:Um,Line:$y,BezierCurve:nx,Arc:ox,IncrementalDisplayable:yx,CompoundPath:sx,LinearGradient:ux,RadialGradient:cx,BoundingRect:Qc,OrientedBoundingRect:mx,Point:jc,Path:Tm}),t_={};function n_(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=vu(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<lv.length;u++){var c=lv[u],d=t[c];l[c]=Eu(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function r_(e,t,n,r){n=n||t_;for(var i=e instanceof nv,o=!1,a=0;a<uv.length;a++){if((p=t[uv[a]])&&p.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new nv,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=n_(n,t),u=t.normal,c=!!u.getShallow("show"),d=o_(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(a_(u,n,!1));for(a=0;a<lv.length;a++){var p,h=lv[a];if(p=t[h]){var f=s.ensureState(h),g=!!Eu(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=o_(p,r&&r[h],n,!0,!i),f.style.text=l[h],!i)e.ensureState(h).textConfig=a_(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(d_(s).setLabelText=function(e){var r=n_(n,t,e);!function(e,t){for(var n=0;n<lv.length;n++){var r=lv[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function i_(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<lv.length;r++){var i=lv[r];n[i]=e.getModel([i,t])}return n}function o_(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||t_;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||t_).rich;if(n){t=t||{};for(var r=hu(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);c_(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p);c_(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&iu(o,t),o}function a_(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=Eu(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var s_=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],l_=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],u_=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function c_(e,t,n,r,i,o,a,s){n=!i&&n||t_;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Eu(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=Eu(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=Eu(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=Eu(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<s_.length;g++){var m=s_[g];null!=(y=Eu(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<l_.length;g++){m=l_[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<u_.length;g++){var y;m=u_[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var d_=Nf();var p_,h_,f_=["textStyle","color"],g_=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],m_=new nv,v_=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(f_):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Ru([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<g_.length;n++)t[g_[n]]=this.getShallow(g_[n]);return m_.useStyle(t),m_.update(),m_.getBoundingRect()},e}(),y_=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],x_=$f(y_),__=function(){function e(){}return e.prototype.getLineStyle=function(e){return x_(this,e)},e}(),b_=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],w_=$f(b_),S_=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return w_(this,e,t)},e}(),C_=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){ru(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(nu(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Ll.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Yf(C_),p_=C_,h_=["__\0is_clz",qf++].join("_"),p_.prototype[h_]=!0,p_.isInstance=function(e){return!(!e||!e[h_])},su(C_,__),su(C_,S_),su(C_,Jf),su(C_,v_);var T_=C_,M_=Math.round(10*Math.random());function A_(e){return[e||"",M_++].join("_")}function E_(e,t){return ru(ru({},e,!0),t,!0)}var I_="ZH",D_="EN",O_=D_,k_={},R_={},N_=Ll.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(I_)>-1?I_:O_;function L_(e,t){e=e.toUpperCase(),R_[e]=new T_(t),k_[e]=t}L_(D_,{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"}},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:". "}}}}),L_(I_,{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:"旭日图"}},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 B_=1e3,P_=6e4,j_=36e5,F_=864e5,U_=31536e6,z_={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},H_="{yyyy}-{MM}-{dd}",V_={year:"{yyyy}",month:"{yyyy}-{MM}",day:H_,hour:H_+" "+z_.hour,minute:H_+" "+z_.minute,second:H_+" "+z_.second,millisecond:z_.none},W_=["year","month","day","hour","minute","second","millisecond"],Y_=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function G_(e,t){return"0000".substr(0,t-(e+="").length)+e}function q_(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Q_(e){return e===q_(e)}function Z_(e,t,n,r){var i=pf(e),o=i[K_(n)](),a=i[J_(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[eb(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[tb(n)](),d=(c-1)%12+1,p=i[nb(n)](),h=i[rb(n)](),f=i[ib(n)](),g=r instanceof T_?r:function(e){return R_[e]}(r||N_)||R_[O_],m=g.getModel("time"),v=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,G_(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,G_(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,G_(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,G_(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,G_(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,G_(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,G_(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,G_(f,3)).replace(/{S}/g,f+"")}function X_(e,t){var n=pf(e),r=n[J_(t)]()+1,i=n[eb(t)](),o=n[tb(t)](),a=n[nb(t)](),s=n[rb(t)](),l=0===n[ib(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,p=d&&1===i;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function $_(e,t,n){var r=_u(e)?pf(e):e;switch(t=t||X_(e,n)){case"year":return r[K_(n)]();case"half-year":return r[J_(n)]()>=6?1:0;case"quarter":return Math.floor((r[J_(n)]()+1)/4);case"month":return r[J_(n)]();case"day":return r[eb(n)]();case"half-day":return r[tb(n)]()/24;case"hour":return r[tb(n)]();case"minute":return r[nb(n)]();case"second":return r[rb(n)]();case"millisecond":return r[ib(n)]()}}function K_(e){return e?"getUTCFullYear":"getFullYear"}function J_(e){return e?"getUTCMonth":"getMonth"}function eb(e){return e?"getUTCDate":"getDate"}function tb(e){return e?"getUTCHours":"getHours"}function nb(e){return e?"getUTCMinutes":"getMinutes"}function rb(e){return e?"getUTCSeconds":"getSeconds"}function ib(e){return e?"getUTCMilliseconds":"getMilliseconds"}function ob(e){return e?"setUTCFullYear":"setFullYear"}function ab(e){return e?"setUTCMonth":"setMonth"}function sb(e){return e?"setUTCDate":"setDate"}function lb(e){return e?"setUTCHours":"setHours"}function ub(e){return e?"setUTCMinutes":"setMinutes"}function cb(e){return e?"setUTCSeconds":"setSeconds"}function db(e){return e?"setUTCMilliseconds":"setMilliseconds"}function pb(e){if(isNaN(gf(e)))return yu(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function hb(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var fb=Ou;function gb(e,t,n){function r(e){return e&&Ru(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?pf(e):e;if(!isNaN(+s))return Z_(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return xu(e)?r(e):_u(e)&&i(e)?e+"":"-";var l=gf(e);return i(l)?pb(l):xu(e)?r(e):"boolean"==typeof e?e+"":"-"}var mb=["a","b","c","d","e","f","g"],vb=function(e,t){return"{"+e+(null==t?"":t)+"}"};function yb(e,t,n){mu(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=mb[o];e=e.replace(vb(a),vb(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(vb(mb[l],s),n?yc(u):u)}return e}function xb(e,t){return t=t||"transparent",yu(e)?e:bu(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function _b(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var bb=uu,wb=["left","right","top","bottom","width","height"],Sb=[["width","left","right"],["height","top","bottom"]];function Cb(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var Tb=Cb;function Mb(e,t,n){n=fb(n||0);var r=t.width,i=t.height,o=nf(e.left,r),a=nf(e.top,i),s=nf(e.right,r),l=nf(e.bottom,i),u=nf(e.width,r),c=nf(e.height,i),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-o),isNaN(c)&&(c=i-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=r-s-u-p),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-p-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new Qc(o+n[3],a+n[0],u,c);return f.margin=n,f}function Ab(e){var t=e.layoutMode||e.constructor.layoutMode;return bu(t)?t:t?{type:t}:null}function Eb(e,t,n){var r=n&&n.ignoreSize;!mu(r)&&(r=[r,r]);var i=a(Sb[0],0),o=a(Sb[1],1);function a(n,i){var o={},a=0,u={},c=0;if(bb(n,(function(t){u[t]=e[t]})),bb(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var p=n[d];if(!s(o,p)&&s(e,p)){o[p]=e[p];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){bb(e,(function(e){t[e]=n[e]}))}u(Sb[0],e,i),u(Sb[1],e,o)}function Ib(e){return function(e,t){return t&&e&&bb(wb,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}gu(Cb,"vertical"),gu(Cb,"horizontal");var Db=Nf(),Ob=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=A_("ec_cpt_model"),i}return L(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ab(this),r=n?Ib(e):{};ru(e,t.getTheme().get(this.mainType)),ru(e,this.getDefaultOption()),n&&Eb(e,r,n)},t.prototype.mergeOption=function(e,t){ru(this.option,e,!0);var n=Ab(this);n&&Eb(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Vf])}(e))return e.defaultOption;var t=Db(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=ru(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Uf(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(T_);Gf(Ob,T_),Xf(Ob),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Wf(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=Wf(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(Ob),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return uu(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return uu(e,(function(e){au(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),uu(s,(function(e){au(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);au(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(uu(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),uu(d.successor,p?f:h)}uu(u,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}(Ob,(function(e){var t=[];uu(Ob.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=cu(t,(function(e){return Wf(e).main})),"dataset"!==e&&au(t,"dataset")<=0&&t.unshift("dataset");return t}));var kb=Ob,Rb="";"undefined"!=typeof navigator&&(Rb=navigator.platform||"");var Nb="rgba(0, 0, 0, 0.2)",Lb={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Nb,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Nb,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Nb,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Nb,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Nb,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Nb,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Rb.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},Bb=Uu(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Pb="original",jb="arrayRows",Fb="objectRows",Ub="keyedColumns",zb="typedArray",Hb="unknown",Vb="column",Wb="row",Yb=1,Gb=2,qb=3,Qb=Nf();function Zb(e,t,n){var r={},i=Xb(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=Qb(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;uu(e=e.slice(),(function(t,n){var i=bu(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return uu(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=p.valueWayDim;h(r[n],a,i),h(l,a,i),p.valueWayDim+=i}else if(o===t)h(r[n],0,i),h(s,0,i);else{a=p.categoryWayDim;h(r[n],a,i),h(l,a,i),p.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function Xb(e){if(!e.get("data",!0))return Uf(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},jf).models[0]}function $b(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Su(e))return qb;if(r){var c=r[o];bu(c)?(s=c.name,l=c.type):yu(c)&&(s=c)}if(null!=l)return"ordinal"===l?Yb:qb;if(t===jb){var d=e;if(n===Wb){for(var p=d[o],h=0;h<(p||[]).length&&h<u;h++)if(null!=(a=x(p[i+h])))return a}else for(h=0;h<d.length&&h<u;h++){var f=d[i+h];if(f&&null!=(a=x(f[o])))return a}}else if(t===Fb){var g=e;if(!s)return qb;for(h=0;h<g.length&&h<u;h++){if((v=g[h])&&null!=(a=x(v[s])))return a}}else if(t===Ub){if(!s)return qb;if(!(p=e[s])||Su(p))return qb;for(h=0;h<p.length&&h<u;h++)if(null!=(a=x(p[h])))return a}else if(t===Pb){var m=e;for(h=0;h<m.length&&h<u;h++){var v,y=Tf(v=m[h]);if(!mu(y))return qb;if(null!=(a=x(y[o])))return a}}function x(e){var t=yu(e);return null!=e&&isFinite(e)&&""!==e?t?Gb:qb:t&&"-"!==e?Yb:void 0}return qb}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var Kb=Uu();var Jb=Nf();Nf();var ew,tw,nw,rw=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=wf(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,Jb,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,Jb)},e}();var iw="\0_ec_inner",ow=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new T_(r),this._locale=new T_(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=lw(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,lw(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):nw(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&uu(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Uu(),s=t&&t.replaceMergeMainTypeMap;Qb(this).datasetMap=Uu(),uu(e,(function(e,t){null!=e&&(kb.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?nu(e):ru(n[t],e,!0))})),s&&s.each((function(e,t){kb.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),kb.topologicalTravel(o,kb.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=Kb.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,wf(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=Af(a,o,l);(function(e,t,n){uu(e,(function(e){var r=e.newOption;bu(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,kb),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],p=[],h=0;uu(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=kb.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=iu({componentIndex:n},e.keyInfo);iu(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))}),this),n[t]=d,r.set(t,p),i.set(t,h),"series"===t&&ew(this)}),this),this._seriesIndices||ew(this)},t.prototype.getOption=function(){var e=nu(this.option);return uu(e,(function(t,n){if(kb.hasClass(n)){for(var r=wf(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!kf(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[iw],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],uu(wf(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?aw("id",i,a):null!=o?aw("name",o,a):pu(a,(function(e){return!!e})),sw(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]}),u=l?this.queryComponents(l):pu(this._componentsMap.get(s),(function(e){return!!e}));return o=sw(u,e),e.filter?pu(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(vu(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=yu(e)?r.get(e):bu(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=Df(e,null);return pu(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return pu(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return pu(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){tw(this),uu(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){uu(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){tw(this),uu(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return uu(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return tw(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){tw(this);var n=[];uu(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Uu(n)},t.prototype.restoreData=function(e){ew(this);var t=this._componentsMap,n=[];t.each((function(e,t){kb.hasClass(t)&&n.push(t)})),kb.topologicalTravel(n,kb.getAllClassMainTypes(),(function(n){uu(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()}))}))},t.internalField=(ew=function(e){var t=e._seriesIndices=[];uu(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Uu(t)},tw=function(e){},void(nw=function(e,t){e.option={},e.option[iw]=1,e._componentsMap=Uu({series:[]}),e._componentsCount=Uu();var n=t.aria;bu(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;uu(t,(function(t,r){"colorLayer"===r&&n||kb.hasClass(r)||("object"==typeof t?e[r]=e[r]?ru(e[r],t,!1):nu(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),ru(t,Lb,!1),e._mergeOption(t,null)})),t}(T_);function aw(e,t,n){if(mu(t)){var r=Uu();return uu(t,(function(e){null!=e&&(null!=Df(e,null)&&r.set(e,!0))})),pu(n,(function(t){return t&&r.get(t[e])}))}var i=Df(t,null);return pu(n,(function(t){return t&&null!=i&&t[e]===i}))}function sw(e,t){return t.hasOwnProperty("subType")?pu(e,(function(e){return e&&e.subType===t.subType})):e}function lw(e){var t=Uu();return e&&uu(wf(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}su(ow,rw);var uw=ow,cw=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],dw=function(e){uu(cw,(function(t){this[t]=fu(e[t],e)}),this)},pw={},hw=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];uu(pw,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){uu(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){pw[e]=t},e.get=function(e){return pw[e]},e}(),fw=/^(min|max)?(.+)$/,gw=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(uu(wf(e.series),(function(e){e&&e.data&&Su(e.data)&&Lu(e.data)})),uu(wf(e.dataset),(function(e){e&&e.source&&Su(e.source)&&Lu(e.source)}))),e=nu(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&mu(u)&&uu(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function p(e){uu(t,(function(t){t(e,n)}))}return p(i),uu(l,(function(e){return p(e)})),uu(o,(function(e){return p(e.option)})),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],nu(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=nu(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)mw(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=cu(s,(function(e){return nu(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function mw(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return uu(e,(function(e,t){var n=t.match(fw);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var vw=gw,yw=uu,xw=bu,_w=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function bw(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=_w.length;n<r;n++){var i=_w[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?ru(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?ru(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function ww(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,ou(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function Sw(e){ww(e,"itemStyle"),ww(e,"lineStyle"),ww(e,"areaStyle"),ww(e,"label"),ww(e,"labelLine"),ww(e,"upperLabel"),ww(e,"edgeLabel")}function Cw(e,t){var n=xw(e)&&e[t],r=xw(n)&&n.textStyle;if(r)for(var i=0,o=Cf.length;i<o;i++){var a=Cf[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function Tw(e){e&&(Sw(e),Cw(e,"label"),e.emphasis&&Cw(e.emphasis,"label"))}function Mw(e){return mu(e)?e:e?[e]:[]}function Aw(e){return(mu(e)?e[0]:e)||{}}function Ew(e,t){yw(Mw(e.series),(function(e){xw(e)&&function(e){if(xw(e)){bw(e),Sw(e),Cw(e,"label"),Cw(e,"upperLabel"),Cw(e,"edgeLabel"),e.emphasis&&(Cw(e.emphasis,"label"),Cw(e.emphasis,"upperLabel"),Cw(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(bw(t),Tw(t));var n=e.markLine;n&&(bw(n),Tw(n));var r=e.markArea;r&&Tw(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Su(o))for(var a=0;a<o.length;a++)Tw(o[a]);uu(e.categories,(function(e){Sw(e)}))}if(i&&!Su(i))for(a=0;a<i.length;a++)Tw(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)Tw(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)mu(l[a])?(Tw(l[a][0]),Tw(l[a][1])):Tw(l[a])}"gauge"===e.type?(Cw(e,"axisLabel"),Cw(e,"title"),Cw(e,"detail")):"treemap"===e.type?(ww(e.breadcrumb,"itemStyle"),uu(e.levels,(function(e){Sw(e)}))):"tree"===e.type&&Sw(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),yw(n,(function(t){yw(Mw(e[t]),(function(e){e&&(Cw(e,"axisLabel"),Cw(e.axisPointer,"label"))}))})),yw(Mw(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Cw(t,"axisLabel"),Cw(t&&t.axisPointer,"label")})),yw(Mw(e.calendar),(function(e){ww(e,"itemStyle"),Cw(e,"dayLabel"),Cw(e,"monthLabel"),Cw(e,"yearLabel")})),yw(Mw(e.radar),(function(e){Cw(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),yw(Mw(e.geo),(function(e){xw(e)&&(Tw(e),yw(Mw(e.regions),(function(e){Tw(e)})))})),yw(Mw(e.timeline),(function(e){Tw(e),ww(e,"label"),ww(e,"itemStyle"),ww(e,"controlStyle",!0);var t=e.data;mu(t)&&uu(t,(function(e){bu(e)&&(ww(e,"label"),ww(e,"itemStyle"))}))})),yw(Mw(e.toolbox),(function(e){ww(e,"iconStyle"),yw(e.feature,(function(e){ww(e,"iconStyle")}))})),Cw(Aw(e.axisPointer),"label"),Cw(Aw(e.tooltip).axisPointer,"label")}function Iw(e){e&&uu(Dw,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Dw=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ow=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],kw=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Rw(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<kw.length;n++){var r=kw[n][1],i=kw[n][0];null!=t[r]&&(t[i]=t[r])}}function Nw(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function Lw(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function Bw(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&Bw(e[n].children,t)}function Pw(e,t){Ew(e,t),e.series=wf(e.series),uu(e.series,(function(e){if(bu(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),Nw(e.label),(i=e.data)&&!Su(i))for(var n=0;n<i.length;n++)Nw(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(Rw(e),Rw(e.backgroundStyle),Rw(e.emphasis),(i=e.data)&&!Su(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(Rw(i[n]),Rw(i[n]&&i[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),Lw(e),Bw(e.data,Lw)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&ou(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),Iw(e)}})),e.dataRange&&(e.visualMap=e.dataRange),uu(Ow,(function(t){var n=e[t];n&&(mu(n)||(n=[n]),uu(n,(function(e){Iw(e)})))}))}function jw(e){uu(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return i;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var v=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=lf(h,v),f=v;break}}}return r[0]=h,r[1]=f,r}))}))}var Fw,Uw,zw,Hw,Vw,Ww=function(e){this.data=e.data||(e.sourceFormat===Ub?{}:[]),this.sourceFormat=e.sourceFormat||Hb,this.seriesLayoutBy=e.seriesLayoutBy||Vb,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&$b(this,n)===Yb&&(r.type="ordinal")}};function Yw(e){return e instanceof Ww}function Gw(e,t,n){n=n||Zw(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:Xw(i),startIndex:a,dimensionsDetectedCount:o};if(t===jb){var s=e;"auto"===r||null==r?$w((function(e){null!=e&&"-"!==e&&(yu(e)?null==a&&(a=1):a=0)}),n,s,10):a=_u(r)?r:r?1:0,i||1!==a||(i=[],$w((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===Wb?s.length:s[0]?s[0].length:null}else if(t===Fb)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return hu(t)}(e));else if(t===Ub)i||(i=[],uu(e,(function(e,t){i.push(t)})));else if(t===Pb){var l=Tf(e[0]);o=mu(l)&&l.length||1}return{startIndex:a,dimensionsDefine:Xw(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new Ww({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:nu(t)})}function qw(e){return new Ww({data:e,sourceFormat:Su(e)?zb:Pb})}function Qw(e){return new Ww({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:nu(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Zw(e){var t=Hb;if(Su(e))t=zb;else if(mu(e)){0===e.length&&(t=jb);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(mu(i)){t=jb;break}if(bu(i)){t=Fb;break}}}}else if(bu(e))for(var o in e)if(Vu(e,o)&&lu(e[o])){t=Ub;break}return t}function Xw(e){if(e){var t=Uu();return cu(e,(function(e,n){var r={name:(e=bu(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r}))}}function $w(e,t,n,r){if(t===Wb)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function Kw(e){var t=e.sourceFormat;return t===Fb||t===Ub}var Jw=function(){function e(e,t){var n=Yw(e)?e:qw(e);this._source=n;var r=this._data=n.data;n.sourceFormat===zb&&(this._offset=0,this._dimSize=t,this._data=r),Vw(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Vw=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(iu(e,Hw[uS(a,s)]),a===zb)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=nS(a,s);e.getItem=fu(c,null,i,l,u);var d=oS(a,s);e.count=fu(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=i[p*o+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[jb+"_"+Vb]={pure:!0,appendData:i},e[jb+"_"+Wb]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Fb]={pure:!0,appendData:i},e[Ub]={pure:!0,appendData:function(e){var t=this._data;uu(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[Pb]={appendData:i},e[zb]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},Hw=e}(),e}(),eS=function(e,t,n,r){return e[r]},tS=((Fw={})[jb+"_"+Vb]=function(e,t,n,r){return e[r+t]},Fw[jb+"_"+Wb]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},Fw[Fb]=eS,Fw[Ub]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},Fw[Pb]=eS,Fw);function nS(e,t){return tS[uS(e,t)]}var rS=function(e,t,n){return e.length},iS=((Uw={})[jb+"_"+Vb]=function(e,t,n){return Math.max(0,e.length-t)},Uw[jb+"_"+Wb]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Uw[Fb]=rS,Uw[Ub]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},Uw[Pb]=rS,Uw);function oS(e,t){return iS[uS(e,t)]}var aS=function(e,t,n){return e[t]},sS=((zw={})[jb]=aS,zw[Fb]=function(e,t,n){return e[n]},zw[Ub]=aS,zw[Pb]=function(e,t,n){var r=Tf(e);return r instanceof Array?r[t]:r},zw[zb]=aS,zw);function lS(e){return sS[e]}function uS(e,t){return e===jb?e+"_"+t:e}function cS(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return lS(o)(r,a,s)}var l=r;return o===Pb&&(l=Tf(r)),l}}}var dS=/\{@(.+?)\}/g,pS=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=r&&mu(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return vu(i)?(s.status=t,s.dimensionIndex=r,i(s)):yu(i)?yb(i,s).replace(dS,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=cS(a,e,i);if(o&&mu(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return cS(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function hS(e){var t,n;return bu(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function fS(e){return new gS(e)}var gS=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||p<h)){var f=this._progress;if(mu(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){mS.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:mS.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),mu(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),mS=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function vS(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||_u(e)||null==e||"-"===e||(e=+pf(e)),null==e||""===e?NaN:+e)}Uu({number:function(e){return parseFloat(e)},time:function(e){return+pf(e)},trim:function(e){return yu(e)?Ru(e):e}});var yS=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=_u(e)?e:gf(e),r=_u(t)?t:gf(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=yu(e),s=yu(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),xS=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return vS(e,t)},e}();function _S(e){if(!MS(e.sourceFormat)){xf("")}return e.data}function bS(e){var t=e.sourceFormat,n=e.data;if(!MS(t)){xf("")}if(t===jb){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===Fb){for(r=[],i=0,o=n.length;i<o;i++)r.push(iu({},n[i]));return r}}function wS(e,t,n){if(null!=n)return _u(n)||!isNaN(n)&&!Vu(t,n)?e[n]:Vu(t,n)?t[n]:void 0}function SS(e){return nu(e)}var CS=Uu();function TS(e,t,n,r){t.length||xf(""),bu(e)||xf("");var i=e.type,o=CS.get(i);o||xf("");var a=cu(t,(function(e){return function(e,t){var n=new xS,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==Vb&&xf("");var a=[],s={},l=e.dimensionsDefine;if(l)uu(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(Vu(s,n)&&xf(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=nS(i,Vb);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=fu(_S,null,e)),n.cloneRawData=fu(bS,null,e);var d=oS(i,Vb);n.count=fu(d,null,r,o,a);var p=lS(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=fu(wS,null,a,s),n.cloneAllDimensionInfo=fu(SS,null,a),n}(e,o)}));return cu(wf(o.transform({upstream:a[0],upstreamList:a,config:nu(e.config)})),(function(e,n){var r;bu(e)||xf(""),e.data||xf(""),MS(Zw(e.data))||xf("");var i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:Vb,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:Vb,sourceHeader:0,dimensions:e.dimensions};return Gw(e.data,r,null)}))}function MS(e){return e===jb||e===Fb}var AS,ES="undefined",IS=typeof Uint32Array===ES?Array:Uint32Array,DS=typeof Uint16Array===ES?Array:Uint16Array,OS=typeof Int32Array===ES?Array:Int32Array,kS=typeof Float64Array===ES?Array:Float64Array,RS={float:kS,int:OS,ordinal:Array,number:Array,time:kS};function NS(e){return e>65535?IS:DS}function LS(e,t,n,r,i){var o=RS[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var BS=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Uu()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=AS[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Kw(r),this._dimensions=cu(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new RS[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){LS(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<i;p++){var h=r[p],f=AS.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=cu(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),LS(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=i[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=NS(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(NS(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)o[h]=u[e[h]][p];o[h]=c,d=t.apply(null,o)}d&&(i[s++]=p)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=hu(e),i=r.length;if(!i)return this;var o=t.count(),a=new(NS(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=h),h++}p=!0}else if(2===i){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===i)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[r[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,S=(b=t.getRawIndex(g),0);S<i;S++){var C=r[S];((x=d[C][b])<e[C][0]||x>e[C][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=[1/0,-1/0];for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<o;p++)s[p]=r[t[p]][d];s[o]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!=typeof h&&(i[0]=h,h=i);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(NS(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,v=h;v<f;v++){var y=a[T=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-h;var x=p,_=Math.min(p+u,s),b=p-1,w=a[c];n=-1,i=x;var S=-1,C=0;for(v=x;v<_;v++){var T;y=a[T=this.getRawIndex(v)];isNaN(y)?(C++,S<0&&(S=T)):(r=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=r,i=T)}C>0&&C<_-x&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(NS(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=v}return i._count=p,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r,i,o=new e,a=this._chunks,s=t&&du(t,(function(e,t){return e[t]=!0,e}),{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=a[l],i=void 0,(i=r.constructor)===Array?r.slice():new i(r)):a[l];else o._chunks=a;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=nu(this._extent),e._rawExtent=nu(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return vS(e[r],this._dimensions[r])}AS={arrayRows:e,objectRows:function(e,t,n,r){return vS(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return vS(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),PS=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(jS(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Su(a=o.get("data",!0))?zb:Pb,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=Eu(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=Eu(c.sourceHeader,d.sourceHeader),f=Eu(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[Gw(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[Gw(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&FS("")}var o=[],a=[];return uu(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||FS(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=wf(e),r=n.length;r||xf("");for(var i=0,o=r;i<o;i++)t=TS(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[Qw(o[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];jS(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new BS).initData(new Jw(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(jS(e)){var t=Xb(e);return t?[t.getSourceManager()]:[]}return cu(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Uf(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},jf).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(jS(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function jS(e){return"series"===e.mainType}function FS(e){throw new Error(e)}var US="line-height:1";function zS(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+yc(r+"")+"px;color:"+yc(n)+";font-weight:"+yc(i+""),valueStyle:"font-size:"+yc(a+"")+"px;color:"+yc(o)+";font-weight:"+yc(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var HS=[0,10,20,30],VS=["","\n","\n\n","\n\n\n"];function WS(e,t){return t.type=e,t}function YS(e){return"section"===e.type}function GS(e){return YS(e)?QS:ZS}function qS(e){if(YS(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return uu(e.blocks,(function(e){var n=qS(e);n>=t&&(t=n+ +(r&&(!n||YS(e)&&!e.noHeader)))})),t}return 0}function QS(e,t,n,r){var i,o=t.noHeader,a=(i=qS(t),{html:HS[i],richText:VS[i]}),s=[],l=t.blocks||[];ku(!l||mu(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Vu(c,u)){var d=new yS(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}uu(l,(function(n,i){var o=t.valueFormatter,l=GS(n)(o?iu(iu({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var p="richText"===e.renderMode?s.join(a.richText):$S(s.join(""),o?n:a.html);if(o)return p;var h=gb(t.header,"ordinal",e.useUTC),f=zS(r,e.renderMode).nameStyle;return"richText"===e.renderMode?KS(e,h,f)+a.richText+p:$S('<div style="'+f+";"+US+';">'+yc(h)+"</div>"+p,n)}function ZS(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return cu(e=mu(e)?e:[e],(function(e,t){return gb(e,mu(h)?h[t]:h,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=o?"":gb(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value),g=!s||!o,m=!s&&o,v=zS(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":KS(e,p,y))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(mu(t)?t.join(" "):t,o)}(e,f,g,m,x)):$S((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+yc(e)+"</span>"}(p,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=mu(e)?e:[e],'<span style="'+o+";"+r+'">'+cu(e,(function(e){return yc(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function XS(e,t,n,r,i,o){if(e)return GS(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function $S(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+US+';">'+e+'<div style="clear:both"></div></div>'}function KS(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function JS(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var eC=function(){function e(){this.richTextStyles={},this._nextStyleNameId=mf()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=yu(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+yc(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+yc(r)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return yu(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};mu(t)?uu(t,(function(e){return iu(n,e)})):iu(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function tC(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),p=mu(d),h=function(e,t){return xb(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||p&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=du(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(WS("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?uu(r,(function(e){c(cS(o,n,e),e)})):uu(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=cS(l,a,u[0]),n=g.type}else i=t=p?d[0]:d;var m=Of(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return WS("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[WS("nameValue",{markerType:"item",markerColor:h,name:x,noName:!Ru(x),value:t,valueType:n})].concat(r||[])})}var nC=Nf();function rC(e,t){return e.getName(t)||e.getId(t)}var iC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return L(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=fS({count:aC,reset:sC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(nC(this).sourceManager=new PS(this)).prepareSource();var r=this.getInitialData(e,n);uC(r,this),this.dataTask.context.data=r,nC(this).dataBeforeProcessed=r,oC(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ab(this),r=n?Ib(e):{},i=this.subType;kb.hasClass(i)&&(i+="Series"),ru(e,t.getTheme().get(this.subType)),ru(e,this.getDefaultOption()),Sf(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Eb(e,r,n)},t.prototype.mergeOption=function(e,t){e=ru(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Ab(this);n&&Eb(this.option,e,n);var r=nC(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);uC(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,nC(this).dataBeforeProcessed=i,oC(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Su(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Sf(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=dC(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return nC(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=dC(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}nC(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Uu(e)},t.prototype.getSourceManager=function(){return nC(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return nC(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return tC({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ll.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=rw.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=rC(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=hu(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[rC(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){bu(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=rC(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=rC(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return kb.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(kb);function oC(e){var t=e.name;Of(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return uu(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function aC(e){return e.model.getRawData().count()}function sC(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),lC}function lC(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function uC(e,t){uu(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,gu(cC,t))}))}function cC(e,t){var n=dC(e);return n&&n.setOutputEnd((t||this).count()),t}function dC(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}su(iC,pS),su(iC,rw),Gf(iC,kb);var pC=iC,hC=function(){function e(){this.group=new Zh,this.uid=A_("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Yf(hC),Xf(hC);var fC=hC;function gC(){var e=Nf();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var mC=Nf(),vC=gC(),yC=function(){function e(){this.group=new Zh,this.uid=A_("viewChart"),this.renderTask=fS({plan:bC,reset:wC}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&_C(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&_C(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Jx(this.group,e)},e.markUpdateMethod=function(e,t){mC(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function xC(e,t,n){e&&Xv(e)&&("emphasis"===t?kv:Rv)(e,n)}function _C(e,t,n){var r=Rf(e,t),i=t&&null!=t.highlightKey?function(e){var t=ov[e];return null==t&&iv<=32&&(t=ov[e]=iv++),t}(t.highlightKey):null;null!=r?uu(wf(r),(function(t){xC(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){xC(e,n,i)}))}function bC(e){return vC(e.model)}function wC(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&mC(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),SC[l]}Yf(yC),Xf(yC);var SC={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},CC=yC,TC="\0__throttleOriginMethod",MC="\0__throttleRate",AC="\0__throttleType";function EC(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),o=this,a=e;var h=s||t,f=s||n;s=null,i=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):i>=0?d():c=setTimeout(d,-i),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function IC(e,t,n,r){var i=e[t];if(i){var o=i[TC]||i,a=i[AC];if(i[MC]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=EC(o,n,"debounce"===r))[TC]=o,i[AC]=r,i[MC]=n}return i}}function DC(e,t){var n=e[t];n&&n[TC]&&(n.clear&&n.clear(),e[t]=n[TC])}var OC=Nf(),kC={itemStyle:$f(b_,!0),lineStyle:$f(y_,!0)},RC={lineStyle:"stroke",itemStyle:"fill"};function NC(e,t){var n=e.visualStyleMapper||kC[t];return n||(console.warn("Unknown style type '"+t+"'."),kC.itemStyle)}function LC(e,t){var n=e.visualDrawType||RC[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var BC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=NC(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=LC(e,r),l=o[s],u=vu(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||vu(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||vu(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=iu({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},PC=new T_,jC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=NC(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){PC.option=n[r];var a=i(PC);iu(e.ensureUniqueItemVisual(t,"style"),a),PC.option.decal&&(e.setItemVisual(t,"decal",PC.option.decal),PC.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},FC={performRawSeries:!0,overallReset:function(e){var t=Uu();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),OC(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=OC(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=LC(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}}))}}))}},UC=Math.PI;var zC=function(){function e(e,t,n,r){this._stageTaskMap=Uu(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Uu();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;uu(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});ku(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}uu(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);p.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.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)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Uu(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||fS({plan:GC,reset:qC,count:XC}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||fS({reset:HC});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Uu(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,fS({reset:VC,onDirty:YC})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}ku(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,uu(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return vu(e)&&(e={overallReset:e,seriesType:$C(e)}),e.uid=A_("stageHandler"),t&&(e.visualType=t),e},e}();function HC(e){e.overallReset(e.ecModel,e.api,e.payload)}function VC(e){return e.overallProgress&&WC}function WC(){this.agent.dirty(),this.getDownstream().dirty()}function YC(){this.agent&&this.agent.dirty()}function GC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function qC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=wf(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?cu(t,(function(e,t){return ZC(t)})):QC}var QC=ZC(0);function ZC(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function XC(e){return e.data.count()}function $C(e){KC=null;try{e(JC,eT)}catch(e){}return KC}var KC,JC={},eT={};function tT(e,t){for(var n in t.prototype)e[n]=Wu}tT(JC,uw),tT(eT,dw),JC.eachSeriesByType=JC.eachRawSeriesByType=function(e){KC=e},JC.eachComponent=function(e){"series"===e.mainType&&e.subType&&(KC=e.subType)};var nT=zC,rT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],iT={color:rT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],rT]},oT="#B9B8CE",aT="#100C2A",sT=function(){return{axisLine:{lineStyle:{color:oT}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},lT=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],uT={darkMode:!0,color:lT,backgroundColor:aT,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:oT}},textStyle:{color:oT},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:oT}},dataZoom:{borderColor:"#71708A",textStyle:{color:oT},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:oT}},timeline:{lineStyle:{color:oT},label:{color:oT},controlStyle:{color:oT,borderColor:oT}},calendar:{itemStyle:{color:aT},dayLabel:{color:oT},monthLabel:{color:oT},yearLabel:{color:oT}},timeAxis:sT(),logAxis:sT(),valueAxis:sT(),categoryAxis:sT(),line:{symbol:"circle"},graph:{color:lT},gauge:{title:{color:oT},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:oT},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};uT.categoryAxis.splitLine.show=!1;var cT=uT,dT=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(yu(e)){var i=Wf(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};uu(e,(function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),pT=["symbol","symbolSize","symbolRotate","symbolOffset"],hT=pT.concat(["symbolKeepAspect"]),fT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<pT.length;a++){var s=pT[a],l=e.get(s);vu(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(iu({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=hu(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}},gT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<hT.length;r++){var i=hT[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function mT(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function vT(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=Rf(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:mu(u)?l.getName(u[0]):l.getName(u),selected:yu(r)?r:iu({},r)})}}))}function yT(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var xT=Math.round(9*Math.random()),_T="function"==typeof Object.defineProperty,bT=function(){function e(){this._id="__ec_inner_"+xT++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return _T?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),wT=bT,ST=Tm.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),CT=Tm.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),TT=Tm.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),MT=Tm.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),AT={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},ET={};uu({line:$y,rect:Um,roundRect:Um,square:Um,circle:yy,diamond:CT,pin:TT,arrow:MT,triangle:ST},(function(e,t){ET[t]=new e}));var IT=Tm.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Bh(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=ET[r];i||(i=ET[r="rect"]),AT[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function DT(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function OT(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?Lx(e.slice(8),new Qc(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?Nx(e.slice(7),{},new Qc(t,n,r,i),a?"center":"cover"):new IT({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=DT,o&&s.setColor(o),s}function kT(e,t){if(null!=e)return mu(e)||(e=[e,e]),[nf(e[0],t[0])||0,nf(Eu(e[1],e[0]),t[1])||0]}function RT(e){return isFinite(e)}function NT(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=RT(a)?a:.5,s=RT(s)?s:.5,l=l>=0&&RT(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=RT(r)?r:0,i=RT(i)?i:1,o=RT(o)?o:0,a=RT(a)?a:0,e.createLinearGradient(r,o,i,a)}(e,t,n),i=t.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function LT(e){return parseInt(e,10)}function BT(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||LT(s[r])||LT(e.style[r]))-(LT(s[o])||0)-(LT(s[a])||0)|0}function PT(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:_u(t)?[t]:mu(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=cu(i,(function(e){return e/a})),o/=a)}return[i,o]}var jT=new im(!0);function FT(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function UT(e){return"string"==typeof e&&"none"!==e}function zT(e){var t=e.fill;return null!=t&&"none"!==t}function HT(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function VT(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function WT(e,t,n){var r=ng(t.image,t.__image,n);if(ig(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*Yu),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var YT=["shadowBlur","shadowOffsetX","shadowOffsetY"],GT=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qT(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){XT(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?yg.opacity:a}(r||t.blend!==n.blend)&&(o||(XT(e,i),o=!0),e.globalCompositeOperation=t.blend||yg.blend);for(var s=0;s<YT.length;s++){var l=YT[s];(r||t[l]!==n[l])&&(o||(XT(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(XT(e,i),o=!0),e.shadowColor=t.shadowColor||yg.shadowColor),o}function QT(e,t,n,r,i){var o=$T(t,i.inHover),a=r?null:n&&$T(n,i.inHover)||{};if(o===a)return!1;var s=qT(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(XT(e,i),s=!0),UT(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(XT(e,i),s=!0),UT(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(XT(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(XT(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<GT.length;u++){var c=GT[u],d=c[0];(r||o[d]!==a[d])&&(s||(XT(e,i),s=!0),e[d]=o[d]||c[1])}return s}function ZT(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function XT(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function $T(e,t){return t&&e.__hoverStyle||e.style}function KT(e,t){JT(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function JT(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(XT(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(XT(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),ZT(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,p=t instanceof Tm&&t.autoBatch&&function(e){var t=zT(e),n=FT(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(XT(e,n),ZT(e,t)):p||XT(e,n);var h=$T(t,n.inHover);t instanceof Tm?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),QT(e,t,u,l,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=FT(n),a=zT(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||jT,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=o&&!!h.colorStops,m=a&&!!p.image,v=o&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?NT(e,p,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?NT(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?WT(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?WT(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var S,C,T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=PT(t))[0],C=i[1]);var M=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),M=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),M&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=C),r||(n.strokeFirst?(o&&VT(e,n),a&&HT(e,n)):(a&&HT(e,n),o&&VT(e,n))),S&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof Em?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),QT(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||Pl,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=PT(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(FT(n)&&e.strokeText(i,n.x,n.y),zT(n)&&e.fillText(i,n.x,n.y)):(zT(n)&&e.fillText(i,n.x,n.y),FT(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,h)):t instanceof km?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){qT(e,$T(t,i.inHover),n&&$T(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=ng(n.image,t.__image,t,t.onload);if(r&&ig(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),JT(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),JT(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),p&&r&&XT(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var eM=new wT,tM=new Qd(100),nM=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function rM(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&eM.delete(e);var o=eM.get(e);if(o)return o;var a=ou(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<nM.length;++l){var u=a[nM[l]];if(null!=u&&!mu(u)&&!yu(u)&&!_u(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=tM.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,p=oM(a.dashArrayX),h=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(_u(e)){var t=Math.ceil(e);return[t,t]}var n=cu(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=iM(a.symbol),g=(_=p,cu(_,(function(e){return aM(e)}))),m=aM(h),v=!i&&zl.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=yf(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=yf(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<p[u].length;++t)w+=p[u][t];if(w<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),C=g+p[u][_]*S,T=o+h[s]*S,M=p[u][_]*a.symbolSize,A=h[s]*a.symbolSize,E=b/2%f[c].length;I(C,T,M,A,f[c][E])}g+=p[u][_],++b,++_===p[u].length&&(_=0)}++u===p.length&&(u=0)}o+=h[s],++l,++s===h.length&&(s=0)}function I(e,t,o,s,l){var u=i?1:n,c=OT(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var p=r.painter.renderOneToVNode(c);p&&y.children.push(p)}else KT(d,c)}})(),s&&tM.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,eM.set(e,s),e.dirty=!1,s}function iM(e){if(!e||0===e.length)return[["rect"]];if(yu(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!yu(e[n])){t=!1;break}if(t)return iM([e]);var r=[];for(n=0;n<e.length;++n)yu(e[n])?r.push([e[n]]):r.push(e[n]);return r}function oM(e){if(!e||0===e.length)return[[0,0]];if(_u(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!_u(e[n])){t=!1;break}if(t)return oM([e]);var r=[];for(n=0;n<e.length;++n)if(_u(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=cu(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function aM(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var sM=new lc,lM={};var uM=2e3,cM=4500,dM={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:uM,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:cM,ARIA:6e3,DECAL:7e3}},pM="__flagInMainProcess",hM="__pendingUpdate",fM="__needsUpdateStatus",gM=/^[a-zA-Z0-9_]+$/,mM="__connectUpdateStatus";function vM(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return xM(this,e,t);this.id}}function yM(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return xM(this,e,t)}}function xM(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),lc.prototype[t].apply(e,n)}var _M,bM,wM,SM,CM,TM,MM,AM,EM,IM,DM,OM,kM,RM,NM,LM,BM,PM,jM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t}(lc),FM=jM.prototype;FM.on=yM("on"),FM.off=yM("off");var UM=function(e){function t(t,n,r){var i=e.call(this,new dT)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},yu(n)&&(n=QM[n]),i._dom=t;var o=i._zr=Jh(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Eu(r.useDirtyRect,!1),useCoarsePointer:Eu(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=EC(fu(o.flush,o),17),(n=nu(n))&&Pw(n,!0),i._theme=n,i._locale=function(e){if(yu(e)){var t=k_[e.toUpperCase()]||{};return e===I_||e===D_?nu(t):ru(nu(t),nu(k_[O_]),!1)}return ru(nu(e),nu(k_[O_]),!1)}(r.locale||N_),i._coordSysMgr=new hw;var a=i._api=NM(i);function s(e,t){return e.__prio-t.__prio}return dd(qM,s),dd(YM,s),i._scheduler=new nT(i,a,YM,qM),i._messageCenter=new jM,i._initEvents(),i.resize=fu(i.resize,i),o.animation.on("frame",i._onframe,i),IM(o,i),DM(o,i),Lu(i),i}return L(t,e),t.prototype._onframe=function(){if(!this._disposed){PM(this);var e=this._scheduler;if(this[hM]){var t=this[hM].silent;this[pM]=!0;try{_M(this),SM.update.call(this,null,this[hM].updateParams)}catch(e){throw this[pM]=!1,this[hM]=null,e}this._zr.flush(),this[pM]=!1,this[hM]=null,AM.call(this,t),EM.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),TM(this,r),e.performVisualTasks(r),RM(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[pM])if(this._disposed)this.id;else{var r,i,o;if(bu(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[pM]=!0,!this._model||t){var a=new vw(this._api),s=this._theme,l=this._model=new uw;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},GM);var u={seriesTransition:o,optionChanged:!0};if(n)this[hM]={silent:r,updateParams:u},this[pM]=!1,this.getZr().wakeUp();else{try{_M(this),SM.update.call(this,null,u)}catch(e){throw this[hM]=null,this[pM]=!1,e}this._ssr||this._zr.flush(),this[hM]=null,this[pM]=!1,AM.call(this,r),EM.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ll.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Ll.svgSupported){var e=this._zr;return uu(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;uu(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return uu(r,(function(e){e.group.ignore=!1})),o}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if($M[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();uu(XM,(function(o,d){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(nu(e)),h=o.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=i(h.right,l),u=i(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}}));var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=zl.createCanvas(),g=Jh(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return uu(c,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Um({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),uu(c,(function(e){var t=new km({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return CM(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return CM(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return uu(Bf(this._model,e),(function(e,r){r.indexOf("Models")>=0&&uu(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}}),this)}),this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=Bf(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?mT(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;uu(HM,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&yT(o,(function(e){var t=rv(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=iu({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),uu(WM,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),uu(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(vT("map","selectchanged",t,r,e),vT("pie","selectchanged",t,r,e)):"select"===e.fromAction?(vT("map","selected",t,r,e),vT("pie","selected",t,r,e)):"unselect"===e.fromAction&&(vT("map","unselected",t,r,e),vT("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&zf(this.getDom(),eA,"");var e=this,t=e._api,n=e._model;uu(e._componentsViews,(function(e){e.dispose(n,t)})),uu(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete XM[e.id]}},t.prototype.resize=function(e){if(!this[pM])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[hM]&&(null==r&&(r=this[hM].silent),n=!0,this[hM]=null),this[pM]=!0;try{n&&_M(this),SM.update.call(this,{type:"resize",animation:iu({duration:0},e&&e.animation)})}catch(e){throw this[pM]=!1,e}this[pM]=!1,AM.call(this,r),EM.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(bu(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),ZM[e]){var n=ZM[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=iu({},e);return t.type=WM[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(bu(t)||(t={silent:!!t}),VM[e.type]&&this._model)if(this[pM])this._pendingActions.push(e);else{var n=t.silent;MM.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Ll.browser.weChat&&this._throttledZrFlush(),AM.call(this,n),EM.call(this,n)}},t.prototype.updateLabelLayout=function(){sM.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,i,-1/0),!0}))}}function r(e,t,n,i){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(o&&(o.z=t,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered((function(e){if(!Cx(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function o(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(Cx(e))return;if(e instanceof Tm&&function(e){var t=av(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}_M=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),bM(e,!0),bM(e,!1),t.plan()},bM=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=Wf(e.type);(c=new(t?fC.getClass(d.main,d.sub):CC.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&u(t)})):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},wM=function(e,t,n,r,i){var o=e._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=Uu(),uu(wf(u),(function(e){var t=Df(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(Kv(n))if(t instanceof pC)n.type!==cv||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Rf(i,t);o=(mu(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=rv(a);Fv(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Fv(r,c,d,n)}}}(t,n,e._api);else{var r=zv(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===cv&&i&&!n.notBlur&&Uv(t.mainType,t.componentIndex,e._api),o&&uu(o,(function(e){n.type===cv?kv(e):Rv(e)}))}else $v(n)&&t instanceof pC&&(!function(e,t){if($v(t)){var n=t.dataType,r=Rf(e.getData(n),t);mu(r)||(r=[r]),e[t.type===fv?"toggleSelect":t.type===pv?"select":"unselect"](r,n)}}(t,n,e._api),Hv(t),BM(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else uu([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},SM={prepareAndUpdate:function(e){_M(this),SM.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),TM(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),OM(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),sM.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}));var a=Uu();r.eachSeries((function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),RM(this,r,i,t,{},a),sM.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),CC.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),OM(this,n,this._api,t,{}),sM.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),CC.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),sM.trigger("afterupdate",r,this._api))},updateLayout:function(e){SM.update.call(this,e)}},CM=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Bf(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},TM=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},MM=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=VM[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&Wf(l[0]);this[pM]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=cu(e.batch,(function(t){return(t=ou(iu({},t),e)).batch=null,t})));var h,f=[],g=$v(e),m=Kv(e);if(m&&jv(this._api),uu(d,(function(t){if((h=(h=a.action(t,n._model,n._api))||iu({},t)).type=s.event||h.type,f.push(h),m){var r=Pf(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";wM(n,u,t,o),BM(n)}else g?(wM(n,u,t,"series"),BM(n)):c&&wM(n,u,t,c.main,c.sub)})),"none"!==u&&!m&&!g&&!c)try{this[hM]?(_M(this),SM.update.call(this,e),this[hM]=null):SM[u].call(this,e)}catch(e){throw this[pM]=!1,e}if(h=p?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[pM]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),g){var y={type:"selectchanged",escapeConnect:o,selected:Vv(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},AM=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();MM.call(this,n,e)}},EM=function(e){!e&&this.trigger("updated")},IM=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[hM]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},DM=function(e,t){e.on("mouseover",(function(e){var n=yT(e.target,Xv);n&&(!function(e,t,n){var r=rv(e),i=zv(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&Uv(r.componentMainType,r.componentIndex,n),uu(o,(function(e){return Dv(e,t)}))):(Fv(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Uv(r.componentMainType,r.componentIndex,n),Dv(e,t))}(n,e,t._api),BM(t))})).on("mouseout",(function(e){var n=yT(e.target,Xv);n&&(!function(e,t,n){jv(n);var r=rv(e),i=zv(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?uu(i,(function(e){return Ov(e,t)})):Ov(e,t)}(n,e,t._api),BM(t))})).on("click",(function(e){var n=yT(e.target,(function(e){return null!=rv(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=rv(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},OM=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,o,a=t.concat(n);dd(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),uu(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}(t),kM(e,t,n,r,i),uu(e._chartsViews,(function(e){e.__alive=!1})),RM(e,t,n,r,i),uu(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},kM=function(e,t,r,a,s,l){uu(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},RM=function(e,t,r,a,s,l){var u=e._scheduler;s=iu(s||{},{updatedSeries:t.getSeries()}),sM.trigger("series:beforeupdate",t,r,s);var c=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Hv(t)})),u.unfinished=c||u.unfinished,sM.trigger("series:layoutlabels",t,r,s),sM.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),o(t,r)})),function(e,t){var n=e._zr,r=n.storage,i=0;r.traverse((function(e){e.isGroup||i++})),i>t.get("hoverLayerThreshold")&&!Ll.node&&!Ll.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),sM.trigger("series:afterupdate",t,r,s)},BM=function(e){e[fM]=!0,e.getZr().wakeUp()},PM=function(e){e[fM]&&(e.getZr().storage.traverse((function(e){Cx(e)||t(e)})),e[fM]=!1)},NM=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return L(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){kv(t,n),BM(e)},n.prototype.leaveEmphasis=function(t,n){Rv(t,n),BM(e)},n.prototype.enterBlur=function(t){!function(e){Mv(e,bv)}(t),BM(e)},n.prototype.leaveBlur=function(t){Nv(t),BM(e)},n.prototype.enterSelect=function(t){Lv(t),BM(e)},n.prototype.leaveSelect=function(t){Bv(t),BM(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(dw))(e)},LM=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][mM]=t}}uu(WM,(function(n,r){e._messageCenter.on(r,(function(n){if($M[e.group]&&0!==e[mM]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];uu(XM,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),uu(i,(function(e){1!==e[mM]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(lc),zM=UM.prototype;zM.on=vM("on"),zM.off=vM("off"),zM.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)};var HM=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var VM={},WM={},YM=[],GM=[],qM=[],QM={},ZM={},XM={},$M={},KM=+new Date-0,JM=+new Date-0,eA="_echarts_instance_";function tA(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return XM[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,eA)]}(e);if(i)return i}var o=new UM(e,t,n);return o.id="ec_"+KM++,XM[o.id]=o,r&&zf(e,eA,o.id),LM(o),sM.trigger("afterinit",o),o}function nA(e){if(mu(e)){var t=e;e=null,uu(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+JM++,uu(t,(function(t){t.group=e}))}return $M[e]=!0,e}function rA(e){$M[e]=!1}function iA(e,t){QM[e]=t}function oA(e){au(GM,e)<0&&GM.push(e)}function aA(e,t){dA(YM,e,t,2e3)}function sA(e,t){sM.on(e,t)}function lA(e,t,n){vu(t)&&(n=t,t="");var r=bu(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,WM[t]||(ku(gM.test(r)&&gM.test(t)),VM[r]||(VM[r]={action:n,actionInfo:e}),WM[t]=r)}function uA(e,t){dA(qM,e,t,3e3,"visual")}var cA=[];function dA(e,t,n,r,i){if((vu(t)||bu(t))&&(n=t,t=r),!(au(cA,n)>=0)){cA.push(n);var o=nT.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function pA(e,t){ZM[e]=t}var hA=function(e){var t=(e=nu(e)).type;t||xf("");var n=t.split(":");2!==n.length&&xf("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,CS.set(t,e)};function fA(e){return null==e?0:e.length||1}function gA(e){return e}uA(uM,BC),uA(cM,jC),uA(cM,FC),uA(uM,fT),uA(cM,gT),uA(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=rM(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=rM(i,t)}}))})),oA(Pw),aA(900,(function(e){var t=Uu();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(jw)})),pA("default",(function(e,t){ou(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Zh,r=new Um({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new nv({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Um({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new ox({shape:{startAngle:-UC/2,endAngle:-UC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*UC/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*UC/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),lA({type:cv,event:cv,update:cv},Wu),lA({type:dv,event:dv,update:dv},Wu),lA({type:pv,event:pv,update:pv},Wu),lA({type:hv,event:hv,update:hv},Wu),lA({type:fv,event:fv,update:fv},Wu),iA("light",iT),iA("dark",cT);var mA=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||gA,this._newKeyGetter=r||gA,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=fA(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=fA(l),d=fA(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=fA(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=fA(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),vA=mA,yA=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function xA(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var _A=function(e){this.otherDims={},null!=e&&iu(this,e)},bA=Nf(),wA={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SA=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=MA(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Eu(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Kw(this.source),n=!AA(e),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=wA[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:i,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function CA(e){return e instanceof SA}function TA(e){for(var t=Uu(),n=0;n<(e||[]).length;n++){var r=e[n],i=bu(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function MA(e){var t=bA(e);return t.dimNameMap||(t.dimNameMap=TA(e.dimensionsDefine))}function AA(e){return e>30}var EA,IA,DA,OA,kA,RA,NA,LA=bu,BA=cu,PA="undefined"==typeof Int32Array?Array:Int32Array,jA=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],FA=["_approximateExtent"],UA=function(){function e(e,t){var n;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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;CA(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=yu(c)?new _A({name:c}):c instanceof _A?c:new _A(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};o.push(p),i[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Uu();uu(o,(function(e){f.set(i[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(_u(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof BS&&(r=e),!r){var o=this.dimensions,a=Yw(e)||lu(e)?new Jw(e,o.length):e;r=new BS;var s=BA(o,(function(e){return{type:i._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Uu(),o=[],a=[],s={};uu(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;xA(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),xA(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}Bb.each((function(e,t){var n=xA(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)}))}));var l=[],u={};i.each((function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=cu(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new yA(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&NA(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==zb&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===Pb&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Mf(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Df(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=Df(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)NA(this,a);EA(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){LA(e)?iu(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=DA(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return IA(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return mu(e)?r.getValues(BA(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){vu(e)&&(n=t,t=e,e=[]);var r=n||this,i=BA(OA(e),this._getStoreDimIndex,this);this._store.each(i,r?fu(t,r):t)},e.prototype.filterSelf=function(e,t,n){vu(e)&&(n=t,t=e,e=[]);var r=n||this,i=BA(OA(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?fu(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return uu(hu(e),(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r]})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){vu(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=BA(OA(e),this._getStoreDimIndex,this),a=RA(this);return a._store=this._store.map(o,i?fu(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=BA(OA(e),this._getStoreDimIndex,this);this._store.modify(o,i?fu(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=RA(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=RA(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new T_(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new vA(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return IA(e,t)}),(function(e){return IA(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},LA(e)?iu(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(mu(i=this.getVisual(t))?i=i.slice():LA(i)&&(i=iu({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,LA(t)?iu(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){LA(e)?iu(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?iu(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=rv(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=rv(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){uu(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:BA(this.dimensions,this._getDimInfo,this),this.hostModel)),kA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];vu(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Du(arguments)))})},e.internalField=(EA=function(e){var t=e._invertedIndicesMap;uu(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new PA(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},DA=function(e,t,n){return Df(e._getCategory(t,n),null)},IA=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=DA(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},OA=function(e){return mu(e)||(e=null!=e?[e]:[]),e},RA=function(t){var n=new e(t._schema?t._schema:BA(t.dimensions,t._getDimInfo,t),t.hostModel);return kA(n,t),n},kA=function(e,t){uu(jA.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,uu(FA,(function(n){e[n]=nu(t[n])})),e._calculationInfo=iu({},t._calculationInfo)},void(NA=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=DA(e,i,t)),null==s&&null!=o&&(r[t]=s=DA(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}(),zA=UA;function HA(e,t){Yw(e)||(e=qw(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Uu(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return uu(t,(function(e){var t;bu(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&AA(a),l=r===e.dimensionsDefine,u=l?MA(e):TA(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Uu(c),p=new OS(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],i=bu(n)?n:{name:n},a=new _A,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return p[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(h=0;h<a;h++)f(h);d.each((function(e,t){var n=wf(e).slice();if(1===n.length&&!yu(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);uu(n,(function(e,n){var i=yu(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,m(f(i),t,n))}))}}));var g=0;function m(e,t,n){null!=Bb.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}uu(n,(function(e){var t,n,r,i;if(yu(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=iu({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=wf(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}uu(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(ou(a,i),t,o),null==a.name&&n){var s=n[o];!bu(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&ou(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)uu(o,(function(e){b(e)})),o.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<a;w++){var S=f(w);null==S.coordDim&&(S.coordDim=VA(_,i,x),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||$b(e,w)!==Yb&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=Uu(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(o),new SA({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function VA(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var WA=function(e){this.coordSysDims=[],this.axisMap=Uu(),this.categoryAxisMap=Uu(),this.coordSysName=e};var YA={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",jf).models[0],o=e.getReferringComponents("yAxis",jf).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),GA(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),GA(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",jf).models[0];t.coordSysDims=["single"],n.set("single",i),GA(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",jf).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),GA(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),GA(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();uu(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),GA(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function GA(e){return"category"===e.get("type")}function qA(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!CA(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,p=!(!e||!e.get("stack"));if(uu(r,(function(e,t){yu(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;uu(r,(function(e){e.coordDim===h&&g++}));var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function QA(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function ZA(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=qw(e)):o=(r=i.getSource()).sourceFormat===Pb;var a=function(e){var t=e.get("coordinateSystem"),n=new WA(t),r=YA[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=hw.get(r);return t&&t.coordSysDims&&(n=cu(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=vu(l)?l:l?gu(Zb,s,t):null,c=HA(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&uu(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(c),h=qA(t,{schema:c,store:p}),f=new zA(c,t);f.setCalculationInfo(h);var g=null!=d&&function(e){if(e.sourceFormat===Pb){return!mu(Tf(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(o?r:p,null,g),f}var XA=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Xf(XA);var $A=XA,KA=0,JA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++KA}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&cu(r,eE);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!yu(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Uu(this.categories))},e}();function eE(e){return bu(e)&&null!=e.value?e.value:e+""}var tE=JA;function nE(e){return"interval"===e.type||"log"===e.type}function rE(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=ff(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=oE(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),aE(e,0,t),aE(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[rf(Math.ceil(e[0]/a)*a,s),rf(Math.floor(e[1]/a)*a,s)],e),i}function iE(e){var t=Math.pow(10,hf(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,rf(n*t)}function oE(e){return af(e)+2}function aE(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function sE(e,t){return e>=t[0]&&e<=t[1]}function lE(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function uE(e,t){return e*(t[1]-t[0])+t[0]}var cE=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new tE({})),mu(r)&&(r=new tE({categories:cu(r,(function(e){return bu(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return L(t,e),t.prototype.parse=function(e){return null==e?NaN:yu(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return sE(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return lE(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(uE(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}($A);$A.registerClass(cE);var dE=cE,pE=rf,hE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return L(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return sE(e,this._extent)},t.prototype.normalize=function(e){return lE(e,this._extent)},t.prototype.scale=function(e){return uE(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=oE(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:pE(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=pE(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:pE(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=pE(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=af(e.value)||0:"auto"===n&&(n=this._intervalPrecision),pb(pE(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=rE(r,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=pE(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=pE(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}($A);$A.registerClass(hE);var fE=hE,gE="undefined"!=typeof Float32Array,mE=gE?Float32Array:Array;function vE(e){return mu(e)?gE?new Float32Array(e):e:new mE(e)}function yE(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function xE(e){return e.dim+e.index}function _E(e,t){var n=[];return t.eachSeriesByType(e,(function(e){SE(e)&&n.push(e)})),n}function bE(e){var t=function(e){var t={};uu(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return uu(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(o[1]-o[0])/d.count()}var p=nf(e.get("barWidth"),r),h=nf(e.get("barMaxWidth"),r),f=nf(e.get("barMinWidth")||(CE(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:xE(i),stackId:yE(e)})})),function(e){var t={};uu(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var p=e.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return uu(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=hu(r).length;o=Math.max(35-4*a,15)+"%"}var s=nf(o,i),l=nf(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),uu(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;uu(r,(function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)})),p&&(h-=p.width*l);var f=-h/2;uu(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}(n)}function wE(e,t){var n=_E(e,t),r=bE(n);uu(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=yE(e),o=r[xE(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function SE(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function CE(e){return e.pipelineContext&&e.pipelineContext.large}var TE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return L(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return Z_(e.value,V_[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(q_(this._minLevelUnit))]||V_.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(yu(n))o=n;else if(vu(n))o=n(e.value,t,{level:e.level});else{var a=iu({},z_);if(e.level>0)for(var s=0;s<W_.length;++s)a[W_[s]]="{primary|"+a[W_[s]]+"}";var l=n?!1===n.inherit?n:ou(n,a):a,u=X_(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=Y_.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(mu(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return Z_(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){var i=1e4,o=Y_,a=0;function s(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,i,o){var a=[],l=!i.length;if(!function(e,t,n,r){var i=pf(t),o=pf(n),a=function(e){return $_(i,e,r)===$_(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")},h=function(){return p()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return h()}}(q_(e),r[0],r[1],n)){l&&(i=[{value:kE(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0,g=!1;switch(e){case"year":p=Math.max(1,Math.round(t/F_/365)),h=K_(n),f=ob(n);break;case"half-year":case"quarter":case"month":p=EE(t),h=J_(n),f=ab(n);break;case"week":case"half-week":case"day":p=AE(t),h=eb(n),f=sb(n),g=!0;break;case"half-day":case"quarter-day":case"hour":p=IE(t),h=tb(n),f=lb(n);break;case"minute":p=DE(t,!0),h=nb(n),f=ub(n);break;case"second":p=DE(t,!1),h=rb(n),f=cb(n);break;case"millisecond":p=OE(t),h=ib(n),f=db(n)}s(p,c,d,h,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,p=0,h=0;h<o.length&&a++<i;++h){var f=q_(o[h]);if(Q_(o[h]))if(l(o[h],u[u.length-1]||[],c),f!==(o[h+1]?q_(o[h+1]):null)){if(c.length){p=d,c.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&p>y/1.5)break;if(u.push(g),d>y||e===o[h])break}c=[]}}var x=pu(cu(u,(function(e){return pu(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),_=[],b=x.length-1;for(h=0;h<x.length;++h)for(var w=x[h],S=0;S<w.length;++S)_.push({value:w[S].value,level:b-h});_.sort((function(e,t){return e.value-t.value}));var C=[];for(h=0;h<_.length;++h)0!==h&&_[h].value===_[h-1].value||C.push(_[h]);return C}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=F_,t[1]+=F_),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-F_}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=ME.length,a=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(ME,this._approxInterval,0,o),o-1);this._interval=ME[a][1],this._minLevelUnit=ME[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return _u(e)?e:+pf(e)},t.prototype.contain=function(e){return sE(this.parse(e),this._extent)},t.prototype.normalize=function(e){return lE(this.parse(e),this._extent)},t.prototype.scale=function(e){return uE(e,this._extent)},t.type="time",t}(fE),ME=[["second",B_],["minute",P_],["hour",j_],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",U_/2],["year",U_]];function AE(e,t){return(e/=F_)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function EE(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function IE(e){return(e/=j_)>12?12:e>6?6:e>3.5?4:e>2?2:1}function DE(e,t){return(e/=t?P_:B_)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function OE(e){return ff(e,!0)}function kE(e,t,n){var r=new Date(e);switch(q_(t)){case"year":case"month":r[ab(n)](0);case"day":r[sb(n)](1);case"hour":r[lb(n)](0);case"minute":r[ub(n)](0);case"second":r[cb(n)](0),r[db(n)](0)}return r.getTime()}$A.registerClass(TE);var RE=TE,NE=$A.prototype,LE=fE.prototype,BE=rf,PE=Math.floor,jE=Math.ceil,FE=Math.pow,UE=Math.log,zE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new fE,t._interval=0,t}return L(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return cu(LE.getTicks.call(this,e),(function(e){var t=e.value,i=rf(FE(this.base,t));return i=t===n[0]&&this._fixMin?VE(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?VE(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=UE(this.base);e=UE(Math.max(0,e))/n,t=UE(Math.max(0,t))/n,LE.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=NE.getExtent.call(this);t[0]=FE(e,t[0]),t[1]=FE(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=VE(t[0],n[0])),this._fixMax&&(t[1]=VE(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=UE(e[0])/UE(t),e[1]=UE(e[1])/UE(t),NE.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,hf(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[rf(jE(t[0]/i)*i),rf(PE(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){LE.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return sE(e=UE(e)/UE(this.base),this._extent)},t.prototype.normalize=function(e){return lE(e=UE(e)/UE(this.base),this._extent)},t.prototype.scale=function(e){return e=uE(e,this._extent),FE(this.base,e)},t.type="log",t}($A),HE=zE.prototype;function VE(e,t){return BE(e,af(t))}HE.getMinorTicks=LE.getMinorTicks,HE.getLabel=LE.getLabel,$A.registerClass(zE);var WE=zE,YE=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);vu(i)?this._modelMinNum=ZE(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=ZE(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(vu(o)?this._modelMaxNum=ZE(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=ZE(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=mu(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Lh(s[0],1),Lh(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Mu(a)||Mu(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[qE[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[GE[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),GE={min:"_determinedMin",max:"_determinedMax"},qE={min:"_dataMin",max:"_dataMax"};function QE(e,t,n){var r=e.rawExtentInfo;return r||(r=new YE(e,t,n),e.rawExtentInfo=r,r)}function ZE(e,t){return null==t?null:Mu(t)?NaN:e.parse(t)}function XE(e,t){var n=e.type,r=QE(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=_E("bar",a),l=!1;if(uu(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=bE(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t){var r=e[xE(t)];return null!=r&&null!=n?r[yE(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;uu(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;uu(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function $E(e,t){var n=t,r=XE(e,n),i=r.extent,o=n.get("splitNumber");e instanceof WE&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function KE(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):yu(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):vu(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(JE(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function JE(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function eI(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new Qc(e.x,e.y,o,a)}function tI(e){var t=e.get("interval");return null==t?"auto":t}function nI(e){return"category"===e.type&&0===tI(e.getLabelModel())}function rI(e,t){var n={};return uu(e.mapDimensionsAll(t),(function(t){n[function(e,t){return QA(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),hu(n)}var iI=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),oI=[],aI={registerPreprocessor:oA,registerProcessor:aA,registerPostInit:function(e){sA("afterinit",e)},registerPostUpdate:function(e){sA("afterupdate",e)},registerUpdateLifecycle:sA,registerAction:lA,registerCoordinateSystem:function(e,t){hw.register(e,t)},registerLayout:function(e,t){dA(qM,e,t,1e3,"layout")},registerVisual:uA,registerTransform:hA,registerLoading:pA,registerMap:function(e,t,n){var r=function(e){return lM[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){lM[e]=t},PRIORITY:dM,ComponentModel:kb,ComponentView:fC,SeriesModel:pC,ChartView:CC,registerComponentModel:function(e){kb.registerClass(e)},registerComponentView:function(e){fC.registerClass(e)},registerSeriesModel:function(e){pC.registerClass(e)},registerChartView:function(e){CC.registerClass(e)},registerSubTypeDefaulter:function(e,t){kb.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){Xh[e]=t}(e,t)}};function sI(e){mu(e)?uu(e,(function(e){sI(e)})):au(oI,e)>=0||(oI.push(e),vu(e)&&(e={install:e}),e.install(aI))}function lI(e,t){return Math.abs(e-t)<1e-8}function uI(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var o=1;o<e.length;o++){var a=e[o];r+=pm(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return lI(i[0],s[0])&&lI(i[1],s[1])||(r+=pm(i[0],i[1],s[0],s[1],t,n)),0!==r}var cI=Nf();function dI(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=hI(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=KE(e);return{labels:cu(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function pI(e,t){return"category"===e.type?function(e,t){var n,r,i=fI(e,"ticks"),o=tI(t),a=gI(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(vu(o))n=yI(e,o,!0);else if("auto"===o){var s=hI(e,e.getLabelModel());r=s.labelCategoryInterval,n=cu(s.labels,(function(e){return e.tickValue}))}else n=vI(e,r=o,!0);return mI(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:cu(e.scale.getTicks(),(function(e){return e.value}))}}function hI(e,t){var n,r,i=fI(e,"labels"),o=tI(t),a=gI(i,o);return a||(vu(o)?n=yI(e,o):(r="auto"===o?function(e){var t=cI(e).autoInterval;return null!=t?t:cI(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=vI(e,r)),mI(i,o,{labels:n,labelCategoryInterval:r}))}function fI(e,t){return cI(e)[t]||(cI(e)[t]=[])}function gI(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function mI(e,t,n){return e.push({key:t,value:n}),n}function vI(e,t,n){var r=KE(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=nI(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&f-l!==o[1]&&g(o[1]),s}function yI(e,t,n){var r=e.scale,i=KE(e),o=[];return uu(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var xI=[0,1],_I=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return sf(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&bI(n=n.slice(),r.count()),tf(e,xI,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&bI(n=n.slice(),r.count());var i=tf(e,n,xI,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=cu(pI(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;uu(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=rf(e),t=rf(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),cu(this.scale.getMinorTicks(e),(function(e){return cu(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return dI(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=KE(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=o[1];l+=s){var f,g,m=Oh(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var v=p/c,y=h/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=cI(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function bI(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var wI=_I;function SI(e,t){return e===t||e!=e&&t!=t}function CI(e,t){for(var n=e.length;n--;)if(SI(e[n][0],t))return n;return-1}var TI=Array.prototype.splice;function MI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MI.prototype.clear=function(){this.__data__=[],this.size=0},MI.prototype.delete=function(e){var t=this.__data__,n=CI(t,e);return!(n<0)&&(n==t.length-1?t.pop():TI.call(t,n,1),--this.size,!0)},MI.prototype.get=function(e){var t=this.__data__,n=CI(t,e);return n<0?void 0:t[n][1]},MI.prototype.has=function(e){return CI(this.__data__,e)>-1},MI.prototype.set=function(e,t){var n=this.__data__,r=CI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function AI(e){if(!Di(e))return!1;var t=Hi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var EI,II=Ni["__core-js_shared__"],DI=(EI=/[^.]+$/.exec(II&&II.keys&&II.keys.IE_PROTO||""))?"Symbol(src)_1."+EI:"";var OI=Function.prototype.toString;function kI(e){if(null!=e){try{return OI.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var RI=/^\[object .+?Constructor\]$/,NI=Function.prototype,LI=Object.prototype,BI=NI.toString,PI=LI.hasOwnProperty,jI=RegExp("^"+BI.call(PI).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FI(e){return!(!Di(e)||(t=e,DI&&DI in t))&&(AI(e)?jI:RI).test(kI(e));var t}function UI(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return FI(n)?n:void 0}var zI=UI(Ni,"Map"),HI=UI(Object,"create");var VI=Object.prototype.hasOwnProperty;var WI=Object.prototype.hasOwnProperty;function YI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function GI(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function qI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}YI.prototype.clear=function(){this.__data__=HI?HI(null):{},this.size=0},YI.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},YI.prototype.get=function(e){var t=this.__data__;if(HI){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return VI.call(t,e)?t[e]:void 0},YI.prototype.has=function(e){var t=this.__data__;return HI?void 0!==t[e]:WI.call(t,e)},YI.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=HI&&void 0===t?"__lodash_hash_undefined__":t,this},qI.prototype.clear=function(){this.size=0,this.__data__={hash:new YI,map:new(zI||MI),string:new YI}},qI.prototype.delete=function(e){var t=GI(this,e).delete(e);return this.size-=t?1:0,t},qI.prototype.get=function(e){return GI(this,e).get(e)},qI.prototype.has=function(e){return GI(this,e).has(e)},qI.prototype.set=function(e,t){var n=GI(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function QI(e){var t=this.__data__=new MI(e);this.size=t.size}QI.prototype.clear=function(){this.__data__=new MI,this.size=0},QI.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},QI.prototype.get=function(e){return this.__data__.get(e)},QI.prototype.has=function(e){return this.__data__.has(e)},QI.prototype.set=function(e,t){var n=this.__data__;if(n instanceof MI){var r=n.__data__;if(!zI||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qI(r)}return n.set(e,t),this.size=n.size,this};var ZI=function(){try{var e=UI(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function XI(e,t,n){"__proto__"==t&&ZI?ZI(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var $I=Object.prototype.hasOwnProperty;function KI(e,t,n){var r=e[t];$I.call(e,t)&&SI(r,n)&&(void 0!==n||t in e)||XI(e,t,n)}function JI(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?XI(n,s,l):KI(n,s,l)}return n}function eD(e){return Vi(e)&&"[object Arguments]"==Hi(e)}var tD=Object.prototype,nD=tD.hasOwnProperty,rD=tD.propertyIsEnumerable,iD=eD(function(){return arguments}())?eD:function(e){return Vi(e)&&nD.call(e,"callee")&&!rD.call(e,"callee")};var oD="object"==typeof exports&&exports&&!exports.nodeType&&exports,aD=oD&&"object"==typeof module&&module&&!module.nodeType&&module,sD=aD&&aD.exports===oD?Ni.Buffer:void 0,lD=(sD?sD.isBuffer:void 0)||function(){return!1},uD=/^(?:0|[1-9]\d*)$/;function cD(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&uD.test(e))&&e>-1&&e%1==0&&e<t}function dD(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var pD={};function hD(e){return function(t){return e(t)}}pD["[object Float32Array]"]=pD["[object Float64Array]"]=pD["[object Int8Array]"]=pD["[object Int16Array]"]=pD["[object Int32Array]"]=pD["[object Uint8Array]"]=pD["[object Uint8ClampedArray]"]=pD["[object Uint16Array]"]=pD["[object Uint32Array]"]=!0,pD["[object Arguments]"]=pD["[object Array]"]=pD["[object ArrayBuffer]"]=pD["[object Boolean]"]=pD["[object DataView]"]=pD["[object Date]"]=pD["[object Error]"]=pD["[object Function]"]=pD["[object Map]"]=pD["[object Number]"]=pD["[object Object]"]=pD["[object RegExp]"]=pD["[object Set]"]=pD["[object String]"]=pD["[object WeakMap]"]=!1;var fD="object"==typeof exports&&exports&&!exports.nodeType&&exports,gD=fD&&"object"==typeof module&&module&&!module.nodeType&&module,mD=gD&&gD.exports===fD&&ki.process,vD=function(){try{var e=gD&&gD.require&&gD.require("util").types;return e||mD&&mD.binding&&mD.binding("util")}catch(e){}}(),yD=vD&&vD.isTypedArray,xD=yD?hD(yD):function(e){return Vi(e)&&dD(e.length)&&!!pD[Hi(e)]},_D=Object.prototype.hasOwnProperty;function bD(e,t){var n=Oi(e),r=!n&&iD(e),i=!n&&!r&&lD(e),o=!n&&!r&&!i&&xD(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!_D.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||cD(u,l))||s.push(u);return s}var wD=Object.prototype;function SD(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wD)}function CD(e,t){return function(n){return e(t(n))}}var TD=CD(Object.keys,Object),MD=Object.prototype.hasOwnProperty;function AD(e){return null!=e&&dD(e.length)&&!AI(e)}function ED(e){return AD(e)?bD(e):function(e){if(!SD(e))return TD(e);var t=[];for(var n in Object(e))MD.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var ID=Object.prototype.hasOwnProperty;function DD(e){if(!Di(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=SD(e),n=[];for(var r in e)("constructor"!=r||!t&&ID.call(e,r))&&n.push(r);return n}function OD(e){return AD(e)?bD(e,!0):DD(e)}var kD="object"==typeof exports&&exports&&!exports.nodeType&&exports,RD=kD&&"object"==typeof module&&module&&!module.nodeType&&module,ND=RD&&RD.exports===kD?Ni.Buffer:void 0,LD=ND?ND.allocUnsafe:void 0;function BD(){return[]}var PD=Object.prototype.propertyIsEnumerable,jD=Object.getOwnPropertySymbols,FD=jD?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(jD(e),(function(t){return PD.call(e,t)})))}:BD,UD=FD;function zD(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var HD=CD(Object.getPrototypeOf,Object),VD=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)zD(t,UD(e)),e=HD(e);return t}:BD;function WD(e,t,n){var r=t(e);return Oi(e)?r:zD(r,n(e))}function YD(e){return WD(e,ED,UD)}function GD(e){return WD(e,OD,VD)}var qD=UI(Ni,"DataView"),QD=UI(Ni,"Promise"),ZD=UI(Ni,"Set"),XD=UI(Ni,"WeakMap"),$D="[object Map]",KD="[object Promise]",JD="[object Set]",eO="[object WeakMap]",tO="[object DataView]",nO=kI(qD),rO=kI(zI),iO=kI(QD),oO=kI(ZD),aO=kI(XD),sO=Hi;(qD&&sO(new qD(new ArrayBuffer(1)))!=tO||zI&&sO(new zI)!=$D||QD&&sO(QD.resolve())!=KD||ZD&&sO(new ZD)!=JD||XD&&sO(new XD)!=eO)&&(sO=function(e){var t=Hi(e),n="[object Object]"==t?e.constructor:void 0,r=n?kI(n):"";if(r)switch(r){case nO:return tO;case rO:return $D;case iO:return KD;case oO:return JD;case aO:return eO}return t});var lO=sO,uO=Object.prototype.hasOwnProperty;var cO=Ni.Uint8Array;function dO(e){var t=new e.constructor(e.byteLength);return new cO(t).set(new cO(e)),t}var pO=/\w*$/;var hO=Li?Li.prototype:void 0,fO=hO?hO.valueOf:void 0;function gO(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return dO(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?dO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?dO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,pO.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,fO?Object(fO.call(r)):{}}}var mO=Object.create,vO=function(){function e(){}return function(t){if(!Di(t))return{};if(mO)return mO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),yO=vO;var xO=vD&&vD.isMap,_O=xO?hD(xO):function(e){return Vi(e)&&"[object Map]"==lO(e)};var bO=vD&&vD.isSet,wO=bO?hD(bO):function(e){return Vi(e)&&"[object Set]"==lO(e)},SO="[object Arguments]",CO="[object Function]",TO="[object Object]",MO={};function AO(e,t,n,r,i,o){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Di(e))return e;var c=Oi(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&uO.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,a)}else{var d=lO(e),p=d==CO||"[object GeneratorFunction]"==d;if(lD(e))return function(e,t){if(t)return e.slice();var n=e.length,r=LD?LD(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==TO||d==SO||p&&!i){if(a=l||p?{}:function(e){return"function"!=typeof e.constructor||SD(e)?{}:yO(HD(e))}(e),!s)return l?function(e,t){return JI(e,VD(e),t)}(e,function(e,t){return e&&JI(t,OD(t),e)}(a,e)):function(e,t){return JI(e,UD(e),t)}(e,function(e,t){return e&&JI(t,ED(t),e)}(a,e))}else{if(!MO[d])return i?e:{};a=gO(e,d,s)}}o||(o=new QI);var h=o.get(e);if(h)return h;o.set(e,a),wO(e)?e.forEach((function(r){a.add(AO(r,t,n,r,e,o))})):_O(e)&&e.forEach((function(r,i){a.set(i,AO(r,t,n,i,e,o))}));var f=c?void 0:(u?l?GD:YD:l?OD:ED)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(f||e,(function(r,i){f&&(r=e[i=r]),KI(a,i,AO(r,t,n,i,e,o))})),a}MO[SO]=MO["[object Array]"]=MO["[object ArrayBuffer]"]=MO["[object DataView]"]=MO["[object Boolean]"]=MO["[object Date]"]=MO["[object Float32Array]"]=MO["[object Float64Array]"]=MO["[object Int8Array]"]=MO["[object Int16Array]"]=MO["[object Int32Array]"]=MO["[object Map]"]=MO["[object Number]"]=MO[TO]=MO["[object RegExp]"]=MO["[object Set]"]=MO["[object String]"]=MO["[object Symbol]"]=MO["[object Uint8Array]"]=MO["[object Uint8ClampedArray]"]=MO["[object Uint16Array]"]=MO["[object Uint32Array]"]=!0,MO["[object Error]"]=MO[CO]=MO["[object WeakMap]"]=!1;var EO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(kb),IO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",jf).models[0]},t.type="cartesian2dAxis",t}(kb);su(IO,iI);var DO={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},OO=ru({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},DO),kO=ru({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},DO),RO={category:OO,value:kO,time:ru({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},kO),log:ou({logBase:10},kO)},NO={value:1,category:1,time:1,log:1};function LO(e,t,n,r){uu(NO,(function(i,o){var a=ru(ru({},RO[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return L(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ab(this),r=n?Ib(e):{};ru(e,t.getTheme().get(o+"Axis")),ru(e,this.getDefaultOption()),e.type=BO(e),n&&Eb(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=tE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",BO)}function BO(e){return e.type||(e.data?"category":"value")}var PO=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return cu(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),pu(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),jO=["x","y"];function FO(e){return"interval"===e.type||"time"===e.type}var UO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=jO,t}return L(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(FO(e)&&FO(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=Bc([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new Qc(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return tc(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return tc(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new Qc(n,r,i,o)},t}(PO),zO=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return L(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(wI),HO=zO;function VO(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Au(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function WO(e){return"cartesian2d"===e.get("coordinateSystem")}function YO(e){var t={xAxisModel:null,yAxisModel:null};return uu(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,jf).models[0];t[r]=o})),t}var GO=Math.log;var qO=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=jO,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=hu(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;nE(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):($E(l,s),nE(l)&&(t=a))}i.length&&(t||$E((t=i.pop()).scale,t.model),uu(i,(function(e){!function(e,t,n){var r=fE.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=XE(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=GO(e.base);u=[GO(u[0])/p,GO(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=iE(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=iE(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=iE(f));var v=f*a;(g=rf((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=rf(v)):m>0&&u[1]<=0&&(m=0,g=-rf(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};uu(n.x,(function(e){ZO(n,"y",e,i)})),uu(n.y,(function(e){ZO(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Mb(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){uu(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(uu(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof dE?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=KE(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=l(r?r[c]:{value:o[0]+c},c),p=eI(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),uu(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}bu(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",jf).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",jf).models[0],a=e.gridModel,s=this._coordsList;if(r)au(s,t=r.coordinateSystem)<0&&(t=null);else if(i&&o)t=this.getCartesian(i.componentIndex,o.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(QO(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new HO(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new dE({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new RE({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new($A.getClass(t)||fE)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,uu(a.x,(function(t,n){uu(a.y,(function(i,o){var a="x"+n+"y"+o,s=new UO(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){uu(rI(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}uu(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(WO(e)){var r=YO(e),i=r.xAxisModel,o=r.yAxisModel;if(!QO(i,t)||!QO(o,t))return;var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return uu(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);au(t,i)<0&&t.push(i),au(n,o)<0&&n.push(o)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(WO(e)){var t=YO(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=jO,e}();function QO(e,t){return e.getCoordSysModel()===t}function ZO(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)XO(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&XO(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function XO(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var $O=qO,KO=Math.PI,JO=function(){function e(e,t){this.group=new Zh,this.opt=t,this.axisModel=e,ou(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Zh({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!ek[e]},e.prototype.add=function(e){ek[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=uf(t-e);return cf(o)?(i=n>0?"top":"bottom",r="center"):cf(o-KO)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<KO?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),ek={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(tc(s,s,a),tc(l,l,a));var c=iu({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new $y({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Fx(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);yu(p)&&(p=[p,p]),(yu(h)||_u(h))&&(h=[h,h]);var f=kT(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];uu([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==p[r]&&null!=p[r]){var i=OT(p[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=ik(i.getTicksCoords(),t.transform,l,ou(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,r,t,e),o=function(e,t,n,r){var i=n.axis,o=Au(r.axisLabelShow,n.get(["axisLabel","show"]));if(!o||i.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=i.getViewLabels(),u=(Au(r.labelRotate,a.get("rotate"))||0)*KO/180,c=JO.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],h=JO.isLabelSilent(n),f=n.get("triggerEvent");return uu(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,g=o.formattedLabel,m=o.rawLabel,v=a;if(d&&d[u]){var y=d[u];bu(y)&&y.textStyle&&(v=new T_(y.textStyle,a,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(u),b=new nv({x:_,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:h,z2:10+(o.level||0),style:o_(v,{text:g,align:v.getShallow("align",!0)||c.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||c.textVerticalAlign,fill:vu(x)?x("category"===i.type?m:"value"===i.type?u+"":u,l):x})});if(b.anid="label_"+u,f){var w=JO.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=m,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),rv(b).eventData=w}t.add(b),b.updateTransform(),p.push(b),e.add(b),b.decomposeTransform()})),p}(n,r,t,e);(function(e,t,n){if(nI(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(tk(o),tk(u)):nk(o,a)&&(r?(tk(a),tk(c)):(tk(o),tk(u)));!1===i?(tk(s),tk(d)):nk(l,s)&&(i?(tk(l),tk(p)):(tk(s),tk(d)))}(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=ou(s.getLineStyle(),ou(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=ik(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&function(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new Qc(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new mx(f.localRect,f.transform)),d||(d=new mx(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new mx(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(cu(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=Au(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,rk(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*KO/180),rk(s)?o=JO.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=uf(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;cf(a-KO/2)?(o=l?"bottom":"top",i="center"):cf(a-1.5*KO)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*KO&&a>KO/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=Au(e.nameTruncateMaxWidth,m.maxWidth,a),x=new nv({x:h[0],y:h[1],rotation:o.rotation,silent:JO.isLabelSilent(t),style:o_(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if($x({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=JO.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,rv(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function tk(e){e&&(e.ignore=!0)}function nk(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=kc([]);return Lc(i,i,-e.rotation),n.applyTransform(Rc([],i,e.getLocalTransform())),r.applyTransform(Rc([],i,t.getLocalTransform())),n.intersect(r)}}function rk(e){return"middle"===e||"center"===e}function ik(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(tc(a,a,t),tc(s,s,t));var c=new $y({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});Fx(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var ok=JO;function ak(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),o=i.get("link",!0)||[],a=[];uu(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=ck(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(uu(n.getAxes(),gu(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&uu(p.baseAxes,gu(h,!d||"cross",c)),d&&uu(p.otherAxes,gu(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",i),p=d.get("show");if(p&&("auto"!==p||r||uk(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};uu(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=nu(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&ou(l,c.textStyle)}}return e.model.getModel("axisPointer",new T_(s,n,r))}(c,u,i,t,r,s):d;var h=d.get("snap"),f=d.get("triggerEmphasis"),g=ck(c.model),m=s||h||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:uk(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(sk(o[r+"AxisId"],n.id)||sk(o[r+"AxisIndex"],n.componentIndex)||sk(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&uu(e.coordSysAxesInfo[ck(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function sk(e,t){return"all"===e||mu(e)&&au(e,t)>=0||e===t}function lk(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[ck(e)]}function uk(e){return!!e.get(["handle","show"])}function ck(e){return e.type+"||"+e.id}var dk={},pk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=lk(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=uk(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=function(e){var t=lk(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){dk[e]=t},t.getAxisPointerClass=function(e){return e&&dk[e]},t.type="axis",t}(fC),hk=pk,fk=Nf();var gk=["axisLine","axisTickLabel","axisName"],mk=["splitArea","splitLine","minorSplitLine"],vk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return L(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Zh,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=VO(a,t),l=new ok(t,iu({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(nE(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));uu(gk,l.add,l),this._axisGroup.add(l.getGroup()),uu(mk,(function(e){t.get([e,"show"])&&yk[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||Yx(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){fk(this).splitAreaColors=null},t.type="cartesianAxis",t}(hk),yk={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=mu(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),p=[],h=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(p[0]=m,p[1]=l.y,h[0]=m,h[1]=l.y+l.height):(p[0]=l.x,p[1]=m,h[0]=l.x+l.width,h[1]=m);var v=c++%s.length,y=d[g].tickValue,x=new $y({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:h[0],y2:h[1]},style:ou({stroke:s[v]},f),silent:!0});Fx(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=i.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new $y({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});Fx(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=fk(e).splitAreaColors,p=Uu(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();for(s=mu(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var S=u[f-1].tickValue;null!=S&&p.set(S,h),t.add(new Um({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:ou({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%c}fk(e).splitAreaColors=p}}}(e,t,n,r)}},xk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="xAxis",t}(vk),_k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=xk.type,t}return L(t,e),t.type="yAxis",t}(vk),bk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return L(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Um({shape:e.coordinateSystem.getRect(),style:ou({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(fC),wk={offset:0};function Sk(e){e.registerComponentView(bk),e.registerComponentModel(EO),e.registerCoordinateSystem("cartesian2d",$O),LO(e,"x",IO,wk),LO(e,"y",IO,wk),e.registerComponentView(xk),e.registerComponentView(_k),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var Ck=Nf(),Tk=nu,Mk=fu,Ak=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=gu(Ek,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Zh,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);kk(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=lk(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=Ck(e).pointerEl=new e_[i.type](Tk(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Ck(e).labelEl=new nv(Tk(t.label));e.add(i),Dk(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Ck(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Ck(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),Dk(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=qx(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Ac(e.event)},onmousedown:Mk(this._onHandleDragMove,this,0,0),drift:Mk(this._onHandleDragMove,this),ondragend:Mk(this._onHandleDragEnd,this)}),r.add(i)),kk(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");mu(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,IC(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){Ek(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Ok(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Ok(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Ok(r)),Ck(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),DC(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function Ek(e,t,n,r){Ik(Ck(n).lastProp,r)||(Ck(n).lastProp=r,t?bx(n,r,e):(n.stopAnimation(),n.attr(r)))}function Ik(e,t){if(bu(e)&&bu(t)){var n=!0;return uu(t,(function(t,r){n=n&&Ik(e[r],t)})),!!n}return e===t}function Dk(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Ok(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function kk(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function Rk(e,t,n,r,i){var o=Nk(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=fb(a.get("padding")||0),l=a.getFont(),u=Oh(o,l),c=i.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:o_(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function Nk(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:JE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};uu(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),yu(a)?o=a.replace("{value}",o):vu(a)&&(o=a(s))}return o}function Lk(e,t,n){var r=[1,0,0,1,0,0];return Lc(r,r,n.rotation),Nc(r,r,n.position),Hx([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var Bk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=Pk(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=jk[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=ok.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),Rk(t,r,i,o,{position:Lk(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,VO(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=VO(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=Lk(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=Pk(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(Ak);function Pk(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var jk={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=Fk(e),{x1:r[o=o||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],o=Fk(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function Fk(e){return"x"===e.dim?0:1}var Uk=Bk,zk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(kb),Hk=Nf(),Vk=uu;function Wk(e,t,n){if(!Ll.node){var r=t.getZr();Hk(r).records||(Hk(r).records={}),function(e,t){if(Hk(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);Vk(Hk(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}Hk(e).initialized=!0,n("click",gu(Gk,"click")),n("mousemove",gu(Gk,"mousemove")),n("globalout",Yk)}(r,t),(Hk(r).records[e]||(Hk(r).records[e]={})).handler=n}}function Yk(e,t,n){e.handler("leave",null,n)}function Gk(e,t,n,r){t.handler(e,n,r)}function qk(e,t){if(!Ll.node){var n=t.getZr();(Hk(n).records||{})[e]&&(Hk(n).records[e]=null)}}var Qk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Wk("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){qk("axisPointer",t)},t.prototype.dispose=function(e,t){qk("axisPointer",t)},t.type="axisPointer",t}(fC),Zk=Qk;function Xk(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Rf(o,e);if(null==a||a<0||mu(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=o.mapDimension(d),f=[];f[p]=o.get(h,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(cu(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var $k=Nf();function Kk(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||fu(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){rR(i)&&(i=Xk({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=rR(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||rR(i),p={},h={},f={list:[],map:{}},g={showPointer:gu(eR,h),showTooltip:gu(tR,f)};uu(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);uu(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&Jk(e,a,g,!1,p)}}))}));var m={};return uu(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&uu(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,nR(t),nR(e)))),m[e.key]=o}}))})),uu(m,(function(e,t){Jk(c[t],e,g,!0,p)})),function(e,t,n){var r=n.axesInfo=[];uu(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,p),function(e,t,n,r){if(rR(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=$k(r)[i]||{},a=$k(r)[i]={};uu(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&uu(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];uu(o,(function(e,t){!a[t]&&l.push(e)})),uu(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function Jk(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return uu(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,i=u,o.length=0),uu(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&iu(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function eR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function tR(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=ck(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function nR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function rR(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function iR(e){hk.registerAxisPointerClass("CartesianAxisPointer",Uk),e.registerComponentModel(zk),e.registerComponentView(Zk),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!mu(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=ak(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Kk)}function oR(e){sI(Sk),sI(iR)}var aR="\0_ec_interaction_mutex";function sR(e,t){return!!lR(e)[t]}function lR(e){return e[aR]||(e[aR]={})}lA({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Wu);var uR=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=fu(n._mousedownHandler,n),i=fu(n._mousemoveHandler,n),o=fu(n._mouseupHandler,n),a=fu(n._mousewheelHandler,n),s=fu(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=ou(nu(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return L(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Ec(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&pR("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!sR(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Ac(e.event),dR(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Ec(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=pR("zoomOnMouseWheel",e,this._opt),n=pR("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;cR(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);cR(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){sR(this._zr,"globalPan")||cR(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(lc);function cR(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(Ac(r.event),dR(e,t,n,r,i))}function dR(e,t,n,r,i){i.isAvailableBehavior=fu(pR,null,n,r),e.trigger(t,i)}function pR(e,t,n){var r=n[e];return!e||r&&(!yu(r)||t.event[r+"Key"])}var hR=uR,fR={axisPointer:1,tooltip:1,brush:1};function gR(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=vR(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=vR(s,[0,a]),i=o=vR(s,[i,o]),r=0}t[0]=vR(t[0],n),t[1]=vR(t[1],n);var l=mR(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=vR(t[r],d),u=mR(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=mR(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function mR(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function vR(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var yR=!0,xR=Math.min,_R=Math.max,bR=Math.pow,wR="globalPan",SR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},TR={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},MR=0,AR=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Zh,n._uid="brushController_"+MR++,uu(eN,(function(e,t){this._handlers[t]=fu(e,this)}),n),n}return L(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){lR(e)[t]=n}(t,wR,this._uid),uu(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=ru(nu(TR),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=lR(e);r[t]===n&&(r[t]=null)}(e,wR,this._uid),uu(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};uu(e,(function(e){t[e.panelId]=nu(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=cu(e,(function(e){return ru(nu(TR),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new vA(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(a).update(a).remove((function(e){t[e]!==i&&r.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):IR(r,ER(r,s));kR(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),BR(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(lc);function ER(e,t){var n=nN[t.brushType].createCover(e,t);return n.__brushOption=t,OR(n,t),e.group.add(n),n}function IR(e,t){var n=RR(t);return n.endCreating&&(n.endCreating(e,t),OR(t,t.__brushOption)),t}function DR(e,t){var n=t.__brushOption;RR(t).updateCoverShape(e,t,n.range,n)}function OR(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function kR(e,t){RR(t).updateCommon(e,t),DR(e,t)}function RR(e){return nN[e.__brushOption.brushType]}function NR(e,t,n){var r,i=e._panels;if(!i)return yR;var o=e._transform;return uu(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function LR(e,t){var n=e._panels;if(!n)return yR;var r=t.__brushOption.panelId;return null!=r?n[r]:yR}function BR(e){var t=e._covers,n=t.length;return uu(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function PR(e,t){var n=cu(e._covers,(function(e){var t=e.__brushOption,n=nu(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function jR(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function FR(e,t,n,r){var i=new Zh;return i.add(new Um({name:"main",style:VR(n),silent:!0,draggable:!0,cursor:"move",drift:gu(GR,e,t,i,["n","s","w","e"]),ondragend:gu(PR,t,{isEnd:!0})})),uu(r,(function(n){i.add(new Um({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:gu(GR,e,t,i,n),ondragend:gu(PR,t,{isEnd:!0})}))})),i}function UR(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=_R(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],p=c-o+i/2,h=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;HR(e,t,"main",a,s,f,g),r.transformable&&(HR(e,t,"w",l,u,o,v),HR(e,t,"e",p,u,o,v),HR(e,t,"n",l,u,m,o),HR(e,t,"s",l,h,m,o),HR(e,t,"nw",l,u,o,o),HR(e,t,"ne",p,u,o,o),HR(e,t,"sw",l,h,o,o),HR(e,t,"se",p,h,o,o))}function zR(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(VR(n)),i.attr({silent:!r,cursor:r?"move":"default"}),uu([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?YR(e,n[0]):function(e,t){var n=[YR(e,t[0]),YR(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?CR[o]+"-resize":null})}))}function HR(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=xR(e[0][0],e[1][0]),n=xR(e[0][1],e[1][1]),r=_R(e[0][0],e[1][0]),i=_R(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(ZR(e,t,[[r,i],[r+o,i+a]])))}function VR(e){return ou({strokeNoScale:!0},e.brushStyle)}function WR(e,t,n,r){var i=[xR(e,n),xR(t,r)],o=[_R(e,n),_R(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function YR(e,t){var n=Vx({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return zx(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function GR(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=QR(t,i,o);uu(r,(function(e){var t=SR[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(WR(s[0][0],s[1][0],s[0][1],s[1][1])),kR(t,n),PR(t,{isEnd:!1})}function qR(e,t,n,r){var i=t.__brushOption.range,o=QR(e,n,r);uu(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),kR(e,t),PR(e,{isEnd:!1})}function QR(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function ZR(e,t,n){var r=LR(e,t);return r&&r!==yR?r.clipPath(n,e._transform):nu(n)}function XR(e){var t=e.event;t.preventDefault&&t.preventDefault()}function $R(e,t,n){return e.childOfName("main").contain(t,n)}function KR(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return bR(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&BR(e);var l=nu(s);l.brushType=JR(l.brushType,a),l.panelId=a===yR?null:a.panelId,o=e._creatingCover=ER(e,l),e._covers.push(o)}if(o){var u=nN[JR(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(ZR(e,o,e._track)),r&&(IR(e,o),u.updateCommon(e,o)),DR(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&NR(e,t,n)&&BR(e)&&(i={isEnd:r,removeOnClick:!0});return i}function JR(e,t){return"auto"===e?t.defaultBrushType:e}var eN={mousedown:function(e){if(this._dragging)tN(this,e);else if(!e.target||!e.target.draggable){XR(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=NR(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=NR(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===yR||s.panelId===o.panelId)&&nN[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){XR(e);var i=KR(this,e,r,!1);i&&PR(this,i)}},mouseup:function(e){tN(this,e)}};function tN(e,t){if(e._dragging){XR(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=KR(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&PR(e,o)}}var nN={lineX:rN(0),lineY:rN(1),rect:{createCover:function(e,t){function n(e){return e}return FR({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=jR(e);return WR(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){UR(e,t,n,r)},updateCommon:zR,contain:$R},polygon:{createCover:function(e,t){var n=new Zh;return n.add(new qy({name:"main",style:VR(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Wy({name:"main",draggable:!0,drift:gu(qR,e,t),ondragend:gu(PR,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:ZR(e,t,n)})},updateCommon:zR,contain:$R}};function rN(e){return{createCover:function(t,n){return FR({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=jR(t);return[xR(n[0][e],n[1][e]),_R(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=LR(t,n);if(a!==yR&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),UR(t,n,l,i)},updateCommon:zR,contain:$R}}var iN=AR;function oN(e){return e=lN(e),function(t){return Gx(t,e)}}function aN(e,t){return e=lN(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function sN(e,t,n){var r=lN(e);return function(e,i){return r.contain(i[0],i[1])&&!function(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!fR.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function lN(e){return Qc.create(e)}var uN=["x","y","radius","angle","single"],cN=["cartesian2d","polar","singleAxis"];function dN(e){return e+"Axis"}function pN(e,t){var n,r=Uu(),i=[],o=Uu();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function hN(e){var t=e.ecModel,n={infoList:[],infoMap:Uu()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(dN(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var fN=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),gN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return L(t,e),t.prototype.init=function(e,t,n){var r=mN(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=mN(e);ru(this.option,e,!0),ru(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;uu([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Uu();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return uu(uN,(function(n){var r=this.getReferringComponents(dN(n),Ff);if(r.specified){t=!0;var i=new fN;uu(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new fN;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",jf).models[0];a&&uu(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",jf).models[0]&&o.add(e.componentIndex)}))}}}r&&uu(uN,(function(t){if(r){var i=n.findComponents({mainType:dN(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new fN;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");uu([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(dN(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){uu(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(dN(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;uu([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;uu(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(kb);function mN(e){var t={};return uu(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var vN=gN,yN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(fC),xN=uu,_N=of,bN=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return au(cN,t)>=0}(t)){var n=dN(this._dimName),r=t.getReferringComponents(n,jf).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return nu(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];xN(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(tf(c,o,n))):(t=!0,c=tf(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c})),_N(s),_N(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";gR(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=tf(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];xN(n,(function(e){!function(e,t,n){t&&uu(rI(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=QE(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&xN(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=cu(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],p=u>o[1];if(c&&!d&&!p)return!0;c&&(i=!0),d&&(t=!0),p&&(n=!0)}return i&&t&&n}))}else xN(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));xN(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;xN(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=tf(n[0]+o,n,[0,100],!0):null!=i&&(o=tf(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=sf(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();var wN=bN,SN={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(dN(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new wN(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Uu();return uu(n,(function(e){uu(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var CN=!1;function TN(e){CN||(CN=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,SN),function(e){e.registerAction("dataZoom",(function(e,t){uu(pN(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}var MN=function(){},AN={};var EN=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],IN=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=ON(t,e);uu(kN,(function(e,t){(!n||!n.include||au(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=LN[e.brushType](0,n,t);e.__rangeOffset={offset:PN[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){uu(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&uu(r.coordSyses,(function(r){var i=LN[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){uu(e,(function(e){var n,r,i,o,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=LN[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?PN[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=FN(n),o=FN(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return cu(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:oN(r),isTargetByCursor:sN(r,e,n.coordSysModel),getLinearBrushOtherExtent:aN(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&au(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=ON(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<RN.length;s++)if(RN[s](r,o))return o}return!0},e}();function DN(e){return e[0]>e[1]&&e.reverse(),e}function ON(e,t){return Bf(e,t,{includeMainTypes:EN})}var kN={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Uu(),a={},s={};(n||r||i)&&(uu(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),uu(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),uu(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];uu(i.getCartesians(),(function(e,t){(au(n,e.getAxis("x").model)>=0||au(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:NN.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){uu(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:NN.geo})}))}},RN=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],NN={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(zx(e)),t}},LN={lineX:gu(BN,0),lineY:gu(BN,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[DN([i[0],o[0]]),DN([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:cu(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function BN(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=DN(cu([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var PN={lineX:gu(jN,0),lineY:gu(jN,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return cu(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function jN(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function FN(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var UN=IN,zN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(kb);function HN(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function VN(e){if(Ll.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var WN=VN(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function YN(e,t){if(!e)return t;t=hb(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var GN=YN(VN(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),qN=YN(WN,"transform"),QN="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ll.transform3dSupported?"will-change:transform;":"");function ZN(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ll.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Ll.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+qN+":"+a+";":[["top",0],["left",0],[WN,a]]}function XN(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=JS(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&i&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Ll.transformSupported?","+qN+r:",left"+r+",top"+r),GN+":"+i}(i,n)),o&&r.push("background-color:"+o),uu(["width","color","radius"],(function(t){var n="border-"+t,i=hb(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),uu(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+fb(d).join("px ")+"px"),r.join(";")+";"}function $N(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){fc(hc,t,r,i,!0)&&fc(e,n,hc[0],hc[1])}(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var KN=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ll.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;$N(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Tc(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t,n,r,i=this._container,o=(n="position",(r=(t=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t))?n?r[n]:r:null),a=i.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative");var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=QN+XN(e,!this._firstShow,this._longHide)+ZN(i[0],i[1],!0)+"border-color:"+xb(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(yu(i)&&"item"===n.get("trigger")&&!HN(n)&&(a=function(e,t,n){if(!yu(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=xb(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=qN+":";au(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,p=l+i,h=p*Math.abs(Math.cos(d))+p*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-p)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),yu(e))o.innerHTML=e+a;else if(e){o.innerHTML="",mu(e)||(e=[e]);for(var s=0;s<e.length;s++)Cu(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if($N(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;uu(ZN(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Ll.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(fu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),JN=KN;function eL(e){return Math.max(0,e)}function tL(e){var t=eL(e.shadowBlur||0),n=eL(e.shadowOffsetX||0),r=eL(e.shadowOffsetY||0);return{left:eL(t-n),right:eL(t+n),top:eL(t-r),bottom:eL(t+r)}}function nL(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var rL=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),nL(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;bu(e)&&xf(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new nv({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:JS(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),uu(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),uu(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=tL(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;nL(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=eL(i.borderWidth||0),a=tL(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(fu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),iL=new Um({shape:{x:-1,y:-1,width:2,height:2}}),oL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.init=function(e,t){if(!Ll.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Ll.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new rL(t):new JN(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!Ll.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?IC(this,"_updatePosition",50,"fixRate"):DC(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");Wk("itemTooltip",this._api,fu((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ll.node&&n.getDom()){var i=sL(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=Pf(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Uf(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=rv(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=iL;l.x=r.x,l.y=r.y,l.update(),rv(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=Xk(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(sL(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===aL([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,yT(n,(function(e){return null!=rv(e).dataIndex?(i=e,!0):null!=rv(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=fu(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=aL([t.tooltipOption],r),a=this._renderMode,s=[],l=WS("section",{blocks:[],noHeader:!0}),u=[],c=new eC;uu(e,(function(e){uu(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=Nk(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=WS("section",{header:o,noHeader:!Ru(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),uu(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=JE(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",xb(f.color),a);var g=hS(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var v=aL([p],r).get("valueFormatter");d.blocks.push(v?iu({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,p=o.get("order"),h=XS(l,c,a,p,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=rv(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=aL([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new eC;g.marker=m.makeTooltipMarker("item",xb(g.color),d);var v=hS(s.formatTooltip(l,!1,u)),y=h.get("order"),x=h.get("valueFormatter"),_=v.frag,b=_?XS(x?iu({valueFormatter:x},_):_,m,d,y,r.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=rv(t),i=r.tooltipConfig.option||{};if(yu(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:i.content});var s=e.positionDefault,l=aL(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new eC;this._showOrMove(l,(function(){var n=nu(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(yu(c)){var h=e.ecModel.get("useUTC"),f=mu(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=Z_(f.axisValue,d,h)),d=yb(d,n,!0)}else if(vu(c)){var g=fu((function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||mu(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:mu(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),vu(t)&&(t=t([n,r],o,i.el,p,{viewSize:[s,l],contentSize:u.slice()})),mu(t))n=nf(t[0],s),r=nf(t[1],l);else if(bu(t)){var h=t;h.width=u[0],h.height=u[1];var f=Mb(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(yu(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,p,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>r?e-=l+o:e+=o);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=lL(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=lL(d)?u[1]/2:"bottom"===d?u[1]:0),HN(e)){g=function(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&uu(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&uu(a,(function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&uu(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&uu(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Ll.node&&t.getDom()&&(DC(this,"_updatePosition"),this._tooltipContent.dispose(),qk("itemTooltip",t))},t.type="tooltip",t}(fC);function aL(e,t,n){var r,i=t.ecModel;n?(r=new T_(n,i,i),r=new T_(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof T_&&(a=a.get("tooltip",!0)),yu(a)&&(a={formatter:a}),a&&(r=new T_(a,r,i)))}return r}function sL(e,t){return e.dispatchAction||fu(t.dispatchAction,t)}function lL(e){return"center"===e||"middle"===e}var uL=oL;function cL(e){sI(iR),e.registerComponentModel(zN),e.registerComponentView(uL),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Wu),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Wu)}var dL=["rect","polygon","keep","clear"];function pL(e,t){var n=wf(e?e.brush:[]);if(n.length){var r=[];uu(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;mu(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};uu(e,(function(e){t[e]=1})),e.length=0,uu(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,dL)}}var hL=uu,fL=bu,gL=-1,mL=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=nu(t);this.type=r,this.mappingMethod=n,this._normalizeData=ML[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(vL(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,uu(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(hL(t,(function(e,t){n[e]=t})),!mu(r)){var i=[];bu(r)?hL(r,(function(e,t){var r=n[t];i[null!=r?r:gL]=e})):i[-1]=r,r=TL(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):vL(i,!0):(ku("linear"!==n||i.dataExtent),vL(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return fu(this._normalizeData,this)},e.listVisualTypes=function(){return hu(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){bu(e)?uu(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=mu(t)?[]:bu(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&hL(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(mu(e))e=e.slice();else{if(!fL(e))return[];var t=[];hL(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||yu(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(AL(c[1],e,u[1]))return o}else if(u[1]===1/0){if(AL(c[0],u[0],e))return o}else if(AL(c[0],u[0],e)&&AL(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:_L("color"),getColorMapper:function(){var e=this.option;return fu("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),bL.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=cp(t,e.parsedVisual,r),i?r:pp(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return pp(cp(e,this.option.parsedVisual),"rgba")},category:bL,piecewise:function(e,t){var n=CL.call(this,t);return null==n&&(n=pp(cp(e,this.option.parsedVisual),"rgba")),n},fixed:wL}},colorHue:yL((function(e,t){return dp(e,t)})),colorSaturation:yL((function(e,t){return dp(e,null,t)})),colorLightness:yL((function(e,t){return dp(e,null,null,t)})),colorAlpha:yL((function(e,t){return function(e,t){var n=sp(e);if(n&&null!=t)return n[3]=$d(t),pp(n,"rgba")}(e,t)})),decal:{applyVisual:_L("decal"),_normalizedToVisual:{linear:null,category:bL,piecewise:null,fixed:null}},opacity:{applyVisual:_L("opacity"),_normalizedToVisual:SL([0,1])},liftZ:{applyVisual:_L("liftZ"),_normalizedToVisual:{linear:wL,category:wL,piecewise:wL,fixed:wL}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:xL,category:bL,piecewise:function(e,t){var n=CL.call(this,t);return null==n&&(n=xL.call(this,e)),n},fixed:wL}},symbolSize:{applyVisual:_L("symbolSize"),_normalizedToVisual:SL([0,1])}},e}();function vL(e,t){var n=e.visual,r=[];bu(n)?hL(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),TL(e,r)}function yL(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:SL([0,1])}}function xL(e){var t=this.option.visual;return t[Math.round(tf(e,[0,1],[0,t.length-1],!0))]||{}}function _L(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function bL(e){var t=this.option.visual;return t[this.option.loop&&e!==gL?e%t.length:e]}function wL(){return this.option.visual[0]}function SL(e){return{linear:function(t){return tf(t,e,this.option.visual,!0)},category:bL,piecewise:function(t,n){var r=CL.call(this,n);return null==r&&(r=tf(t,e,this.option.visual,!0)),r},fixed:wL}}function CL(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[mL.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function TL(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=cu(t,(function(e){var t=sp(e);return t||[0,0,0,1]}))),t}var ML={linear:function(e){return tf(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=mL.findPieceIndex(e,t,!0);if(null!=n)return tf(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?gL:t},fixed:Wu};function AL(e,t,n){return e?t<=n:t<n}var EL=mL,IL=uu;function DL(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var OL={lineX:kL(0),lineY:kL(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&uI(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,l=r[0];return!!(uI(r,i,o)||uI(r,i+a,o)||uI(r,i,o+s)||uI(r,i+a,o+s)||Qc.create(e).contain(l[0],l[1])||Qx(i,o,i+a,o,r)||Qx(i,o,i,o+s,r)||Qx(i+a,o,i+a,o+s,r)||Qx(i,o+s,i+a,o+s,r))||void 0}}};function kL(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return RL(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),RL(s[0],a)||RL(s[1],a)||RL(a[0],s)||RL(a[1],s)}}}}function RL(e,t){return t[0]<=e&&e<=t[1]}var NL=["inBrush","outOfBrush"],LL="__ecBrushSelect",BL="__ecInBrushSelectEvent";function PL(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new UN(t.option,e)).setInputRanges(t.areas,e)}))}function jL(e,t,n){var r,i,o=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),PL(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:nu(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,i=s.throttleDelay);var h=cu(t.areas,(function(e){var t=zL[e.brushType],n=ou({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return OL[t].point(r,n,e)},rect:function(r){return OL[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return IL(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);IL(e[t],(function(e,r){if(EL.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new EL(i),"opacity"===r&&((i=nu(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new EL(i))}}))})),r}(t.option,NL,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}mu(l)&&uu(l,(function(e){u[e]=1})),e.eachSeries((function(n,r){var i=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,r):function(n,r,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(mu(n)?au(n,t)<0:t!==n)}(t,r))return;if(uu(h,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),p=p||m(i)})),g(r)&&m(i)){var o=n.getData();o.each((function(e){UL(n,i,o,e)&&(c[e]=1)}))}}(n,r,i)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],i=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return UL(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return mT(n,a,e)}function u(e,t){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=r.call(i,e),h=t[p],f=s[p],g=0,m=f.length;g<m;g++){var v=f[g];h[v]&&h[v].applyVisual(e,l,u)}}uu(e,(function(e){var n=EL.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(NL,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[BL])return;o[LL]||(o[LL]=FL);var a=IC(o,LL,n,t);a(e,r)}(t,r,i,o,n)}function FL(e,t){if(!e.isDisposed()){var n=e.getZr();n[BL]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[BL]=!1}}function UL(e,t,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}var zL={rect:function(e){return HL(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[r];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&HL(t)}};function HL(e){return new Qc(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var VL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new iN(t.getZr())).on("brush",fu(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){PL(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:nu(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:nu(n),$from:t})},t.type="brush",t}(fC),WL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return L(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;uu(n,(function(e){t.hasOwnProperty(e)&&DL(t[e])&&(r=!0)})),r&&uu(n,(function(n){t.hasOwnProperty(n)&&DL(t[n])?e[n]=nu(t[n]):delete e[n]}))}(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=cu(e,(function(e){return YL(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=YL(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(kb);function YL(e,t){return ru({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new T_(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var GL=WL,qL=["rect","polygon","lineX","lineY","keep","clear"],QL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,uu(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return uu(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:qL.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:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(MN),ZL=QL;function XL(e){e.registerComponentView(VL),e.registerComponentModel(GL),e.registerPreprocessor(pL),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,jL),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Wu),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Wu),function(e,t){AN[e]=t}("brush",ZL)}var $L=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return L(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(kb),KL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Eu(e.get("textBaseline"),e.get("textVerticalAlign")),l=new nv({style:o_(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new nv({style:o_(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",(function(){_b(p,"_"+e.get("target"))})),h&&d.on("click",(function(){_b(h,"_"+e.get("subtarget"))})),rv(l).eventData=rv(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Mb(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new Um({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(b)}},t.type="title",t}(fC);function JL(e){e.registerComponentModel($L),e.registerComponentView(KL)}function eB(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=cS(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(cS(e,t,n[a]));return o.join(" ")}}function tB(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!mu(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}var nB=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return L(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=OT(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=rB,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){kv(this.childAt(0))},t.prototype.downplay=function(){Rv(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):bx(p,d,a,n),Ex(p)}if(this._updateCommon(e,n,s,r,i),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Sx(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=i_(m),p=v.getShallow("scale"),h=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=kT(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof km){var w=f.style;f.useStyle(iu({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(iu({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var T=i&&i.useNameLabel;r_(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return T?e.getName(t):eB(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var A=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;M.scaleX=this._sizeX*A,M.scaleY=this._sizeY*A,this.setSymbolScale(1),Yv(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=rv(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&Tx(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Tx(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return mu(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(Zh);function rB(e,t){this.parent.drift(e,t)}var iB=nB;function oB(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function aB(e){return null==e||bu(e)||(e={isIgnore:e}),e||{}}function sB(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:i_(t),cursorStyle:t.get("cursor")}}var lB=function(){function e(e){this.group=new Zh,this._SymbolCtor=e||iB}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=aB(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=sB(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(oB(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var p=i.getItemGraphicEl(d),h=u(c);if(oB(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):bx(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=sB(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=aB(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(oB(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){Jx(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}(),uB=lB;function cB(e,t){return e.type===t}var dB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return L(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),mu(t)&&uu(t,(function(e,r){yu(e)&&(e={type:e}),t[r]=ru(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&Of(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=Uu(),o=cu(r,(function(e){return(yu(e)||_u(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new T_(e,this,this.ecModel))}),this);this._data=pu(o,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&uu(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;uu(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;uu(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&au(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(kb),pB=dB,hB=gu,fB=uu,gB=Zh,mB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return L(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new gB),this.group.add(this._selectorGroup=new gB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Mb(l,u,c),p=this.layoutInner(e,i,d,r,a,s),h=Mb(ou({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=fb(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new Um({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=Uu(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),fB(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new gB;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style");this._createItem(p,a,o,i,t,e,f,m,g,u,r).on("click",hB(vB,a,null,r,c)).on("mouseover",hB(xB,p.name,null,r,c)).on("mouseout",hB(_B,p.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),p=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),f=sp(p.fill);f&&0===f[3]&&(f[3]=.2,p=iu(iu({},p),{fill:pp(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},p,h,u,r).on("click",hB(vB,null,a,r,c)).on("mouseover",hB(xB,null,a,r,c)).on("mouseout",hB(_B,null,a,r,c)),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();fB(e,(function(e){var r=e.type,i=new nv({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),r_(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Wv(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,p=i.get("itemWidth"),h=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),fB(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?rM(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new gB,_=r.getModel("textStyle");if(!vu(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=OT(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:h,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,S=o,C=i.get("formatter"),T=t;yu(C)&&C?T=C.replace("{name}",null!=t?t:""):vu(C)&&(T=C(t));var M=f?_.getTextColor():r.get("inactiveColor");x.add(new nv({style:o_(_,{text:T,x:w,y:h/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var A=new Um({shape:x.getBoundingRect(),invisible:!0}),E=r.getModel("tooltip");return E.get("show")&&$x({el:A,componentModel:i,itemName:t,itemTooltipOption:E.option}),x.add(A),x.eachChild((function(e){e.silent=!0})),A.silent=!u,this.getContentGroup().add(x),Wv(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Tb(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){Tb("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===o?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-h]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(fC);function vB(e,t,n,r){_B(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),xB(e,t,n,r)}function yB(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function xB(e,t,n,r){yB(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function _B(e,t,n,r){yB(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var bB=mB;function wB(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function SB(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),uu(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function CB(e){e.registerComponentModel(pB),e.registerComponentView(bB),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,wB),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",gu(SB,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",gu(SB,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",gu(SB,"inverseSelect")),e.registerAction("legendSelect","legendselected",gu(SB,"select")),e.registerAction("legendUnSelect","legendunselected",gu(SB,"unSelect"))}(e)}function TB(e,t,n){var r=[1,1];r[e.getOrient().index]=0,Eb(t,n,{type:"box",ignoreSize:!!r})}var MB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Ib(t);e.prototype.init.call(this,t,n,r),TB(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),TB(this,this.option,t)},t.type="legend.scroll",t.defaultOption=E_(pB.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}(pB),AB=Zh,EB=["width","height"],IB=["x","y"],DB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return L(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new AB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new AB)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=mu(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",o=qx(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:fu(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new nv({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=EB[s],u=IB[s],c=EB[1-s],d=IB[1-s];i&&Tb("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=nu(n);i&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+p;else{var v=h[l]+p;f[s]-=v,m[u]-=v}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;Tb(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),Tb("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],v=Eu(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-p[i]:g[r]+=p[i]+v);m[1-r]+=d[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=h?n[i]:d[i],y[o]=Math.max(d[o],p[o]),y[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[i],h){var x={x:0,y:0};x[i]=Math.max(n[i]-p[i]-v,0),x[o]=y[o],u.setClipPath(new Um({shape:x})),u.__rectSize=x[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&bx(l,{x:_.contentPosition[0],y:_.contentPosition[1]},h?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;uu(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",yu(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=EB[i],a=IB[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=y(u);p.contentPosition[i]=-h.s;for(var f=s+1,g=h,m=h,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=v;for(f=s-1,g=h,m=h,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=v;return p;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(bB),OB=DB;function kB(e){sI(CB),e.registerComponentModel(MB),e.registerComponentView(OB),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}function RB(e){sI(CB),sI(kB)}var NB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="dataZoom.inside",t.defaultOption=E_(vN.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(vN),LB=Nf();function BB(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function PB(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function jB(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function FB(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=LB(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Uu());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){uu(hN(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:gu(jB,t),dispatchAction:gu(PB,e),dataZoomInfoMap:null,controller:null},r=n.controller=new hR(e.getZr());return uu(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Uu())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each((function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),IC(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else BB(r,e)}))}))}var UB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return L(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){LB(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:fu(zB.pan,this),zoom:fu(zB.zoom,this),scrollMove:fu(zB.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=LB(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||BB(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(yN),zB={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=VB[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return gR(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:HB((function(e,t,n,r,i,o){var a=VB[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:HB((function(e,t,n,r,i,o){return VB[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function HB(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return gR(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var VB={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},WB=UB;function YB(e){TN(e),e.registerComponentModel(NB),e.registerComponentView(WB),FB(e)}var GB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=E_(vN.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(vN),qB=Um,QB="horizontal",ZB="vertical",XB=["line","bar","candlestick","scatter"],$B={easing:"cubicOut",duration:100,delay:0},KB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return L(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=fu(this._onBrush,this),this._onBrushEnd=fu(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),IC(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){DC(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Zh;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===QB?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Ib(e.option);uu(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=Mb(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===ZB&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==QB||i?n===QB&&i?{scaleY:a?1:-1,scaleX:-1}:n!==ZB||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new qB({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new qB({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:fu(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:tf(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new Zh,r=new Wy({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new qy({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){uu(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&au(XB,e.get("type"))<0)){var a,s=r.getComponent(dN(i),o).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new qB({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new qB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),uu([0,1],(function(t){var o=a.get("handleIcon");!ET[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=OT(o,-1,0,2,2,null,!0);s.attr({cursor:JB(this._orient),draggable:!0,drift:fu(this._onDragMove,this,t),ondragend:fu(this._onDragEnd,this),onmouseover:fu(this._showDataInfo,this,!0),onmouseout:fu(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=nf(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Wv(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new nv({silent:!0,invisible:!0,style:o_(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var p=nf(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new Um({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=OT(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));(d=t.moveZone=new Um({invisible:!0,shape:{y:o[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:JB(this._orient),drift:fu(this._onDragMove,this,"all"),ondragstart:fu(this._showDataInfo,this,!0),ondragend:fu(this._onDragEnd,this),onmouseover:fu(this._showDataInfo,this,!0),onmouseout:fu(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[tf(e[0],[0,100],t,!0),tf(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];gR(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?tf(o.minSpan,a,i,!0):null,null!=o.maxSpan?tf(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=of([tf(r[0],i,a,!0),tf(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=of(n.slice()),i=this._size;uu([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new Um,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=of(this._handleEnds.slice());function d(e){var t=zx(n.handles[e].parent,this.group),a=Vx(0===e?"right":"left",t),s=this._handleWidth/2+5,l=Hx([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===QB?"middle":a,align:i===QB?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return vu(r)?r(e,o):yu(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,Ac(r.event);var i=Hx([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new jc(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=of([tf(n.x,r,i,!0),tf(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Ac(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new qB({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?$B:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=hN(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(yN);function JB(e){return"vertical"===e?"ns-resize":"ew-resize"}var eP=KB;function tP(e){e.registerComponentModel(GB),e.registerComponentView(eP),TN(e)}function nP(e){sI(YB),sI(tP)}var rP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return L(t,e),t.prototype.getInitialData=function(e){return ZA(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Zh,n=OT("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=OT(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?i:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(pC);function iP(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),o=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:_u(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=cu(e.dimensions,(function(e){return t.mapDimension(e)})),p=!1,h=t.getCalculationInfo("stackResultDimension");return QA(t,d[0])&&(p=!0,d[0]=h),QA(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function oP(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var aP=Math.min,sP=Math.max;function lP(e,t){return isNaN(e)||isNaN(t)}function uP(e,t,n,r,i,o,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(lP(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,p=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],S=t[2*b+1];w===v&&S===y&&m<r;)m++,g+=o,w=t[2*(b+=o)],S=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var C=m+1;if(l)for(;lP(w,S)&&C<r;)C++,w=t[2*(b+=o)],S=t[2*b+1];var T=.5,M=0,A=0,E=void 0,I=void 0;if(C>=r||lP(w,S))h=v,f=y;else{M=w-u,A=S-c;var D=v-u,O=w-v,k=y-c,R=S-y,N=void 0,L=void 0;if("x"===s){var B=M>0?1:-1;h=v-B*(N=Math.abs(D))*a,f=y,E=v+B*(L=Math.abs(O))*a,I=y}else if("y"===s){var P=A>0?1:-1;h=v,f=y-P*(N=Math.abs(k))*a,E=v,I=y+P*(L=Math.abs(R))*a}else N=Math.sqrt(D*D+k*k),h=v-M*a*(1-(T=(L=Math.sqrt(O*O+R*R))/(L+N))),f=y-A*a*(1-T),I=y+A*a*T,E=aP(E=v+M*a*T,sP(w,v)),I=aP(I,sP(S,y)),E=sP(E,aP(w,v)),f=y-(A=(I=sP(I,aP(S,y)))-y)*N/L,h=aP(h=v-(M=E-v)*N/L,sP(u,v)),f=aP(f,sP(c,y)),E=v+(M=v-(h=sP(h,aP(u,v))))*L/N,I=y+(A=y-(f=sP(f,aP(c,y))))*L/N}e.bezierCurveTo(d,p,h,f,v,y),d=E,p=I}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var cP=function(){this.smooth=0,this.smoothConstraint=!0},dP=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cP},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&lP(n[2*i-2],n[2*i-1]);i--);for(;r<i&&lP(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=uP(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=im.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(i[l++]){case o.M:n=i[l++],r=i[l++];break;case o.L:if(u=i[l++],c=i[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],p=i[l++],h=i[l++],f=i[l++];var v=a?Rd(n,u,d,h,e,s):Rd(r,c,p,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Od(r,c,p,f,x):Od(n,u,d,h,x);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(Tm),pP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t}(cP),hP=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return L(t,e),t.prototype.getDefaultShape=function(){return new pP},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&lP(n[2*o-2],n[2*o-1]);o--);for(;i<o&&lP(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=uP(e,n,i,o,o,1,t.smooth,a,t.connectNulls);uP(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(Tm);function fP(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,a=Math.floor(a),l=Math.round(l);var d=new Um({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=vu(i)?function(e){i(e,d)}:null;Sx(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function gP(e,t,n){var r=e.getArea(),i=rf(r.r0,1),o=rf(r.r,1),a=new Py({shape:{cx:rf(e.cx,1),cy:rf(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,Sx(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function mP(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function vP(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function yP(e,t){var n=vP(e),r=n[0],i=n[1],o=vP(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function xP(e){return _u(e)?e:e?.5:0}function _P(e,t,n,r){var i=t.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,h=[];l[o]=h[o]=p,l[1-o]=u[1-o],h[1-o]=c[1-o],a.push(l[0],l[1]),a.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function bP(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=sp(t[i]),s=sp(t[o]),l=r-i,u=pp([Xd(tp(a[0],s[0],l)),Xd(tp(a[1],s[1],l)),Xd(tp(a[2],s[2],l)),$d(tp(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function wP(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*iB.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return uu(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function SP(e,t){return[e[2*t],e[2*t+1]]}function CP(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<lv.length;t++)if(e.get([lv[t],"endLabel","show"]))return!0;return!1}function TP(e,t,n,r){if(cB(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=CP(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=fP(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return gP(t,n,r)}var MP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.init=function(){var e=new Zh,t=new uB;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===i.type,d=this._coordSys,p=this._symbolDraw,h=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),x=iP(i,a,y),_=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=vE(2*r),o=0;o<r;o++){var a=oP(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,x),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!c&&wP(e,a,i),C=this._data;C&&C.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),C.setItemGraphicEl(t,null))})),b||p.remove(),o.add(g);var T,M=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(T=i.getArea()).width?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var A=function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=cu(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=bP(u,"x"===i?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";uu(p,(function(e){e.offset=(e.coord-f)/m})),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var v=new ux(0,0,0,0,p,!0);return v[i]=f,v[i+"2"]=g,v}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&d.type===i.type&&M===this._step){v&&!f?f=this._newPolygon(u,_):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,xb(A));var E=g.getClipPath();if(E)Sx(E,{shape:TP(this,i,!1,e).shape},e);else g.setClipPath(TP(this,i,!0,e));b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),mP(this._stackedOnPoints,_)&&mP(this._points,u)||(m?this._doUpdateAnimation(a,_,i,n,M,y,w):(M&&(u=_P(u,i,M,w),_&&(_=_P(_,i,M,w))),h.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))}else b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,i,T),M&&(u=_P(u,i,M,w),_&&(_=_P(_,i,M,w))),h=this._newPolyline(u),v?f=this._newPolygon(u,_):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,xb(A)),g.setClipPath(TP(this,i,!0,e));var I=e.getModel("emphasis"),D=I.get("focus"),O=I.get("blurScope"),k=I.get("disabled");(h.useStyle(ou(s.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Qv(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);rv(h).seriesIndex=e.seriesIndex,Yv(h,D,O,k);var R=xP(e.get("smooth")),N=e.get("smoothMonotone");if(h.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var L=a.getCalculationInfo("stackedOnSeries"),B=0;f.useStyle(ou(l.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(B=xP(L.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:B,smoothMonotone:N,connectNulls:w}),Qv(f,e,"areaStyle"),rv(f).seriesIndex=e.seriesIndex,Yv(f,D,O,k)}var P=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=P)})),this._polyline.onHoverStateChange=P,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){rv(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=Rf(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new iB(i,o)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else CC.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Rf(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else CC.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Av(this._polyline,e),t&&Av(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new dP({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new hP({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");vu(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=vu(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var v=n;r?(p=v.x,h=v.x+v.width,f=e.x):(p=v.y+v.height,h=v.y,f=e.y)}var y=h===p?0:(f-p)/(h-p);a&&(y=1-y);var x=vu(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(CP(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new nv({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(r_(o,i_(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?tB(i,n):eB(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=o.get("precision"),h=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?h:0)*(m?-1:1),_=(g?0:-h)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,C=S[1]-S[0],T=void 0;if(C>=1){if(C>1&&!d){var M=SP(u,S[0]);s.attr({x:M[0]+x,y:M[1]+_}),i&&(T=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+x,y:M[1]+_});var A=c.getRawValue(S[0]),E=c.getRawValue(S[1]);i&&(T=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(_u(r))return rf(f=_f(n||0,r,i),o?Math.max(af(n||0),af(r)):t);if(yu(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=_f(p,h,i);a[c]=rf(f,o?Math.max(af(p),af(h)):t)}}return a}(n,p,A,E,w.t))}r.lastFrameIndex=S[0]}else{var I=1===e||r.lastFrameIndex>0?S[0]:0;M=SP(u,I);i&&(T=c.getRawValue(I)),s.attr({x:M[0]+x,y:M[1]+_})}if(i){var D=d_(s);"function"==typeof D.setLabelText&&D.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],p=[],h=[],f=[],g=iP(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],C=m[b+1],T=v[w],M=v[w+1];(isNaN(S)||isNaN(C))&&(S=T,C=M),l.push(S,C),u.push(T,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var A=x.idx,E=g.dataDimsForPoint,I=i.dataToPoint([t.get(E[0],A),t.get(E[1],A)]);w=2*A,l.push(I[0],I[1]),u.push(v[w],v[w+1]);var D=oP(g,i,t,A);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(A));break;case"-":_=!1}_&&(p.push(x),h.push(h.length))}h.sort((function(e,t){return f[e]-f[t]}));var O=l.length,k=vE(O),R=vE(O),N=vE(O),L=vE(O),B=[];for(y=0;y<h.length;y++){var P=h[y],j=2*y,F=2*P;k[j]=l[F],k[j+1]=l[F+1],R[j]=u[F],R[j+1]=u[F+1],N[j]=c[F],N[j+1]=c[F+1],L[j]=d[F],L[j+1]=d[F+1],B[y]=p[P]}return{current:k,next:R,stackedOnCurrent:N,stackedOnNext:L,status:B}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(i&&(d=_P(c.current,n,i,a),p=_P(c.stackedOnCurrent,n,i,a),h=_P(c.next,n,i,a),f=_P(c.stackedOnNext,n,i,a)),yP(d,h)>3e3||l&&yP(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),bx(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),bx(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(CC),AP=MP;var EP={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},IP=function(e){return Math.round(e.length/2)};function DP(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p));var h=void 0;yu(i)?h=EP[i]:vu(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,IP))}}}}}function OP(e){e.registerChartView(AP),e.registerSeriesModel(rP),e.registerLayout(function(e,t){return{seriesType:e,plan:gC(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=cu(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");QA(n,a[0])&&(a[0]=l),QA(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&vE(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);o?(i[h++]=f[0],i[h++]=f[1]):t.setItemLayout(p,f.slice())}o&&t.setLayout("points",i)}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,DP("line"))}var kP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.getInitialData=function(e,t){return ZA(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)uu(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,d=0;d<r.length;d++){var p=r[d].coord,h=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(h===a){u=p;break}if(h<a)l=p;else if(null!=l&&h>a){u=(p+l)/2;break}1===d&&(c=h-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(pC);pC.registerClass(kP);var RP=kP,NP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.getInitialData=function(){return ZA(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=E_(RP.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(RP),LP=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},BP=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return L(t,e),t.prototype.getDefaultShape=function(){return new LP},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*i+n,f*i+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(Tm),PP=BP;function jP(e,t,n){return t*Math.sin(e)*(n?-1:1)}function FP(e,t,n){return t*Math.cos(e)*(n?1:-1)}var UP=Math.max,zP=Math.min;var HP=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return L(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Jx(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=function(e,t){var n=e.getArea&&e.getArea();if(cB(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=XP[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Py:Um;return new r({shape:rj(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=XP[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&ZP[l.type](r)){var s=!1;p&&(s=VP[l.type](h,r));var m=WP[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),KP(m,a,t,n,r,e,i,"polar"===l.type),_?m.attr({shape:r}):d?YP(d,c,m,r,t,i,!1,!1):Sx(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=XP[l.type](a,t,r);if(g){var C=void 0;0===x.length?C=w(n):((C=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var T=XP[l.type](a,t);bx(C,{shape:rj(i,T,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&ZP[l.type](S)){var A=!1;if(p&&(A=VP[l.type](h,S))&&o.remove(M),M?Ex(M):M=WP[l.type](e,a,t,S,i,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),b){var E=M.getTextContent();if(E){var I=d_(E);null!=I.prevValue&&(I.prevValue=I.value)}}else KP(M,a,t,r,S,e,i,"polar"===l.type);_?M.attr({shape:S}):d?YP(d,c,M,S,t,i,!0,b):bx(M,{shape:S},e,t,null),a.setItemGraphicEl(t,M),M.ignore=A,o.add(M)}else o.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&Ax(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Zh);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),tj(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),tj(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?gP(e,t,n):"cartesian2d"===e.type?fP(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:cu(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){Ax(t,e,rv(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(CC),VP={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=UP(t.x,e.x),s=zP(t.x+t.width,i),l=UP(t.y,e.y),u=zP(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=zP(t.r,e.r),o=UP(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},WP={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new Um({shape:iu({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?PP:Py,c=new u({shape:r,z2:1});c.name="item";var d,p,h=$P(i);if(c.calculateTextPosition=(d=h,p=({isRoundCap:u===PP}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return Bh(e,t,n);var i=d(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,h=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=p?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(i){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+h*y(f)+jP(f,o+v,!1),b=l+h*x(f)+FP(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+h*y(f)+jP(f,-o+v,!1),b=l+h*x(f)+FP(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+h*y(m),b=l+h*x(m),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",S="top";break;case"endAngle":_=s+h*y(g)+jP(g,o+v,!0),b=l+h*x(g)+FP(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+h*y(g)+jP(g,-o+v,!0),b=l+h*x(g)+FP(g,-o+v,!0),w="right",S="middle";break;default:return Bh(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?bx:Sx)(c,{shape:g},o)}return c}};function YP(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?bx:Sx)(n,{shape:l},t,i,null),(a?bx:Sx)(n,{shape:u},t?e.baseAxis.model:null,i)}function GP(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var qP=["x","y","width","height"],QP=["cx","cy","r","startAngle","endAngle"],ZP={cartesian2d:function(e){return!GP(e,qP)},polar:function(e){return!GP(e,QP)}},XP={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}(n,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function $P(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function KP(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;iu(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;mu(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:cu(r,(function(e){return Lh(e,i)}))}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=i_(r);r_(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:eB(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(_u(r))e.setTextConfig({rotation:r});else if(mu(t))e.setTextConfig({rotation:0});else{var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?p:g,$P(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=d_(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,h,o.getRawValue(n),(function(e){return tB(t,e)}));var m=r.getModel(["emphasis"]);Yv(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Qv(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",uu(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var JP=function(){},ej=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return L(t,e),t.prototype.getDefaultShape=function(){return new JP},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(Tm);function tj(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new ej({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new ej({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),rv(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",nj),d.on("mousemove",nj)),n&&n.push(d)}var nj=EC((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[i]=o[p+2],s[r]=o[p+r],s[i]=o[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);rv(this).dataIndex=t>=0?t:null}),30,!1);function rj(e,t,n){if(cB(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var ij=HP;function oj(e){e.registerChartView(ij),e.registerSeriesModel(NP),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,gu(wE,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:gC(),reset:function(e){if(SE(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=QA(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),p=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),h=CE(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=h&&vE(3*i),u=h&&s&&vE(3*i),y=h&&vE(i),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?g:o,r),C=b.get(a,r),T=p,M=void 0;c&&(M=+S-b.get(o,r));var A=void 0,E=void 0,I=void 0,D=void 0;if(d){var O=n.dataToPoint([S,C]);c&&(T=n.dataToPoint([M,C])[0]),A=T,E=O[1]+v,I=O[0]-T,D=m,Math.abs(I)<f&&(I=(I<0?-1:1)*f)}else O=n.dataToPoint([C,S]),c&&(T=n.dataToPoint([C,M])[1]),A=O[0]+v,E=T,I=m,D=O[1]-T,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);h?(l[w]=A,l[w+1]=E,l[w+2]=d?I:D,u&&(u[w]=d?x.x:A,u[w+1]=d?E:x.y,u[w+2]=_),y[r]=r):t.setItemLayout(r,{x:A,y:E,width:I,height:D}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,DP("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var aj=Math.sin,sj=Math.cos,lj=Math.PI,uj=2*Math.PI,cj=180/lj,dj=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=vp(c-uj)||(u?l>=uj:-l>=uj),p=l>0?l%uj:l%uj+uj,h=!1;h=!!d||!vp(c)&&p>=lj==!!u;var f=e+n*sj(o),g=t+r*aj(o);this._start&&this._add("M",f,g);var m=Math.round(i*cj);if(d){var v=1/this._p,y=(u?1:-1)*(uj-v);this._add("A",n,r,m,1,+u,e+n*sj(o+y),t+r*aj(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*sj(a),_=t+r*aj(a);this._add("A",n,r,m,+h,+u,x,_)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),pj="none",hj=Math.round;var fj=["lineCap","miterLimit","lineJoin"],gj=cu(fj,(function(e){return"stroke-"+e.toLowerCase()}));function mj(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof km)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==pj}(t)){var o=gp(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*i:o.opacity*i;(r||a<1)&&e("fill-opacity",a)}else e("fill",pj);if(function(e){var t=e.stroke;return null!=t&&t!==pj}(t)){var s=gp(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*i:s.opacity*i,d=t.strokeFirst;if((r||1!==u)&&e("stroke-width",u),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||c<1)&&e("stroke-opacity",c),t.lineDash){var p=PT(n),h=p[0],f=p[1];h&&(f=hj(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",pj);for(var g=0;g<fj.length;g++){var m=fj[g];if(r||t[m]!==bm[m]){var v=t[m]||bm[m];v&&e(gj[g],v)}}}else r&&e("stroke",pj)}}var vj="http://www.w3.org/2000/svg",yj="http://www.w3.org/1999/xlink";function xj(e){return document.createElementNS(vj,e)}function _j(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function bj(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,i=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var i=t[r],o=r;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(i,o)+("style"!==i?yc(a):a||"")+(r?""+n+cu(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function wj(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Sj(e,t,n,r){return _j("svg","root",{width:e,height:t,xmlns:vj,"xmlns:xlink":yj,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var Cj={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"},Tj="transform-origin";function Mj(e,t,n){var r=iu({},e.shape);iu(r,t),e.buildPath(n,r);var i=new dj;return i.reset(Ap(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Aj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[Tj]=n+"px "+r+"px")}var Ej={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Ij(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Dj(e){return yu(e)?Cj[e]?"cubic-bezier("+Cj[e]+")":Vd(e)?e:"":""}function Oj(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof sx){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(uu(o,(function(e){var t=wj(n.zrId);t.animation=!0,Oj(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=hu(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=Ij(a,n);return r.replace(i,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],p=Dj(c.getClip().easing),h=c.getDelay();p?d.push(p):d.push("linear"),h&&d.push(h/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/i*100)+"%",h=Dj(c.easing),f=c.rawValue;(yu(f)||_u(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(S=(w=a[h]).targetName)?"shape"===S&&p(w,u):!r&&p(w,l)}for(var f in l){var g={};Ah(g,e),iu(g,l[f]);var m=Ep(g),v=l[f][d];c[f]=m?{transform:m}:{},Aj(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new im);var _=o.len();o.reset(),c[f].d=Mj(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var w,S;"style"===(S=(w=a[h]).targetName)&&p(w,c,(function(e){return Ej[e]}))}var C,T=hu(c),M=!0;for(h=1;h<T.length;h++){var A=T[h-1],E=T[h];if(c[A][Tj]!==c[E][Tj]){M=!1;break}C=c[A][Tj]}if(M&&C){for(var f in c)c[f][Tj]&&delete c[f][Tj];t[Tj]=C}if(pu(T,(function(e){return hu(c[e]).length>0})).length)return Ij(c,n)+" "+i[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}var kj=Math.round;function Rj(e){return e&&yu(e.src)}function Nj(e){return e&&vu(e.toDataURL)}function Lj(e,t,n,r){mj((function(i,o){var a="fill"===i||"stroke"===i;a&&Tp(o)?Yj(t,e,i,r):a&&wp(o)?Gj(n,e,i,r):e[i]=o}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[i];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=gp(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=_j("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[_j("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=Mp(a)}}(n,e,r)}function Bj(e){return vp(e[0]-1)&&vp(e[1])&&vp(e[2])&&vp(e[3]-1)}function Pj(e,t,n){if(t&&(!function(e){return vp(e[4])&&vp(e[5])}(t)||!Bj(t))){var r=n?10:1e4;e.transform=Bj(t)?"translate("+kj(t[4]*r)/r+" "+kj(t[5]*r)/r+")":function(e){return"matrix("+yp(e[0])+","+yp(e[1])+","+yp(e[2])+","+yp(e[3])+","+xp(e[4])+","+xp(e[5])+")"}(t)}}function jj(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(kj(r[o][0]*n)/n),i.push(kj(r[o][1]*n)/n);t.points=i.join(" ")}function Fj(e){return!e.smooth}var Uj,zj,Hj={circle:[(Uj=["cx","cy","r"],zj=cu(Uj,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<zj.length;r++){var i=zj[r],o=e[i[0]];null!=o&&(t[i[1]]=kj(o*n)/n)}})],polyline:[jj,Fj],polygon:[jj,Fj]};function Vj(e,t){var n=e.style,r=e.shape,i=Hj[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&Ap(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new dj),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return Pj(o,e.transform),Lj(o,n,e,t),t.animation&&Oj(e,o,t),_j(s,e.id+"",o)}function Wj(e,t){return e instanceof Tm?Vj(e,t):e instanceof km?function(e,t){var n=e.style,r=n.image;if(r&&!yu(r)&&(Rj(r)?r=r.src:Nj(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),Pj(a,e.transform),Lj(a,n,e,t),t.animation&&Oj(e,a,t),_j("image",e.id+"",a)}}(e,t):e instanceof Em?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||Pl,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Nh(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":_p[n.textAlign]||n.textAlign};if(Zm(n)){var l="",u=n.fontStyle,c=qm(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Bl,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),Pj(s,e.transform),Lj(s,n,e,t),t.animation&&Oj(e,s,t),_j("text",e.id+"",s,void 0,r)}}(e,t):void 0}function Yj(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Sp(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Cp(o))return;i="radialGradient",a.cx=Eu(o.x,.5),a.cy=Eu(o.y,.5),a.r=Eu(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*xp(s[u].offset)+"%",p=gp(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(_j("stop",u+"",g))}var m=bj(_j(i,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=_j(i,y,a,l)),t[n]=Mp(y)}function Gj(e,t,n,r){var i,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(bp(o)){var p=o.imageWidth,h=o.imageHeight,f=void 0,g=o.image;if(yu(g)?f=g:Rj(g)?f=g.src:Nj(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";ku(p,m),ku(h,m)}else if(null==p||null==h){var v=function(e,t){if(e){var n=e.elm,r=p||t.width,i=h||t.height;"pattern"===e.tag&&(c?(i=1,r/=a.width):d&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute("width",r),n.setAttribute("height",i))}},y=ng(f,null,e,(function(e){u||v(w,e),v(i,e)}));y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}i=_j("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else o.svgElement&&(i=nu(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=Ep(o);b&&(s.patternTransform=b);var w=_j("pattern","",s,[i]),S=bj(w),C=r.patternCache,T=C[S];T||(T=r.zrId+"-p"+r.patternIdx++,C[S]=T,s.id=T,w=r.defs[T]=_j("pattern",T,s,[i])),t[n]=Mp(T)}}function qj(e,t,n){var r=n.clipPathCache,i=n.defs,o=r[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=o,i[o]=_j("clipPath",o,a,[Vj(e,n)])}t["clip-path"]=Mp(o)}function Qj(e){return document.createTextNode(e)}function Zj(e,t,n){e.insertBefore(t,n)}function Xj(e,t){e.removeChild(t)}function $j(e,t){e.appendChild(t)}function Kj(e){return e.parentNode}function Jj(e){return e.nextSibling}function eF(e,t){e.textContent=t}var tF=_j("","");function nF(e){return void 0===e}function rF(e){return void 0!==e}function iF(e,t,n){for(var r={},i=t;i<=n;++i){var o=e[i].key;void 0!==o&&(r[o]=i)}return r}function oF(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function aF(e){var t,n=e.children,r=e.tag;if(rF(r)){var i=e.elm=xj(r);if(uF(tF,e),mu(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&$j(i,aF(o))}else rF(e.text)&&!bu(e.text)&&$j(i,Qj(e.text))}else e.elm=Qj(e.text);return e.elm}function sF(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&Zj(e,aF(o),t)}}function lF(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(rF(i.tag))Xj(Kj(i.elm),i.elm);else Xj(e,i.elm)}}function uF(e,t){var n,r=t.elm,i=e&&e.attrs||{},o=t.attrs||{};if(i!==o){for(n in o){var a=o[n];i[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?r.setAttributeNS(yj,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function cF(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(uF(e,t),nF(t.text)?rF(r)&&rF(i)?r!==i&&function(e,t,n){for(var r,i,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:oF(u,p)?(cF(u,p),u=t[++a],p=n[++s]):oF(c,h)?(cF(c,h),c=t[--l],h=n[--d]):oF(u,h)?(cF(u,h),Zj(e,u.elm,Jj(c.elm)),u=t[++a],h=n[--d]):oF(c,p)?(cF(c,p),Zj(e,c.elm,u.elm),c=t[--l],p=n[++s]):(nF(r)&&(r=iF(t,a,l)),nF(i=r[p.key])||(o=t[i]).tag!==p.tag?Zj(e,aF(p),u.elm):(cF(o,p),t[i]=void 0,Zj(e,o.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?sF(e,null==n[d+1]?null:n[d+1].elm,n,s,d):lF(e,t,a,l))}(n,r,i):rF(i)?(rF(e.text)&&eF(n,""),sF(n,null,i,0,i.length-1)):rF(r)?lF(n,r,0,r.length-1):rF(e.text)&&eF(n,""):e.text!==t.text&&(rF(r)&&lF(n,r,0,r.length-1),eF(n,t.text)))}var dF=0,pF=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=iu({},n),this.root=e,this._id="zr"+dF++,this._oldVNode=Sj(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=xj("svg");uF(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(oF(e,t))cF(e,t);else{var n=e.elm,r=Kj(n);aF(t),null!==r&&(Zj(r,t.elm,Jj(n)),lF(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return Wj(e,wj(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=wj(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=_j("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Tp(n))Yj({fill:n},i.attrs,"fill",r);else if(wp(n))Gj({style:{fill:n},dirty:Wu,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=gp(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=e.compress?null:this._mainVNode=_j("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=cu(hu(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(_j("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=cu(hu(e),(function(t){return t+i+cu(hu(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=cu(hu(t),(function(e){return"@keyframes "+e+i+cu(hu(t[e]),(function(n){return n+i+cu(hu(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=_j("style","stl",{},[],u);o.push(c)}}return Sj(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},bj(this.renderToVNode({animation:Eu(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Eu(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=i&&i.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var v={};qj(d[m],v,t);var y=_j("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=Wj(c,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&i&&(i.style.display="none",e=BT(r,0,n),t=BT(r,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(wp(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Ip(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var hF=pF;function fF(e,t,n){var r=zl.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var gF=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||gh,"string"==typeof t?i=fF(t,n,r):bu(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Hu(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return L(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=fF("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new Qc(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new Qc(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new Qc(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new Qc(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c]).shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function p(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Tu(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||NT(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=WT(i,t,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?p(0,0,o,a):n.length&&uu(n,(function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(lc),mF=gF,vF=1e5,yF=314159,xF=.01;var _F=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=iu({},n||{}),this.dpr=n.devicePixelRatio||gh,this._singleCanvas=i,this.root=e,e.style&&(Hu(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new mF(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=yF,o.push(yF),this._domRoot=e}else{this._width=BT(e,0,n),this._height=BT(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(vF)),r||(r=n.ctx).save(),JT(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(vF)},e.prototype.paintOne=function(e,t){KT(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;vd((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(yF).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=i[a],d=l.ctx,h=o&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b<h.length;++b){var w=h[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<i.length;h++)d(h);return Ll.wxa&&uu(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(JT(a,e,i,o),e.setPrevPaintRect(s))}else JT(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=yF);var n=this._layers[e];return n||((n=new mF("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?ru(n,this._layerConfig[e],!0):this._layerConfig[e-xF]&&ru(n,this._layerConfig[e-xF],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<e.length;i++){var s,l=(s=e[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?xF:0),this._needsManuallyCompositing),u.__builtin__||tu("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,uu(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ru(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+xF)ru(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(au(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=BT(i,0,r),t=BT(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(yF).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new mF("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];JT(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),bF=_F;function wF(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current}sI([JL,cL,RB,oR,nP,OP,oj,function(e){e.registerPainter("canvas",bF)},XL]);var SF=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,CF=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,TF=r.makeStyles((function(){return{outlierOnlyButton:{borderRadius:"8px"},metricPanel:{position:"relative"},overideMuiSelect:{"& .yb-MuiInput-input":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},"& .yb-MuiInput-root":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"}},overrideDefaultMuiSelect:{maxHeight:"300px","& .yb-MuiInput-root":{minWidth:"70px",height:"32px"},"& .yb-MuiSelect-select":{paddingRight:"24px !important"}},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},menuItem:{fontWeight:300,fontSize:"14px",padding:"15px 20px",height:"52px"},outlierButtonContainer:{position:"absolute",top:"12px",right:"8px",zIndex:2,pointerEvents:"auto",display:"flex"},prometheusIcon:{position:"absolute",top:"15px",right:"15px",marginLeft:"17px",marginTop:"5px"}}})),MF=S.default.memo((function(n){var i,a,s=n.metricData,l=n.appName,u=n.metricKey,c=n.metricMeasure,d=n.operations,p=n.groupByOperations;n.height;var h=n.timezone,f=n.graphTitle,g=n.graphType,m=n.queryData,v=n.dateTimeRange,y=n.isHistoricalQueryView,x=n.showTitle,_=void 0===x||x,b=n.onEChartsDateSelect,w=n.onSelectAshLabel,S=n.registerChartInstance,C=TF(),T=d,M="".concat("echart-").concat(u),A=t.useState(null==p?void 0:p[0]),E=A[0],I=A[1],D=t.useState(null==T?void 0:T[0]),O=D[0],k=D[1],R=t.useState("undefined"!=typeof window?window.innerWidth:1280),N=R[0],L=R[1],P=t.useState([]),j=P[0],F=P[1],z=t.useRef(j),V=t.useRef(null),W=t.useRef(null),Y=wF(s),G=t.useCallback((function(){var e,t,n=g===exports.GraphType.SINGLE_SUPPORTING||g===exports.GraphType.MAIN_RCA,r=null===(t=null===(e=V.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:N;if(n)return Math.max(.99*i,250);var o=Math.floor(i/500),a=16*((o=Math.max(1,o))-1),s=Math.floor((i-a)/o);return Math.max(Math.min(s,SF),l===exports.AppName.YBM?CF:490)}),[g,N]),q=t.useCallback((function(e){var t,n,r,i,o,a,u,p=AO(s,5),g=_?null!=f?f:null===(t=p.layout)||void 0===t?void 0:t.title:"";if(!Qi(p)||!qi(p.data))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:g,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"}},legend:{data:[]},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};var y=c===exports.MetricMeasure.OUTLIER,x=c===exports.MetricMeasure.OUTLIER_TABLES,b=c===exports.MetricMeasure.OUTLIER_DB,w=null!=e?e:null==d?void 0:d[0];((null==d?void 0:d.length)||e)&&(y||x||b)&&(p.data=p.data.filter((function(e){return(null==e?void 0:e.name)===w})));var S=null!==(o=null===(i=null===(r=null===(n=p.layout)||void 0===n?void 0:n.yaxis)||void 0===r?void 0:r.ticksuffix)||void 0===i?void 0:i.replace(/(&nbsp;|\s)+/g,""))&&void 0!==o?o:null,C=0,T=p.data.map((function(e,t){var n,r,i,o,a,s,l,u,d,f,g,v=e.name;if(e.instanceName&&e.name!==e.instanceName)v="".concat(e.name," (").concat(e.instanceName,")"),c===exports.MetricMeasure.OUTLIER&&(v=e.instanceName);else if(c!==exports.MetricMeasure.OUTLIER||e.instanceName||e.global){if(x)v=e.tableName;else if(b)v=e.dbName;else if((null===(n=null==p?void 0:p.layout)||void 0===n?void 0:n.type)===Cr&&c===exports.MetricMeasure.OVERALL&&(null===(o=null===(i=null===(r=null==p?void 0:p.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===exports.WaitEventClassification.QUERY_ID){var y=null==m?void 0:m.find((function(t){return t.id.queryId===e.name}));v=null==y?void 0:y.query}}else v=Ir.NODE_AVERAGE;var _=v,w=(null==v?void 0:v.length)>30;(null===(a=null==p?void 0:p.layout)||void 0===a?void 0:a.type)===Cr&&c===exports.MetricMeasure.OVERALL&&(null===(u=null===(l=null===(s=null==p?void 0:p.layout)||void 0===s?void 0:s.metadata)||void 0===l?void 0:l.currentGroupBy)||void 0===u?void 0:u[0])===exports.WaitEventClassification.QUERY_ID?_=(null==v?void 0:v.substring(0,30))+"...":w&&c!==exports.MetricMeasure.OUTLIER?_=v.substring(0,30)+"...":c!==exports.MetricMeasure.OUTLIER||e.global?x?_=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:b&&(_=e.namespaceName):_=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):Ir.NODE_AVERAGE;var S=e.x.map((function(t,n){return[t,e.y[n]]})),C=(null===(d=null==p?void 0:p.layout)||void 0===d||d.type,S);return B(B({name:_,fullname:v,type:(null===(f=null==p?void 0:p.layout)||void 0===f?void 0:f.type)===Cr?"bar":"line",data:C,color:yi[t%yi.length]},e.name===Ir.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:h});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:(null===(g=null==p?void 0:p.layout)||void 0===g?void 0:g.type)===Cr?"total":void 0,smooth:!1,showSymbol:!1})}));Qi(null===(a=p.layout)||void 0===a?void 0:a.yaxis)&&"µs"===S&&qi(p.data)&&Ki(p.data)&&(T.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),S="ms");var M=0;T.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>M&&(M=t)}));C=1.5*M,(null===(u=null==p?void 0:p.layout)||void 0===u?void 0:u.type)===Cr&&(C=3.5*M),0===C&&(C=1.01);var A={title:{text:l!==exports.AppName.YBA&&S?"".concat(g," (").concat(S,")"):g,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:Ar,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",formatter:function(e){var t,n=(null===(t=e[0])||void 0===t?void 0:t.axisValue)||"",r=new Date(n),i=Sl(h?Cl(r,h):r,"MMM d HH:mm (zzz)",{timeZone:null!=h?h:void 0}),o=e.map((function(e){var t=e.value[1],n=ba(e.color,e.seriesName),r=wa(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(i,'</b><br/><span style="margin-top: 16px;">').concat(o,"</span></div>")}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:{left:"3%",right:"4%",bottom:"20%",containLabel:!0,top:"22%"},xAxis:{type:"time",boundaryGap:!1,splitNumber:6,axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},interval:"auto",formatter:function(e){var t,n=new Date(e),r=(t=v.startDateTime,(v.endDateTime-t)/864e5);return Sl(n,r>5?"MM/dd":r>2&&r<=5?"MM/dd, HH:mm":"HH:mm")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}}},yAxis:{type:"value",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},formatter:function(e){return"".concat(null==e?void 0:e.toFixed(2)," ").concat(null!=S?S:"")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}},min:0,max:C},series:T,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0},legend:{type:T.length>3?"scroll":"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:Ar},symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,bottom:10,data:T.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return A}),[l,v,f,s,c,d,m,_,h]),Q=function(e){var t,n,r,i,o;null===(t=null==e?void 0:e.current)||void 0===t||t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}});var a=!1,s=null;null===(r=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getZr())||void 0===r||r.on("mousedown",(function(t){var n,r,i=[t.offsetX,t.offsetY],o=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},i);s=null!==(r=null==o?void 0:o[0])&&void 0!==r?r:null,a=!0})),null===(o=null===(i=null==e?void 0:e.current)||void 0===i?void 0:i.getZr())||void 0===o||o.on("mouseup",(function(t){var n;if(a){var r=[t.offsetX,t.offsetY],i=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},r),o=null==i?void 0:i[0];if(null!==s&&null!==o&&Math.abs(o-s)>10){var l=Math.min(s,o),u=Math.max(s,o);b(l,u)}}a=!1}))},Z=t.useCallback((function(){var e;if(V.current){W.current||(W.current=tA(V.current,"light",{renderer:"canvas"})),S&&S(W.current);var t=q(O);W.current.setOption(t,!0),g===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=W.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==V?void 0:V.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),Q(W)})):(null===(e=W.current)||void 0===e||e.resize({width:G()}),Q(W)),function(e){var t;null===(t=null==e?void 0:e.current)||void 0===t||t.on("legendselectchanged",(function(t){var n,r,i=t.name,o=U([],z.current,!0),a=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===z.current.length||z.current.length===s.length?[i]:z.current.includes(i)?z.current.filter((function(e){return e!==i})):U(U([],z.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),F(o)}))}(W)}}),[O,q,G]);t.useEffect((function(){var e=function(){return L(window.innerWidth)};return window.addEventListener("resize",e),Z(),function(){window.removeEventListener("resize",e),W.current&&(W.current.dispose(),W.current=null)}}),[Z]),t.useEffect((function(){z.current=j}),[j]),t.useEffect((function(){var e;if(W.current){var t=q(O);W.current.setOption(t,!0),g===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=W.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==V?void 0:V.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),Q(W)})):(null===(e=W.current)||void 0===e||e.resize({width:G()}),Q(W))}}),[s,Y,O,E,G,q]);t.useEffect((function(){var e;W.current&&(g===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=W.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==V?void 0:V.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=W.current)||void 0===e||e.resize({width:G()}))}),[N,G]);var X=O||(null==d?void 0:d[0]);return e.jsxs(r.Box,B({id:u,onClick:function(e){return e.stopPropagation()},className:C.metricPanel},{children:[e.jsxs("span",B({className:C.outlierButtonContainer},{children:[(null===(i=null==s?void 0:s.layout)||void 0===i?void 0:i.type)===Cr&&(c===exports.MetricMeasure.OUTLIER||c===exports.MetricMeasure.OUTLIER_TABLES||c===exports.MetricMeasure.OUTLIER_DB||y)&&qi(p)&&e.jsx(r.Box,B({ml:2,mr:2},{children:e.jsx(o.YBSelect,B({value:E,className:H(C.outlierOnlyButton,C.overrideDefaultMuiSelect,C.overrideDefaultMuiFormControl),dataTestId:"group-by-operation-select"},{children:null==p?void 0:p.map((function(t,n){return e.jsx(r.MenuItem,B({value:t,onClick:function(e){!function(e){var t;I(e),(null===(t=null==s?void 0:s.layout)||void 0===t?void 0:t.type)!==Cr||c!==exports.MetricMeasure.OUTLIER&&c!==exports.MetricMeasure.OUTLIER_TABLES&&c!==exports.MetricMeasure.OUTLIER_DB&&!y||null==w||w(e,s,!!y)}(t),e.stopPropagation()}},{children:t}),n)}))}))})),qi(T)&&((null===(a=null==s?void 0:s.layout)||void 0===a?void 0:a.type)===Cr||(null==T?void 0:T.length)>1)&&e.jsx(r.Box,B({mr:2},{children:e.jsx(o.YBSelect,B({value:O,className:H(C.outlierOnlyButton,C.overrideDefaultMuiSelect,C.overrideDefaultMuiFormControl),dataTestId:"metric-operation-select"},{children:null==T?void 0:T.map((function(t,n){return e.jsx(r.MenuItem,B({className:H(t===X&&C.overideMuiSelect,C.menuItem),value:t,onClick:function(e){!function(e){var t;if(k(e),(null===(t=null==s?void 0:s.layout)||void 0===t?void 0:t.type)===Cr&&c===exports.MetricMeasure.OVERALL&&qi(d)&&(null==w||w(e,s,!!y)),W.current){var n=q(e);W.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))}))]})),e.jsx("div",{ref:V,id:M,style:{overflow:"hidden",position:"relative",zIndex:1,minHeight:l===exports.AppName.WEB?320:340,width:"100%",minWidth:0}})]}))})),AF={exports:{}},EF=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},IF=EF,DF=Object.prototype.toString;function OF(e){return"[object Array]"===DF.call(e)}function kF(e){return void 0===e}function RF(e){return null!==e&&"object"==typeof e}function NF(e){if("[object Object]"!==DF.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function LF(e){return"[object Function]"===DF.call(e)}function BF(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),OF(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var PF={isArray:OF,isArrayBuffer:function(e){return"[object ArrayBuffer]"===DF.call(e)},isBuffer:function(e){return null!==e&&!kF(e)&&null!==e.constructor&&!kF(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:RF,isPlainObject:NF,isUndefined:kF,isDate:function(e){return"[object Date]"===DF.call(e)},isFile:function(e){return"[object File]"===DF.call(e)},isBlob:function(e){return"[object Blob]"===DF.call(e)},isFunction:LF,isStream:function(e){return RF(e)&&LF(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:BF,merge:function e(){var t={};function n(n,r){NF(t[r])&&NF(n)?t[r]=e(t[r],n):NF(n)?t[r]=e({},n):OF(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)BF(arguments[r],n);return t},extend:function(e,t,n){return BF(t,(function(t,r){e[r]=n&&"function"==typeof t?IF(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},jF=PF;function FF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var UF=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(jF.isURLSearchParams(t))r=t.toString();else{var i=[];jF.forEach(t,(function(e,t){null!=e&&(jF.isArray(e)?t+="[]":e=[e],jF.forEach(e,(function(e){jF.isDate(e)?e=e.toISOString():jF.isObject(e)&&(e=JSON.stringify(e)),i.push(FF(t)+"="+FF(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},zF=PF;function HF(){this.handlers=[]}HF.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},HF.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},HF.prototype.forEach=function(e){zF.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var VF,WF,YF,GF,qF,QF,ZF,XF,$F,KF,JF,eU,tU,nU,rU,iU,oU,aU,sU=HF,lU=PF,uU=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function cU(){if(WF)return VF;WF=1;var e=uU;return VF=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)},VF}function dU(){if(GF)return YF;GF=1;var e=cU();return YF=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function pU(){if(QF)return qF;QF=1;var e=PF;return qF=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(i)&&s.push("path="+i),e.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},qF}function hU(){return XF?ZF:(XF=1,ZF=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function fU(){return KF?$F:(KF=1,$F=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function gU(){if(eU)return JF;eU=1;var e=hU(),t=fU();return JF=function(n,r){return n&&!e(r)?t(n,r):r}}function mU(){if(nU)return tU;nU=1;var e=PF,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return tU=function(n){var r,i,o,a={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([i]):a[r]?a[r]+", "+i:i}})),a):a}}function vU(){if(iU)return rU;iU=1;var e=PF;return rU=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var yU,xU,_U,bU,wU,SU={exports:{}},CU={exports:{}},TU={exports:{}};function MU(){if(xU)return yU;xU=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return yU=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(i){var o=Math.abs(i);if(o>=r)return a(i,o,r,"day");if(o>=n)return a(i,o,n,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},yU}function AU(){if(bU)return _U;return bU=1,_U=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=MU(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},_U}var EU,IU,DU,OU,kU,RU,NU,LU,BU,PU={exports:{}};function jU(){return IU?EU:(IU=1,EU=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function FU(){return kU||(kU=1,function(e,t){const n=I.default,r=D.default;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(OU)return DU;OU=1;const e=O.default,t=I.default,n=jU(),{env:r}=process;let i;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,o){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===i)return 0;const a=i||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),DU={supportsColor:function(e){return o(a(e,e&&e.isTTY))},stdout:o(a(!0,t.isatty(1))),stderr:o(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=AU()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(PU,PU.exports)),PU.exports}function UU(){return RU||(RU=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?CU.exports=(wU||(wU=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=AU()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(TU,TU.exports)),TU.exports):CU.exports=FU()),CU.exports}function zU(){if(BU)return SU.exports;BU=1;var e,t,n,r=M.default,i=r.URL,o=C.default,a=T.default,s=A.default.Writable,l=E.default,u=function(){return LU||(LU=1,NU=function(){if(!e){try{e=UU()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),NU;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=L(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var c=!1;try{l(new i(""))}catch(e){c="ERR_INVALID_URL"===e.code}var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);p.forEach((function(e){h[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=k("ERR_INVALID_URL","Invalid URL",TypeError),g=k("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=k("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),v=k("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=k("ERR_STREAM_WRITE_AFTER_END","write after end"),x=s.prototype.destroy||w;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",a=n[o]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,i&&s instanceof i?e=D(e):N(e)?e=D(S(e)):(a=r,r=I(e),e={protocol:o}),L(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,N(r.host)||N(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new _(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function S(e){var t;if(c)t=new i(e);else if(!N((t=I(r.parse(e))).protocol))throw new f({input:e});return t}function I(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new f({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new f({input:e.href||e});return e}function D(e,t){var n=t||{};for(var r of d)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function O(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function k(e,t,n){function r(n){L(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function R(e,t){for(var n of p)e.removeListener(n,h[n]);e.on("error",w),e.destroy(t)}function N(e){return"string"==typeof e||e instanceof String}function L(e){return"function"==typeof e}return _.prototype=Object.create(s.prototype),_.prototype.abort=function(){R(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return R(this._currentRequest,e),x.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!N(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;L(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new v),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(L(e)?(n=e,e=t=null):L(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,p))i.on(o,h[o]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(R(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],O(/^content-/i,this._options.headers));var d=O(/^host$/i,this._options.headers),p=S(this._currentUrl),h=d||p.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(p,{host:h})),g=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",g.href),this._isRedirect=!0,D(g,this._options),(g.protocol!==p.protocol&&"https:"!==g.protocol||g.host!==h&&!function(e,t){l(N(e)&&N(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(g.host,h))&&O(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),L(a)){var v={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,v,y),this._sanitizeOptions(this._options)}this._performRequest()},SU.exports=b({http:o,https:a}),SU.exports.wrap=b,SU.exports}var HU,VU,WU={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function YU(){if(VU)return HU;VU=1;var e=PF,t=dU(),n=gU(),r=UF,i=C.default,o=T.default,a=zU().http,s=zU().https,l=M.default,u=k.default,c=WU,d=cU(),p=uU,h=/https:?/;function f(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,f(e,t,e.href)}}return HU=function(g){return new Promise((function(m,v){var y=function(e){m(e)},x=function(e){v(e)},_=g.data,b=g.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+c.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",g));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var w=void 0;g.auth&&(w=(g.auth.username||"")+":"+(g.auth.password||""));var S=n(g.baseURL,g.url),C=l.parse(S),T=C.protocol||"http:";if(!w&&C.auth){var M=C.auth.split(":");w=(M[0]||"")+":"+(M[1]||"")}w&&delete b.Authorization;var A=h.test(T),E=A?g.httpsAgent:g.httpAgent,I={path:r(C.path,g.params,g.paramsSerializer).replace(/^\?/,""),method:g.method.toUpperCase(),headers:b,agent:E,agents:{http:g.httpAgent,https:g.httpsAgent},auth:w};g.socketPath?I.socketPath=g.socketPath:(I.hostname=C.hostname,I.port=C.port);var D,O=g.proxy;if(!O&&!1!==O){var k=T.slice(0,-1)+"_proxy",R=process.env[k]||process.env[k.toUpperCase()];if(R){var N=l.parse(R),L=process.env.no_proxy||process.env.NO_PROXY,B=!0;if(L)B=!L.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e))}));if(B&&(O={host:N.hostname,port:N.port,protocol:N.protocol},N.auth)){var P=N.auth.split(":");O.auth={username:P[0],password:P[1]}}}}O&&(I.headers.host=C.hostname+(C.port?":"+C.port:""),f(I,O,T+"//"+C.hostname+(C.port?":"+C.port:"")+I.path));var j=A&&(!O||h.test(O.protocol));g.transport?D=g.transport:0===g.maxRedirects?D=j?o:i:(g.maxRedirects&&(I.maxRedirects=g.maxRedirects),D=j?s:a),g.maxBodyLength>-1&&(I.maxBodyLength=g.maxBodyLength);var F=D.request(I,(function(n){if(!F.aborted){var r=n,i=n.req||F;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==g.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(u.createUnzip()),delete n.headers["content-encoding"]}var o={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:g,request:i};if("stream"===g.responseType)o.data=r,t(y,x,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,g.maxContentLength>-1&&s>g.maxContentLength&&(r.destroy(),x(d("maxContentLength size of "+g.maxContentLength+" exceeded",g,null,i)))})),r.on("error",(function(e){F.aborted||x(p(e,g,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==g.responseType&&(n=n.toString(g.responseEncoding),g.responseEncoding&&"utf8"!==g.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,x,o)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(p(e,g,null,F))})),g.timeout){var U=parseInt(g.timeout,10);if(isNaN(U))return void x(d("error trying to parse `config.timeout` to int",g,"ERR_PARSE_TIMEOUT",F));F.setTimeout(U,(function(){F.abort(),x(d("timeout of "+U+"ms exceeded",g,g.transitional&&g.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}g.cancelToken&&g.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(p(e,g,null,F))})).pipe(F):F.end(_)}))}}var GU=PF,qU=function(e,t){lU.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},QU=uU,ZU={"Content-Type":"application/x-www-form-urlencoded"};function XU(e,t){!GU.isUndefined(e)&&GU.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var $U,KU={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?$U=function(){if(aU)return oU;aU=1;var e=PF,t=dU(),n=pU(),r=UF,i=gU(),o=mU(),a=vU(),s=cU();return oU=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var g=l.auth.username||"",m=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+m)}var v=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&($U=YU()),$U),transformRequest:[function(e,t){return qU(t,"Accept"),qU(t,"Content-Type"),GU.isFormData(e)||GU.isArrayBuffer(e)||GU.isBuffer(e)||GU.isStream(e)||GU.isFile(e)||GU.isBlob(e)?e:GU.isArrayBufferView(e)?e.buffer:GU.isURLSearchParams(e)?(XU(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):GU.isObject(e)||t&&"application/json"===t["Content-Type"]?(XU(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&GU.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw QU(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};KU.headers={common:{Accept:"application/json, text/plain, */*"}},GU.forEach(["delete","get","head"],(function(e){KU.headers[e]={}})),GU.forEach(["post","put","patch"],(function(e){KU.headers[e]=GU.merge(ZU)}));var JU,ez,tz=KU,nz=PF,rz=tz;function iz(){return ez?JU:(ez=1,JU=function(e){return!(!e||!e.__CANCEL__)})}var oz=PF,az=function(e,t,n){var r=this||rz;return nz.forEach(n,(function(n){e=n.call(r,e,t)})),e},sz=iz(),lz=tz;function uz(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var cz=PF,dz=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return cz.isPlainObject(e)&&cz.isPlainObject(t)?cz.merge(e,t):cz.isPlainObject(t)?cz.merge({},t):cz.isArray(t)?t.slice():t}function l(r){cz.isUndefined(t[r])?cz.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}cz.forEach(r,(function(e){cz.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),cz.forEach(i,l),cz.forEach(o,(function(r){cz.isUndefined(t[r])?cz.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),cz.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(i).concat(o).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return cz.forEach(c,l),n},pz=WU,hz={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){hz[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var fz={},gz=pz.version.split(".");function mz(e,t){for(var n=t?t.split("."):gz,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}hz.transitional=function(e,t,n){var r=t&&mz(t);function i(e,t){return"[Axios v"+pz.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new Error(i(o," has been removed in "+t));return r&&!fz[o]&&(fz[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var vz,yz,xz,_z,bz,wz,Sz,Cz,Tz={isOlderVersion:mz,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:hz},Mz=PF,Az=UF,Ez=sU,Iz=function(e){return uz(e),e.headers=e.headers||{},e.data=az.call(e,e.data,e.headers,e.transformRequest),e.headers=oz.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oz.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||lz.adapter)(e).then((function(t){return uz(e),t.data=az.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return sz(t)||(uz(e),t&&t.response&&(t.response.data=az.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Dz=dz,Oz=Tz,kz=Oz.validators;function Rz(e){this.defaults=e,this.interceptors={request:new Ez,response:new Ez}}function Nz(){if(yz)return vz;function e(e){this.message=e}return yz=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,vz=e}Rz.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Dz(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&Oz.assertOptions(t,{silentJSONParsing:kz.transitional(kz.boolean,"1.0.0"),forcedJSONParsing:kz.transitional(kz.boolean,"1.0.0"),clarifyTimeoutError:kz.transitional(kz.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[Iz,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),i=Promise.resolve(e);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{i=Iz(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},Rz.prototype.getUri=function(e){return e=Dz(this.defaults,e),Az(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Mz.forEach(["delete","get","head","options"],(function(e){Rz.prototype[e]=function(t,n){return this.request(Dz(n||{},{method:e,url:t,data:(n||{}).data}))}})),Mz.forEach(["post","put","patch"],(function(e){Rz.prototype[e]=function(t,n,r){return this.request(Dz(r||{},{method:e,url:t,data:n}))}}));var Lz=PF,Bz=EF,Pz=Rz,jz=dz;function Fz(e){var t=new Pz(e),n=Bz(Pz.prototype.request,t);return Lz.extend(n,Pz.prototype,t),Lz.extend(n,t),n}var Uz=Fz(tz);Uz.Axios=Pz,Uz.create=function(e){return Fz(jz(Uz.defaults,e))},Uz.Cancel=Nz(),Uz.CancelToken=function(){if(_z)return xz;_z=1;var e=Nz();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},xz=t}(),Uz.isCancel=iz(),Uz.all=function(e){return Promise.all(e)},Uz.spread=wz?bz:(wz=1,bz=function(e){return function(t){return e.apply(null,t)}}),Uz.isAxiosError=Cz?Sz:(Cz=1,Sz=function(e){return"object"==typeof e&&!0===e.isAxiosError}),AF.exports=Uz,AF.exports.default=Uz;var zz,Hz,Vz=V(AF.exports),Wz="undefined"!=typeof process&&process.env?process.env:{},Yz="development"===Wz.NODE_ENV,Gz=null!==(zz=Wz.REACT_APP_API_URL)&&void 0!==zz?zz:Yz?"http://localhost:8080/api":"/api",qz=null;exports.QUERY_KEY=void 0,(Hz=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",Hz.fetchGraphs="fetchGraphs",Hz.fetchQueries="fetchQueries",Hz.fetchUniverseMetadataList="fetchUniverseMetadataList",Hz.deleteUniverseMetadata="deleteUniverseMetadata",Hz.updateUniverseMetadata="updateUniverseMetadata",Hz.fetchUniverseListDetails="fetchUniverseListDetails",Hz.fetchUniverseById="fetchUniverseById",Hz.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",Hz.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",Hz.fetchAnomaliesPage="fetchAnomaliesPage",Hz.fetchQueriesPage="fetchQueriesPage",Hz.fetchQueriesStatsPage="fetchQueriesStatsPage",Hz.fetchQueriesDatabases="fetchQueriesDatabases",Hz.fetchCustomerMetadataList="fetchCustomerMetadataList",Hz.fetchQueryStats="fetchQueryStats",Hz.fetchTablesPage="fetchTablesPage",Hz.fetchNamespaces="fetchNamespaces",Hz.deleteRuntimeConfig="deleteRuntimeConfig",Hz.fetchRuntimeConfigs="fetchRuntimeConfigs",Hz.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",Hz.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",Hz.updateRuntimeConfig="updateRuntimeConfig",Hz.fetchAnomalyGroups="fetchAnomalyGroups",Hz.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",Hz.fetchAnomalyGroupsById="fetchAnomalyGroupsById",Hz.getUniverseMetadata="getUniverseMetadata",Hz.fetchMetricsGraphs="fetchMetricsGraphs";var Qz=Vz.create({baseURL:Gz});Qz.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var Zz,Xz,$z,Kz,Jz,eH,tH,nH,rH,iH=function(){this.fetchAnomalies=function(e,t,n,r){var i=Zi(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),Qz.get(i,{params:o}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,i,o,a,s){void 0===r&&(r=10);var l=Zi(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return i&&(u.startTime=i),o&&(u.endTime=o),a&&a!==wr&&(u.category=a),Zi(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,Qz.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=Zi(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),Zi(s)&&(p.query=s),l&&l!==wr&&(p.dbName=l),p.sortBy=Xi(u)?"dbName":u,p.direction=Xi(c)?"DESC":c,p.offset=n*i,p.needTotalCount=!0,p.limit=i,Qz.get(d,{params:p})},this.fetchQueriesStatsPage=function(e,t,n,r){var i=t.currentTablePage,o=t.apiUrl,a=t.pageSize,s=t.startTime,l=t.endTime,u=t.searchInput,c=t.database,d=t.sortBy,p=t.sortDirection,h=t.queryType,f=t.groupByOperation,g=n(),m=g.cluster,v=g.region,y=g.zone,x=g.node,_=new URLSearchParams;if(Zi(m)&&m!==wr&&_.append("clusterUuid",m),Zi(v)&&v!==wr&&_.append("regionCode",v),Zi(y)&&y!==wr&&_.append("azCode",y),Zi(x)&&x!==wr&&_.append("instanceName",x),qi(r)){var b=f===exports.WaitEventClassification.WAIT_EVENT?"events":"eventTypes";r.forEach((function(e){return _.append(b,e)}))}var w=Zi(o)?"".concat(o,"/universe/").concat(e,"/queries/stats/page?").concat(_.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(_.toString()),S={};return h&&(S.queryType=h.toUpperCase()),s&&(S.startTime=s),l&&(S.endTime=l),Zi(u)&&(S.query=u),c&&c!==wr&&(S.namespaceName=c),f&&f===exports.WaitEventClassification.WAIT_EVENT&&(S.groupEventsBy=rr.waitEvent),S.sortBy=Xi(d)?"eps":d,S.direction=Xi(p)?"DESC":p,S.offset=i*a,S.needTotalCount=!0,S.limit=a,S.excludeTpUser=!0,Qz.get(w,{params:S})},this.fetchNamespaceSchemas=function(e,t,n){var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return Qz.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},i=t.startTime,o=t.endTime,a=t.queryId,s=t.dbId;i&&(r.startTime=i),o&&(r.endTime=o),a&&(r.queryId=a),s&&(r.dbId=s);var l=Zi(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return Qz.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=Zi(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),Zi(s)&&(h.tableName=s),l&&l!==wr&&(h.namespaceName=l),u&&u!==wr&&(h.schemaName=u),h.sortBy=Xi(c)?"namespaceName":c,h.direction=Xi(d)?"DESC":d,h.offset=n*i,h.needTotalCount=!0,h.limit=i,Qz.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return Qz.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return Qz.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return Qz.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n){qz&&qz.abort(),qz=new AbortController;var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),i=Vz.CancelToken.source();return qz.signal.addEventListener("abort",(function(){i.cancel("Request aborted")})),Qz.post(r,t,{cancelToken:i.token}).then((function(e){return e.data}))},this.fetchQueries=function(e,t,n){var r={};Qi(n)&&(r.db_id=null==n?void 0:n.dbId,r.query_id=null==n?void 0:n.queryId,r.user_id=null==n?void 0:n.userId);var i=Zi(t)?"".concat(t,"/universe/").concat(e,"/queries"):"/universe/".concat(e,"/queries");return Qz.get(i,{params:r}).then((function(e){return e.data}))},this.fetchCustomerMetadataList=function(e){var t=Zi(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return Qz.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Zi(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Qz.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Zi(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Qz.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Zi(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Qz.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Zi(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return Qz.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Qz.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Qz.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Qz.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=Zi(e)?"".concat(e,"/universe/details"):"/universe/details";return Qz.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return Qz.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return Qz.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return Qz.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=Zi(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Qz.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Zi(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Qz.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var i=Zi(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Qz.put(i,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Zi(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Qz.delete(r).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,i,o){void 0===r&&(r="");var a=i(),s=a.cluster,l=a.region,u=a.zone,c=a.node,d=new URLSearchParams;if(t&&d.append("startTime",t),n&&d.append("endTime",n),null===t&&null===n)return{};Zi(r)&&d.append("anomalyType",r),Zi(s)&&s!==wr&&d.append("clusterUuid",s),Zi(l)&&l!==wr&&d.append("regionCode",l),Zi(u)&&u!==wr&&d.append("azCode",u),Zi(c)&&c!==wr&&d.append("instanceName",c);var p=Zi(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return Qz.get(p).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=Zi(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return Qz.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=Zi(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return Qz.get(o).then((function(e){return e.data}))}},oH=new iH;function aH(){return aH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aH.apply(null,arguments)}const sH=e=>w.createElement("svg",aH({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),Zz||(Zz=w.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),Xz||(Xz=w.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),$z||($z=w.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),Kz||(Kz=w.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),Jz||(Jz=w.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),eH||(eH=w.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),tH||(tH=w.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),nH||(nH=w.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),rH||(rH=w.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var lH=function(i){var a,s,l,u=i.metricMeasure,c=i.apiUrl,d=i.universeQueryStatsData,p=i.appName,h=i.timezone,f=i.urlParams,g=i.dateTimeRange,m=i.getClusterDetails,v=i.onEChartsDateSelect,y=wi(),x=t.useRef([]),_=t.useState(null),b=_[0],w=_[1],S=t.useState([]),C=S[0],T=S[1],M=m(),A=M.universeUuid,E=M.cluster,I=M.region,D=M.zone,O=M.node,k=M.numNodes,R=M.outlierType,N=function(e,t,n){void 0===n&&(n=!1);var r=zr.WAIT_EVENT_COMPONENT;if("Class"===e?r=zr.WAIT_EVENT_CLASS:"Type"===e?r=zr.WAIT_EVENT_TYPE:"Event"===e?r=zr.WAIT_EVENT:"Query"===e?r=zr.QUERY:"Client IP"===e&&(r=zr.CLIENT_NODE_IP),n){var i=JSON.parse(JSON.stringify(C)),o=null;if(n){var a=null==i?void 0:i.filter((function(e){return e.name===(null==t?void 0:t.name)}));if(a.length>=2){var s=a.find((function(e,n){return n===a.length-1&&e.name===(null==t?void 0:t.name)}));o=s}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}))}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}));o&&(o.groupBy=[r]),i.map((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)?o:e})),T(i),L.mutate(i)}},L=n.useMutation({mutationKey:["fetchHistoricalQueryGraphs",A],mutationFn:function(e){return oH.fetchGraphs(A,e,c)},onSuccess:function(e){w(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),P=null===(l=null===(s=null===(a=null==L?void 0:L.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;t.useEffect((function(){var e,t=ya(!0,!1,0,m(),null,B(B({},f),{type:null!==(e=f.type)&&void 0!==e?e:null}));t&&T(t),t&&L.mutate(t)}),[u,g,I,E,D,O,R,k]);var j=function(e,t){x.current[t]=e};return t.useEffect((function(){x.current=[]}),[u]),t.useEffect((function(){return L.isSuccess&&b&&b.length>0&&x.current.length===b.length&&nA(x.current),function(){rA(x.current)}}),[L.isSuccess,b]),e.jsxs(r.Box,B({mt:3},{children:[L.isLoading&&e.jsx(r.Box,B({mt:2,className:y.loadingBox},{children:e.jsx(sH,{className:H(y.icon,y.inProgressIcon)})})),L.isError&&e.jsxs(r.Box,B({mt:4},{children:[(p===exports.AppName.YBA||p===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(P)?P:_i.QUERIES_GRAPHS_FETCH_ERROR}),p===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(P)?P:_i.QUERIES_GRAPHS_FETCH_ERROR})]})),L.isSuccess&&e.jsxs(r.Box,{children:[e.jsx(r.Box,B({className:H(y.gridBox,y.gridBoxSingle)},{children:null==b?void 0:b.filter((function(e){var t;return null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history")})).map((function(t,n){var i,o,a=ma(u,t,exports.GraphType.SINGLE_SUPPORTING,!0,C,!0),s=null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.startsWith("active_session_history"),l=t.name;if(s){var c=t.layout.metadata,f=c.currentGroupBy,m=null===(o=c.supportedGroupBy.find((function(e){return e.label===f[0]})))||void 0===o?void 0:o.name;m&&a.groupByOperations.sort((function(e,t){return e===m?-1:t===m?1:0}))}return e.jsx(r.Box,B({id:"HistoricalQueryView-ash-".concat(u,"-").concat(n)},{children:e.jsx(r.Box,B({style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF"}},{children:e.jsx(MF,{metricData:t,metricKey:l,dateTimeRange:g,containerWidth:null,metricMeasure:u,operations:u===exports.MetricMeasure.OVERALL?[]:a.uniqueOperations,registerChartInstance:function(e){return j(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:a.groupByOperations,appName:p,timezone:h,queryData:d,onSelectAshLabel:N,isHistoricalQueryView:!0,onEChartsDateSelect:v,showTitle:!0},"".concat(u,"-").concat(l))}))}),"HistoricalQueryView-ash-".concat(u,"-").concat(n))}))})),e.jsx(r.Box,B({className:H(y.gridBox,y.gridBoxThree)},{children:null==b?void 0:b.filter((function(e){var t;return!(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history"))})).map((function(t,n){var i=ma(u,t,exports.GraphType.SINGLE_SUPPORTING,!0,C,!0),o=t.name;return e.jsx(r.Box,B({id:"HistoricalQueryView-".concat(u,"-").concat(n)},{children:e.jsx(r.Box,B({style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF",marginTop:"16px",marginBottom:"16px"}},{children:e.jsx(MF,{metricData:t,metricKey:o,dateTimeRange:g,containerWidth:null,metricMeasure:u,operations:u===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return j(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:i.groupByOperations,appName:p,timezone:h,queryData:d,onSelectAshLabel:N,isHistoricalQueryView:!0,onEChartsDateSelect:v,showTitle:!0},"".concat(u,"-").concat(o))}))}),"HistoricalQueryView-".concat(u,"-").concat(n))}))}))]})]}))},uH=function(n){var i=n.sourceData,o=n.expandAll,a=void 0!==o&&o,s=n.showMoreOptions,l=void 0!==s&&s,u=n.onClickShowMoreAnomalies,c=n.onSelectedIssue,d=n.startTime,p=n.name,h=n.endTime,f=n.appName,g=n.showMultiline,m=void 0===g||g,v=n.isInsightsTab,x=void 0!==v&&v;n.currentTab;var _=n.viewAllAnomalies,b=void 0!==_&&_,w=f===exports.AppName.YBM?27:35,S=t.useState({}),C=S[0],T=S[1],M=t.useState({}),A=M[0],E=M[1],I=t.useRef(null),D=t.useRef(null);t.useEffect((function(){if(i){if(l){var e=function(e){for(var t,n={},r=0,i=Object.entries(e.groups);r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=Object.keys(s);for(var l=function(e,r){n[e]=(null===(t=r.groups)||void 0===t?void 0:t.map((function(t,n){return"".concat(e,"_").concat(n)})))||[]},u=0,c=Object.entries(s);u<c.length;u++){var d=c[u];l(d[0],d[1])}}return n}(i),t=function(e){for(var t={},n=0,r=Object.entries(e.groups);n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=!1;for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(i);E(e),T(t)}else E({}),T({})}}),[i]),t.useEffect((function(){T((function(e){var t=B({},e);return Object.keys(t).forEach((function(e){t[e]=a})),t}))}),[a]);var O=function(e){var t,n=0;for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))n+=null===(t=e[r])||void 0===t?void 0:t.totalCount}return n},k=function(e){for(var t=0,n=Object.entries(A);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return k(i)}return e};function R(){var e,t,n,r,i,o;document.querySelectorAll(".custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-top, .custom-group-separator-bottom").forEach((function(e){return e.remove()}));var a=Array.from(document.querySelectorAll(".vis-labelset .vis-label.custom-group-row-1"));a.forEach((function(e,t){var n,r=function(e){var t=e.nextElementSibling;for(;t&&!t.classList.contains("custom-group-row-1");)t=t.nextElementSibling;return t}(e);if(r){var i=document.createElement("div");i.className="custom-group-separator-left",null===(n=e.parentNode)||void 0===n||n.insertBefore(i,r)}var o=document.querySelector(".vis-foreground");if(o&&null!==e.offsetTop&&t>0){var a=document.createElement("div");a.className="custom-group-separator-right",a.style.top="".concat(e.offsetTop,"px"),a.style.position="absolute",o.appendChild(a)}}));var s=a[0];if(!(null===(e=s.previousElementSibling)||void 0===e?void 0:e.classList.contains("custom-group-separator-top"))){var l=document.createElement("div");l.className="custom-group-separator-top",null===(t=s.parentNode)||void 0===t||t.insertBefore(l,s)}var u=a[a.length-1],c=function(e){var t=e.nextElementSibling;for(;t&&(t.classList.contains("custom-group-row-2")||t.classList.contains("custom-group-row-3"));)t=t.nextElementSibling;return t}(u);if(!(null===(n=null==c?void 0:c.previousElementSibling)||void 0===n?void 0:n.classList.contains("custom-group-separator-bottom"))&&!(null===(r=u.nextElementSibling)||void 0===r?void 0:r.classList.contains("custom-group-separator-bottom"))){var d=document.createElement("div");d.className="custom-group-separator-bottom",c?null===(i=u.parentNode)||void 0===i||i.insertBefore(d,c):null===(o=u.parentNode)||void 0===o||o.appendChild(d)}}return t.useEffect((function(){if((Object.keys(C).length>0||qi(i))&&I.current){var e=l?function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:O(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"&#xff0b;&nbsp;&nbsp;&nbsp;".concat(s):"&#x2212;&nbsp;&nbsp;&nbsp;".concat(s),parent:e,name:s,categoryCount:o.totalCount});var u=[];if(o.groups.forEach((function(e,i){var o,s,l="".concat(a,"_").concat(i),c=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:l,name:c,content:c,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:l})})),u.push.apply(u,e.anomalyIntervals)})),o.hasMore&&l){var c="".concat(a,"_").concat(qr),d=qr;t.push({id:c,name:d,content:Qr,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(qr),content:"anomaly-".concat(a,"-").concat(qr),start:"",end:"",group:a})}_a(u).forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},a=0,s=Object.entries(i);a<s.length;a++){var u=s[a];o(u[0],u[1])}var c=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));_a(c).forEach((function(t){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:t.startTime,end:t.endTime,group:e})}))},o=0,a=Object.entries(null==e?void 0:e.groups);o<a.length;o++){var s=a[o];i(s[0],s[1])}return{groups:t,items:n}}(i):function(e){var t=[],n=[],r=0;return null==e||e.forEach((function(e,i){var o=e.lastInstance,a="group-".concat(i),s=(null==o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:a,content:s,name:s,uuid:null==o?void 0:o.uuid,categoryLevel:1}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))})),{groups:t,items:n}}(i),t=e.items,n=e.groups,r={items:t,groups:n},o=n;if(l){var a=n.map((function(e){var t,n,r=(null===(t=A[e.id])||void 0===t?void 0:t.length)>0,i=null!==(n=C[e.id])&&void 0!==n&&n,o=r?i?"&#x2212;":"&#xff0b;":"",a=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,s="",l=k(e.id);3===e.categoryLevel&&e.name===qr&&(l=e.grandParent),1===e.categoryLevel?s="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?s="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;":3===e.categoryLevel&&(s="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var u=0;2===e.categoryLevel?u=40:3===e.categoryLevel&&(u=44);var c="margin-left: ".concat(u,"px;"),d=r||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",p="".concat(c).concat(d).concat("color: #0B1117 !important;").concat(s),h="",f="";if(l)switch(l){case exports.AnomalyCategory.DB:h="db-background",f="Database";break;case exports.AnomalyCategory.NODE:h="node-background",f="Node";break;case exports.AnomalyCategory.SQL:h="sql-background",f="SQL";break;case exports.AnomalyCategory.APP:h="app-background",f="Application";break;case exports.AnomalyCategory.INFRA:h="infra-background",f="Infrastructure"}var g="";1===e.categoryLevel?g="custom-group-row-1":2===e.categoryLevel?g="custom-group-row-2":3===e.categoryLevel&&(g="custom-group-row-3");var m=e.content.replace(/&nbsp;/g,"").length>w?"".concat(e.content.substring(0,w),"..."):e.content;return B(B({},e),{content:r?'<a title="'.concat(e.name,'">').concat(o,"&nbsp;&nbsp;&nbsp;").concat((null==e?void 0:e.name)&&e.name.length>w?1===e.categoryLevel?f:"".concat(e.name.substring(0,w),"..."):1===e.categoryLevel?f:e.name,"</a>").concat(1!==e.categoryLevel&&2!==e.categoryLevel||i?"":"<span>".concat(e.categoryCount,"</span>")):'<a title="'.concat(e.content,'">').concat(o).concat(m,"</a>").concat(a?"<span>".concat(3===e.categoryCount?"&#xff0b;":"").concat(e.categoryCount,"</span>"):""),className:[g,h].filter(Boolean).join(" "),style:p,visible:!e.parent||C[e.parent]})})),s=a.filter((function(e){return e.visible}));Object.entries(A).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=a.find((function(t){return t.id===e}));n&&(n.visible=C[t])}))}));var g=t.filter((function(e){var t,n=a.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=A[n.id])||void 0===t?void 0:t.length)>0,i=C[n.id];return!r||!i}return!1}));r={items:S=g.map((function(e){var t=a.find((function(t){return t.id===e.group})),n=t?k(t.id):null,r="#CCCCCC";if(n)switch(n){case exports.AnomalyCategory.DB:r=xi[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=xi[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=xi[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=xi[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=xi[exports.AnomalyCategory.INFRA]}return B(B({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:s}}else{var v="custom-group-row",_=n.map((function(e){return B(B({},e),{content:m?'<a title="'.concat(e.content,'"> ').concat(e.content.length>w?"".concat(e.content.substring(0,w),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[v].filter(Boolean).join(" ")})})),S=t.map((function(e){var t,n,r="#CCCCCC",o=null===(n=null===(t=null==i?void 0:i[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(o)switch(o){case exports.AnomalyCategory.DB:r=xi[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=xi[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=xi[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=xi[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=xi[exports.AnomalyCategory.INFRA]}return B(B({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));r={items:S,groups:_}}if(D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current.setOptions(M),D.current.setItems(r.items),D.current.setGroups(r.groups),l&&!x&&R()}else{var M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new y.Timeline(I.current,r.items,r.groups,M)}D.current.on("changed",(function(){if(b){document.querySelectorAll(".vis-label.custom-group-row .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")}))}else{document.querySelectorAll(".vis-label.custom-group-row-1 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-1")})),document.querySelectorAll(".vis-label.custom-group-row-2 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-2")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-3")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")})),document.querySelectorAll(".vis-label.db-background .vis-inner span").forEach((function(e){return e.classList.add("db-inner-background")})),document.querySelectorAll(".vis-label.node-background .vis-inner span").forEach((function(e){return e.classList.add("node-inner-background")})),document.querySelectorAll(".vis-label.sql-background .vis-inner span").forEach((function(e){return e.classList.add("sql-inner-background")})),document.querySelectorAll(".vis-label.app-background .vis-inner span").forEach((function(e){return e.classList.add("app-inner-background")})),document.querySelectorAll(".vis-label.infra-background .vis-inner span").forEach((function(e){return e.classList.add("infra-inner-background")})),l&&!x&&R();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=p===hi?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=p===hi?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==D||D.current.on("click",(function(e){var t=window.scrollY;setTimeout((function(){return window.scrollTo(0,t)}),0);var n,r,i,a=e.group,s="",l=null;a&&(l=o.find((function(e){return e.id===a})))&&"string"==typeof l.content&&(s=l.id),(null==l?void 0:l.uuid)&&(f===exports.AppName.YBM?(n=l.uuid,r=new URLSearchParams(window.location.search),(i={}).duration=r.get("duration"),i.startTime=r.get("startTime"),i.endTime=r.get("endTime"),null==c||c(n,i)):f!==exports.AppName.WEB&&f!==exports.AppName.YBA||function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();f===exports.AppName.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(l.uuid)),(null==l?void 0:l.name)===qr&&(null==u||u(l.parent)),s&&function(e){T((function(t){var n=B({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=A[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(s)}))}else if(Gi(i)&&I.current&&!D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new y.Timeline(I.current,[],[],M),D.current.setOptions(M),D.current.setItems([]),D.current.setGroups([])}return function(){D.current&&(D.current.destroy(),D.current=null)}}),[C,i]),e.jsxs(r.Box,B({id:p},{children:[e.jsx("div",{ref:I,style:{backgroundColor:"#FFFFFF"}},p),e.jsx("style",{children:"\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),p)},cH=function(i){var a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,A,E,I,D,O=i.metricMeasure,k=i.appName,R=i.timezone,N=i.universeQueryData,L=i.amomalyGraphRequestParams,P=i.formattedAnomalyRca,j=i.anomalyData,F=i.gantChartData,U=i.dateTimeRange,z=i.urlParams,V=i.apiUrl,W=i.getClusterDetails,Y=i.onEChartsDateSelect,G=i.onSelectedIssue,q=t.useRef([]),Q=wi(),Z=t.useState(!1);Z[0],Z[1];var X=t.useState(0),$=X[0],K=X[1],J=t.useState(j),ee=J[0],te=J[1],ne=t.useState(null),re=ne[0],ie=ne[1],oe=t.useState(L),ae=oe[0],se=oe[1],le=W(),ue=le.universeUuid,ce=le.cluster,de=le.region,pe=le.zone,he=le.node,fe=le.numNodes,ge=le.outlierType,me=wF(O),ve=function(e,t,n){var r,i,o=zr.WAIT_EVENT_COMPONENT;if("Class"===e?o=zr.WAIT_EVENT_CLASS:"Type"===e?o=zr.WAIT_EVENT_TYPE:"Event"===e?o=zr.WAIT_EVENT:"Query"===e?o=zr.QUERY:"Client IP"===e&&(o=zr.CLIENT_NODE_IP),(null===(r=null==j?void 0:j.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==j?void 0:j.lastInstance)||void 0===i?void 0:i.category)!==exports.AnomalyCategory.DB){var a=JSON.parse(JSON.stringify(ae)),s=null==a?void 0:a.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));s&&(s.groupBy=[o]),a.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?s:e})),se(a),ye.mutate(a)}};t.useEffect((function(){te(j)}),[j]),t.useEffect((function(){var e;me&&me!==O&&ie(null);var t=JSON.parse(JSON.stringify(ae)),n=W(),r=ya(!1,!1,0,n,t,B(B({},z),{type:null!==(e=z.type)&&void 0!==e?e:null})),i=null!=r?r:ae;se(i),ye.mutate(i)}),[O,U,de,ce,pe,he,ge,fe]);var ye=n.useMutation({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return oH.fetchGraphs(ue,e,V)},onSuccess:function(e){ie(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),xe=null===(l=null===(s=null===(a=null==ye?void 0:ye.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,_e=function(t,n,i,o,a,s){return e.jsx(r.Box,B({mt:3,mr:8},{children:e.jsx(MF,{metricData:t,metricKey:t.name,graphTitle:s,containerWidth:null,dateTimeRange:U,metricMeasure:O,operations:n,groupByOperations:i,registerChartInstance:function(e){return we(e,a)},appName:k,graphType:o,timezone:R,queryData:N,onSelectAshLabel:ve,onEChartsDateSelect:Y},"".concat(O,"-").concat(t.name))}))},be=null==P?void 0:P.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0}));t.useEffect((function(){q.current=[]}),[O]);var we=function(e,t){q.current[t]=e};return t.useEffect((function(){return ye.isSuccess&&re&&re.length>0&&nA(q.current),function(){rA(q.current)}}),[ye.isSuccess,re,$]),e.jsx(r.Box,{children:e.jsx(Jn,{bodyClassName:H(k===exports.AppName.WEB?Q.panelItemBody:Q.panelItemBodyYBM),body:e.jsxs(e.Fragment,{children:[ye.isLoading&&e.jsx(r.Box,B({mt:2,className:Q.loadingBox},{children:e.jsx(sH,{className:H(Q.icon,Q.inProgressIcon)})})),ye.isError&&e.jsxs(r.Box,B({mt:4},{children:[(k===exports.AppName.YBA||k===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(xe)?xe:_i.RCA_GRAPHS_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(xe)?xe:_i.RCA_GRAPHS_FETCH_ERROR})]})),ye.isSuccess&&e.jsxs(r.Box,{children:[qi(re)&&qi(null===(u=null==j?void 0:j.lastInstance)||void 0===u?void 0:u.mainGraphs)&&(null===(c=null==j?void 0:j.lastInstance)||void 0===c?void 0:c.mainGraphs.map((function(t,n){var i,o,a,s=null==re?void 0:re.find((function(e){return e.name===t.name})),l=t.groupByControl,u=O===exports.MetricMeasure.OVERALL?{uniqueOperations:[],groupByOperations:[]}:ma(O,s,exports.GraphType.MAIN_RCA,l,L);return e.jsxs(r.Box,B({className:H(Q.mainGraphBox,k===exports.AppName.WEB?null:Q.mainGraphBoxYBM)},{children:[e.jsx(r.Box,B({className:Q.mainGraphMetadataBox},{children:e.jsxs(r.Box,B({className:Q.anomalyMetadataOneBox},{children:[e.jsx("span",B({className:Q.headerTitle},{children:oi})),e.jsx("span",B({className:Q.metadataDetails},{children:null===(i=null==j?void 0:j.lastInstance)||void 0===i?void 0:i.title})),e.jsx("span",B({className:H(Q.regularMetadata,(null===(o=null==j?void 0:j.lastInstance)||void 0===o?void 0:o.category)===exports.AnomalyCategory.SQL&&Q.restrictLines)},{children:null===(a=null==j?void 0:j.lastInstance)||void 0===a?void 0:a.summary}))]}))})),e.jsx(r.Box,B({mt:1,className:Q.boxContainer},{children:_e(s,u.uniqueOperations,u.groupByOperations,exports.GraphType.MAIN_RCA,n+10)}))]}))}))),e.jsxs(r.Box,B({mt:2,mb:1,className:Q.ghantChartContainer},{children:[F.isLoading&&e.jsx(r.Box,B({mt:2,className:Q.loadingBox},{children:e.jsx(sH,{className:H(Q.icon,Q.inProgressIcon)})})),F.isError&&404!==(null===(p=null===(d=null==F?void 0:F.error)||void 0===d?void 0:d.response)||void 0===p?void 0:p.status)&&e.jsxs(r.Box,B({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx(mt,{customErrorMessage:Zi(null===(g=null===(f=null===(h=null==F?void 0:F.error)||void 0===h?void 0:h.response)||void 0===f?void 0:f.data)||void 0===g?void 0:g.error)?null===(y=null===(v=null===(m=null==F?void 0:F.error)||void 0===m?void 0:m.response)||void 0===v?void 0:v.data)||void 0===y?void 0:y.error:_i.GANTCHART_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(null===(b=null===(_=null===(x=null==F?void 0:F.error)||void 0===x?void 0:x.response)||void 0===_?void 0:_.data)||void 0===b?void 0:b.error)?null===(C=null===(S=null===(w=null==F?void 0:F.error)||void 0===w?void 0:w.response)||void 0===S?void 0:S.data)||void 0===C?void 0:C.error:_i.GANTCHART_FETCH_ERROR})]})),(F.isSuccess||F.isError&&404===(null===(M=null===(T=null==F?void 0:F.error)||void 0===T?void 0:T.response)||void 0===M?void 0:M.status))&&(Qi(ee)?e.jsx(r.Box,B({className:H(k===exports.AppName.WEB?Q.rcaGantChartBox:Q.rcaGantChartBoxYBM)},{children:e.jsx(uH,{sourceData:F.isError&&404===(null===(E=null===(A=null==F?void 0:F.error)||void 0===A?void 0:A.response)||void 0===E?void 0:E.status)?[]:[ee],name:hi,showMoreOptions:!1,expandAll:!0,startTime:null===(I=null==U?void 0:U.startDateTime)||void 0===I?void 0:I.toISOString(),endTime:null===(D=null==U?void 0:U.endDateTime)||void 0===D?void 0:D.toISOString(),onSelectedIssue:G,appName:k,showMultiline:!1},hi)})):e.jsxs(r.Box,B({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx("span",{children:"Failed to fetch anomaly data, please try again."}),k===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:"Failed to fetch anomaly data, please try again."})]})))]})),qi(re)&&qi(be)&&e.jsxs(r.Box,B({className:H(Q.causesBox,k===exports.AppName.WEB?null:Q.causesBoxYBM)},{children:[e.jsx(o.YBTabs,B({value:$,onChange:function(e,t){var n=window.scrollY;K(t),setTimeout((function(){return window.scrollTo(0,n)}),0)},"aria-label":"anomaly causes tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:null==be?void 0:be.map((function(t,n){return e.jsx(o.YBTab,{component:"div",label:t.cause,className:Q.causeTabButton},n)}))})),null==be?void 0:be.map((function(t,n){var i,o;return e.jsx(r.Box,B({role:"tabpanel",hidden:$!==n,id:"tabpanel-".concat(n),"aria-labelledby":"tab-".concat(n)},{children:$===n&&e.jsxs(r.Box,B({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx("span",B({className:Q.causeText},{children:t.cause})),e.jsxs(r.Box,{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",alt:"path"}),e.jsx("span",B({className:Q.descriptionText},{children:t.description}))]}),e.jsx(r.Box,B({mt:2,className:(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.length)>1?H(Q.gridBox,Q.gridBoxDouble):""},{children:null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.map((function(i,o){var a,s,l,u=null==re?void 0:re.find((function(e,n){return n>0&&(null==e?void 0:e.name)===i&&t.index.includes(n)})),c=1===(null===(a=null==t?void 0:t.name)||void 0===a?void 0:a.length),d=null===(s=t.groupByControl)||void 0===s?void 0:s[0];if(Zi(null!==(l=null==u?void 0:u.errorMessage)&&void 0!==l?l:""))return e.jsx(r.Box,{});var p=ma(O,u,exports.GraphType.MULTI_SUPPORTING,d,L);return e.jsx(r.Box,B({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:c?"0px":"16px"}},{children:_e(u,p.uniqueOperations,p.groupByOperations,c?exports.GraphType.SINGLE_SUPPORTING:exports.GraphType.MULTI_SUPPORTING,n+o,t.title)}))}))}))]}))}),n)}))]}))]})]})})})},dH=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},pH=V(dH),hH=Object.getOwnPropertySymbols,fH=Object.prototype.hasOwnProperty,gH=Object.prototype.propertyIsEnumerable;var mH=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))fH.call(n,a)&&(i[a]=n[a]);if(hH){r=hH(n);for(var s=0;s<r.length;s++)gH.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},vH=mH,yH={};function xH(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var _H="mixins";var bH=function(e,t,n){var r=[],i={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},o={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},a={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)l(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=vH({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=vH({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=c(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=vH({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(xH(!(n in a),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return xH("DEFINE_MANY_MERGED"===(o.hasOwnProperty(n)?o[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=c(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function s(e,t){var n=i.hasOwnProperty(t)?i[t]:null;g.hasOwnProperty(t)&&xH("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&xH("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function l(e,n){if(n){xH("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),xH(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,o=r.__reactAutoBindPairs;for(var l in n.hasOwnProperty(_H)&&a.mixins(e,n.mixins),n)if(n.hasOwnProperty(l)&&l!==_H){var u=n[l],p=r.hasOwnProperty(l);if(s(p,l),a.hasOwnProperty(l))a[l](e,u);else{var h=i.hasOwnProperty(l);if("function"==typeof u&&!h&&!p&&!1!==n.autobind)o.push(l,u),r[l]=u;else if(p){var f=i[l];xH(h&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,l),"DEFINE_MANY_MERGED"===f?r[l]=c(r[l],u):"DEFINE_MANY"===f&&(r[l]=d(r[l],u))}else r[l]=u}}}}function u(e,t){for(var n in xH(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(xH(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return u(i,n),u(i,r),i}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){return t.bind(e)}var h={componentDidMount:function(){this.__isMounted=!0}},f={componentWillUnmount:function(){this.__isMounted=!1}},g={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},m=function(){};return vH(m.prototype,e.prototype,g),function(e){var t=function(e,r,i){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=p(e,i)}}(this),this.props=e,this.context=r,this.refs=yH,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;xH("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o};for(var o in t.prototype=new m,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],r.forEach(l.bind(null,t)),l(t,h),l(t,e),l(t,f),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),xH(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),i)t.prototype[o]||(t.prototype[o]=null);return t}},wH=S.default,SH=bH;if(void 0===wH)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var CH,TH,MH,AH,EH=(new wH.Component).updater,IH=V(SH(wH.Component,wH.isValidElement,EH)),DH={exports:{}};DH.exports=function(){if(AH)return MH;AH=1;var e=TH?CH:(TH=1,CH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,MH=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();var OH=DH.exports,kH=V(OH),RH=function(){};function NH(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var LH=Object.create(null);function BH(e){return LH[e]||(LH[e]=function(e){for(var t="",n=[],r=[],i=void 0,o=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g;i=a.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=NH(e.slice(o,i.index))),i[1]?(t+="([^/]+)",n.push(i[1])):"**"===i[0]?(t+="(.*)",n.push("splat")):"*"===i[0]?(t+="(.*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]?t+=")?":"\\("===i[0]?t+="\\(":"\\)"===i[0]&&(t+="\\)"),r.push(i[0]),o=a.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=NH(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),LH[e]}function PH(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=BH(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===o[o.length-1]&&(r+="$");var a=t.match(new RegExp("^"+r,"i"));if(null==a)return null;var s=a[0],l=t.substr(s.length);if(l){if("/"!==s.charAt(s.length-1))return null;l="/"+l}return{remainingPathname:l,paramNames:i,paramValues:a.slice(1).map((function(e){return e&&decodeURIComponent(e)}))}}function jH(e){return BH(e).paramNames}function FH(e,t){t=t||{};for(var n=BH(e).tokens,r=0,i="",o=0,a=[],s=void 0,l=void 0,u=0,c=n.length;u<c;++u)if("*"===(s=n[u])||"**"===s)null!=(l=Array.isArray(t.splat)?t.splat[o++]:t.splat)||r>0||pH(!1),null!=l&&(i+=encodeURI(l));else if("("===s)a[r]="",r+=1;else if(")"===s){var d=a.pop();(r-=1)?a[r-1]+=d:i+=d}else if("\\("===s)i+="(";else if("\\)"===s)i+=")";else if(":"===s.charAt(0))if(null!=(l=t[s.substring(1)])||r>0||pH(!1),null==l){if(r){a[r-1]="";for(var p=n.indexOf(s),h=n.slice(p,n.length),f=-1,g=0;g<h.length;g++)if(")"==h[g]){f=g;break}f>0||pH(!1),u=p+f-1}}else r?a[r-1]+=encodeURIComponent(l):i+=encodeURIComponent(l);else r?a[r-1]+=s:i+=s;return r<=0||pH(!1),i.replace(/\/+/g,"/")}function UH(e,t){var n=e&&e.routes,r=t.routes,i=void 0,o=void 0,a=void 0;if(n){var s=!1;i=n.filter((function(n){if(s)return!0;var i=-1===r.indexOf(n)||function(e,t,n){return!!e.path&&jH(e.path).some((function(e){return t.params[e]!==n.params[e]}))}(n,e,t);return i&&(s=!0),i})),i.reverse(),a=[],o=[],r.forEach((function(e){var t=-1===n.indexOf(e),r=-1!==i.indexOf(e);t||r?a.push(e):o.push(e)}))}else i=[],o=[],a=r;return{leaveRoutes:i,changeRoutes:o,enterRoutes:a}}function zH(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0;function l(){i=!0,o?s=[].concat(Array.prototype.slice.call(arguments)):n.apply(this,arguments)}!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t.call(this,r++,u,l);o=!1,i?n.apply(this,s):r>=e&&a&&(i=!0,n())}}()}function HH(e,t,n){var r=e.length,i=[];if(0===r)return n(null,i);var o=!1,a=0;e.forEach((function(e,s){t(e,s,(function(e,t){!function(e,t,s){o||(t?(o=!0,n(t)):(i[e]=s,(o=++a===r)&&n(null,i)))}(s,e,t)}))}))}var VH=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=[],this.add=function(e){return t.hooks.push(e)},this.remove=function(e){return t.hooks=t.hooks.filter((function(t){return t!==e}))},this.has=function(e){return-1!==t.hooks.indexOf(e)},this.clear=function(){return t.hooks=[]}};function WH(){var e=new VH,t=new VH;function n(e,t,n,r){var i=e.length<n,o=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];(e.apply(t,r),i)&&(0,r[r.length-1])()};return r.add(o),o}function r(e,t,n){if(e){var r=void 0;zH(e,(function(e,n,o){t(e,i,(function(e){e||r?o(e,r):n()}))}),n)}else n();function i(e){r=e}}return{runEnterHooks:function(t,i,o){e.clear();var a=function(t){return t.reduce((function(t,r){return r.onEnter&&t.push(n(r.onEnter,r,3,e)),t}),[])}(t);return r(a.length,(function(t,n,r){a[t](i,n,(function(){e.has(a[t])&&(r.apply(void 0,arguments),e.remove(a[t]))}))}),o)},runChangeHooks:function(e,i,o,a){t.clear();var s=function(e){return e.reduce((function(e,r){return r.onChange&&e.push(n(r.onChange,r,4,t)),e}),[])}(e);return r(s.length,(function(e,n,r){s[e](i,o,n,(function(){t.has(s[e])&&(r.apply(void 0,arguments),t.remove(s[e]))}))}),a)},runLeaveHooks:function(e,t){for(var n=0,r=e.length;n<r;++n)e[n].onLeave&&e[n].onLeave.call(e[n],t)}}}var YH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function GH(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return GH(e,t[n])}));if("object"===(void 0===e?"undefined":YH(e))){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!GH(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function qH(e,t){return null==t?null==e:null==e||GH(e,t)}function QH(e,t,n,r,i){var o=e.pathname,a=e.query;return null!=n&&("/"!==o.charAt(0)&&(o="/"+o),!!(function(e,t){return"/"!==t.charAt(0)&&(t="/"+t),"/"!==e.charAt(e.length-1)&&(e+="/"),"/"!==t.charAt(t.length-1)&&(t+="/"),t===e}(o,n.pathname)||!t&&function(e,t,n){for(var r=e,i=[],o=[],a=0,s=t.length;a<s;++a){var l=t[a].path||"";if("/"===l.charAt(0)&&(r=e,i=[],o=[]),null!==r&&l){var u=PH(l,r);if(u?(r=u.remainingPathname,i=[].concat(i,u.paramNames),o=[].concat(o,u.paramValues)):r=null,""===r)return i.every((function(e,t){return String(o[t])===String(n[e])}))}}return!1}(o,r,i))&&qH(a,n.query))}function ZH(e){return e&&"function"==typeof e.then}function XH(e,t){HH(e.routes,(function(t,n,r){!function(e,t,n){if(t.component||t.components)n(null,t.component||t.components);else{var r=t.getComponent||t.getComponents;if(r){var i=r.call(t,e,n);ZH(i)&&i.then((function(e){return n(null,e)}),n)}else n()}}(e,t,r)}),t)}var $H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function KH(e){return null==e||S.default.isValidElement(e)}function JH(e){return KH(e)||Array.isArray(e)&&e.every(KH)}function eV(e){var t,n,r=e.type,i=(t=r.defaultProps,n=e.props,$H({},t,n));if(i.children){var o=tV(i.children,i);o.length&&(i.childRoutes=o),delete i.children}return i}function tV(e,t){var n=[];return S.default.Children.forEach(e,(function(e){if(S.default.isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(eV(e))})),n}function nV(e){return JH(e)?e=tV(e):e&&!Array.isArray(e)&&(e=[e]),e}var rV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function iV(e,t,n,r,i){if(e.childRoutes)return[null,e.childRoutes];if(!e.getChildRoutes)return[];var o=!0,a=void 0,s={location:t,params:aV(n,r)},l=e.getChildRoutes(s,(function(e,t){t=!e&&nV(t),o?a=[e,t]:i(e,t)}));return ZH(l)&&l.then((function(e){return i(null,nV(e))}),i),o=!1,a}function oV(e,t,n,r,i){if(e.indexRoute)i(null,e.indexRoute);else if(e.getIndexRoute){var o={location:t,params:aV(n,r)},a=e.getIndexRoute(o,(function(e,t){i(e,!e&&nV(t)[0])}));ZH(a)&&a.then((function(e){return i(null,nV(e)[0])}),i)}else if(e.childRoutes||e.getChildRoutes){var s=function(e,o){if(e)i(e);else{var a=o.filter((function(e){return!e.path}));zH(a.length,(function(e,i,o){oV(a[e],t,n,r,(function(t,n){if(t||n){var r=[a[e]].concat(Array.isArray(n)?n:[n]);o(t,r)}else i()}))}),(function(e,t){i(null,t)}))}},l=iV(e,t,n,r,s);l&&s.apply(void 0,l)}else i()}function aV(e,t){return function(e,t,n){return t.reduce((function(e,t,r){var i=n&&n[r];return Array.isArray(e[t])?e[t].push(i):e[t]=t in e?[e[t],i]:i,e}),e)}({},e,t)}function sV(e,t,n,r,i,o){var a=e.path||"";if("/"===a.charAt(0)&&(n=t.pathname,r=[],i=[]),null!==n&&a){try{var s=PH(a,n);s?(n=s.remainingPathname,r=[].concat(r,s.paramNames),i=[].concat(i,s.paramValues)):n=null}catch(e){o(e)}if(""===n){var l={routes:[e],params:aV(r,i)};return void oV(e,t,r,i,(function(e,t){if(e)o(e);else{var n;if(Array.isArray(t))(n=l.routes).push.apply(n,t);else t&&l.routes.push(t);o(null,l)}}))}}if(null!=n||e.childRoutes){var u=function(a,s){a?o(a):s?lV(s,t,(function(t,n){t?o(t):n?(n.routes.unshift(e),o(null,n)):o()}),n,r,i):o()},c=iV(e,t,r,i,u);c&&u.apply(void 0,c)}else o()}function lV(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];void 0===r&&("/"!==t.pathname.charAt(0)&&(t=rV({},t,{pathname:"/"+t.pathname})),r=t.pathname),zH(e.length,(function(n,a,s){sV(e[n],t,r,i,o,(function(e,t){e||t?s(e,t):a()}))}),n)}var uV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function cV(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function dV(e,t,n){if(e[t])return new Error("<"+n+'> should not have a "'+t+'" prop')}OH.shape({listen:OH.func.isRequired,push:OH.func.isRequired,replace:OH.func.isRequired,go:OH.func.isRequired,goBack:OH.func.isRequired,goForward:OH.func.isRequired});var pV,hV=OH.elementType,fV=OH.oneOfType([hV,OH.object]),gV=OH.oneOfType([OH.object,OH.element]),mV=OH.oneOfType([gV,OH.arrayOf(gV)]),vV={exports:{}},yV={};vV.exports=function(){if(pV)return yV;pV=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return yV.AsyncMode=l,yV.ConcurrentMode=u,yV.ContextConsumer=s,yV.ContextProvider=a,yV.Element=t,yV.ForwardRef=c,yV.Fragment=r,yV.Lazy=f,yV.Memo=h,yV.Portal=n,yV.Profiler=o,yV.StrictMode=i,yV.Suspense=d,yV.isAsyncMode=function(e){return _(e)||x(e)===l},yV.isConcurrentMode=_,yV.isContextConsumer=function(e){return x(e)===s},yV.isContextProvider=function(e){return x(e)===a},yV.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},yV.isForwardRef=function(e){return x(e)===c},yV.isFragment=function(e){return x(e)===r},yV.isLazy=function(e){return x(e)===f},yV.isMemo=function(e){return x(e)===h},yV.isPortal=function(e){return x(e)===n},yV.isProfiler=function(e){return x(e)===o},yV.isStrictMode=function(e){return x(e)===i},yV.isSuspense=function(e){return x(e)===d},yV.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},yV.typeOf=x,yV}();var xV=vV.exports;var _V=kH.shape({subscribe:kH.func.isRequired,eventIndex:kH.number.isRequired});function bV(e){return"@@contextSubscriber/"+e}var wV=void 0!==S.default.forwardRef;var SV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TV=IH({displayName:"RouterContext",mixins:[function(e){var t,n,r=bV(e),i=r+"/listeners",o=r+"/eventIndex",a=r+"/subscribe",s=((n={childContextTypes:(t={},t[r]=_V.isRequired,t),getChildContext:function(){var e;return(e={})[r]={eventIndex:this[o],subscribe:this[a]},e},componentWillMount:function(){this[i]=[],this[o]=0},componentWillReceiveProps:function(){this[o]++},componentDidUpdate:function(){var e=this;this[i].forEach((function(t){return t(e[o])}))}})[a]=function(e){var t=this;return this[i].push(e),function(){t[i]=t[i].filter((function(t){return t!==e}))}},n);return wV&&(s.UNSAFE_componentWillMount=s.componentWillMount,s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillMount,delete s.componentWillReceiveProps),s}("router")],propTypes:{router:OH.object.isRequired,location:OH.object.isRequired,routes:OH.array.isRequired,params:OH.object.isRequired,components:OH.array.isRequired,createElement:OH.func.isRequired},getDefaultProps:function(){return{createElement:S.default.createElement}},childContextTypes:{router:OH.object.isRequired},getChildContext:function(){return{router:this.props.router}},createElement:function(e,t){return null==e?null:this.props.createElement(e,t)},render:function(){var e=this,t=this.props,n=t.location,r=t.routes,i=t.params,o=t.components,a=t.router,s=null;return o&&(s=o.reduceRight((function(t,o,s){if(null==o)return t;var l=r[s],u=function(e,t){var n={};return e.path?(jH(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n}(l,i),c={location:n,params:i,route:l,router:a,routeParams:u,routes:r};if(JH(t))c.children=t;else if(t)for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(c[d]=t[d]);if("object"===(void 0===o?"undefined":CV(o))&&!xV.isValidElementType(o)){var p={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(p[h]=e.createElement(o[h],SV({key:h},c)));return p}return e.createElement(o,c)}),s)),null===s||!1===s||S.default.isValidElement(s)||pH(!1),s}}),MV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function AV(e,t){var n=t.location,r=t.params,i=t.routes;return e.location=n,e.params=r,e.routes=i,e}var EV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var IV={history:OH.object,children:mV,routes:mV,render:OH.func,createElement:OH.func,onError:OH.func,onUpdate:OH.func,matchContext:OH.object},DV=void 0!==S.default.forwardRef,OV=IH({displayName:"Router",propTypes:IV,getDefaultProps:function(){return{render:function(e){return S.default.createElement(TV,e)}}},getInitialState:function(){return{location:null,routes:null,params:null,components:null}},handleError:function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},createRouterObject:function(e){var t=this.props.matchContext;return t?t.router:function(e,t,n){return AV(MV({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive}),n)}(this.props.history,this.transitionManager,e)},createTransitionManager:function(){var e=this.props.matchContext;if(e)return e.transitionManager;var t=this.props.history,n=this.props,r=n.routes,i=n.children;return t.getCurrentLocation||pH(!1),function(e,t){var n={},r=WH(),i=r.runEnterHooks,o=r.runChangeHooks,a=r.runLeaveHooks,s=void 0;function l(e,n){s&&s.location===e?u(s,n):lV(t,e,(function(t,r){t?n(t):r?u(uV({},r,{location:e}),n):n()}))}function u(e,t){var r=UH(n,e),s=r.leaveRoutes,l=r.changeRoutes,u=r.enterRoutes;function c(r,i){if(r||i)return d(r,i);XH(e,(function(r,i){r?t(r):t(null,null,n=uV({},e,{components:i}))}))}function d(e,n){e?t(e):t(null,n)}a(s,n),s.filter((function(e){return-1===u.indexOf(e)})).forEach(y),o(l,n,e,(function(t,n){if(t||n)return d(t,n);i(u,e,c)}))}var c=1;function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.__id__||t&&(e.__id__=c++)}var p=Object.create(null);function h(e){return e.map((function(e){return p[d(e)]})).filter((function(e){return e}))}function f(e,r){lV(t,e,(function(t,i){if(null!=i){s=uV({},i,{location:e});for(var o=h(UH(n,s).leaveRoutes),a=void 0,l=0,u=o.length;null==a&&l<u;++l)a=o[l](e);r(a)}else r()}))}function g(){if(n.routes){for(var e=h(n.routes),t=void 0,r=0,i=e.length;"string"!=typeof t&&r<i;++r)t=e[r]();return t}}var m=void 0,v=void 0;function y(e){var t=d(e);t&&(delete p[t],cV(p)||(m&&(m(),m=null),v&&(v(),v=null)))}return{isActive:function(t,r){return QH(t=e.createLocation(t),r,n.location,n.routes,n.params)},match:l,listenBeforeLeavingRoute:function(t,n){var r=!cV(p),i=d(t,!0);return p[i]=n,r&&(m=e.listenBefore(f),e.listenBeforeUnload&&(v=e.listenBeforeUnload(g))),function(){y(t)}},listen:function(t){function r(r){n.location===r?t(null,n):l(r,(function(n,r,i){n?t(n):r?e.replace(r):i&&t(null,i)}))}var i=e.listen(r);return n.location?t(null,n):r(e.getCurrentLocation()),i}}}(t,nV(r||i))},componentWillMount:function(){var e=this;this.transitionManager=this.createTransitionManager(),this.router=this.createRouterObject(this.state),this._unlisten=this.transitionManager.listen((function(t,n){t?e.handleError(t):(AV(e.router,n),e.setState(n,e.props.onUpdate))}))},componentWillReceiveProps:function(e){},componentWillUnmount:function(){this._unlisten&&this._unlisten()},render:function(){var e=this.state,t=e.location,n=e.routes,r=e.params,i=e.components,o=this.props,a=o.createElement,s=o.render,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(o,["createElement","render"]);return null==t?null:(Object.keys(IV).forEach((function(e){return delete l[e]})),s(EV({},l,{router:this.router,location:t,routes:n,params:r,components:i,createElement:a})))}});DV&&(OV.prototype.UNSAFE_componentWillReceiveProps=OV.prototype.componentWillReceiveProps,OV.prototype.UNSAFE_componentWillMount=OV.prototype.componentWillMount,delete OV.prototype.componentWillReceiveProps,delete OV.prototype.componentWillMount);var kV=OH.shape({push:OH.func.isRequired,replace:OH.func.isRequired,go:OH.func.isRequired,goBack:OH.func.isRequired,goForward:OH.func.isRequired,setRouteLeaveHook:OH.func.isRequired,isActive:OH.func.isRequired});OH.shape({pathname:OH.string.isRequired,search:OH.string.isRequired,state:OH.object,action:OH.string.isRequired,key:OH.string});var RV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function NV(e,t){return"function"==typeof e?e(t.location):e}var LV=IH({displayName:"Link",mixins:[function(e){var t,n,r=bV(e),i=r+"/lastRenderedEventIndex",o=r+"/handleContextUpdate",a=r+"/unsubscribe",s=((n={contextTypes:(t={},t[r]=_V,t),getInitialState:function(){var e;return this.context[r]?((e={})[i]=this.context[r].eventIndex,e):{}},componentDidMount:function(){this.context[r]&&(this[a]=this.context[r].subscribe(this[o]))},componentWillReceiveProps:function(){var e;this.context[r]&&this.setState(((e={})[i]=this.context[r].eventIndex,e))},componentWillUnmount:function(){this[a]&&(this[a](),this[a]=null)}})[o]=function(e){var t;e!==this.state[i]&&this.setState(((t={})[i]=e,t))},n);return wV&&(s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillReceiveProps),s}("router")],contextTypes:{router:kV},propTypes:{to:OH.oneOfType([OH.string,OH.object,OH.func]),activeStyle:OH.object,activeClassName:OH.string,onlyActiveOnIndex:OH.bool.isRequired,onClick:OH.func,target:OH.string,innerRef:OH.oneOfType([OH.string,OH.func,OH.shape({current:OH.elementType})])},getDefaultProps:function(){return{onlyActiveOnIndex:!1,style:{}}},handleClick:function(e){if(this.props.onClick&&this.props.onClick(e),!e.defaultPrevented){var t=this.context.router;t||pH(!1),!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&function(e){return 0===e.button}(e)&&(this.props.target||(e.preventDefault(),t.push(NV(this.props.to,t))))}},render:function(){var e=this.props,t=e.to,n=e.activeClassName,r=e.activeStyle,i=e.onlyActiveOnIndex,o=e.innerRef,a=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","activeClassName","activeStyle","onlyActiveOnIndex","innerRef"]),s=this.context.router;if(s){if(!t)return S.default.createElement("a",RV({},a,{ref:o}));var l=NV(t,s);a.href=s.createHref(l),(n||null!=r&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r))&&s.isActive(l,i)&&(n&&(a.className?a.className+=" "+n:a.className=n),r&&(a.style=RV({},a.style,r)))}return S.default.createElement("a",RV({},a,{onClick:this.handleClick,ref:o}))}}),BV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};IH({displayName:"IndexLink",render:function(){return S.default.createElement(LV,BV({},this.props,{onlyActiveOnIndex:!0}))}});var PV,jV={exports:{}},FV={};jV.exports=function(){if(PV)return FV;PV=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return FV.AsyncMode=l,FV.ConcurrentMode=u,FV.ContextConsumer=s,FV.ContextProvider=a,FV.Element=t,FV.ForwardRef=c,FV.Fragment=r,FV.Lazy=f,FV.Memo=h,FV.Portal=n,FV.Profiler=o,FV.StrictMode=i,FV.Suspense=d,FV.isAsyncMode=function(e){return _(e)||x(e)===l},FV.isConcurrentMode=_,FV.isContextConsumer=function(e){return x(e)===s},FV.isContextProvider=function(e){return x(e)===a},FV.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},FV.isForwardRef=function(e){return x(e)===c},FV.isFragment=function(e){return x(e)===r},FV.isLazy=function(e){return x(e)===f},FV.isMemo=function(e){return x(e)===h},FV.isPortal=function(e){return x(e)===n},FV.isProfiler=function(e){return x(e)===o},FV.isStrictMode=function(e){return x(e)===i},FV.isSuspense=function(e){return x(e)===d},FV.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},FV.typeOf=x,FV}();var UV=jV.exports,zV={};zV[UV.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zV[UV.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var HV=IH({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=eV(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){var r=e.location,i=e.params,o=void 0;if("/"===t.to.charAt(0))o=FH(t.to,i);else if(t.to){var a=e.routes.indexOf(t);o=FH(HV.getRoutePattern(e.routes,a-1).replace(/\/*$/,"/")+t.to,i)}else o=r.pathname;n({pathname:o,query:t.query||r.query,state:t.state||r.state})},t},getRoutePattern:function(e,t){for(var n="",r=t;r>=0;r--){var i=e[r].path||"";if(n=i.replace(/\/*$/,"/")+n,0===i.indexOf("/"))break}return"/"+n}},propTypes:{path:OH.string,from:OH.string,to:OH.string.isRequired,query:OH.object,state:OH.object,onEnter:dV,children:dV},render:function(){pH(!1)}});IH({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=HV.createRouteFromReactElement(e))}},propTypes:{to:OH.string.isRequired,query:OH.object,state:OH.object,onEnter:dV,children:dV},render:function(){pH(!1)}}),IH({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=eV(e))}},propTypes:{path:dV,component:hV,components:fV,getComponent:OH.func,getComponents:OH.func},render:function(){pH(!1)}}),IH({displayName:"Route",statics:{createRouteFromReactElement:eV},propTypes:{path:OH.string,component:hV,components:fV,getComponent:OH.func,getComponents:OH.func},render:function(){pH(!1)}});var VV={__esModule:!0,PUSH:"PUSH",REPLACE:"REPLACE",POP:"POP"},WV={},YV=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},GV=mH;function qV(e,t){return t.encode?t.strict?YV(e):encodeURIComponent(e):e}function QV(e){return Array.isArray(e)?e.sort():"object"==typeof e?QV(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}WV.extract=function(e){return e.split("?")[1]||""},WV.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=GV({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=QV(n):e[t]=n,e}),Object.create(null))):r},WV.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[qV(t,e),"[",r,"]"].join(""):[qV(t,e),"[",qV(r,e),"]=",qV(n,e)].join("")};case"bracket":return function(t,n){return null===n?qV(t,e):[qV(t,e),"[]=",qV(n,e)].join("")};default:return function(t,n){return null===n?qV(t,e):[qV(t,e),"=",qV(n,e)].join("")}}}(t=GV({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return qV(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return qV(r,t)+"="+qV(i,t)})).filter((function(e){return e.length>0})).join("&"):""};var ZV,XV={__esModule:!0};!(ZV=RH)||ZV.__esModule;XV.default=function(e,t,n){var r=e(t,n);e.length<2&&n(r)};var $V={},KV={__esModule:!0};KV.createPath=KV.parsePath=KV.getQueryStringValueFromPath=KV.stripQueryStringValueFromPath=KV.addQueryStringValueToPath=void 0,function(e){e&&e.__esModule}(RH),KV.addQueryStringValueToPath=function(e,t,n){var r=JV(e),i=r.pathname,o=r.search,a=r.hash;return eW({pathname:i,search:o+(-1===o.indexOf("?")?"?":"&")+t+"="+n,hash:a})},KV.stripQueryStringValueFromPath=function(e,t){var n=JV(e),r=n.pathname,i=n.search,o=n.hash;return eW({pathname:r,search:i.replace(new RegExp("([?&])"+t+"=[a-zA-Z0-9]+(&?)"),(function(e,t,n){return"?"===t?t:n})),hash:o})},KV.getQueryStringValueFromPath=function(e,t){var n=JV(e).search.match(new RegExp("[?&]"+t+"=([a-zA-Z0-9]+)"));return n&&n[1]};var JV=KV.parsePath=function(e){var t=function(e){var t=e.match(/^(https?:)?\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}(e),n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substring(i),t=t.substring(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}},eW=KV.createPath=function(e){if(null==e||"string"==typeof e)return e;var t=e.basename,n=e.pathname,r=e.search,i=e.hash,o=(t||"")+n;return r&&"?"!==r&&(o+=r),i&&(o+=i),o};$V.__esModule=!0,$V.locationsAreEqual=$V.statesAreEqual=$V.createLocation=$V.createQuery=void 0;var tW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rW=aW(dH);aW(RH);var iW=KV,oW=VV;function aW(e){return e&&e.__esModule?e:{default:e}}$V.createQuery=function(e){return nW(Object.create(null),e)},$V.createLocation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oW.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"==typeof e?(0,iW.parsePath)(e):e;return{pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:r.state,action:t,key:n}};var sW=function(e){return"[object Date]"===Object.prototype.toString.call(e)},lW=$V.statesAreEqual=function e(t,n){if(t===n)return!0;var r=void 0===t?"undefined":tW(t);if(r!==(void 0===n?"undefined":tW(n)))return!1;if("function"===r&&(0,rW.default)(!1),"object"===r){if(sW(t)&&sW(n)&&(0,rW.default)(!1),!Array.isArray(t)){var i=Object.keys(t),o=Object.keys(n);return i.length===o.length&&i.every((function(r){return e(t[r],n[r])}))}return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}return!1};$V.locationsAreEqual=function(e,t){return e.key===t.key&&e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&lW(e.state,t.state)};var uW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cW=WV,dW=function(e){return e&&e.__esModule?e:{default:e}}(XV),pW=$V,hW=KV;var fW=function(e){return(0,cW.stringify)(e).replace(/%20/g,"+")},gW=cW.parse,mW=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.stringifyQuery,i=t.parseQueryString;"function"!=typeof r&&(r=fW),"function"!=typeof i&&(i=gW);var o=function(e){return e?(null==e.query&&(e.query=i(e.search.substring(1))),e):e},a=function(e,t){if(null==t)return e;var n="string"==typeof e?(0,hW.parsePath)(e):e,i=r(t);return uW({},n,{search:i?"?"+i:""})};return uW({},n,{getCurrentLocation:function(){return o(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,dW.default)(e,o(t),n)}))},listen:function(e){return n.listen((function(t){return e(o(t))}))},push:function(e){return n.push(a(e,e.query))},replace:function(e){return n.replace(a(e,e.query))},createPath:function(e){return n.createPath(a(e,e.query))},createHref:function(e){return n.createHref(a(e,e.query))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var s=n.createLocation.apply(n,[a(e,e.query)].concat(r));return e.query&&(s.query=(0,pW.createQuery)(e.query)),o(s)}})}},vW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yW=function(e){return e&&e.__esModule?e:{default:e}}(XV),xW=KV;var _W=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.basename,i=function(e){return e?(r&&null==e.basename&&(0===e.pathname.toLowerCase().indexOf(r.toLowerCase())?(e.pathname=e.pathname.substring(r.length),e.basename=r,""===e.pathname&&(e.pathname="/")):e.basename=""),e):e},o=function(e){if(!r)return e;var t="string"==typeof e?(0,xW.parsePath)(e):e,n=t.pathname,i="/"===r.slice(-1)?r:r+"/",o="/"===n.charAt(0)?n.slice(1):n;return vW({},t,{pathname:i+o})};return vW({},n,{getCurrentLocation:function(){return i(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,yW.default)(e,i(t),n)}))},listen:function(e){return n.listen((function(t){return e(i(t))}))},push:function(e){return n.push(o(e))},replace:function(e){return n.replace(o(e))},createPath:function(e){return n.createPath(o(e))},createHref:function(e){return n.createHref(o(e))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return i(n.createLocation.apply(n,[o(e)].concat(r)))}})}},bW={},wW={__esModule:!0,loopAsync:function(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0,l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];i=!0,o?s=t:n.apply(void 0,t)};!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t(r++,u,l);o=!1,i?n.apply(void 0,s):r>=e&&a&&(i=!0,n())}}()}};bW.__esModule=!0;var SW=wW,CW=KV,TW=function(e){return e&&e.__esModule?e:{default:e}}(XV),MW=VV,AW=$V;function EW(e){return e&&e.__esModule?e:{default:e}}bW.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getCurrentLocation,n=e.getUserConfirmation,r=e.pushLocation,i=e.replaceLocation,o=e.go,a=e.keyLength,s=void 0,l=void 0,u=[],c=[],d=[],p=function(e){var t=l&&l.action===MW.POP?d.indexOf(l.key):s?d.indexOf(s.key):-1;(s=e).action===MW.PUSH?d=[].concat(d.slice(0,t+1),[s.key]):s.action===MW.REPLACE&&(d[t]=s.key),c.forEach((function(e){return e(s)}))},h=function(e){var t,a;s&&(0,AW.locationsAreEqual)(s,e)||l&&(0,AW.locationsAreEqual)(l,e)||(l=e,t=e,a=function(t){if(l===e)if(l=null,t){if(e.action===MW.PUSH){var n=(0,CW.createPath)(s);(0,CW.createPath)(e)===n&&(0,AW.statesAreEqual)(s.state,e.state)&&(e.action=MW.REPLACE)}e.action===MW.POP?p(e):e.action===MW.PUSH?!1!==r(e)&&p(e):e.action===MW.REPLACE&&!1!==i(e)&&p(e)}else if(s&&e.action===MW.POP){var a=d.indexOf(s.key),u=d.indexOf(e.key);-1!==a&&-1!==u&&o(a-u)}},(0,SW.loopAsync)(u.length,(function(e,n,r){(0,TW.default)(u[e],t,(function(e){return null!=e?r(e):n()}))}),(function(e){n&&"string"==typeof e?n(e,(function(e){return a(!1!==e)})):a(!1!==e)})))},f=function(){return Math.random().toString(36).substr(2,a||6)},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f();return(0,AW.createLocation)(e,t,n)};return{getCurrentLocation:t,listenBefore:function(e){return u.push(e),function(){return u=u.filter((function(t){return t!==e}))}},listen:function(e){return c.push(e),function(){return c=c.filter((function(t){return t!==e}))}},transitionTo:h,push:function(e){return h(g(e,MW.PUSH))},replace:function(e){return h(g(e,MW.REPLACE))},go:o,goBack:function(){return o(-1)},goForward:function(){return o(1)},createKey:f,createPath:CW.createPath,createHref:function(e){return(0,CW.createPath)(e)},createLocation:g}},EW(RH),EW(dH),EW(bW);var IW={__esModule:!0};IW.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);var DW={},OW={__esModule:!0,addEventListener:function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},supportsHistory:function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},supportsGoWithoutReloadUsingHash:function(){return-1===window.navigator.userAgent.indexOf("Firefox")},supportsPopstateOnHashchange:function(){return-1===window.navigator.userAgent.indexOf("Trident")},isExtraneousPopstateEvent:function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},kW={__esModule:!0};kW.readState=kW.saveState=void 0,function(e){e&&e.__esModule}(RH);var RW={QuotaExceededError:!0,QUOTA_EXCEEDED_ERR:!0},NW={SecurityError:!0},LW=function(e){return"@@History/"+e};kW.saveState=function(e,t){if(window.sessionStorage)try{null==t?window.sessionStorage.removeItem(LW(e)):window.sessionStorage.setItem(LW(e),JSON.stringify(t))}catch(e){if(NW[e.name])return;if(RW[e.name]&&0===window.sessionStorage.length)return;throw e}},kW.readState=function(e){var t=void 0;try{t=window.sessionStorage.getItem(LW(e))}catch(e){if(NW[e.name])return}if(t)try{return JSON.parse(t)}catch(e){}},DW.__esModule=!0,DW.go=DW.replaceLocation=DW.pushLocation=DW.startListener=DW.getUserConfirmation=DW.getCurrentLocation=void 0;var BW=$V,PW=OW,jW=kW,FW=KV,UW="popstate",zW="hashchange",HW=IW.canUseDOM&&!(0,PW.supportsPopstateOnHashchange)(),VW=function(e){var t=e&&e.key;return(0,BW.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:t?(0,jW.readState)(t):void 0},void 0,t)},WW=DW.getCurrentLocation=function(){var e=void 0;try{e=window.history.state||{}}catch(t){e={}}return VW(e)};DW.getUserConfirmation=function(e,t){return t(window.confirm(e))},DW.startListener=function(e){var t=function(t){(0,PW.isExtraneousPopstateEvent)(t)||e(VW(t.state))};(0,PW.addEventListener)(window,UW,t);var n=function(){return e(WW())};return HW&&(0,PW.addEventListener)(window,zW,n),function(){(0,PW.removeEventListener)(window,UW,t),HW&&(0,PW.removeEventListener)(window,zW,n)}};var YW=function(e,t){var n=e.state,r=e.key;void 0!==n&&(0,jW.saveState)(r,n),t({key:r},(0,FW.createPath)(e))};DW.pushLocation=function(e){return YW(e,(function(e,t){return window.history.pushState(e,null,t)}))},DW.replaceLocation=function(e){return YW(e,(function(e,t){return window.history.replaceState(e,null,t)}))},DW.go=function(e){e&&window.history.go(e)};var GW={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=DW;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}});var n=$V,r=KV;e.getCurrentLocation=function(){return(0,n.createLocation)(window.location)},e.pushLocation=function(e){return window.location.href=(0,r.createPath)(e),!1},e.replaceLocation=function(e){return window.location.replace((0,r.createPath)(e)),!1}}(GW);var qW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW=tY(dH),ZW=IW,XW=eY(DW),$W=eY(GW),KW=OW,JW=tY(bW);function eY(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function tY(e){return e&&e.__esModule?e:{default:e}}var nY=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ZW.canUseDOM||(0,QW.default)(!1);var t=e.forceRefresh||!(0,KW.supportsHistory)()?$W:XW,n=t.getUserConfirmation,r=t.getCurrentLocation,i=t.pushLocation,o=t.replaceLocation,a=t.go,s=(0,JW.default)(qW({getUserConfirmation:n},e,{getCurrentLocation:r,pushLocation:i,replaceLocation:o,go:a})),l=0,u=void 0,c=function(e,t){1==++l&&(u=XW.startListener(s.transitionTo));var n=t?s.listenBefore(e):s.listen(e);return function(){n(),0==--l&&u()}};return qW({},s,{listenBefore:function(e){return c(e,!0)},listen:function(e){return c(e,!1)}})},rY=!("undefined"==typeof window||!window.document||!window.document.createElement);function iY(e){var t=void 0;return rY&&(t=function(e){return function(t){return mW(_W(e))(t)}}(e)()),t}iY(nY);var oY={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.startListener=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=DW;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}}),function(e){e&&e.__esModule}(RH);var n=$V,r=OW,i=kW,o=KV;var a="hashchange",s=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},l=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},u=e.getCurrentLocation=function(e,t){var r=e.decodePath(s()),a=(0,o.getQueryStringValueFromPath)(r,t),l=void 0;a&&(r=(0,o.stripQueryStringValueFromPath)(r,t),l=(0,i.readState)(a));var u=(0,o.parsePath)(r);return u.state=l,(0,n.createLocation)(u,void 0,a)},c=void 0;e.startListener=function(e,t,n){var i=function(){var r=s(),i=t.encodePath(r);if(r!==i)l(i);else{var o=u(t,n);if(c&&o.key&&c.key===o.key)return;c=o,e(o)}},o=s(),d=t.encodePath(o);return o!==d&&l(d),(0,r.addEventListener)(window,a,i),function(){return(0,r.removeEventListener)(window,a,i)}};var d=function(e,t,n,r){var a=e.state,s=e.key,l=t.encodePath((0,o.createPath)(e));void 0!==a&&(l=(0,o.addQueryStringValueToPath)(l,n,s),(0,i.saveState)(s,a)),c=e,r(l)};e.pushLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&function(e){window.location.hash=e}(e)}))},e.replaceLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&l(e)}))}}(oY);var aY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};pY(RH);var sY=pY(dH),lY=IW,uY=OW,cY=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(oY),dY=pY(bW);function pY(e){return e&&e.__esModule?e:{default:e}}var hY=function(e){return"/"===e.charAt(0)?e:"/"+e},fY={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!"+e},decodePath:function(e){return"!"===e.charAt(0)?e.substring(1):e}},noslash:{encodePath:function(e){return"/"===e.charAt(0)?e.substring(1):e},decodePath:hY},slash:{encodePath:hY,decodePath:hY}};iY((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};lY.canUseDOM||(0,sY.default)(!1);var t=e.queryKey,n=e.hashType;"string"!=typeof t&&(t="_k"),null==n&&(n="slash"),n in fY||(n="slash");var r=fY[n],i=cY.getUserConfirmation,o=(0,dY.default)(aY({getUserConfirmation:i},e,{getCurrentLocation:function(){return cY.getCurrentLocation(r,t)},pushLocation:function(e){return cY.pushLocation(e,r,t)},replaceLocation:function(e){return cY.replaceLocation(e,r,t)},go:cY.go})),a=0,s=void 0,l=function(e,n){1==++a&&(s=cY.startListener(o.transitionTo,r,t));var i=n?o.listenBefore(e):o.listen(e);return function(){i(),0==--a&&s()}};(0,uY.supportsGoWithoutReloadUsingHash)();return aY({},o,{listenBefore:function(e){return l(e,!0)},listen:function(e){return l(e,!1)},go:function(e){o.go(e)},createHref:function(e){return"#"+r.encodePath(o.createHref(e))}})}));var gY=function(n){var i,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,A,E,I,D,O,k,R,N,L,P=n.appName,j=n.universeData,F=n.anomalyData,U=n.isDrilldownView,z=void 0===U||U,V=n.queryObject,W=n.onSelectedQuery,Y=n.onSelectedIssue,G=wi(),q=ft(),Q=t.useState(!0),Z=Q[0],X=Q[1],$=window.location.pathname.includes("".concat(_r.INSIGHTS)),K=window.location.href,J=K.substring(0,K.lastIndexOf("/")),ee=new URLSearchParams(window.location.search),te=ee.get("duration"),ne=ee.get("startTime"),re=ee.get("endTime"),ie=ee.get("dbId"),oe=ee.get("userId"),ae=ee.get("universeId"),se=ee.get("type"),le=ee.get("tab"),ue=new URLSearchParams;Zi(te)&&ue.append("duration",te),Zi(ne)&&ue.append("startTime",ne),Zi(re)&&ue.append("endTime",re),Zi(ie)&&ue.delete("dbId",ie),Zi(oe)&&ue.delete("userId",oe),Zi(ae)&&ue.delete("universeId",ae),Zi(se)&&ue.delete("type",se),P===exports.AppName.YBA&&Zi(le)&&ue.append("tab",le),L="".concat(J).concat(ue.toString()?"?".concat(ue.toString()):"");var ce=new URL(window.location.href);if(P===exports.AppName.YBM){["universeId","queryId","dbId","userId"].forEach((function(e){return ce.searchParams.delete(e)}))}var de="HOT_TABLET"===(null===(i=null==F?void 0:F.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(a=null==F?void 0:F.lastInstance)||void 0===a?void 0:a.type),pe=null===(s=null==F?void 0:F.lastInstance)||void 0===s?void 0:s.entityDisplayName,he=null===(l=null==F?void 0:F.lastInstance)||void 0===l?void 0:l.category,fe=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(p=null===(d=null===(c=null===(u=null==j?void 0:j.universeDetails)||void 0===u?void 0:u.nodeDetailsSet)||void 0===c?void 0:c.find((function(e){return e.nodeName===pe})))||void 0===d?void 0:d.cloudInfo)||void 0===p?void 0:p.region),ge=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(m=null===(g=null===(f=null===(h=null==j?void 0:j.universeDetails)||void 0===h?void 0:h.nodeDetailsSet)||void 0===f?void 0:f.find((function(e){return e.nodeName===pe})))||void 0===g?void 0:g.cloudInfo)||void 0===m?void 0:m.az);return e.jsxs(r.Box,{children:[e.jsxs(r.Box,B({display:"flex",mb:3},{children:[e.jsx(r.Box,{children:z&&e.jsxs(r.Breadcrumbs,B({className:G.breadCrumb,separator:e.jsx(r.Typography,B({variant:"body2",style:{fontSize:"18px"}},{children:"/"})),"aria-label":"breadcrumb","data-testid":"GenericHeader-Breadcrumb"},{children:[e.jsx(r.Link,B({className:G.breadcrumbColor,component:LV,variant:"h5",onClick:function(){P===exports.AppName.YBM?F?(null==Y||Y(null),window.history.pushState({},"",window.location.href)):(null==W||W(null),window.history.pushState({},"",ce.toString())):window.location.href=L},to:"#"},{children:e.jsx("span",B({className:G.breadCrumbText},{children:"Cluster Load"}))})),e.jsx(r.Link,B({className:G.breadcrumbColor,component:LV,variant:"h5",onClick:function(){P===exports.AppName.YBM?F?(null==Y||Y(null),window.history.pushState({},"",window.location.href)):(null==W||W(null),window.history.pushState({},"",ce.toString())):window.location.href=L},to:"#"},{children:F?e.jsx("span",B({className:H(G.breadCrumbText),style:{color:"capitalize"}},{children:he?"".concat(he.charAt(0).toUpperCase()+he.slice(1).toLowerCase()," ").concat($?"Insights":"Anomalies"," "):"Unknown ".concat($?"Insights":"Anomalies")})):e.jsx("span",B({className:G.breadCrumbText},{children:"Query"}))})),e.jsx(r.Link,B({className:G.breadcrumbDefaultColor,component:"span",variant:"h5"},{children:F?e.jsx("span",B({className:H(G.breadCrumbText)},{children:(null!==(v=null==pe?void 0:pe.length)&&void 0!==v?v:0)>30?"".concat(null==pe?void 0:pe.substring(0,30),"..."):pe})):e.jsx("span",B({className:H(G.breadCrumbText)},{children:(null!==(x=null===(y=null==V?void 0:V.query)||void 0===y?void 0:y.length)&&void 0!==x?x:0)>30?"".concat(null===(_=null==V?void 0:V.query)||void 0===_?void 0:_.substring(0,30),"..."):null==V?void 0:V.query}))}))]}))}),e.jsx(r.Box,B({ml:2,style:{marginTop:"-2px"}},{children:!Z&&e.jsx(o.YBButton,B({size:"small",variant:"secondary",onClick:function(){return X(!0)},dataTestId:"BreadCrumbsAndMetadataHeader-ShowDetails",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Maximize Icon"})},{children:"Show Details"}))}))]})),z&&Z&&e.jsx(r.Box,B({className:H(G.headerMetadataBox,G.boxContainer,G.flexColumn),mt:1},{children:F?e.jsxs(r.Box,B({className:G.flexRow,width:"100%",justifyContent:"space-between"},{children:[e.jsxs(r.Box,B({className:G.flexColumn},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:oi})),e.jsx(r.Box,B({className:G.anomalyTypeTag},{children:e.jsx("span",B({className:G.anomalyTypeText},{children:Gr[null===(b=null==F?void 0:F.lastInstance)||void 0===b?void 0:b.type]}))}))]})),e.jsxs(r.Box,B({className:G.flexColumn},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:null===(S=Jr[null===(w=null==F?void 0:F.lastInstance)||void 0===w?void 0:w.type])||void 0===S?void 0:S.title})),e.jsxs(r.Box,{children:[e.jsx("span",B({className:G.regularMetadata},{children:(null===(T=null===(C=null==F?void 0:F.lastInstance)||void 0===C?void 0:C.entityDisplayName)||void 0===T?void 0:T.length)>30?"".concat(null==pe?void 0:pe.substring(0,he===exports.AnomalyCategory.SQL?40:30),"..."):pe})),e.jsx("img",{src:"data:image/svg+xml,%3csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.5 7.001V8.001H7C6.17157 8.001 5.5 8.67257 5.5 9.501V18.501C5.5 19.3294 6.17157 20.001 7 20.001H14C14.8284 20.001 15.5 19.3294 15.5 18.501V17.001H16.5V18.501C16.5 19.8817 15.3807 21.001 14 21.001H7C5.61929 21.001 4.5 19.8817 4.5 18.501V9.501C4.5 8.12029 5.61929 7.001 7 7.001H8.5ZM16.5 4.001H11C10.1716 4.001 9.5 4.67258 9.5 5.501V14.501C9.5 15.3294 10.1716 16.001 11 16.001H18C18.8284 16.001 19.5 15.3294 19.5 14.501V7.001H17C16.7239 7.001 16.5 6.77714 16.5 6.501V4.001ZM20.5 6.52898V14.501C20.5 15.8817 19.3807 17.001 18 17.001H11C9.61929 17.001 8.5 15.8817 8.5 14.501V5.501C8.5 4.12029 9.61929 3.001 11 3.001H16.972C17.1048 2.99258 17.2429 3.03684 17.3536 3.14745L20.3536 6.14745C20.4642 6.25806 20.5084 6.39623 20.5 6.52898ZM17.5 6.001H18.7929L17.5 4.70811V6.001ZM12 13.001C11.7239 13.001 11.5 12.7771 11.5 12.501C11.5 12.2249 11.7239 12.001 12 12.001H14C14.2761 12.001 14.5 12.2249 14.5 12.501C14.5 12.7771 14.2761 13.001 14 13.001H12ZM12 11.001C11.7239 11.001 11.5 10.7771 11.5 10.501C11.5 10.2249 11.7239 10.001 12 10.001H17C17.2761 10.001 17.5 10.2249 17.5 10.501C17.5 10.7771 17.2761 11.001 17 11.001H12ZM12 9.001C11.7239 9.001 11.5 8.77714 11.5 8.501C11.5 8.22486 11.7239 8.001 12 8.001H17C17.2761 8.001 17.5 8.22486 17.5 8.501C17.5 8.77714 17.2761 9.001 17 9.001H12Z' fill='%230B1117'/%3e%3c/svg%3e",alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(pe)}})]})]})),e.jsxs(r.Box,B({className:G.flexColumn},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:he===exports.AnomalyCategory.DB?void 0!==de?de?ii:ri:ni:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?ai:null})),e.jsx(r.Box,{children:e.jsx("span",B({className:G.regularMetadata},{children:he===exports.AnomalyCategory.DB?de?null===(I=null===(E=null===(A=null===(M=null==F?void 0:F.lastInstance)||void 0===M?void 0:M.mainGraphs)||void 0===A?void 0:A[0].filters)||void 0===E?void 0:E.tabletId)||void 0===I?void 0:I[0]:null===(R=null===(k=null===(O=null===(D=null==F?void 0:F.lastInstance)||void 0===D?void 0:D.mainGraphs)||void 0===O?void 0:O[0].filters)||void 0===k?void 0:k.tableName)||void 0===R?void 0:R[0]:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?e.jsxs(e.Fragment,{children:[fe,fe&&ge&&" / ",ge]}):null}))})]})),e.jsx(r.Box,{children:e.jsx(o.YBButton,B({size:"small",variant:"ghost",onClick:function(){return X(!1)},dataTestId:"BreadCrumbsAndMetadataHeader-HideDetails"},{children:e.jsx("span",B({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))})]})):e.jsxs(r.Box,{children:[e.jsxs(r.Box,B({className:G.flexRow,width:"100%"},{children:[e.jsxs(r.Box,B({className:G.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:ei})),e.jsx(r.Box,{children:null==V?void 0:V.namespaceName})]})),e.jsxs(r.Box,B({className:G.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:ti})),e.jsx(r.Box,{children:null==V?void 0:V.queryType})]})),e.jsx(r.Box,B({className:G.flexColumn,alignItems:"flex-start",ml:"auto"},{children:e.jsx(o.YBButton,B({size:"small",variant:"ghost",onClick:function(){return X(!1)},dataTestId:"BreadCrumbsAndMetadataHeader-HideDetails"},{children:e.jsx("span",B({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))}))]})),e.jsx(r.Box,B({className:G.flexColumn,mt:1},{children:e.jsx(r.Box,B({width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"}},{children:e.jsx(ht,{text:null!==(N=null==V?void 0:V.query)&&void 0!==N?N:"",showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:P===exports.AppName.YBM?q.queryCodeElement:q.queryCodeElementWeb,preClassName:q.queryPreBlockFull,containerClassName:q.queryContainerCode},"TableHelperQueries-query")}))}))]})}))]})},mY=S.default.memo((function(i){var o,a=i.universeUuid,s=i.universeData,l=i.anomalyData,u=i.amomalyGraphRequestParams,c=i.appName,d=i.timezone,p=i.formattedAnomalyRca,h=i.apiUrl,f=i.universeQueryData,g=i.universeQueryStatsData,m=i.isHistoricalQueryView,v=i.troubleshootUuid,y=i.queryIdParam,x=i.onSelectedIssue,_=i.onSelectedQuery,b=wi(),w=function(e){var t,n,r,i,o,a,s=exports.MetricMeasure.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===or.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===or.NONE&&(s=exports.MetricMeasure.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==ir.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==ir.BOTTOM||(s=exports.MetricMeasure.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===or.TABLE?s=exports.MetricMeasure.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===or.NAMESPACE&&(s=exports.MetricMeasure.OUTLIER_DB)),s}(l),S=function(e){var t,n,r=ir.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===ir.TOP?r=ir.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===ir.BOTTOM&&(r=ir.BOTTOM),r}(l),C=function(e){var t,n,r=3;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitCount)>0&&(r=null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitCount),r}(l),T=new URLSearchParams(window.location.search),M={startTime:T.get("startTime"),endTime:T.get("endTime"),duration:T.get("duration"),dbId:T.get("dbId"),queryId:null!=y?y:void 0,userId:T.get("userId"),type:T.get("type"),universeId:a},A=null==M?void 0:M.endTime,E=A?new Date(A):new Date,I=new Date(E);(null==M?void 0:M.startTime)?I=new Date(null==M?void 0:M.startTime):I.setDate(I.getDate()-1);var D=t.useState(br),O=D[0],k=D[1],R=t.useState(Sr),N=R[0],L=R[1],P=t.useState(!0),j=P[0],F=P[1],U=t.useState(wr),z=U[0],V=U[1],W=t.useState(wr),Y=W[0],G=W[1],q=t.useState(wr),Q=q[0],Z=q[1],X=t.useState(wr),$=X[0],K=X[1],J=t.useState(w),ee=J[0],te=J[1],ne=t.useState(S),re=ne[0],ie=ne[1],oe=t.useState(null!==(o=null==M?void 0:M.duration)&&void 0!==o?o:$r[0].value),ae=oe[0],se=oe[1],le=t.useState(C),ue=le[0],ce=le[1],de=t.useState((function(){return Ca(ae,E,I)})),pe=de[0],he=de[1],fe=t.useState(null),ge=fe[0],me=fe[1],ve=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsById,a,null==l?void 0:l.groupId,pe.startDateTime,pe.endDateTime],(function(){return l&&(null==l?void 0:l.groupId)?oH.fetchAnomalyGroupById(a,l.groupId,pe.startDateTime.toISOString(),pe.endDateTime.toISOString(),h):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){me(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!m&&Zi(v)}),ye=function(){var e,t,n=null===(e=pe.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=pe.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:a,cluster:z,region:Y,zone:Q,node:$,metricMeasure:ee,numNodes:ue,outlierType:re,formattedStartDate:n,formattedEndDate:r}},xe=function(){if(ae!==Xr.CUSTOM){var e=Sa(ae,E),t=e.formattedStartDate,n=e.formattedEndDate;he({startDateTime:t,endDateTime:n})}};t.useEffect((function(){xe()}),[ae]);var _e=function(e,t){he({startDateTime:new Date(e),endDateTime:new Date(t)})};t.useEffect((function(){(null==M?void 0:M.duration)&&Zi(M.duration)&&xe()}),[]);var be=function(e){te(e)},we=function(e){ie(e)},Se=function(e){ce(e>10?10:e)},Ce=function(e,t,n,r){F(r),n===br&&(k(br),V(wr),G(wr)),(e||t)&&(k(n),e&&(V(n),G("")),t&&(G(n),V("")))},Te=function(e,t,n){n===Sr&&(L(Sr),Z(wr),K(wr)),(e||t)&&(L(n),e&&(Z(n),K("")),t&&(Z(""),K(n)))},Me=null==M?void 0:M.queryId,Ae=m?Me:null==Me?void 0:Me[0],Ee=null==g?void 0:g.find((function(e){return e.queryId===Ae}));return e.jsxs(r.Box,B({style:{height:"100vh",display:"flex",flexDirection:"column"}},{children:[e.jsx(gY,{appName:c,universeData:s,queryObject:Ee,anomalyData:Qi(ge)?ge:null,onSelectedIssue:Qi(l)?x:void 0,onSelectedQuery:_}),e.jsx(r.Box,B({className:H(c===exports.AppName.WEB?b.stickyHeader:b.stickyHeaderYBM)},{children:e.jsx(kl,{appName:c,filterDuration:ae,startDateTime:pe.startDateTime,endDateTime:pe.endDateTime,timezone:d,onSelectedFilterDuration:function(e){se(e)},metricMeasure:ee,onStartDateChange:function(e){e&&he((function(t){return B(B({},t),{startDateTime:e})}))},onEndDateChange:function(e){e&&he((function(t){return B(B({},t),{endDateTime:e})}))},onRefresh:function(){he((function(e){return B(B({},e),{endDateTime:new Date})}))}})})),e.jsx(r.Box,B({className:H(c===exports.AppName.WEB&&b.headerContainer),style:{flex:1,overflow:"auto",paddingTop:c===exports.AppName.WEB?"16px":"0px"}},{children:Qi(ge)?e.jsxs(e.Fragment,{children:[e.jsx(Ta,{appName:c,universeData:s,anomalyData:ge,clusterRegionItem:O,zoneNodeItem:N,isPrimaryCluster:j,cluster:z,region:Y,metricMeasure:ee,outlierType:re,numNodes:ue,onZoneNodeSelected:Te,onClusterRegionSelected:Ce,onOutlierTypeSelected:we,onSplitTypeSelected:be,onNumNodesChanged:Se}),e.jsx(cH,{metricMeasure:ee,appName:c,dateTimeRange:pe,timezone:d,universeQueryData:f,amomalyGraphRequestParams:u,formattedAnomalyRca:p,apiUrl:h,anomalyData:ge,gantChartData:ve,onEChartsDateSelect:_e,onSelectedIssue:x,urlParams:M,getClusterDetails:ye})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ta,{appName:c,universeData:s,anomalyData:null,clusterRegionItem:O,zoneNodeItem:N,isPrimaryCluster:j,cluster:z,region:Y,metricMeasure:ee,outlierType:re,numNodes:ue,onZoneNodeSelected:Te,onClusterRegionSelected:Ce,onOutlierTypeSelected:we,onSplitTypeSelected:be,onNumNodesChanged:Se}),e.jsx(lH,{urlParams:M,getClusterDetails:ye,metricMeasure:ee,apiUrl:h,appName:c,timezone:d,dateTimeRange:pe,universeQueryStatsData:g,onEChartsDateSelect:_e})]})}))]}))})),vY=o.yba.ybaTheme,yY=function(t){var n=t.children,r=t.appName;return e.jsx(o.YBThemeProvider,B({theme:r===exports.AppName.YBM?o.coreTheme:vY},{children:n}))};function xY(){return xY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xY.apply(this,arguments)}function _Y(e){return"number"==typeof e&&!isNaN(e)}function bY(e){return"boolean"==typeof e}function wY(e){return"string"==typeof e}function SY(e){return"function"==typeof e}function CY(e){return wY(e)||SY(e)?e:null}function TY(e){return 0===e||e}var MY=!("undefined"==typeof window||!window.document||!window.document.createElement);function AY(e){return t.isValidElement(e)||wY(e)||SY(e)||_Y(e)}var EY={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},IY={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function DY(e){var n=e.enter,r=e.exit,i=e.appendPosition,o=void 0!==i&&i,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var i=e.children,a=e.position,l=e.preventExitTransition,c=e.done,d=e.nodeRef,p=e.isIn,h=o?n+"--"+a:n,f=o?r+"--"+a:r,g=t.useRef(),m=t.useRef(0);function v(){var e=d.current;e.removeEventListener("animationend",v),0===m.current&&(e.className=g.current)}function y(){var e=d.current;e.removeEventListener("animationend",y),s?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,c,u):c()}return t.useLayoutEffect((function(){!function(){var e=d.current;g.current=e.className,e.className+=" "+h,e.addEventListener("animationend",v)}()}),[]),t.useEffect((function(){p||(l?y():function(){m.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",y)}())}),[p]),S.default.createElement(S.default.Fragment,null,i)}}var OY={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function kY(e,n){void 0===n&&(n=!1);var r=t.useRef(e);return t.useEffect((function(){n&&(r.current=e)})),r.current}function RY(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return TY(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function NY(e){var n=t.useReducer((function(e){return e+1}),0)[1],r=t.useReducer(RY,[]),i=r[0],o=r[1],a=t.useRef(null),s=kY(0),l=kY([]),u=kY({}),c=kY({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:d,getToast:function(e){return u[e]||null}});function d(e){return-1!==i.indexOf(e)}function p(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(s-=l.length,l=[])}function h(e){o({type:1,toastId:e})}function f(){var e=l.shift();m(e.toastContent,e.toastProps,e.staleId)}function g(e,r){var i=r.delay,o=r.staleId,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["delay","staleId"]);if(AY(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||u[n]&&null==r)}(d)){var p=d.toastId,g=d.updateId,v=c.props,y=function(){return h(p)},x=null==d.updateId;x&&s++;var _,b,w={toastId:p,updateId:g,isIn:!1,key:d.key||c.toastKey++,type:d.type,closeToast:y,closeButton:d.closeButton,rtl:v.rtl,position:d.position||v.position,transition:d.transition||v.transition,className:CY(d.className||v.toastClassName),bodyClassName:CY(d.bodyClassName||v.bodyClassName),style:d.style||v.toastStyle,bodyStyle:d.bodyStyle||v.bodyStyle,onClick:d.onClick||v.onClick,pauseOnHover:bY(d.pauseOnHover)?d.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:bY(d.pauseOnFocusLoss)?d.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:bY(d.draggable)?d.draggable:v.draggable,draggablePercent:_Y(d.draggablePercent)?d.draggablePercent:v.draggablePercent,draggableDirection:d.draggableDirection||v.draggableDirection,closeOnClick:bY(d.closeOnClick)?d.closeOnClick:v.closeOnClick,progressClassName:CY(d.progressClassName||v.progressClassName),progressStyle:d.progressStyle||v.progressStyle,autoClose:(_=d.autoClose,b=v.autoClose,!1===_||_Y(_)&&_>0?_:b),hideProgressBar:bY(d.hideProgressBar)?d.hideProgressBar:v.hideProgressBar,progress:d.progress,role:wY(d.role)?d.role:v.role,deleteToast:function(){!function(e){delete u[e];var t=l.length;s=TY(e)?s-1:s-c.displayedToast,s<0&&(s=0);if(t>0){var r=TY(e)?1:c.props.limit;if(1===t||1===r)c.displayedToast++,f();else{var i=r>t?t:r;c.displayedToast=i;for(var o=0;o<i;o++)f()}}else n()}(p)}};SY(d.onOpen)&&(w.onOpen=d.onOpen),SY(d.onClose)&&(w.onClose=d.onClose),"y"===w.draggableDirection&&80===w.draggablePercent&&(w.draggablePercent*=1.5);var S=v.closeButton;!1===d.closeButton||AY(d.closeButton)?S=d.closeButton:!0===d.closeButton&&(S=!AY(v.closeButton)||v.closeButton),w.closeButton=S;var C=e;t.isValidElement(e)&&!wY(e.type)?C=t.cloneElement(e,{closeToast:y,toastProps:w}):SY(e)&&(C=e({closeToast:y,toastProps:w})),v.limit&&v.limit>0&&s>v.limit&&x?l.push({toastContent:C,toastProps:w,staleId:o}):_Y(i)&&i>0?setTimeout((function(){m(C,w,o)}),i):m(C,w,o)}}function m(e,t,n){var r=t.toastId;n&&delete u[n],u[r]={content:e,props:t},o({type:0,toastId:r,staleId:n})}return t.useEffect((function(){return c.containerId=e.containerId,OY.cancelEmit(3).on(0,g).on(1,(function(e){return a.current&&h(e)})).on(5,p).emit(2,c),function(){return OY.emit(3,c)}}),[]),t.useEffect((function(){c.isToastActive=d,c.displayedToast=i.length,OY.emit(4,i.length,e.containerId)}),[i]),t.useEffect((function(){c.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(u).reverse():Object.keys(u),i=0;i<r.length;i++){var o=u[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:u,containerRef:a,isToastActive:d}}function LY(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function BY(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function PY(e){var n=t.useState(!0),r=n[0],i=n[1],o=t.useState(!1),a=o[0],s=o[1],l=t.useRef(null),u=kY({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),c=kY(e,!0),d=e.autoClose,p=e.pauseOnHover,h=e.closeToast,f=e.onClick,g=e.closeOnClick;function m(t){if(e.draggable){var n=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=n.getBoundingClientRect(),n.style.transition="",u.x=LY(t.nativeEvent),u.y=BY(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function v(){if(u.boundingRect){var t=u.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&u.x>=i&&u.x<=o&&u.y>=n&&u.y<=r?x():y()}}function y(){i(!0)}function x(){i(!1)}function _(t){if(u.canDrag){t.preventDefault();var n=l.current;r&&x(),u.x=LY(t),u.y=BY(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance))}}function b(){var t=l.current;if(u.canDrag){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}t.useEffect((function(){return SY(e.onOpen)&&e.onOpen(t.isValidElement(e.children)&&e.children.props),function(){SY(c.onClose)&&c.onClose(t.isValidElement(c.children)&&c.children.props)}}),[]),t.useEffect((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),document.addEventListener("touchmove",_),document.addEventListener("touchend",b)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",b))}}),[e.draggable]),t.useEffect((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||x();window.addEventListener("focus",y),window.addEventListener("blur",x)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",x))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:m,onTouchStart:m,onMouseUp:v,onTouchEnd:v};return d&&p&&(w.onMouseEnter=x,w.onMouseLeave=y),g&&(w.onClick=function(e){f&&f(e),u.canCloseOnClick&&h()}),{playToast:y,pauseToast:x,isRunning:r,preventExitTransition:a,toastRef:l,eventHandlers:w}}function jY(e){var n=e.closeToast,r=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":o},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function FY(e){var n,r,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,p=e.progress,h=e.rtl,f=e.isIn,g=xY({},c,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+p+")");var m=H("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((n={})["Toastify__progress-bar--rtl"]=h,n)),v=SY(u)?u({rtl:h,type:s,defaultClassName:m}):H(m,u),y=((r={})[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]=d&&p<1?null:function(){f&&a()},r);return t.createElement("div",Object.assign({role:"progressbar",className:v,style:g},y))}FY.defaultProps={type:IY.DEFAULT,hide:!1};var UY=function(e){var n,r=PY(e),i=r.isRunning,o=r.preventExitTransition,a=r.toastRef,s=r.eventHandlers,l=e.closeButton,u=e.children,c=e.autoClose,d=e.onClick,p=e.type,h=e.hideProgressBar,f=e.closeToast,g=e.transition,m=e.position,v=e.className,y=e.style,x=e.bodyClassName,_=e.bodyStyle,b=e.progressClassName,w=e.progressStyle,S=e.updateId,C=e.role,T=e.progress,M=e.rtl,A=e.toastId,E=e.deleteToast,I=e.isIn,D=H("Toastify__toast","Toastify__toast--"+p,((n={})["Toastify__toast--rtl"]=M,n)),O=SY(v)?v({rtl:M,position:m,type:p,defaultClassName:D}):H(D,v),k=!!T;return t.createElement(g,{isIn:I,done:E,position:m,preventExitTransition:o,nodeRef:a},t.createElement("div",Object.assign({id:A,onClick:d,className:O},s,{style:y,ref:a}),t.createElement("div",Object.assign({},I&&{role:C},{className:SY(x)?x({type:p}):H("Toastify__toast-body",x),style:_}),u),function(e){if(e){var n={closeToast:f,type:p};return SY(e)?e(n):t.isValidElement(e)?t.cloneElement(e,n):void 0}}(l),(c||k)&&t.createElement(FY,Object.assign({},S&&!k?{key:"pb-"+S}:{},{rtl:M,delay:c,isRunning:i,isIn:I,closeToast:f,hide:h,type:p,style:w,className:b,controlledProgress:k,progress:T}))))},zY=function(e){var n=NY(e),r=n.getToastToRender,i=n.containerRef,o=n.isToastActive,a=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,n=H("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return SY(a)?a({position:e,rtl:l,defaultClassName:n}):H(n,CY(a))}return t.createElement("div",{ref:i,className:"Toastify",id:u},r((function(e,n){var r=0===n.length?xY({},s,{pointerEvents:"none"}):xY({},s);return t.createElement("div",{className:c(e),style:r,key:"container-"+e},n.map((function(e){var n=e.content,r=e.props;return t.createElement(UY,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?jY:r.closeButton}),n)})))})))};zY.defaultProps={position:EY.TOP_RIGHT,transition:DY({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:jY,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var HY,VY,WY,YY=new Map,GY=[],qY=!1;function QY(){return Math.random().toString(36).substr(2,9)}function ZY(e){return e&&(wY(e.toastId)||_Y(e.toastId))?e.toastId:QY()}function XY(e,n){return YY.size>0?OY.emit(0,e,n):(GY.push({content:e,options:n}),qY&&MY&&(qY=!1,VY=document.createElement("div"),document.body.appendChild(VY),g.render(t.createElement(zY,Object.assign({},WY)),VY))),n.toastId}function $Y(e,t){return xY({},t,{type:t&&t.type||e,toastId:ZY(t)})}var KY=function(e){return function(t,n){return XY(t,$Y(e,n))}},JY=function(e,t){return XY(e,$Y(IY.DEFAULT,t))};JY.success=KY(IY.SUCCESS),JY.info=KY(IY.INFO),JY.error=KY(IY.ERROR),JY.warning=KY(IY.WARNING),JY.dark=KY(IY.DARK),JY.warn=JY.warning,JY.dismiss=function(e){return OY.emit(1,e)},JY.clearWaitingQueue=function(e){return void 0===e&&(e={}),OY.emit(5,e)},JY.isActive=function(e){var t=!1;return YY.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},JY.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=YY.get(n||HY);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=xY({},r,t,{toastId:t.toastId||e,updateId:QY()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,XY(a,o)}}),0)},JY.done=function(e){JY.update(e,{progress:1})},JY.onChange=function(e){return SY(e)&&OY.on(4,e),function(){SY(e)&&OY.off(4,e)}},JY.configure=function(e){void 0===e&&(e={}),qY=!0,WY=e},JY.POSITION=EY,JY.TYPE=IY,OY.on(2,(function(e){HY=e.containerId||e,YY.set(HY,e),GY.forEach((function(e){OY.emit(0,e.content,e.options)})),GY=[]})).on(3,(function(e){YY.delete(e.containerId||e),0===YY.size&&OY.off(0).off(1).off(5),MY&&VY&&document.body.removeChild(VY)}));var eG=/\s/;var tG=/^\s+/;function nG(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&eG.test(e.charAt(t)););return t}(e)+1).replace(tG,""):e}var rG=/^[-+]0x[0-9a-f]+$/i,iG=/^0b[01]+$/i,oG=/^0o[0-7]+$/i,aG=parseInt;function sG(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Vi(e)&&"[object Symbol]"==Hi(e)}(e))return NaN;if(Di(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Di(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=nG(e);var n=iG.test(e);return n||oG.test(e)?aG(e.slice(2),n?2:8):rG.test(e)?NaN:+e}var lG=function(){return Ni.Date.now()},uG=Math.max,cG=Math.min;function dG(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function f(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=o}function g(){var e=lG();if(f(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?cG(n,o-(e-u)):n}(e))}function m(e){return s=void 0,p&&r?h(e):(r=i=void 0,a)}function v(){var e=lG(),n=f(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?h(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),h(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=sG(t)||0,Di(n)&&(c=!!n.leading,o=(d="maxWait"in n)?uG(sG(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?a:m(lG())},v}var pG,hG=r.makeStyles((function(e){return{itemsContainer:{padding:e.spacing(1,0)},item:{paddingLeft:e.spacing(2),"& label":{height:"36px"}},checkbox:{"& .yb-MuiSvgIcon-root":{width:"20px",height:"20px"}}}})),fG=function(n){var i;n.appName;var a=n.columns,s=n.hiddenColumns,l=n.onColumnVisibilityChange,u=n.close,c=hG(),d=JSON.parse(null!==(i=sessionStorage.getItem("visibleQueryFields"))&&void 0!==i?i:"[]"),p=a.reduce((function(e,t){var n;return e[t.name]=d.length>0?d.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),h=Vn({defaultValues:p}),f=h.control,g=h.handleSubmit,m=h.reset;t.useEffect((function(){m(p)}),[a,m]);var v=function(){u()};return e.jsx(o.YBModal,B({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:v,onSubmit:g((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;l(i,r),r&&t.push(i)})),sessionStorage.setItem("visibleQueryFields",JSON.stringify(t)),v()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,{children:e.jsx(r.Box,B({className:c.itemsContainer},{children:a.map((function(t){return s.includes(t.name)?null:e.jsx(r.Box,B({className:c.item},{children:e.jsx(oo,{name:t.name,label:t.label,control:f,dataTestId:t.name,className:c.checkbox})}),t.name)}))}))})}))},gG=function(n){var r=n.data,i=n.maxEPS,o=n.groupByOperation,a=t.useRef(null),s=t.useMemo((function(){var e=i<1?5:100,t=r.reduce((function(e,t){return e+t.eps}),0),n=Math.pow(t/i,.5)*e;return Math.max(n,10)+100}),[r,i]);return t.useEffect((function(){if(a.current){var e=tA(a.current),t=r.map((function(e){return o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType})).map((function(e,t){var n;return{name:e,type:"bar",stack:"total",label:{show:!1},data:[r[t].eps],itemStyle:{color:null!==(n=xi[e])&&void 0!==n?n:yi[t]}}})),n={animation:!1,grid:{left:0,right:50,top:20,bottom:40,containLabel:!1},tooltip:{trigger:"item",extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:9999;",formatter:function(e){var t=ba(e.color,e.seriesName),n=wa(Number(e.value).toFixed(3)),r='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(t).concat(n,"\n </div>");return'<div style="letter-spacing:0.5px;">'.concat(r,"</div>")},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400}},xAxis:{type:"value",show:!1,min:0,max:i},yAxis:{type:"category",data:[""],show:!1},series:t};e.setOption(n);var s=new ResizeObserver((function(){e.resize()}));return s.observe(a.current),function(){s.disconnect(),e.dispose()}}}),[r,o,s,i]),e.jsx("div",{className:"query-events-chart-container",ref:a,style:{height:"".concat(40,"px"),width:"".concat(s,"px"),minWidth:"".concat(s,"px"),maxWidth:"".concat(s,"px"),display:"flex",top:"12px"}})};function mG(){return mG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mG.apply(null,arguments)}const vG=e=>w.createElement("svg",mG({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),pG||(pG=w.createElement("g",{fill:"none",fillRule:"evenodd"},w.createElement("path",{d:"M0 0h24v24H0z"}),w.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 4a.5.5 0 0 1 .492.41l.008.09v4h4a.5.5 0 0 1 .09.992l-.09.008h-4v4a.5.5 0 0 1-.992.09l-.008-.09v-4h-4a.5.5 0 0 1-.09-.992l.09-.008h4v-4A.5.5 0 0 1 12 7Z"}))));var yG;function xG(){return xG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xG.apply(null,arguments)}const _G=e=>w.createElement("svg",xG({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),yG||(yG=w.createElement("g",{fill:"none",fillRule:"evenodd"},w.createElement("path",{d:"M0 0h24v24H0z"}),w.createElement("path",{fill:"#6D7C88",d:"M10 4a6 6 0 0 1 4.581 9.875l4.773 4.771a.5.5 0 0 1-.638.765l-.07-.057-4.771-4.773A6 6 0 1 1 10 4Zm0 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z"}))));var bG="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e",wG="databaseId",SG="eps",CG="events",TG="firstActive",MG="lastActive",AG="latencyAvg",EG="latencyP90",IG="latencyP99",DG="namespaceName",OG="query",kG="queryid",RG="queryType",NG="rowsAvg",LG="rps",BG="totalTime",PG="universeId",jG="totalEpsRatio",FG={SHOW_ALL:"All Queries",SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ACTIVITIES:"Background Tasks Only"},UG=function(i){var a,s,l,u,c,d,p,h,f,g=i.universeUuid,m=i.apiUrl,y=i.startTime,x=i.endTime,_=i.appName,b=i.groupByOperation,w=i.filteredLegends,S=i.getClusterDetails,C=i.onSelectedQuery,T=ft(),M=wi(),A=t.useState(null),E=A[0],I=A[1],D=t.useState(""),O=D[0],k=D[1],R=t.useState(""),N=R[0],L=R[1],P=t.useRef(dG((function(e){k(e),X(0)}),500)),j=t.useState([]),F=j[0],U=j[1],z=t.useState(!1),V=z[0],W=z[1],Y=t.useState(Hr[0]),G=Y[0],q=Y[1],Q=t.useState(0),Z=Q[0],X=Q[1],$=t.useState(0),K=$[0],J=$[1],ee=t.useState(wr),te=ee[0],ne=ee[1],re=t.useState([]),ie=re[0],oe=re[1],ae=t.useState([]),se=ae[0],le=ae[1],ue=t.useState("eps"),ce=ue[0],de=ue[1],pe=t.useState(null),he=pe[0],fe=pe[1],ge=t.useState(FG.SHOW_ALL),me=ge[0],ve=ge[1],ye=t.useState(1),xe=ye[0],_e=ye[1],be=t.useState(exports.SortDirection.DESC),we=be[0],Se=be[1],Ce=t.useRef(""),Te=S(),Me=Te.cluster,Ae=Te.region,Ee=Te.zone,Ie=Te.node,De=t.useMemo((function(){return JSON.stringify({cluster:Me,region:Ae,zone:Ee,node:Ie})}),[Me,Ae,Ee,Ie]),Oe=t.useMemo((function(){return JSON.stringify((w||[]).slice().sort())}),[w]),ke=t.useMemo((function(){return[exports.QUERY_KEY.fetchQueriesStatsPage,g,G,y,x,O,te,ce,we,he,b,De,Oe]}),[g,G,y,x,O,te,ce,we,he,b,De,Oe]),Re=n.useInfiniteQuery(ke,(function(e){var t=e.pageParam,n=void 0===t?0:t;return oH.fetchQueriesStatsPage(g,{currentTablePage:n,apiUrl:m,pageSize:G,startTime:y,endTime:x,searchInput:O,database:te,sortBy:ce,sortDirection:we,queryType:he,groupByOperation:b},S,w)}),{keepPreviousData:!0,getNextPageParam:function(e,t){var n;if(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.hasNext)return t.length},onSuccess:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f=e.pages.flatMap((function(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.entities)&&void 0!==n?n:[]}));"eps"===ce&&!1===(null===(r=null===(n=null===(t=null==e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.hasPrev)&&we===exports.SortDirection.DESC&&(null===(a=null===(o=null===(i=null==e?void 0:e.pages)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.entities)&&_e(null===(c=null===(u=null===(l=null===(s=null==e?void 0:e.pages)||void 0===s?void 0:s[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u.entities[0])||void 0===c?void 0:c.eps);var g=function(e){return null==e?void 0:e.map((function(e){var t,n,r,i,o,a;return{databaseId:null!==(t=e.databaseId)&&void 0!==t?t:"",eps:e.eps,events:e.events,firstActive:null!==(n=e.firstActive)&&void 0!==n?n:"",lastActive:null!==(r=e.lastActive)&&void 0!==r?r:"",latencyAvg:e.latencyAvg,latencyP90:e.latencyP90,latencyP99:e.latencyP99,namespaceName:e.namespaceName,query:e.query,queryId:null!==(i=e.queryId)&&void 0!==i?i:"",queryType:null!==(o=e.queryType)&&void 0!==o?o:"",rowsAvg:e.rowsAvg,rps:e.rps,totalEpsRatio:e.totalEpsRatio,totalTime:e.totalTime,universeId:null!==(a=e.universeId)&&void 0!==a?a:""}}))}(f);le(g),J(null!==(h=null===(p=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===p?void 0:p.totalCount)&&void 0!==h?h:0)}}),Ne=Re.isFetching,Le=Re.isError,Be=Re.error,Pe=Re.fetchNextPage,je=Re.hasNextPage,Fe=Re.isFetchingNextPage,Ue=Re.data,ze=n.useQuery([exports.QUERY_KEY.fetchQueriesDatabases,g],(function(){return oH.fetchQueriesDatabases(g,m)}),{onSuccess:function(e){oe(e)}}),He=ze.isLoading,Ve=ze.isError;t.useEffect((function(){var e,t,n;if(void 0!==je&&(null===(e=null==Ue?void 0:Ue.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==Ue?void 0:Ue.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;je&&!Fe&&Z===r&&Z>=0&&Pe()}}),[je,Pe,Z,Fe,null===(a=null==Ue?void 0:Ue.pages)||void 0===a?void 0:a.length]);t.useEffect((function(){}),[E]),t.useEffect((function(){Le&&le([])}),[Le]),t.useEffect((function(){var e=JSON.stringify(ke);Ce.current&&Ce.current!==e&&X(0),Ce.current=e}),[ke]),t.useEffect((function(){return function(){P.current.cancel()}}),[]),t.useEffect((function(){var t,n,i,a,s,l,u,c=sessionStorage.getItem("visibleQueryFields"),d=c?JSON.parse(c):null;U([{name:wG,label:"",options:{sort:!1,display:!1,filter:!1}},{name:jG,label:"Total Load",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Percentage of the system load",placement:"top",arrow:!0},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Total Load"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:SG,label:"AAS",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Active Sessions per Second",placement:"top",arrow:!0},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"AAS"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:CG,label:"Events",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,width:"140px",minWidth:"140px",maxWidth:"160px"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Active Session Events per Second",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Events"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(t){return qi(t)?e.jsx(gG,{data:t,maxEPS:xe,groupByOperation:b}):"-"}}},{name:OG,label:"Query",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"300px",maxWidth:"450px",minWidth:"300px"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Query Text",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Query"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Tooltip,B({title:t,placement:"top",arrow:!0},{children:e.jsx(r.Box,B({className:T.queryCellBox},{children:e.jsx(ht,{text:t,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:_===exports.AppName.YBM?T.queryCodeElement:T.queryCodeElementWeb,preClassName:_===exports.AppName.YBM?T.queryPreBlockYBM:T.queryPreBlockWeb,containerClassName:T.queryContainerCode},"TableHelperQueries-".concat(Z,"-").concat(i))}))}))}}},{name:DG,label:"Database",options:{sort:!0,display:null!==(t=null==d?void 0:d.includes(DG))&&void 0!==t&&t,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Database Name",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Database"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:TG,label:"First Active Time",options:{sort:!0,display:null!==(n=null==d?void 0:d.includes(TG))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"First Time that the query was active",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"First Active Time"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:MG,label:"Last Active Time",options:{sort:!0,display:null!==(i=null==d?void 0:d.includes(MG))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Last Time that the query was active",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Last Active Time"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:AG,label:"Avg Latency (ms)",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"The average latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsx(r.Box,B({className:M.headerBox},{children:e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Avg Latency (ms)"}))}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:EG,label:"P90 Latency (ms)",options:{sort:!0,display:null!==(a=null==d?void 0:d.includes(EG))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"The P90 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"P90 Latency (ms)"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:IG,label:"P99 Latency (ms)",options:{sort:!0,display:null!==(s=null==d?void 0:d.includes(IG))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"The P99 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"P99 Latency (ms)"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:RG,label:"Query Type",options:{sort:!1,display:null!==(l=null==d?void 0:d.includes(RG))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"10%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"SQL/CQL query or Background activity",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Query Type"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:BG,label:"Total Time (ms)",options:{sort:!0,display:null!==(u=null==d?void 0:d.includes(BG))&&void 0!==u&&u,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Total time spent for query processing measured in ms",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Total Time (ms)"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:NG,label:"Avg Rows/Call",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Average rows returned",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Avg Rows"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:LG,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Calls per second",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"RPS"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[se,xe,b]);var We=Ne||He,Ye=t.useMemo((function(){var e;return bi(Pe,"Rows per page:",null!==(e=null==se?void 0:se.length)&&void 0!==e?e:0,je)}),[Pe,null==se?void 0:se.length,je]),Ge=t.useMemo((function(){return{sorting:ce?[{id:ce,desc:we===exports.SortDirection.DESC}]:[],pagination:{pageIndex:Z,pageSize:G},isLoading:We,showProgressBars:We}}),[ce,we,Z,G,We]);return e.jsxs(e.Fragment,{children:[V&&e.jsx(fG,{appName:_,hiddenColumns:[wG,AG,NG,LG,SG,CG,kG,PG,OG],columns:F,onColumnVisibilityChange:function(e,t){U((function(n){return n.map((function(n){return n.name===e?B(B({},n),{options:B(B({},n.options),{display:t})}):n}))}))},close:function(){return W(!1)}}),e.jsxs(r.Box,B({mt:1,mb:2,className:M.dataBox},{children:[e.jsxs(r.Box,B({display:"flex",flexDirection:"column"},{children:[e.jsx(r.Box,B({mb:2},{children:e.jsx(r.Typography,B({variant:"h5"},{children:"Queries"}))})),e.jsxs(r.Box,B({className:M.filterContainer},{children:[e.jsxs(r.Box,B({className:M.filterLeftContainer},{children:[e.jsxs(o.YBSelect,B({label:"",value:te,dataTestId:"HistoricalQueryData-DatabaseSelect",className:M.ybOverrideMuiSelect,onChange:function(e){X(0),ne(e.target.value)},menuProps:{PaperProps:{style:{maxHeight:"300px"}}}},{children:[e.jsx(r.MenuItem,B({value:wr,"data-testid":"HistoricalQueryData-".concat(wr)},{children:e.jsx("span",{children:Ir.ALL_DATABASES})}),wr),ie.map((function(t){return e.jsx(r.MenuItem,B({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e.jsx("span",{children:t})}),t)}))]})),e.jsx(o.YBSelect,B({label:"",value:me,dataTestId:"HistoricalQueryData-QueryTypeSelect",className:M.ybOverrideMuiSelect,onChange:function(e){X(0),e.target.value===FG.SHOW_ALL&&fe(null),e.target.value===FG.SHOW_YSQL&&fe(exports.QueryType.SQL),e.target.value===FG.SHOW_YCQL&&fe(exports.QueryType.CQL),e.target.value===FG.SHOW_ACTIVITIES&&fe(exports.QueryType.BACKGROUND),ve(e.target.value)},menuProps:{PaperProps:{style:{maxHeight:"300px"}}}},{children:Object.entries(FG).map((function(t){var n=t[0],i=t[1];return e.jsx(r.MenuItem,B({value:i,"data-testid":"HistoricalQueryData-".concat(i)},{children:e.jsx("span",{children:i})}),n)}))})),e.jsx(o.YBInput,{dataTestId:"HistoricalQueryData-SearchInput",placeholder:"Filter Queries",className:M.ybSearchInput,onChange:function(e){var t=e.target.value;L(t),P.current(t)},value:N,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"},InputProps:{startAdornment:e.jsx(r.InputAdornment,B({position:"start"},{children:e.jsx(_G,{})})),endAdornment:!!N&&e.jsx(r.InputAdornment,B({position:"end"},{children:e.jsx(r.IconButton,B({size:"small",onClick:function(){P.current.cancel(),k(""),L(""),X(0)},"data-testid":"HistoricalQueryData-ClearButton"},{children:e.jsx(v.Clear,{fontSize:"small"})}))}))}})]})),e.jsx(o.YBButton,B({size:"medium",variant:_===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(vG,{style:{marginBottom:"2px"}}),onClick:function(){return W(!0)},dataTestId:"HistoricalQueryData-AddFieldsButton"},{children:"Add Columns"}))]}))]})),e.jsxs(r.Box,B({className:_===exports.AppName.YBM?M.overrideMuiTableContainer:M.overrideMuiTableContainerWeb},{children:[(Le||Ve)&&e.jsxs(r.Box,B({mt:3,className:M.recommendation},{children:[(_===exports.AppName.YBA||_===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(null===(l=null===(s=null==Be?void 0:Be.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error)?null===(c=null===(u=null==Be?void 0:Be.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error:_i.HISTORICAL_QUERY_DATA_FETCH_ERROR}),_===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(null===(p=null===(d=null==Be?void 0:Be.response)||void 0===d?void 0:d.data)||void 0===p?void 0:p.error)?null===(f=null===(h=null==Be?void 0:Be.response)||void 0===h?void 0:h.data)||void 0===f?void 0:f.error:_i.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),e.jsx(o.YBTable,{id:"HistoricalQueryData",className:M.overrideMuiTable,data:null!=se?se:[],columns:null==F?void 0:F.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:We,options:{sort:!0,filter:!0,count:K,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:G,rowsPerPage:G,autoResetPageIndex:!1,onChangePage:function(e){X(e)},onChangeRowsPerPage:function(e){q(e),X(0)},textLabels:{body:{noMatch:"There are no queries with the current ".concat(_===exports.AppName.YBM?"cluster":"universe")}},onRowClick:function(e,t){!function(e){var t=e.rowData;e.rowMeta;var n=e.appName,r=e.onClose,i=e.onSelectedQuery,o=t[0],a=t[10],s=t[16],l=t[11],u=l===exports.QueryType.SQL||l===exports.QueryType.BACKGROUND;n===exports.AppName.YBM?function(){r();var e=null,t=new URLSearchParams(window.location.search);t.set("type",l),t.set("queryId",a),t.set("universeId",s),u?(e={queryId:a,dbId:null==o?void 0:o.toString(),universeId:s,type:l},t.set("dbId",e.dbId)):e={queryId:a,universeId:s,type:l},null==i||i(a.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(t.toString()))}():n!==exports.AppName.WEB&&n!==exports.AppName.YBA||function(e,t,i){r();var o=window.location.pathname,s=new URLSearchParams(window.location.search);s.set("universeId",i),s.set("type",l),u&&s.set("dbId",t),n===exports.AppName.YBA&&s.set("queryId",a);var c=s.toString(),d="".concat(o,"/").concat(e).concat(c?"?".concat(c):"");window.open(d,"_blank")}(a,null==o?void 0:o.toString(),s)}({rowData:e,rowMeta:t,appName:_,onSelectedQuery:C,onClose:function(){return function(e){I(e)}(null)}})},rowsPerPageOptions:Hr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(ce?[{id:ce,desc:we===exports.SortDirection.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return de("eps"),Se(exports.SortDirection.DESC),void X(0);var n=t[0],r=n.id,i=n.desc?exports.SortDirection.DESC:exports.SortDirection.ASC;de(r),Se(i),X(0)},paginationDisplayMode:"custom",customFooter:Ye,manualSorting:!0,state:Ge}},"HistoricalQueryData")]}))]}))]})},zG=r.makeStyles((function(e){return{messageBox:{width:"100%",height:"228px",border:"1px dotted #CBDBFF",borderRadius:"8px",backgroundColor:"#F2F6FF",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},ashText:{color:"#4E5F6D",marginTop:e.spacing(2),marginBottom:e.spacing(2),marginLeft:e.spacing(1),marginRight:e.spacing(1),fontSize:"13px"},ashLink:{color:"#2B59C3",fontSize:"11.5px",textDecoration:"underline",fontStyle:"solid"}}})),HG=[{text:"Learn more.",link:"https://docs.yugabyte.com/preview/yugabyte-platform/manage-deployments/upgrade-software-install/"},{text:"Learn more.",link:"https://docs.yugabyte.com/preview/explore/observability/active-session-history/"}],VG=function(t){var n=t.isAshSupported,i=zG();return e.jsxs(r.Box,B({className:i.messageBox},{children:[e.jsx("img",{src:n?"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Arrow"}),e.jsx("span",B({className:i.ashText},{children:n?"The Cluster Load chart requires access to the Active Session History (ASH) view, which is not enabled on this cluster. To enable ASH for this cluster, contact Support.":"The Cluster Load chart requires YugabyteDB v2024.2 or later."})),e.jsxs(r.Box,B({display:"flex",flexDirection:"row"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Docs"}),e.jsx("a",B({className:i.ashLink,href:n?HG[1].link:HG[0].link,target:"_blank",rel:"noreferrer"},{children:n?HG[1].text:HG[0].text}))]}))]}))},WG="Cluster Load Overview",YG="Activity By Database";sI([OP,oj,oR,cL,RB,nP,JL,function(e){e.registerPainter("svg",hF)},XL]);var GG,qG=i.makeStyles((function(e){return{metricPanel:{position:"relative",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px 24px 20px 16px",backgroundColor:"#FFFFFF",height:"320px"},metricPanelYBM:{position:"relative",height:"320px",textOverflow:"ellipsis",whiteSpace:"nowrap"},groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .yb-MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .yb-MuiInput-root":{width:"150px",height:"32px"}},groupByContainer:{position:"absolute",top:"20px",right:"20px",display:"flex",flex:1,flexDirection:"row",alignItems:"center"},groupByText:{fontSize:"13px",fontFamily:"Inter, sans-serif",fontWeight:500,color:"#0B1117"},chartTypeSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderBarButton:{borderRadius:"8px 0px 0px 8px"},borderLineButton:{borderRadius:"0px 8px 8px 0px"},clusterLoadBoxYBM:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF",marginTop:e.spacing(2)}}})),QG=[{value:exports.ChartType.BAR,label:"Bar"},{value:exports.ChartType.LINE,label:"Line"}],ZG="Cpu",XG="IO",$G="DiskIO",KG=function(i){var a,s,l,u=i.startTime,c=i.endTime,d=i.appName,p=i.metricKey,h=i.shouldAbbreviateTraceName,f=i.groupByOperation,g=i.timezone,m=i.universeUuid,v=i.isAshEnabled,y=i.isAshSupported,x=i.apiUrl,_=i.dbWaitEventType,b=i.isDbClusterLoadView,w=void 0!==b&&b,S=i.onEChartsDateSelect,C=i.onSetGroupByOperation,T=i.onFilterBarData,M=i.getClusterDetails,A=qG(),E=wi(),I=t.useRef(null),D=t.useRef(null),O=t.useState([]),k=O[0],R=O[1],N=t.useState(exports.ChartType.BAR),L=N[0],P=N[1],j=t.useRef(k),F=t.useState(null),z=F[0],V=F[1],W=M(),Y=W.cluster,G=W.region,q=W.zone,Q=W.node,Z=W.numNodes,X=W.outlierType,$=QG.map((function(t){return{value:t.value,icon:e.jsx("img",{src:t.value===exports.ChartType.BAR?"data:image/svg+xml,%3csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.599976 6.43334V14.6M5.93331 0.600006V14.6M11.2666 6.43334V14.6M16.6 0.600006V14.6' stroke='%232B59C3' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.6 10.6L13.8724 4.62478C13.6553 4.39833 13.5468 4.28511 13.4159 4.22658C13.3003 4.17493 13.1729 4.15363 13.0464 4.16477C12.903 4.1774 12.7621 4.2489 12.4804 4.3919L7.7196 6.80811C7.43784 6.95111 7.29696 7.02261 7.15357 7.03524C7.027 7.04639 6.89966 7.02508 6.78409 6.97343C6.65315 6.91491 6.54462 6.80168 6.32755 6.57523L0.599976 0.600006' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Chart Type Icon"}),onClick:function(){var e;e=t.value,P(e)},buttonProps:{dataTestId:"PerfAdvisorClusterLoad-ChartTypeSelector-".concat(t.value)}}})),K=n.useMutation((function(e){return oH.fetchGraphs(m,e,x)}),{onSuccess:function(e){!qi(e)||V(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),J=null===(l=null===(s=null===(a=null==K?void 0:K.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,ee=function(){var e={universeUuid:[m]};w?(delete e.clusterUuid,delete e.regionCode,delete e.azCode,delete e.instanceName,_===wr.toUpperCase()?delete e.waitEventType:e.waitEventType="CPU"===_?[ZG]:[XG,$G]):(Y&&Y!==wr?e.clusterUuid=[Y]:delete e.clusterUuid,G&&G!==wr?e.regionCode=[G]:delete e.regionCode,q&&q!==wr?e.azCode=[q]:delete e.azCode,Q&&Q!==wr?e.instanceName=[Q]:delete e.instanceName);var t=function(t){return B(B({start:u,end:c,name:t,filters:e,settings:{aggregatedValueFunction:w?sr.SUM:sr.AVERAGE,returnAggregatedValue:!1,splitCount:w?Z:3,splitMode:w?X:ir.NONE,splitType:w?or.NAMESPACE:or.NONE}},t!==Dr||w?{}:{groupBy:[f]}),{stepSeconds:xa(u,c)})},n=[t(Dr)];w||(n.push(t(Or)),n.push(t(kr))),Zi(u)&&Zi(c)&&v&&K.mutate(n)};t.useEffect((function(){ee()}),[u,c,f,Y,G,q,Q,_,Z,X]),t.useEffect((function(){return ee(),function(){V(null)}}),[]);return t.useEffect((function(){j.current=k}),[k]),t.useEffect((function(){if(qi(z)&&D.current){I.current||(I.current=tA(D.current,null,{renderer:"svg"}));var e=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f,g,m=i.shouldAbbreviateTraceName;i.appName;var v=i.timezone,y=void 0===v?"":v,x=i.groupByOperation,_=null==e?void 0:e.flatMap((function(e){return e.data||[]}));_&&(null==_?void 0:_.length)>1&&!n&&(_=U(U([],_.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),_.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var b=[];if(!_||0===(null==_?void 0:_.length))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:n?t===wr.toUpperCase()?YG:"".concat(t," Activity By Database"):WG,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"},legend:{data:[]}},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};null==_||_.forEach((function(t,i){var o,a=n&&null!==(o=t.namespaceName)&&void 0!==o?o:t.name,s=null;if(a===Tr){var l=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(s=null==l?void 0:l.name)===kr?a=Er:s===Or&&(a=Mr)}var u=x===exports.WaitEventClassification.WAIT_EVENT?22:25,c=m&&(null==a?void 0:a.length)>u?"".concat(a.substring(0,u),"..."):a;if(a===Mr)b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:!1,tooltip:{show:!1},lineStyle:{color:"white",width:4,type:"solid"},silent:!0,symbol:"none",z:1}),b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:"black",width:2,type:"solid"},symbol:"circle",symbolSize:6,itemStyle:{color:"transparent"},emphasis:{itemStyle:{color:"black"},lineStyle:{width:2},symbolSize:8},z:2});else{var d={name:c,type:"scatter"===t.type||n&&r===exports.ChartType.LINE?"line":"bar",stack:n?r===exports.ChartType.BAR?"total":null:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:a===Er?"#888888":xi[a]||yi[i%yi.length],width:2,type:a===Er?"dashed":"solid"},itemStyle:{color:a===Er?"transparent":xi[a]||yi[i%yi.length]},symbolSize:6,symbol:n?"none":"circle",z:1,emphasis:{lineStyle:{color:a===Er?"#888888":xi[a]||yi[i%yi.length],width:2},itemStyle:{color:a===Er?xi[a]||yi[i%yi.length]:void 0},symbolSize:a===Er?8:void 0}};b.push(d)}}));var w=(null===(a=null===(o=null==b?void 0:b[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.length)||0,S=[];if(w)for(var C=0;C<w;C++){for(var T=0,M=0,A=b;M<A.length;M++){var E=A[M];"bar"===E.type&&(T+=parseFloat(null===(s=E.data[C])||void 0===s?void 0:s[1])||0)}S.push(T)}var I=Math.max.apply(Math,U([.1],S,!1)),D=0;b.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>D&&(D=t)}}));var O=Math.max(1,1.4*I,1.4*D),k=Math.ceil(O),R=null===(d=null===(c=null===(u=null===(l=null==e?void 0:e[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u[0])||void 0===c?void 0:c.x)||void 0===d?void 0:d[0],N=null===(g=null===(f=null===(h=null===(p=null==e?void 0:e[0])||void 0===p?void 0:p.data)||void 0===h?void 0:h[0])||void 0===f?void 0:f.x)||void 0===g?void 0:g.slice(-1)[0],L=N&&R?(new Date(N).getTime()-new Date(R).getTime())/864e5:0,B={title:{text:n?t===wr.toUpperCase()?YG:"".concat(t," Activity By Database"):WG,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"}},tooltip:{trigger:x===exports.WaitEventClassification.WAIT_EVENT?"item":"axis",axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:Ar,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",z:1,formatter:function(e){var t,n,r;if(Array.isArray(e)){var i=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",o=new Date(i),a=Sl(y?Cl(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0}),s=e.map((function(e){var t=Array.isArray(e.value)?e.value[1]:e.value,n=ba(e.color,e.seriesName),r=wa(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}i=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",o=new Date(i),a=Sl(y?Cl(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0});var l=Array.isArray(e.value)?e.value[1]:e.value,u=ba(e.color,e.seriesName),c=wa(l);return s='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(u).concat(c,"\n </div>"),'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}},legend:{type:"scroll",orient:"vertical",left:"1%",top:"18%",bottom:"10%",width:"250px",height:"220px",symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,itemWidth:16,itemHeight:16,textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:Ar,rich:{dashedLine:{backgroundColor:{image:'data:image/svg+xml;utf8,<svg width="24" height="6" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="3" x2="24" y2="3" stroke="%23888" stroke-width="2" stroke-dasharray="6,4" /></svg>'},width:24,height:6,padding:[0,4,0,0],lineHeight:14},thickLine:{backgroundColor:"black",width:24,height:0,borderWidth:1,borderColor:"black",borderType:"solid",padding:[2,4,0,0],lineHeight:14}}},data:b.filter((function(e){return e.showLegend})).map((function(e){return e.name===Er||e.name===Mr?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===Er?"{dashedLine|} # vCPU":e===Mr?"{thickLine|} Queries":e}},grid:{left:"270px",right:"2%",top:"22%",bottom:"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},formatter:function(e){var t=new Date(e);return Sl(y?Cl(t,y):t,L>1?"MMM d HH:mm":"HH:mm",{timeZone:y||void 0})}},axisLine:{lineStyle:{color:"#6D7C88"}}},yAxis:{type:"value",name:"Active Sessions",nameLocation:"middle",nameGap:50,nameTextStyle:{fontWeight:"bold",fontFamily:Ar,fontSize:13,color:"#0B1117",rotate:90},axisLine:{lineStyle:{color:"#6D7C88"}},axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},precision:0},splitNumber:4,max:k},series:b,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return B}(z,_,w,L,{shouldAbbreviateTraceName:h,appName:d,timezone:g,metricKey:p,groupByOperation:f});I.current.setOption(e),n=!1,r=null,(t=I).current.getZr().on("mousedown",(function(e){var i,o,a=[e.offsetX,e.offsetY],s=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},a);r=null!==(o=null==s?void 0:s[0])&&void 0!==o?o:null,n=!0})),t.current.getZr().on("mouseup",(function(e){var i;if(n){var o=[e.offsetX,e.offsetY],a=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},o),s=null==a?void 0:a[0];if(null!==r&&null!==s&&Math.abs(s-r)>10){var l=Math.min(r,s),u=Math.max(r,s);S(l,u)}}n=!1})),w||function(e){e.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}}),e.current.on("legendselectchanged",(function(t){var n,r,i=t.name,o=U([],j.current,!0),a=null===(n=e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===j.current.length||j.current.length===s.length?[i]:j.current.includes(i)?j.current.filter((function(e){return e!==i})):U(U([],j.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),R(o),T(o)}))}(I)}var t,n,r;return function(){I.current&&(I.current.dispose(),I.current=null)}}),[z,K.isLoading,p,L]),t.useEffect((function(){var e=function(){I.current&&I.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),e.jsx(r.Box,B({mt:d===exports.AppName.WEB?2:0,className:H(d===exports.AppName.WEB?void 0:A.clusterLoadBoxYBM)},{children:e.jsxs(r.Box,{children:[K.isLoading&&e.jsx(r.Box,B({mt:2,className:E.loadingBox},{children:e.jsx(sH,{className:H(E.icon,E.inProgressIcon)})})),K.isError&&e.jsxs(r.Box,B({mt:3},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(J)?J:_i.CLUSTER_LOAD_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(J)?J:_i.CLUSTER_LOAD_FETCH_ERROR})]})),e.jsxs(r.Box,{children:[K.isSuccess&&e.jsxs(r.Box,B({id:"".concat(p,"-wrapper"),display:"flex",flexDirection:"row",className:H(d===exports.AppName.WEB?A.metricPanel:A.metricPanelYBM),onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e.jsx("div",{ref:D,id:p,style:{flexGrow:1,minWidth:0}}),!w&&e.jsxs("div",B({className:A.groupByContainer},{children:[e.jsxs("span",B({className:A.groupByText},{children:["Group By","   "]})),e.jsx(o.YBSelect,B({dataTestId:"PerfAdvisorClusterLoad-GroupBySelect",value:f,className:H(A.groupByOperationDropdown,A.overrideDefaultMuiSelect,A.overrideDefaultMuiFormControl)},{children:null==vr?void 0:vr.map((function(t,n){return e.jsx(r.MenuItem,B({value:t,onClick:function(e){C(t),e.stopPropagation()}},{children:mr[t]}),"".concat(t,"-").concat(n))}))}))]})),w&&e.jsx("div",B({className:A.groupByContainer},{children:e.jsx(o.YBButtonGroup,{divider:!0,value:L,buttons:$,dataTestId:"PerfAdvisorClusterLoad-ChartTypeSelector"})}))]})),!v&&e.jsx(r.Box,B({mt:2,mb:1.5},{children:e.jsx(VG,{isAshSupported:y})}))]})]})}))},JG=r.makeStyles((function(e){return{modal:{display:"flex",justifyContent:"flex-end"},paper:{width:"50vw",height:"100vh",backgroundColor:e.palette.background.paper,padding:e.spacing(2),overflowY:"auto",boxShadow:e.shadows[5],display:"flex",flexDirection:"column"},content:{flexGrow:1},footer:{paddingTop:e.spacing(2),borderTop:"1px solid #ccc",textAlign:"right"},search:{top:0,position:"sticky",padding:e.spacing(2,0),backgroundColor:e.palette.background.paper,zIndex:1},container:{border:"1px solid ".concat(e.palette.grey[200]),borderRadius:e.shape.borderRadius},itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},group:{"&:not(:first-child)":{borderTop:"1px solid ".concat(e.palette.grey[200])}},groupHeader:{height:44,padding:e.spacing(0,3),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:r.alpha(e.palette.grey[200],.25)},iconRotate:{transform:"rotate(180deg)"},item:{paddingLeft:e.spacing(3),"& label":{height:"34px",marginBottom:0}},searchInput:{"& .yb-MuiInputBase-root":{height:"42px"}},checkbox:{"& .yb-MuiSvgIcon-root":{width:"16px",height:"16px"}}}})),eq=function(n){var i=n.open,a=n.selectedTabIndex,s=n.metricMeasure,l=n.onClose,u=n.onSubmit,c=n.metricResources,d=JG(),p=s===exports.MetricMeasure.OUTLIER_TABLES,h=s===exports.MetricMeasure.OUTLIER_DB,f=p||h?p?li[a]:ui[a]:si[a],g=pi.reduce((function(e,t){return e[t.name]=t.name===f,e}),{}),m=t.useState(g),v=m[0],y=m[1],x=function(){var e=p||h?p?sessionStorage.getItem(mi):sessionStorage.getItem(vi):sessionStorage.getItem(gi);if(e)return JSON.parse(e);var t={};return c.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},_=t.useState(""),b=_[0],w=_[1],S=t.useState(x),C=S[0],T=S[1];t.useEffect((function(){T(x())}),[i]);var M=t.useMemo((function(){return c.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(b.toLowerCase())}));return 0===t.length?null:B(B({},e),{metrics:t})})).filter(Boolean)}),[c,b]),A=0===M.length;return e.jsx(o.YBModal,B({open:i,isSidePanel:!0,title:"Add and Remove Charts",onClose:l,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(p||h?p?mi:vi:gi,JSON.stringify(C)),u(C),l()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsxs(r.Box,{children:[e.jsx(r.Box,B({className:d.search},{children:e.jsx(o.YBInput,{fullWidth:!0,placeholder:"Search",value:b,InputProps:{startAdornment:e.jsx(r.InputAdornment,B({position:"end"},{children:e.jsx(_G,{})}))},onChange:function(e){w(e.target.value)},dataTestId:"MetricsSelectionSearch",className:d.searchInput})})),A?e.jsx(r.Box,B({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e.jsx(r.Typography,B({variant:"body2"},{children:"No results returned"}))})):e.jsx(r.Box,B({className:d.container},{children:M.map((function(t){if(!t.metrics.length)return null;var n=v[t.name]||!!b;return e.jsxs(r.Box,B({className:d.group},{children:[e.jsxs(r.Box,B({className:d.groupHeader,onClick:function(){return e=t.name,void y((function(t){var n;return B(B({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e.jsx(r.Box,B({display:"flex",alignItems:"center"},{children:e.jsx(r.Typography,B({variant:"body1"},{children:t.title}))})),e.jsx(R.default,{className:H(n&&d.iconRotate)})]})),e.jsx(r.Collapse,B({in:n},{children:e.jsx(r.Box,B({className:d.itemsContainer},{children:t.metrics.map((function(n){return e.jsx(r.Box,B({className:H(d.item)},{children:e.jsx(o.YBCheckbox,{name:"".concat(t.name,".").concat(n),label:fi[n]||n,dataTestId:"MetricsSelectionCheckbox-".concat(n),checked:!!C[n],onChange:function(){return e=n,void T((function(t){var n;return B(B({},t),((n={})[e]=!t[e],n))}));var e},className:d.checkbox})}),n)}))}))}))]}),t.name)}))}))]})}))},tq="metricsTab",nq=function(i){var a,s,l,u,c,d=i.appName,p=i.isMetricsDrawerOpen,h=i.apiUrl,f=i.timezone,g=i.metricMeasure,m=i.dateTimeRange,v=i.filterTrigger,y=i.urlParams,x=i.getClusterDetails,_=i.onEChartsDateSelect,b=i.handleFilterMetrics,w=i.openSelectionModal,S=i.closeSelectionModal,C=wi(),T=t.useRef([]),M=t.useState(null),A=M[0],E=M[1],I=t.useState(0),D=I[0],O=I[1],k=t.useState(!1),R=k[0],N=k[1],L=x(),P=L.universeUuid,j=L.cluster,F=L.region,U=L.zone,z=L.node,V=L.numNodes,W=L.outlierType;t.useEffect((function(){if(d===exports.AppName.YBA){var e=new URLSearchParams(window.location.search).get(tq),t=g===exports.MetricMeasure.OUTLIER_TABLES,n=g===exports.MetricMeasure.OUTLIER_DB,r=t||n?t?li:ui:si;O(r.includes(e)?r.indexOf(e):0),N(!0)}}),[]),t.useEffect((function(){var e=g===exports.MetricMeasure.OUTLIER_TABLES,t=g===exports.MetricMeasure.OUTLIER_DB,n=e?li:si;if(e||t)O(0),N(!0);else if(g&&d!==exports.AppName.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===_r.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),O(0),void N(!0)}var a=n.indexOf(i);if(-1!==a)O(a),N(!0);else{o=n[0];var s=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(s,"/").concat(o)),O(0),N(!0)}}}),[g]);var Y=n.useMutation({mutationKey:[exports.QUERY_KEY.fetchMetricsGraphs,P,m],mutationFn:function(e){return oH.fetchGraphs(P,e,h)},onSuccess:function(e){E(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),G=null===(l=null===(s=null===(a=null==Y?void 0:Y.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return t.useEffect((function(){var e;if(R){var t=ya(!1,!0,D,x(),null,B(B({},y),{type:null!==(e=y.type)&&void 0!==e?e:null}));t&&Y.mutate(t)}}),[g,null===(u=null==m?void 0:m.startDateTime)||void 0===u?void 0:u.getTime(),null===(c=null==m?void 0:m.endDateTime)||void 0===c?void 0:c.getTime(),D,F,R,j,U,z,W,V,v]),t.useEffect((function(){return Y.isSuccess&&A&&A.length>0&&T.current.length===A.length&&nA(T.current),function(){rA(T.current)}}),[Y.isSuccess,A]),e.jsxs(r.Box,B({mt:2,mb:2,mr:2,className:C.metricsBox},{children:[e.jsxs(r.Box,B({display:"flex",alignItems:"center"},{children:[e.jsxs(o.YBTabs,B({value:D,onChange:function(e,t){if(t!==D){var n=g===exports.MetricMeasure.OUTLIER_TABLES,r=g===exports.MetricMeasure.OUTLIER_DB,i=(n||r?n?li:ui:si)[t],o=window.location.pathname;if(d!==exports.AppName.YBA){var a=o.split("/").slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(i))}else{var s=new URLSearchParams(window.location.search);s.set(tq,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString())),window.dispatchEvent(new Event("url-changed"))}O(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto",style:{flexGrow:1}},{children:[(g===exports.MetricMeasure.OVERALL||g===exports.MetricMeasure.OUTLIER)&&si.map((function(t,n){var r;return e.jsx(o.YBTab,{value:n,label:null===(r=null==pi?void 0:pi.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:C.causeTabButton},t)})),g===exports.MetricMeasure.OUTLIER_TABLES&&li.map((function(t,n){var r;return e.jsx(o.YBTab,{value:n,label:null===(r=null==ci?void 0:ci.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:C.causeTabButton},t)})),g===exports.MetricMeasure.OUTLIER_DB&&ui.map((function(t,n){var r;return e.jsx(o.YBTab,{value:n,label:null===(r=null==di?void 0:di.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:C.causeTabButton},t)}))]})),e.jsx(o.YBButton,B({variant:d===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(vG,{}),size:"medium",onClick:w,dataTestId:"GenericHeader-AddChartsButton"},{children:"Add and Remove Charts"}))]})),Y.isLoading&&e.jsx(r.Box,B({mt:2,className:C.loadingBox},{children:e.jsx(sH,{className:H(C.icon,C.inProgressIcon)})})),Y.isError&&e.jsxs(r.Box,B({mt:4},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(G)?G:_i.METRICS_GRAPHS_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(G)?G:_i.METRICS_GRAPHS_FETCH_ERROR})]})),Y.isSuccess&&e.jsx(r.Box,B({className:H(C.gridBox,C.gridBoxDouble)},{children:null==A?void 0:A.map((function(t,n){if(Zi(null==t?void 0:t.errorMessage))return e.jsx(r.Box,{});var i=ma(g,t,exports.GraphType.MULTI_SUPPORTING,!0,[],!0);return e.jsx(r.Box,B({style:{marginTop:"16px",marginRight:"16px",border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(r.Box,{children:e.jsx(MF,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:g,operations:g===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return function(e,t){T.current[t]=e}(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,dateTimeRange:m,groupByOperations:i.groupByOperations,appName:d,timezone:f,isHistoricalQueryView:!1,onEChartsDateSelect:_,showTitle:!0},"".concat(t.name,"-").concat(g))},"TopKMetricsView-".concat(n))}))}))})),p&&e.jsx(eq,{onSubmit:b,metricResources:g===exports.MetricMeasure.OUTLIER_TABLES||g===exports.MetricMeasure.OUTLIER_DB?g===exports.MetricMeasure.OUTLIER_TABLES?ci:di:pi,open:p,onClose:S,selectedTabIndex:D,metricMeasure:g})]}))},rq=S.default.memo((function(n){var i,o,a,s=n.universeUuid,l=n.appName,u=n.timezone,c=n.apiUrl,d=n.onEChartsDateSelect,p=n.getClusterDetails,h=t.useState(window.location.search),f=h[0],g=h[1];t.useEffect((function(){var e=function(){g(window.location.search)};return window.addEventListener("popstate",e),window.addEventListener("url-changed",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("url-changed",e)}}),[]);var m=t.useMemo((function(){var e=new URLSearchParams(f);return{startTime:e.get("startTime"),endTime:e.get("endTime"),duration:e.get("duration"),dbId:e.get("dbId"),queryId:void 0,userId:e.get("userId"),type:e.get("type"),universeId:s}}),[f,s]),v=t.useState(0),y=v[0],x=v[1],_=t.useState(!1),b=_[0],w=_[1];t.useEffect((function(){var e=sessionStorage.getItem(gi),t=sessionStorage.getItem(mi),n=sessionStorage.getItem(vi);if(!e){var r={};pi.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(gi,JSON.stringify(r))}if(!t){var i={};ci.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem(mi,JSON.stringify(i))}if(!n){var o={};di.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(vi,JSON.stringify(o))}}),[]);return e.jsx(r.Box,{children:e.jsx(nq,{apiUrl:c,isMetricsDrawerOpen:b,appName:l,timezone:u,metricMeasure:null===(i=p())||void 0===i?void 0:i.metricMeasure,dateTimeRange:{startDateTime:null===(o=p())||void 0===o?void 0:o.formattedStartDate,endDateTime:null===(a=p())||void 0===a?void 0:a.formattedEndDate},urlParams:m,filterTrigger:y,onEChartsDateSelect:d,openSelectionModal:function(){return w(!0)},closeSelectionModal:function(){return w(!1)},getClusterDetails:p,handleFilterMetrics:function(){x((function(e){return e+1}))}})})})),iq=[{value:"ALL",label:"All Event Types"},{value:"IO",label:"IO"},{value:"CPU",label:"CPU"}],oq=i.makeStyles((function(){return{input:{width:"60px",height:"32px"}}})),aq=function(n){var i,a=n.outlierType,s=n.numNodes,l=n.onChangeDbWaitEventType,u=n.onOutlierTypeSelected,c=n.onNumNodesChanged;oq();var d=t.useState(0),p=d[0],h=d[1],f=iq.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){l(e.value),h(t)},buttonProps:{dataTestId:"DbLoadHeader-DbSelector-".concat(e.value)}}}));return e.jsxs(r.Box,B({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e.jsx(Ii,{outlierType:a,metricOutlierSelectors:Lr,onOutlierTypeSelected:u,onNumNodesChanged:c,selectedNumNodes:s,showNumNodesInput:!1,showNumNodesSelector:!0}),e.jsx(r.Typography,B({variant:"body2",style:{marginRight:"16px",marginLeft:"8px"}},{children:"databases"})),e.jsxs(r.Box,B({display:"flex"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='1' height='16' viewBox='0 0 1 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='0.5' y1='2.18557e-08' x2='0.499999' y2='16' stroke='%23B7C3CB'/%3e%3c/svg%3e",alt:"Divider"}),e.jsx(o.YBLabel,B({style:{marginRight:"8px",marginLeft:"16px"}},{children:"group by"})),e.jsx(o.YBButtonGroup,{divider:!0,buttons:f,dataTestId:"DbLoadHeader-DbSelector",value:null===(i=iq[p])||void 0===i?void 0:i.value})]}))]}))},sq=(0,o.mui.styled)(o.YBTab)((function(e){var t=e.theme;return{display:"flex",flexDirection:"row",alignItems:"center",padding:t.spacing(.5,1),"& .yb-MuiTab-iconWrapper":{marginTop:t.spacing(.5)}}})),lq=r.makeStyles((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%"},tabButton:{width:"160px"},tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"0px 24px 4px 16px",backgroundColor:"#FFFFFF",marginTop:e.spacing(2)},expandAllButton:{fontSize:"13px",fontWeight:600},detectionButton:{marginRight:e.spacing(2),marginLeft:e.spacing(2)},noteText:{fontSize:"11.5px",fontWeight:600,fontStyle:"semibold",fontFamily:"Inter",letterSpacing:"0px"},warningText:{fontSize:"11.5px",fontWeight:400,fontStyle:"regular",fontFamily:"Inter",letterSpacing:"0px"},runDetectionButtonContainer:{gap:e.spacing(2),display:"flex",flexDirection:"row",alignItems:"center"}}})),uq=function(i){var a,s,l,u,c,d,p,h,f,g,v,y,x,_=i.startTime,b=i.endTime,w=i.universeUuid,S=i.appName,C=i.timezone,T=i.filterDuration,M=i.apiUrl,A=i.universeData,E=i.isAshEnabled,I=i.isAshSupported,D=i.onClickShowMoreAnomalies,O=i.onEChartsDateSelect,k=i.onSelectedIssue,R=i.onSelectedQuery,N=i.notifyTabChange,L=i.onStartDateChange,P=i.onEndDateChange,j=i.onRefresh,F=i.onSelectedFilterDuration,U=lq(),z=wi(),V=t.useState([]),W=V[0],Y=V[1],G=t.useState(null),q=G[0],Q=G[1],Z=t.useState((y=window.location.pathname,x=exports.InsightsTabs.CLUSTER_LOAD,y.includes("/".concat(_r.METRICS))&&(x=exports.InsightsTabs.METRICS),y.includes("/".concat(_r.INSIGHTS))&&(x=exports.InsightsTabs.INSIGHTS),y.includes("/".concat(_r.CLUSTER_LOAD))&&(x=exports.InsightsTabs.CLUSTER_LOAD),x)),X=Z[0],$=Z[1],K=t.useState(!1),J=K[0],ee=K[1],te=t.useState(Object.values(exports.InsightsTabs)),ne=te[0],re=te[1],ie=t.useState(vr[0]),oe=ie[0],ae=ie[1],se=t.useState(exports.ClusterLoadOverallTabs.QUERIES),le=se[0],ue=se[1],ce=t.useState(exports.ClusterLoadSubTabs.OVERALL_LOAD),de=ce[0],pe=ce[1],he=t.useState(null);he[0];var fe=he[1],ge=t.useState(exports.AnomalyDetectionStatusText.EMPTY),me=ge[0],ve=ge[1],ye=t.useState(wr.toUpperCase()),xe=ye[0],_e=ye[1],be=t.useState(br),we=be[0],Se=be[1],Ce=t.useState(Sr),Te=Ce[0],Me=Ce[1],Ae=t.useState(!0),Ee=Ae[0],Ie=Ae[1],De=t.useState(wr),Oe=De[0],ke=De[1],Re=t.useState(wr),Ne=Re[0],Le=Re[1],Be=t.useState(wr),Pe=Be[0],je=Be[1],Fe=t.useState(wr),Ue=Fe[0],ze=Fe[1],He=t.useState(exports.MetricMeasure.OVERALL),Ve=He[0],We=He[1],Ye=t.useState(ar.ALL),Ge=Ye[0],qe=Ye[1],Qe=t.useState(ir.TOP),Ze=Qe[0],Xe=Qe[1],$e=t.useState(3),Ke=$e[0],Je=$e[1],et=function(e){Y(e)},tt=function(e,t,n){var r=Object.values(exports.InsightsTabs);return t||(r=r.filter((function(e){return e!==exports.InsightsTabs.METRICS}))),r},nt=function(e){ae(e)};n.useQuery(exports.QUERY_KEY.fetchAnomalyDetectionStatus,(function(){return oH.fetchAnomalyDetectionStatus(w,M)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||Xi(t))fe(null);else{var n=new Date(t),r=Al(n,Ml,C);fe(r)}ve(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:me!==exports.AnomalyDetectionStatusText.SUCCESS});var rt=n.useMutation((function(){return oH.scheduleAnomalyDetectionStatus(w,M)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||Xi(t))fe(null);else{var n=new Date(t),r=Al(n,Ml,C);fe(r)}ve(e.status)},onError:function(e){var t,n,r,i;JY.error(Zi(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)?null===(i=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.error:_i.ANOMALY_SCHEDULE_ERROR)}}),it=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroups,null==_?void 0:_.toISOString()],(function(){var e,t;return oH.fetchAnomalyGroups(w,null!==(e=null==_?void 0:_.toISOString())&&void 0!==e?e:null,null!==(t=null==b?void 0:b.toISOString())&&void 0!==t?t:null,X===exports.InsightsTabs.INSIGHTS?exports.AnomalyTypeFilter.INSIGHT:exports.AnomalyTypeFilter.PERF_ANOMALY,lt,M)}),{onSuccess:function(e){Q(e)}}),ot=null===(l=null===(s=null===(a=null==it?void 0:it.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;n.useQuery([exports.QUERY_KEY.fetchSpecificRuntimeConfigs],(function(){return oH.fetchSpecificRuntimeConfigs(Wr,[Yr.SHOW_QUERIES_VIEW,Yr.SHOW_TOPK_METRICS_VIEW,Yr.SHOW_DB_CLUSTER_LOAD_VIEW],M)}),{onSuccess:function(e){var t,n,r,i="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===Yr.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value);null===(n=null==e?void 0:e.find((function(e){return e.path===Yr.SHOW_QUERIES_VIEW})))||void 0===n||n.value;null===(r=null==e?void 0:e.find((function(e){return e.path===Yr.SHOW_DB_CLUSTER_LOAD_VIEW})))||void 0===r||r.value,re(tt(0,!!i))},onError:function(){re(tt(0,!1))}}),t.useEffect((function(){me===exports.AnomalyDetectionStatusText.SUCCESS&&it.refetch()}),[me]),t.useEffect((function(){(X===exports.InsightsTabs.CLUSTER_LOAD&&le===exports.ClusterLoadOverallTabs.ANOMALIES||X===exports.InsightsTabs.INSIGHTS)&&it.refetch()}),[null==_?void 0:_.toISOString(),null==b?void 0:b.toISOString(),X,Oe,Ne,Pe,Ue]),t.useEffect((function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search),n=t.get("tab");if(e.includes("/".concat(_r.CLUSTER_LOAD))||n===_r.CLUSTER_LOAD)if($(exports.InsightsTabs.CLUSTER_LOAD),N(exports.InsightsTabs.CLUSTER_LOAD),S===exports.AppName.YBA)t.set("subTab",de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE?_r.CLUSTER_LOAD_DB:_r.OVERALL_LOAD),window.history.replaceState(null,"","".concat(e,"?").concat(t.toString()));else{if(e.includes("/".concat(_r.CLUSTER_LOAD_DB)))return void pe(exports.ClusterLoadSubTabs.LOAD_BY_DATABASE);pe(exports.ClusterLoadSubTabs.OVERALL_LOAD);var r=e.endsWith("/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.ANOMALIES));if(ue(r?exports.ClusterLoadOverallTabs.ANOMALIES:exports.ClusterLoadOverallTabs.QUERIES),e.endsWith("/".concat(_r.CLUSTER_LOAD))||e.endsWith("/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD))){var i=new URLSearchParams(window.location.search).toString(),o=e.replace(new RegExp("/".concat(_r.CLUSTER_LOAD,"(/").concat(_r.OVERALL_LOAD,")?$")),""),a="".concat(o,"/").concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.QUERIES).concat(i?"?".concat(i):"");window.history.replaceState(null,"",a)}}else if(e.includes("/".concat(_r.METRICS))||n===_r.METRICS)$(exports.InsightsTabs.METRICS),N(exports.InsightsTabs.METRICS);else if(e.includes("/".concat(_r.INSIGHTS))||n===_r.INSIGHTS)$(exports.InsightsTabs.INSIGHTS),N(exports.InsightsTabs.INSIGHTS);else if(S!==exports.AppName.YBA){i=new URLSearchParams(window.location.search).toString(),a="".concat(e,"/").concat(_r.QUERIES).concat(i?"?".concat(i):"");window.history.replaceState(null,"",a)}}),[]);var at=function(e,t){t!==de&&pe(t)};t.useEffect((function(){if(X===exports.InsightsTabs.CLUSTER_LOAD)if(S===exports.AppName.YBA){var e=window.location.pathname;(t=new URLSearchParams(window.location.search)).set("subTab",de===exports.ClusterLoadSubTabs.OVERALL_LOAD?_r.OVERALL_LOAD:_r.CLUSTER_LOAD_DB),window.history.replaceState(null,"","".concat(e,"?").concat(t.toString()))}else{var t,n=window.location.pathname,r=(t=new URLSearchParams(window.location.search)).toString();n=n.replace(/\/(clusterLoad(\/(overallLoad|dbLoad)(\/(anomalies|queries))?)?)$/,"");var i="";de===exports.ClusterLoadSubTabs.OVERALL_LOAD?i=le===exports.ClusterLoadOverallTabs.ANOMALIES?"/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.ANOMALIES):"/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.QUERIES):de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&(i="/".concat(_r.CLUSTER_LOAD,"/").concat(_r.CLUSTER_LOAD_DB)),(n="".concat(n).concat(i).concat(r?"?".concat(r):""))!==window.location.pathname+(r?"?".concat(r):"")&&window.history.replaceState(null,"",n)}}),[le,de]);var st=function(t){switch(t){case exports.InsightsTabs.METRICS:return e.jsx(r.Box,{mt:1});case exports.InsightsTabs.INSIGHTS:return e.jsx(r.Box,{mt:.5});case exports.InsightsTabs.CLUSTER_LOAD:return e.jsx(r.Box,B({ml:S===exports.AppName.WEB?4:0},{children:e.jsx(r.Box,B({display:"flex",alignItems:"center",className:U.tabsContainer,mt:1},{children:e.jsxs(o.YBTabs,B({value:de,onChange:at},{children:[e.jsx(sq,{value:exports.ClusterLoadSubTabs.OVERALL_LOAD,label:exports.ClusterLoadSubTabs.OVERALL_LOAD}),e.jsx(sq,{value:exports.ClusterLoadSubTabs.LOAD_BY_DATABASE,label:exports.ClusterLoadSubTabs.LOAD_BY_DATABASE})]}))}))}));default:return null}},lt=function(){return{universeUuid:w,cluster:Oe,region:Ne,zone:Pe,node:Ue,metricMeasure:Ve,numNodes:Ke,outlierType:Ze,formattedStartDate:_,formattedEndDate:b}},ut=function(e){Xe(e)},ct=function(e){Je(e>10?10:e)},dt=X===exports.InsightsTabs.METRICS,pt=X!==exports.InsightsTabs.METRICS;return e.jsxs(r.Box,B({className:H(S===exports.AppName.WEB?U.tabBox:void 0)},{children:[S===exports.AppName.WEB&&e.jsx(r.Box,{children:e.jsxs(m.TabContext,B({value:X},{children:[e.jsx(r.Box,B({display:"flex",alignItems:"center",className:U.tabsContainer},{children:e.jsx(o.YBTabs,B({value:X,onChange:function(e,t){if(t!==X){$(t),N(t),pe(exports.ClusterLoadSubTabs.OVERALL_LOAD);var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();n=n.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),t===exports.InsightsTabs.METRICS?n="".concat(n,"/").concat(_r.METRICS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.INSIGHTS?n="".concat(n,"/").concat(_r.INSIGHTS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.CLUSTER_LOAD&&(n="".concat(n,"/").concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.QUERIES).concat(r?"?".concat(r):"")),window.history.pushState(null,"",n)}}},{children:ne.map((function(t,n){return e.jsx(o.YBTab,{"data-testid":"".concat(t,"Tab"),value:t,label:t,className:U.tabButton},n)}))}))})),e.jsx(m.TabPanel,B({className:z.tabPanelPrimary,value:exports.InsightsTabs.METRICS},{children:st(exports.InsightsTabs.METRICS)})),e.jsx(m.TabPanel,B({className:z.tabPanelPrimary,value:exports.InsightsTabs.CLUSTER_LOAD},{children:st(exports.InsightsTabs.CLUSTER_LOAD)}))]}))}),(S===exports.AppName.YBM||S===exports.AppName.YBA)&&e.jsx(e.Fragment,{children:st(X)}),e.jsx(r.Box,B({mt:2},{children:e.jsx(kl,{appName:S,filterDuration:T,startDateTime:_,endDateTime:b,timezone:C,isDrilldownView:!1,isClusterLoadView:X===exports.InsightsTabs.CLUSTER_LOAD,isTopKMetricsView:X===exports.InsightsTabs.METRICS,onSelectedFilterDuration:F,metricMeasure:Ve,onStartDateChange:L,onEndDateChange:P,onRefresh:j})})),de!==exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&e.jsx(r.Box,B({mt:2,ml:S===exports.AppName.WEB&&X===exports.InsightsTabs.CLUSTER_LOAD?4:0},{children:e.jsx(Ta,{appName:S,universeData:A,clusterRegionItem:we,zoneNodeItem:Te,isPrimaryCluster:Ee,cluster:Oe,region:Ne,metricMeasure:Ve,outlierType:Ze,numNodes:Ke,isDrilldownView:!1,anomalyData:null,queryType:Ge,showSplitSelector:dt,showQueryTypeSelector:pt,onZoneNodeSelected:function(e,t,n){n===Sr&&(Me(Sr),je(wr),ze(wr)),(e||t)&&(Me(n),e&&(je(n),ze("")),t&&(je(""),ze(n)))},onClusterRegionSelected:function(e,t,n,r){Ie(r),n===br&&(Se(br),ke(wr),Le(wr)),(e||t)&&(Se(n),e&&(ke(n),Le("")),t&&(Le(n),ke("")))},onOutlierTypeSelected:ut,onSplitTypeSelected:function(e){We(e)},onNumNodesChanged:ct,onQueryTypeSelected:function(e){qe(e)}})})),X===exports.InsightsTabs.METRICS&&e.jsx(rq,{universeUuid:w,appName:S,timezone:C,apiUrl:M,onEChartsDateSelect:O,getClusterDetails:lt}),X===exports.InsightsTabs.CLUSTER_LOAD&&de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&e.jsxs(r.Box,B({mt:2,ml:S===exports.AppName.WEB?4:0},{children:[de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&e.jsx(aq,{outlierType:Ze,numNodes:Ke,onOutlierTypeSelected:ut,onNumNodesChanged:ct,onChangeDbWaitEventType:function(e){_e(e)}}),e.jsx(KG,{dbWaitEventType:xe,isDbClusterLoadView:!0,startTime:null!==(u=null==_?void 0:_.toISOString())&&void 0!==u?u:null,endTime:null!==(c=null==b?void 0:b.toISOString())&&void 0!==c?c:null,apiUrl:M,universeUuid:w,appName:S,metricKey:"cluster_load",groupByOperation:oe,shouldAbbreviateTraceName:!0,timezone:C,isAshEnabled:E,isAshSupported:I,onFilterBarData:et,onSetGroupByOperation:nt,onEChartsDateSelect:O,getClusterDetails:lt})]})),X===exports.InsightsTabs.CLUSTER_LOAD&&de===exports.ClusterLoadSubTabs.OVERALL_LOAD&&e.jsxs(r.Box,B({ml:S===exports.AppName.WEB?4:0},{children:[e.jsx(KG,{dbWaitEventType:xe,isDbClusterLoadView:!1,startTime:null!==(d=null==_?void 0:_.toISOString())&&void 0!==d?d:null,endTime:null!==(p=null==b?void 0:b.toISOString())&&void 0!==p?p:null,apiUrl:M,universeUuid:w,appName:S,metricKey:"cluster_load",groupByOperation:oe,shouldAbbreviateTraceName:!0,timezone:C,isAshEnabled:E,isAshSupported:I,onFilterBarData:et,onSetGroupByOperation:nt,onEChartsDateSelect:O,getClusterDetails:lt}),e.jsx(r.Box,B({display:"flex",alignItems:"center",className:U.tabsContainer,mt:5},{children:e.jsxs(o.YBTabs,B({pill:!0,value:le,onChange:function(e,t){t!==le&&ue(t)}},{children:[e.jsx(sq,{icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.5 4.5C4.237 4.5 3.214 5.523 3.214 6.786V11.357L1 12.5L3.214 13.643V18.214C3.214 19.477 4.237 20.5 5.5 20.5' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M18.4995 4.47221C19.7625 4.47221 20.7855 5.49521 20.7855 6.75821V11.3292L22.9995 12.4722L20.7855 13.6152V18.1862C20.7855 19.4492 19.7625 20.4722 18.4995 20.4722' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3crect x='7' y='14.5' width='2' height='3' rx='0.5' fill='%230B1117'/%3e%3crect x='11' y='11.5' width='2' height='6' rx='0.5' fill='%230B1117'/%3e%3crect x='15' y='7.5' width='2' height='10' rx='0.5' fill='%230B1117'/%3e%3c/svg%3e",alt:"Queries Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadOverallTabs.QUERIES,label:exports.ClusterLoadOverallTabs.QUERIES}),e.jsx(sq,{icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='5.94943' cy='5.62132' r='2' transform='rotate(-135 5.94943 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='8.94943' cy='12.6213' r='2' transform='rotate(-135 8.94943 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='11.9494' cy='19.6213' r='2' transform='rotate(-135 11.9494 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='13.1916' cy='5.62132' r='2' transform='rotate(-135 13.1916 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='16.1916' cy='12.6213' r='2' transform='rotate(-135 16.1916 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='19.1916' cy='19.6213' r='2' transform='rotate(-135 19.1916 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='4.12131' cy='19.6213' r='2' transform='rotate(-135 4.12131 19.6213)' fill='%230B1117' stroke='%230B1117'/%3e%3c/svg%3e",alt:"Anomalies Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadOverallTabs.ANOMALIES,label:exports.ClusterLoadOverallTabs.ANOMALIES})]}))})),le===exports.ClusterLoadOverallTabs.QUERIES&&e.jsx(r.Box,{children:e.jsx(UG,{universeUuid:w,groupByOperation:oe,apiUrl:M,startTime:null!==(h=null==_?void 0:_.toISOString())&&void 0!==h?h:null,endTime:null!==(f=null==b?void 0:b.toISOString())&&void 0!==f?f:null,appName:S,filteredLegends:W,queryType:Ge,onSelectedQuery:R,getClusterDetails:lt})}),le===exports.ClusterLoadOverallTabs.ANOMALIES&&e.jsx(r.Box,B({className:z.noteTextContainer},{children:e.jsxs(r.Typography,B({variant:"body2",className:z.noteText},{children:[e.jsx(r.Typography,B({variant:"body2",className:H(z.noteText,z.noteTextBold)},{children:"Note!"})),"Only the time window filter applies to this view."]}))}))]})),(X===exports.InsightsTabs.INSIGHTS||X===exports.InsightsTabs.CLUSTER_LOAD&&de===exports.ClusterLoadSubTabs.OVERALL_LOAD&&le===exports.ClusterLoadOverallTabs.ANOMALIES)&&e.jsxs(r.Box,B({mt:3,className:z.dataBox,ml:S===exports.AppName.WEB&&X===exports.InsightsTabs.CLUSTER_LOAD?4:0},{children:[e.jsxs(r.Box,B({display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},{children:[e.jsx(r.Box,B({display:"flex",flexDirection:"column"},{children:e.jsx(r.Box,{children:e.jsx(r.Typography,B({variant:"h5"},{children:X===exports.InsightsTabs.INSIGHTS?"Insights":"Detected Anomalies"}))})})),e.jsxs(r.Box,B({className:U.runDetectionButtonContainer},{children:[e.jsx(o.YBButton,B({variant:S===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx("img",{src:J?"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Expand Icon"}),onClick:function(){ee(!J)},dataTestId:"expand-all-button"},{children:e.jsx("span",B({className:U.expandAllButton},{children:J?"Collapse All":"Expand All"}))})),e.jsx(o.YBButton,B({variant:"primary",size:"medium",dataTestId:"run-detection-button",onClick:function(){rt.mutate()},disabled:me===exports.AnomalyDetectionStatusText.SCHEDULED||me===exports.AnomalyDetectionStatusText.IN_PROGRESS,showSpinner:me===exports.AnomalyDetectionStatusText.SCHEDULED||me===exports.AnomalyDetectionStatusText.IN_PROGRESS,startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",alt:"Detection Icon"})},{children:"Run Detection"}))]})),it.isLoading&&e.jsx(r.Box,B({mt:2,className:z.loadingBox},{children:e.jsx(sH,{className:H(z.icon,z.inProgressIcon)})})),it.isError&&e.jsxs(r.Box,B({mt:2},{children:[(S===exports.AppName.YBA||S===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(ot)?ot:_i.ANOMALIES_FETCH_ERROR}),S===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(ot)?ot:_i.ANOMALIES_FETCH_ERROR})]}))]})),it.isSuccess&&(Qi(null==q?void 0:q.groups)?e.jsx(uH,{name:"gant-chart-insights",sourceData:null!=q?q:[],expandAll:J,showMoreOptions:!0,onClickShowMoreAnomalies:D,startTime:null!==(g=null==_?void 0:_.toISOString())&&void 0!==g?g:null,endTime:null!==(v=null==b?void 0:b.toISOString())&&void 0!==v?v:null,onSelectedIssue:k,appName:S,currentTab:X,isInsightsTab:X===exports.InsightsTabs.INSIGHTS},"gant-chart-insights"):e.jsx(r.Box,B({mt:2},{children:"No Anomalies were detected"})))]}))]}))},cq=r.makeStyles((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),dq=function(i){var a,s,l,u,c,d=i.showMoreAnomalyCategory,p=i.selectedTab,h=i.startTime,f=i.endTime,g=i.apiUrl,m=i.universeUuid,y=i.appName,x=i.onClickShowMoreAnomalies,_=i.onSelectedIssue,b=cq(),w=wi(),S=t.useState(null),C=S[0],T=S[1],M=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsByType,h,f],(function(){return oH.fetchAnomalyGroupsByType(m,h,f,d,g)}),{onSuccess:function(e){T(e)}}),A=null===(l=null===(s=null===(a=null==M?void 0:M.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return e.jsxs(r.Box,B({className:b.tabBox},{children:[e.jsxs(r.Breadcrumbs,B({className:w.breadCrumb,separator:e.jsx(r.Typography,B({variant:"body2"},{children:"/"})),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e.jsx(r.Link,B({className:w.breadcrumbColor,component:LV,variant:"h5",onClick:function(){x(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e.jsx("span",B({className:w.breadCrumbText},{children:p===exports.InsightsTabs.CLUSTER_LOAD?"Anomalies":"Insights"}))})),e.jsx(r.Typography,B({variant:"h5"},{children:e.jsx("span",B({className:H(w.breadCrumbText,w.anomalyCategoryText)},{children:"".concat(null===(c=null===(u=null==C?void 0:C[0])||void 0===u?void 0:u.lastInstance)||void 0===c?void 0:c.title)||"".concat(Gr[d])}))}))]})),e.jsxs(r.Box,B({mt:3},{children:[M.isLoading&&e.jsx(r.Box,{children:e.jsx(sH,{className:H(w.icon,w.inProgressIcon)})}),M.isError&&e.jsxs(r.Box,B({mt:3},{children:[(y===exports.AppName.YBA||y===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(A)?A:_i.SHOW_MORE_ANOMALIES_FETCH_ERROR}),y===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(A)?A:_i.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),M.isSuccess&&(qi(C)?e.jsxs(r.Box,{children:[e.jsxs(r.Box,B({display:"flex",alignItems:"center",mb:2,style:{marginLeft:"12px"},onClick:function(){if(qi(C)){var e=null==C?void 0:C.map((function(e){var t;return null===(t=e.lastInstance)||void 0===t?void 0:t.entityDisplayName})).filter(Boolean).join("\n");navigator.clipboard.writeText(e)}}},{children:[e.jsx(v.FileCopy,{style:{cursor:"pointer",height:16,width:16}}),e.jsx(r.Typography,B({variant:"body2",style:{marginLeft:8,textDecoration:"underline",cursor:"pointer"}},{children:"Copy all entities"}))]})),e.jsx(uH,{name:"gant-chart-show-more-anomalies",sourceData:null!=C?C:[],showMoreOptions:!1,expandAll:!0,startTime:h,endTime:f,onSelectedIssue:_,appName:y,viewAllAnomalies:!0},"gant-chart-show-more-anomalies")]}):e.jsx(r.Box,{children:"No Anomalies were detected"}))]}))]}))},pq=i.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),hq=function(t){var i=t.data,a=t.open,s=t.apiUrl,l=t.onClose,u=t.onActionPerformed,c=pq(),d=n.useMutation((function(){return oH.deleteUniverseMetadata(i.id,s)}),{onSuccess:function(){JY.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),u(),l()},onError:function(e){var t,n,r;JY.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Not able to remove universe, please try again")}});return e.jsx(o.YBModal,B({open:a,onClose:l,title:"Remove Universe",onSubmit:function(){return j(void 0,void 0,void 0,(function(){return F(this,(function(e){return d.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(r.Box,B({mt:2},{children:e.jsx(r.Typography,B({variant:"body2"},{children:"Are you sure you want to remove the universe ".concat(i.id," from Perf Advisor service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(GG||(GG={}));var fq=i.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},tagGreen:{backgroundColor:"#CDEFE1"},tagRed:{backgroundColor:"#FDE2E2"},tagTextGreen:{color:"#097245"},tagTextRed:{color:"#8F0000"},statusText:{fontFamily:"Inter",fontStyle:"normal",fontSize:"13px"},statusBox:{display:"flex",flexDirection:"row",alignItems:"center",height:"24px",borderRadius:"6px",padding:"10px 6px",width:"fit-content"},flexColumn:{display:"flex",flexDirection:"row"},tooltip:{marginLeft:e.spacing(.5)}}})),gq=function(n){var i=n.metadata,a=n.apiUrl;n.customerUuid;var s=n.universeList,l=n.onActionPerformed,u=fq(),c=wi(),d=t.useState(!1),p=d[0],h=d[1],f=t.useState([]),g=f[0],m=f[1],v=t.useState(Hr[0]),y=v[0],x=v[1],_=t.useState(""),b=_[0],w=_[1],S=t.useState(0),C=S[0],T=S[1],M=t.useState(null),A=M[0],E=M[1],I=t.useState(i),D=I[0],O=I[1];return t.useEffect((function(){var e=i.map((function(e){var t,n=s.find((function(t){return e.id===t.universeUUID}));return e.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",e.lastSyncError=null==n?void 0:n.lastSyncError,e}));O(e)}),[s,i]),t.useEffect((function(){m([{name:"id",label:"Universe UUID",options:{sort:!0,display:!0}},{name:"name",label:"Universe Name",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:H(c.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=D[r],o=null==i?void 0:i.id;return e.jsx("a",B({href:"/universes/".concat(o,"/perfAdvisor?tab=").concat(_r.ANOMALIES)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:H(c.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"lastSyncError",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:H(c.tableHeaderCell)}},customBodyRender:function(t){return e.jsx(e.Fragment,{children:t?e.jsxs(r.Box,B({className:u.flexColumn},{children:[e.jsx(r.Box,B({className:H(u.tagRed,u.statusBox)},{children:e.jsx("span",B({className:H(u.tagTextRed,u.statusText)},{children:GG.INACTIVE}))})),e.jsx(r.Tooltip,B({title:t,arrow:!0,placement:"top",className:u.tooltip},{children:e.jsx("img",{src:bG,alt:"info"})}))]})):e.jsx(r.Box,B({className:H(u.tagGreen,u.statusBox)},{children:e.jsx("span",B({className:H(u.tagTextGreen,u.statusText)},{children:GG.ACTIVE}))}))})}}},{name:"",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:H(c.tableHeaderCell)}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx(o.YBButton,B({size:"medium",variant:"ghost",dataTestId:"UniverseListMetadata-unregisterButton",onClick:function(){return e=D[i],E(e),void h(!0);var e}},{children:"Unregister"}))})}}}])}),[D]),e.jsxs(r.Box,B({mt:2,className:u.overrideMuiTableContainer},{children:[qi(D)&&qi(g)&&e.jsx(r.Box,B({mt:2},{children:e.jsx(o.YBTable,{title:"Universe Metadata",className:c.overrideMuiTable,dataTestId:"UniverseListMetadata-Table",data:D,columns:g,options:{filter:!0,search:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:y,page:C,onChangePage:function(e){return T(e)},onChangeRowsPerPage:function(e){x(e),T(0)},rowsPerPageOptions:Hr,globalFilterFn:"includesString",state:{globalFilter:b,pagination:{pageIndex:C,pageSize:y}},onGlobalFilterChange:w}})})),p&&A&&e.jsx(hq,{onActionPerformed:l,open:p,onClose:function(){h(!1)},data:A,apiUrl:a})]}))},mq=i.makeStyles((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),vq=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),yq=function(t){var i=t.data,a=t.open,s=t.apiUrl,l=t.onClose,u=t.onActionPerformed,c=t.toast,d=vq(),p=n.useMutation((function(){return oH.deleteRuntimeConfig(Wr,null==i?void 0:i.path,s)}),{onSuccess:function(){c.success("Have reset runtime configuration key ".concat(i.path," successfully")),u(),l()},onError:function(e){var t,n,r;c.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot reset runtime configuration key, please try again")}});return e.jsx(o.YBModal,B({open:a,onClose:l,title:"Reset Runtime Configuration",onSubmit:function(){return j(void 0,void 0,void 0,(function(){return F(this,(function(e){return p.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:d.root,dividers:!0}},{children:e.jsx(r.Box,B({mt:2},{children:e.jsx(r.Typography,B({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(i.path," ?")}))}))}))},xq=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),_q=function(t){var i=t.data,a=t.open,s=t.apiUrl,l=t.onClose,u=t.onActionPerformed,c=t.toast,d=xq(),p=Vn({defaultValues:{configValue:(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL?"true"===i.value:i.value},mode:"onChange",reValidateMode:"onChange"}),h=p.control,f=p.handleSubmit,g=n.useMutation((function(e){return oH.updateRuntimeConfig(Wr,null==i?void 0:i.path,e.configValue?e.configValue.toString():i.value.toString(),s)}),{onSuccess:function(){c.success("Updated runtime configuration key ".concat(i.path," successfully")),u(),l()},onError:function(e){var t,n,r;c.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot update runtime configuration key, please try again")}}),m=f((function(e){var t={configValue:""};Object.assign(t,i),t.configValue=e.configValue,g.mutate(t)}));return e.jsx(o.YBModal,B({open:a,onClose:l,title:"Update Runtime Configuration",onSubmit:m,cancelLabel:"Cancel",submitLabel:"Update",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:d.root,dividers:!0}},{children:e.jsx(Wt,B({},p,{children:e.jsxs(r.Box,B({mt:2},{children:[e.jsx(o.YBLabel,{children:"Config Key "}),e.jsx(r.Typography,B({variant:"body2"},{children:i.path})),e.jsxs(r.Box,B({mt:1},{children:[e.jsx(o.YBLabel,{children:"Config Value "}),(null==i?void 0:i.type)!==exports.RuntimeConfigType.BOOL&&e.jsx(Zn,{style:{marginTop:"8px"},name:"configValue",control:h,fullWidth:!0,dataTestId:"UpdateRuntimeConfig-ConfigValue"}),(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL&&e.jsx(Ti,{name:"configValue",control:h,dataTestId:"UpdateRuntimeConfig-ConfigValue"})]}))]}))}))}))},bq=r.makeStyles((function(e){return{overrideMuiTableContainer:{"& .yb-MuiTableContainer-root":{width:"100% !important",minHeight:"fit-content",marginTop:"3px"}},overrideMuiTable:{textAlign:"center","& .yb-MuiTableCell-sizeSmall":{textAlign:"center"}},tooltip:{marginLeft:e.spacing(.5)},textColor:{color:"#303A78"},searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"}}}));exports.ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE="active_session_history_eps_client_node",exports.ACTIVE_SESSION_HISTORY_EPS_GLOBAL=Dr,exports.ACTIVE_SESSION_HISTORY_QUERY_EVENTS=Or,exports.ALL=wr,exports.ALL_REGIONS=br,exports.ALL_ZONES=Sr,exports.ANOMALY_CATEGORY_LIST=Vr,exports.ANOMALY_FILTER_DURATION_OPTIONS=$r,exports.ANOMALY_TAG=oi,exports.ANOMALY_TYPE_TO_NAME_MAP=Gr,exports.ASH=Cr,exports.ASH_GROUPBY_VALUES=zr,exports.Aggregation=sr,exports.BACKGROUND_QUERY_REQUEST_GRAPHS=Fr,exports.CATALOG_READ_REQUEST_GRAPH=Ur,exports.CATEGORY_HEADER_DATA_MAP=Jr,exports.COLORS=yi,exports.CORES=Tr,exports.CPU_CORES=Er,exports.CPU_COUNT=kr,exports.CQL_QUERY_REQUEST_GRAPHS=jr,exports.ClusterRegionSelector=io,exports.ConfigureUniverseMetadata=function(i){var a=i.apiUrl,s=i.customerUuid,l=i.appName,u=void 0===l?exports.AppName.WEB:l,c=mq(),d=wi(),p=t.useState([]),h=p[0],f=p[1],g=t.useState([]),m=g[0],v=g[1],y=n.useQueryClient(),x=n.useQuery(exports.QUERY_KEY.fetchUniverseMetadataList,(function(){return oH.fetchUniverseMetadataList(a,s)}),{onSuccess:function(e){f(e)}}),_=x.isIdle,b=x.isLoading,w=x.isError,S=x.refetch,C=n.useQuery(exports.QUERY_KEY.fetchUniverseListDetails,(function(){return oH.fetchUniverseListDetails(a)}),{onSuccess:function(e){v(e)}}),T=C.isIdle,M=C.isLoading,A=C.isError,E=C.refetch;if((w||A)&&e.jsx(mt,{customErrorMessage:"Unable to fetch ".concat(u===exports.AppName.YBM?"cluster":"universe"," details")}),b||M||_&&void 0===h||T&&void 0===m)return e.jsx(r.Box,B({mt:4,className:d.loadingBox},{children:e.jsx(sH,{className:H(d.icon,d.inProgressIcon)})}));var I=function(){j(void 0,void 0,void 0,(function(){return F(this,(function(e){switch(e.label){case 0:return y.invalidateQueries(exports.QUERY_KEY.fetchUniverseMetadataList),y.invalidateQueries(exports.QUERY_KEY.fetchUniverseListDetails),[4,S()];case 1:return e.sent(),[4,E()];case 2:return e.sent(),[2]}}))}))};return e.jsx(Jn,{body:e.jsxs(r.Box,B({ml:1,mr:1,mt:1,className:c.flexColumn},{children:[e.jsx(o.YBButton,B({variant:"secondary",size:"medium",onClick:function(){I()},className:c.refreshButton,dataTestId:"ConfigureUniverseMetadata-refreshButton"},{children:"Refresh"})),Zi(a)&&h.length>0?e.jsx(e.Fragment,{children:e.jsx(r.Box,B({mt:2},{children:e.jsx(gq,{apiUrl:a,customerUuid:s,metadata:h,universeList:m,onActionPerformed:I})}))}):e.jsx(r.Box,B({className:c.noUniverses},{children:Zi(a)?"Currently, there are no universes attached to Perf Advisor service":"Customer is not registered with Perf Advisor service. Please register and then enable Perf Advisor for universes."}))]}))})},exports.DB_CAPS_TAG_=ei,exports.DB_TAG=ni,exports.DEFAULT_ERROR_MESSAGES=_i,exports.DEFAULT_RECORDS_PER_PAGE=Hr,exports.ELLIPSIS="...",exports.GLOBAL_RUNTIME_CONFIG=Wr,exports.GROUP_BY_OPERATIONS=vr,exports.GroupEventsParam=rr,exports.IN_DEVELOPMENT_MODE=Yz,exports.MAX_OUTLIER_NUM_NODES=10,exports.METRICS_OUTLIER_DATABASES_STORAGE_KEY=vi,exports.METRICS_OUTLIER_TABLES_STORAGE_KEY=mi,exports.METRICS_SESSION_STORAGE_KEY=gi,exports.METRIC_DB_RESOURCES_WITH_GRAPHS=di,exports.METRIC_FONT=Ar,exports.METRIC_NAMES=fi,exports.METRIC_RESOURCES_WITH_GRAPHS=pi,exports.METRIC_TABLES_RESOURCES_WITH_GRAPHS=ci,exports.METRIC_TABS=si,exports.METRIC_TABS_DATABASES=ui,exports.METRIC_TABS_TABLES=li,exports.MIN_OUTLIER_NUM_NODES=3,exports.MORE=qr,exports.MetricConsts=Ir,exports.MetricOrigin={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},exports.MetricSplitSelector=Mi,exports.MetricsAnalysisEntry=function(i){var a,s,l,u=i.universeUuid,c=i.troubleshootUuid,d=i.appName,p=i.timezone,h=i.apiUrl,f=i.onSelectedIssue,g=i.onSelectedQuery,m=wi(),v=t.useState(null),y=v[0],x=v[1],_=t.useState(null),b=_[0],w=_[1],S=t.useState(null),C=S[0],T=S[1],M=t.useState(null),A=M[0],E=M[1],I=t.useState(null),D=I[0],O=I[1],k=new URLSearchParams(window.location.search),R=window.location.pathname,N=null;if(R.includes("/queries/")){var L=R.split("/"),P=L.indexOf("queries");N=L[P+1]||null}d!==exports.AppName.YBM&&d!==exports.AppName.YBA||(N=k.get("queryId"));var j=k.get("dbId"),F=k.get("userId"),z=Zi(N);t.useEffect((function(){localStorage.setItem("appName",d)}),[]);var V=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return oH.fetchUniverseById(u,h)})),W=null===(l=null===(s=null===(a=null==V?void 0:V.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,Y=n.useQuery([exports.QUERY_KEY.fetchAnomalies,u],(function(){return oH.fetchAnomaliesById(u,c,h)}),{onSuccess:function(e){x(e),w(function(e){var t,n=null==e?void 0:e.mainGraphs.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n})),r=null===(t=null==e?void 0:e.rcaGuidelines)||void 0===t?void 0:t.map((function(t){var n;return null===(n=t.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(t){var n;return null===(n=t.supportingGraphs)||void 0===n?void 0:n.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n}))}))})),i=null==r?void 0:r.flat(2),o=null==i?void 0:i.filter((function(e){return Qi(e)}));return U(U([],n,!0),o,!0)}(e)),T(function(e){var t,n;if(sa=0,!e)return[];var r=null===(t=null==e?void 0:e.mainGraphs)||void 0===t?void 0:t.length,i=null===(n=null==e?void 0:e.rcaGuidelines)||void 0===n?void 0:n.map((function(e,t){var n,i={cause:"",name:[],groupByControl:[],description:"",index:[],rcaRecommendation:"",title:void 0};return i.name=[],i.groupByControl=[],i.cause=e.possibleCause,i.description=e.possibleCauseDescription,null===(n=e.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(e){var t;return e.supportingGraphs?null===(t=e.supportingGraphs)||void 0===t?void 0:t.map((function(t){return i.name.push(t.name),i.rcaRecommendation=e.recommendation,1===r?i.index.push(fa()):r>1&&i.index.push(fa()+r-1),i.title=t.displayName,i.groupByControl.push(t.groupByControl),i})):i}))})),o=null==i?void 0:i.flat(2),a=new Set(o);return Array.from(a)}(e))},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!z&&Zi(c)}),G=Y.isLoading,q=Y.isError,Q=Y.isIdle,Z=n.useQuery([exports.QUERY_KEY.fetchQueries,u],(function(){return oH.fetchQueries(u,h,{dbId:j,userId:F,queryId:N})}),{onSuccess:function(e){E(e)},onError:function(e){E([]),console.error("Failed to fetch queries",e)}}),X=Z.isLoading,$=Z.isError,K=n.useQuery([exports.QUERY_KEY.fetchQueryStats,u],(function(){return oH.fetchQueryStats(u,{dbId:j,queryId:N},h)}),{onSuccess:function(e){O([e])},onError:function(e){O([]),console.error("Failed to fetch query stats",e)},enabled:z}),J=K.isLoading,ee=K.isError;return G||J||X?e.jsx(r.Box,B({mt:2,className:m.loadingBox},{children:e.jsx(sH,{className:H(m.icon,m.inProgressIcon)})})):q||ee||$||W||Q&&void 0===y?e.jsxs(r.Box,B({mt:3},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:q?_i.ANOMALIES_FETCH_ERROR:_i.QUERY_STATS_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:q?_i.ANOMALIES_FETCH_ERROR:_i.QUERY_STATS_FETCH_ERROR})]})):e.jsx(yY,B({appName:d},{children:e.jsx(r.Box,{children:A&&(null==V?void 0:V.data)&&e.jsx(mY,{apiUrl:h,troubleshootUuid:c,anomalyData:y,universeData:null==V?void 0:V.data,universeUuid:u,appName:d,timezone:p,isHistoricalQueryView:z,amomalyGraphRequestParams:b,formattedAnomalyRca:C,universeQueryData:A,universeQueryStatsData:D,queryIdParam:N,onSelectedIssue:f,onSelectedQuery:g})})}))},exports.NAME_COLOR_MAPPING=xi,exports.OutlierSelector=Ii,exports.PerfAdvisorAPI=oH,exports.PerfAdvisorEntry=function(i){var a,s,l,u,c,d,p,h,f,g,m=i.timezone,v=i.universeUuid,y=i.appName,x=i.apiUrl,_=i.onSelectedIssue,b=i.onSelectedQuery,w=wi(),S=new URLSearchParams(window.location.search),C=null==S?void 0:S.get("endTime"),T=C?new Date(C):new Date,M=new Date(T);(null==S?void 0:S.get("startTime"))?M=new Date(S.get("startTime")):M.setDate(M.getDate()-1);var A=null==S?void 0:S.get("duration"),E=t.useState(null!=A?A:$r[0].value),I=E[0],D=E[1],O=t.useState((function(){return Ca(I,T,M)})),k=O[0],R=O[1];t.useEffect((function(){localStorage.setItem("appName",y)}),[]);var N=t.useState(null),L=N[0],P=N[1],j=t.useState(exports.InsightsTabs.CLUSTER_LOAD),F=j[0],U=j[1],z=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return oH.fetchUniverseById(v,x)})),V=n.useQuery(exports.QUERY_KEY.getUniverseMetadata,(function(){return oH.getUniverseMetadata(v,x)})),W=null===(l=null===(s=null===(a=null==z?void 0:z.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,Y=null===(d=null===(c=null===(u=null==V?void 0:V.error)||void 0===u?void 0:u.response)||void 0===c?void 0:c.data)||void 0===d?void 0:d.error,G=null===(p=null==z?void 0:z.data)||void 0===p?void 0:p.ashEnabled,q=null===(h=null==z?void 0:z.data)||void 0===h?void 0:h.ashSupported,Q=function(e){P(e)},Z=function(){if(I!==Xr.CUSTOM){var e=Sa(I,T),t=e.formattedStartDate,n=e.formattedEndDate;R({startDateTime:t,endDateTime:n})}};t.useEffect((function(){Z()}),[I]),t.useEffect((function(){A&&Zi(A)&&Z()}),[]);return e.jsx(yY,B({appName:y},{children:e.jsxs(r.Box,{children:[V.isLoading||z.isLoading&&e.jsx(r.Box,B({mt:2,className:w.loadingBox},{children:e.jsx(sH,{className:H(w.icon,w.inProgressIcon)})})),V.isError||z.isError&&e.jsxs(r.Box,B({mt:2},{children:[(y===exports.AppName.YBA||y===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:V.isError?Zi(Y)?Y:_i.UNIVERSE_PA_STATUS_ERROR:Zi(W)?W:_i.UNIVERSE_DETAILS_ERROR}),y===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:V.isError?Zi(Y)?Y:_i.UNIVERSE_PA_STATUS_ERROR:Zi(W)?W:_i.UNIVERSE_DETAILS_ERROR})]})),z.isSuccess&&e.jsx(e.Fragment,{children:e.jsxs(r.Box,B({className:H(y!=exports.AppName.WEB&&w.headerContainerYBM)},{children:[!L&&e.jsx(r.Box,{children:e.jsx(uq,{startTime:null==k?void 0:k.startDateTime,endTime:null==k?void 0:k.endDateTime,filterDuration:I,universeUuid:v,universeData:null==z?void 0:z.data,appName:y,timezone:m,isAshEnabled:!!G,isAshSupported:!!q,apiUrl:x,onClickShowMoreAnomalies:Q,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);D(Zr.CUSTOM),R({startDateTime:new Date(e),endDateTime:new Date(t)});var i=new URLSearchParams(window.location.search);i.set("startTime",n.toISOString()),i.set("endTime",r.toISOString()),i.set("duration",Zr.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:_,onSelectedQuery:b,notifyTabChange:function(e){U(e)},onStartDateChange:function(e){var t;if(e){R((function(t){return B(B({},t),{startDateTime:e})}));var n=new URLSearchParams(window.location.search);n.set("startTime",null===(t=null==k?void 0:k.startDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))}},onEndDateChange:function(e){var t;if(e){R((function(t){return B(B({},t),{endDateTime:e})}));var n=new URLSearchParams(window.location.search);n.set("endTime",null===(t=null==k?void 0:k.endDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))}},onRefresh:function(){R((function(e){return B(B({},e),{endDateTime:new Date})}))},onSelectedFilterDuration:function(e){var t,n,r,i;D(e);var o=new URLSearchParams(window.location.search);e===Zr.CUSTOM?(o.set("startTime",null!==(n=null===(t=null==k?void 0:k.startDateTime)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:""),o.set("endTime",null!==(i=null===(r=null==k?void 0:k.endDateTime)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"")):(o.delete("startTime"),o.delete("endTime")),o.set("duration",e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(o.toString()))}})}),Zi(L)&&e.jsx(dq,{onClickShowMoreAnomalies:Q,selectedTab:F,showMoreAnomalyCategory:L,startTime:null===(f=null==k?void 0:k.startDateTime)||void 0===f?void 0:f.toISOString(),endTime:null===(g=null==k?void 0:k.endDateTime)||void 0===g?void 0:g.toISOString(),universeUuid:v,appName:y,apiUrl:x,onSelectedIssue:_})]}))})]})}))},exports.QUERIES=Mr,exports.QUERY_DETAILS="QUERY DETAILS",exports.QUERY_TAG="QUERY",exports.QUERY_TYPE_TAG=ti,exports.QueryTypeMode=ar,exports.RCA_GANT_CHART=hi,exports.REACT_APP_API_URL=Gz,exports.REGION_TAG="Region",exports.REGION_ZONE_TAG=ai,exports.RUNTIME_CONFIG_KEYS=Yr,exports.RuntimeConfigs=function(i){var a,s,l=i.apiUrl,u=i.appName,c=i.toast,d=bq(),p=wi(),h=n.useQueryClient(),f=t.useState(""),g=f[0],m=f[1],v=t.useState([]),y=v[0],x=v[1],_=t.useState(Hr[0]),b=_[0],w=_[1],S=t.useState(0),C=S[0],T=S[1],M=t.useState(!1),A=M[0],E=M[1],I=t.useState(!1),D=I[0],O=I[1],k=t.useState(null),R=k[0],N=k[1],L=n.useQuery([exports.QUERY_KEY.fetchRuntimeConfigs],(function(){return oH.fetchRuntimeConfigs(Wr,l)}),{onSuccess:function(e){x(e)}}),P=L.error,U=L.isLoading,z=L.isError,H=L.isIdle,V=L.refetch,W=null===(s=null===(a=null==P?void 0:P.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,Y=function(){j(void 0,void 0,void 0,(function(){return F(this,(function(e){switch(e.label){case 0:return h.invalidateQueries(exports.QUERY_KEY.fetchRuntimeConfigs),[4,V()];case 1:return e.sent(),[2]}}))}))},G=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"20%"}}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsxs(r.Box,{children:[e.jsx("span",{children:y[i].path}),e.jsx(o.YBTooltip,B({title:y[i].description,placement:"top",arrow:!0},{children:e.jsx(r.Box,B({className:d.tooltip,display:"inline-block"},{children:e.jsx("img",{src:bG,alt:"info"})}))}))]})}}},{name:"description",label:"Config Description",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"30%"}}}}},{name:"value",label:"Config Value",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"10%"}}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx("span",B({className:y[i].overriden?d.textColor:""},{children:y[i].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"10%"}}},customBodyRender:function(t,n){var r=n.rowIndex;return e.jsxs(e.Fragment,{children:[e.jsx(o.YBButton,B({size:"medium",variant:"ghost",dataTestId:"RuntimeConfigs-UpdateRuntimeConfigButton",onClick:function(){return e=y[r],N(e),void E(!0);var e}},{children:"Update"})),e.jsx(o.YBButton,B({size:"medium",variant:"ghost",dataTestId:"RuntimeConfigs-ResetRuntimeConfigButton",onClick:function(){return e=y[r],N(e),void O(!0);var e}},{children:"Reset"}))]})}}}];return e.jsx(yY,B({appName:u},{children:e.jsxs(r.Box,B({mt:2,ml:4,mr:4,className:d.overrideMuiTableContainer},{children:[e.jsx(r.Typography,B({variant:"h4"},{children:"Global Runtime Configurations"})),(z||H&&null===y)&&e.jsxs(r.Box,B({className:p.recommendation},{children:[(u===exports.AppName.YBA||u===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(W)?W:_i.RUNTIME_CONFIGS_ERROR}),u===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(W)?W:_i.RUNTIME_CONFIGS_ERROR})]})),e.jsx(r.Box,B({display:"flex",alignSelf:"center",mt:2},{children:e.jsx(o.YBInput,{placeholder:"Search",className:d.searchBox,onChange:function(e){m(e.target.value),T(0)},value:g,dataTestId:"RuntimeConfigs-SearchInput"})})),e.jsx(r.Box,B({mt:2,mb:4,pb:2},{children:e.jsx(o.YBTable,{title:"Runtime Configuration Variables",className:d.overrideMuiTable,data:null!=y?y:[],columns:G,dataTestId:"RuntimeConfigs-Table",isLoading:U,options:{filter:!0,search:!0,selectableRowsOnClick:!1,rowHover:!0,tableLayout:"fixed",responsive:"standard",rowsPerPage:b,page:C,onChangePage:function(e){return T(e)},onChangeRowsPerPage:function(e){w(e),T(0)},rowsPerPageOptions:Hr,globalFilterFn:"includesString",state:{globalFilter:g,pagination:{pageIndex:C,pageSize:b},isLoading:U,showProgressBars:U},onGlobalFilterChange:m}})})),A&&R&&e.jsx(_q,{open:A,data:R,apiUrl:l,onActionPerformed:Y,onClose:function(){E(!1)},toast:c}),D&&R&&e.jsx(yq,{open:D,data:R,apiUrl:l,onActionPerformed:Y,onClose:function(){O(!1)},toast:c})]}))}))},exports.SQL_QUERY_REQUEST_GRAPHS=Pr,exports.SplitMode=ir,exports.SplitType=or,exports.TABLET_ID_TAG=ii,exports.TABLET_TAG="Tablet Id",exports.TABLE_REQUEST_GRAPHS=["table_scan_ops","table_tup_read_ops","table_write_ops"],exports.TABLE_TAG=ri,exports.TIME_FILTER_LABEL=Zr,exports.TIME_FILTER_VALUES=Xr,exports.TYPE="type",exports.URL_TAB_PATH=_r,exports.USER_TAG="User",exports.VIEW_MORE=Qr,exports.WAIT_EVENT_MAPPING=mr,exports.YBCheckboxField=oo,exports.YBCodeBlock=ht,exports.YBErrorIndicator=mt,exports.YBInfinitePagination=$n,exports.YBInputField=Zn,exports.YBPanelItem=Jn,exports.YBThemeWrapper=yY,exports.YBToggleField=Ti,exports.ZONE_TAG="Zone",exports.ZoneNodeSelector=no,exports.filterDurations=Kr,exports.getCustomFooterComponent=bi,exports.getRowCellComponent=function(t,n,r,i,o,a,s,l,u,c,d,p){return function(h,f){return e.jsx(Ci,{appName:t,currentTablePage:n,displayedRows:r,classes:i,showQuery:o,tableColumns:a,ignoredColumns:s,startTime:l,endTime:u,onSelectedQuery:p,expandedRowIndex:c,handleExpandedRowIndex:d,dataIndex:f,data:h})}},exports.isDefinedNotNull=Yi,exports.isEmptyArray=Gi,exports.isEmptyObject=function(e){return void 0===e||Di(e)&&0===Object.keys(e).length},exports.isEmptyString=Xi,exports.isNonEmptyArray=qi,exports.isNonEmptyObject=Qi,exports.isNonEmptyString=Zi,exports.isNullOrEmpty=function(e){return null==e||Di(e)&&0===Object.keys(e).length},exports.isValidObject=$i,exports.isYAxisGreaterThanThousand=Ki,exports.metricOutlierSelectors=Lr,exports.metricSplitSelectors=Rr,exports.otherSplitSelectors=Nr,exports.queryTypeSelectors=Br,exports.removeNullProperties=function(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]},exports.useCodeBlockStyles=ft;
10
+ */var Kh=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new md,o=n.renderer||"canvas";Xh[o]||(o=hu(Xh)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new Xh[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Ll.node||Ll.worker||s?null:new hh(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Ll.touchEventsSupported:!!c)&&(l=Eu(n.pointerSize,44)),this.handler=new od(i,a,u,a.root,l),this.animation=new Xp({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},e.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return hp(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=hp(t[i].color,1);return(n/=r)<.4}return!1}(e)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(e){var t,n=Yp();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=Yp();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Zh&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete $h[e]},e}();function Jh(e,t){var n=new Kh(eu(),e,t);return $h[n.id]=n,n}var ef=1e-4;function tf(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function nf(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return yu(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function rf(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function of(e){return e.sort((function(e,t){return e-t})),e}function af(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(e)}function sf(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function lf(e,t){var n=Math.max(af(e),af(t)),r=e+t;return n>20?r:rf(r,n)}function uf(e){var t=2*Math.PI;return(e%t+t)%t}function cf(e){return e>-1e-4&&e<ef}var df=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function pf(e){if(e instanceof Date)return e;if(yu(e)){var t=df.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function hf(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function ff(e,t){var n=hf(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function gf(e){var t=parseFloat(e);return t==e&&(0!==t||!yu(e)||e.indexOf("x")<=0)?t:NaN}function mf(){return Math.round(9*Math.random())}function vf(e,t){return 0===t?e:vf(t,e%t)}function yf(e,t){return null==e?t:null==t?e:e*t/vf(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function xf(e){throw new Error(e)}function _f(e,t,n){return(t-e)*n+e}var bf="series\0";function wf(e){return e instanceof Array?e:null==e?[]:[e]}function Sf(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var Cf=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Tf(e){return!bu(e)||mu(e)||e instanceof Date?e:e.value}function Mf(e){return bu(e)&&!(e instanceof Array)}function Af(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Uu();uu(t,(function(e,n){bu(e)||(t[n]=null)}));var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||kf(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){uu(r,(function(i,o){if(i&&null!=i.id){var a=If(i.id),s=n.get(a);if(null!=s){var l=e[s];ku(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}}))}(u,e,a,t),r&&function(e,t){uu(t,(function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var o=e[i].existing;if(!e[i].newOption&&o&&(null==o.id||null==n.id)&&!kf(n)&&!kf(o)&&Ef("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){uu(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||kf(r.existing)||r.existing&&null!=t.id&&!Ef("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}}))}(u,t,i):o&&function(e,t){uu(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=Uu(),uu(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),uu(s,(function(e){var t=e.newOption;ku(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})})),uu(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(bu(r)){if(i.name=null!=r.name?If(r.name):n?n.name:bf+t,n)i.id=If(n.id);else if(null!=r.id)i.id=If(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,e)}})),u}function Ef(e,t,n){var r=Df(t[e],null),i=Df(n[e],null);return null!=r&&null!=i&&r===i}function If(e){return Df(e,"")}function Df(e,t){return null==e?t:yu(e)?e:_u(e)||xu(e)?e+"":t}function Of(e){var t=e.name;return!(!t||!t.indexOf(bf))}function kf(e){return e&&null!=e.id&&0===If(e.id).indexOf("\0_ec_\0")}function Rf(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?mu(t.dataIndex)?cu(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?mu(t.name)?cu(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function Nf(){var e="__ec_inner_"+Lf++;return function(t){return t[e]||(t[e]={})}}var Lf=mf();function Bf(e,t,n){var r=Pf(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each((function(t,r){var i=Uf(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]})),a}function Pf(e,t){var n;if(yu(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Uu(),o={},a=!1;return uu(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&au(t.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e}else o[n]=e})),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var jf={useDefault:!0,enableAll:!1,enableNone:!1},Ff={useDefault:!1,enableAll:!0,enableNone:!0};function Uf(e,t,n,r){r=r||jf;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(ku(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(ku(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a}),s)}function zf(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var Hf="___EC__COMPONENT__CONTAINER___",Vf="___EC__EXTENDED_CLASS___";function Wf(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function Yf(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return vu(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return L(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),iu(t.prototype,e),t[Vf]=!0,t.extend=this.extend,t.superCall=Qf,t.superApply=Zf,t.superClass=r,t}}function Gf(e,t){e.extend=t.extend}var qf=Math.round(10*Math.random());function Qf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Zf(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Xf(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){ku(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=Wf(r);if(i.sub){if(i.sub!==Hf){var o=function(e){var n=t[e.main];n&&n[Hf]||((n=t[e.main]={})[Hf]=!0);return n}(i);o[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Hf]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=Wf(e),r=[],i=t[n.main];return i&&i[Hf]?uu(i,(function(e,t){t!==Hf&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=Wf(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return uu(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=Wf(e),r=t[n.main];return r&&r[Hf]}}function $f(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&au(r,s)>=0||i&&au(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var Kf=$f([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Jf=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Kf(this,e,t)},e}(),eg=new Qd(50);function tg(e){if("string"==typeof e){var t=eg.get(e);return t&&t.image}return e}function ng(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=eg.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!ig(t=o.image)&&o.pending.push(a):((t=zl.loadImage(e,rg,rg)).__zrImageSrc=e,eg.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function rg(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function ig(e){return e&&e.width&&e.height}var og=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function ag(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=sg(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=lg(o[a],i);return o.join("\n")}function sg(e,t,n,r){var i=iu({},r=r||{});i.font=t,n=Eu(n,"..."),i.maxIterations=Eu(r.maxIterations,2);var o=i.minChar=Eu(r.minChar,0);i.cnCharWidth=Ih("国",t);var a=i.ascCharWidth=Ih("a",t);i.placeholder=Eu(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Ih(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function lg(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=Ih(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?ug(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=Ih(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function ug(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}var cg=function(){},dg=function(e){this.tokens=[],e&&(this.tokens=e)},pg=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function hg(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Lh(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=mg(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new cg;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Ih(v,c),m||d)u.push(new dg([y]));else{var x=(u[u.length-1]||(u[0]=new dg)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var fg=du(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function gg(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!fg[e]}function mg(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=Ih(p,t),f=!r&&!gg(p);(o.length?c+h>n:i+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=h)):f?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var vg="__zr_style_"+Math.round(10*Math.random()),yg={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xg={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};yg[vg]=!0;var _g=["z","z2","invisible"],bg=["invisible"],wg=function(e){function t(t){return e.call(this,t)||this}var n;return L(t,e),t.prototype._init=function(t){for(var n=hu(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}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,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Sg.copy(e.getBoundingRect()),e.transform&&Sg.applyTransform(e.transform);return Cg.width=t,Cg.height=n,!Sg.intersect(Cg)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Qc(0,0,0,0)),t?Qc.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Qc(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){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:iu(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return zu(yg,e)},t.prototype.useStyle=function(e){e[vg]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[vg]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,_g)},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=hu(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=hu(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?bg:_g;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return iu(e,t),e},t.prototype.getAnimationStyleProps=function(){return xg},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(qh),Sg=new Qc(0,0,0,0),Cg=new Qc(0,0,0,0);var Tg=wg,Mg=Math.min,Ag=Math.max,Eg=Math.sin,Ig=Math.cos,Dg=2*Math.PI,Og=Gu(),kg=Gu(),Rg=Gu();function Ng(e,t,n,r,i,o){i[0]=Mg(e,n),i[1]=Mg(t,r),o[0]=Ag(e,n),o[1]=Ag(t,r)}var Lg=[],Bg=[];function Pg(e,t,n,r,i,o,a,s,l,u){var c=Nd,d=Od,p=c(e,n,i,a,Lg);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,i,a,Lg[h]);l[0]=Mg(f,l[0]),u[0]=Ag(f,u[0])}p=c(t,r,o,s,Bg);for(h=0;h<p;h++){var g=d(t,r,o,s,Bg[h]);l[1]=Mg(g,l[1]),u[1]=Ag(g,u[1])}l[0]=Mg(e,l[0]),u[0]=Ag(e,u[0]),l[0]=Mg(a,l[0]),u[0]=Ag(a,u[0]),l[1]=Mg(t,l[1]),u[1]=Ag(t,u[1]),l[1]=Mg(s,l[1]),u[1]=Ag(s,u[1])}function jg(e,t,n,r,i,o,a,s){var l=Fd,u=Pd,c=Ag(Mg(l(e,n,i),1),0),d=Ag(Mg(l(t,r,o),1),0),p=u(e,n,i,c),h=u(t,r,o,d);a[0]=Mg(e,i,p),a[1]=Mg(t,o,h),s[0]=Ag(e,i,p),s[1]=Ag(t,o,h)}function Fg(e,t,n,r,i,o,a,s,l){var u=nc,c=rc,d=Math.abs(i-o);if(d%Dg<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Og[0]=Ig(i)*n+e,Og[1]=Eg(i)*r+t,kg[0]=Ig(o)*n+e,kg[1]=Eg(o)*r+t,u(s,Og,kg),c(l,Og,kg),(i%=Dg)<0&&(i+=Dg),(o%=Dg)<0&&(o+=Dg),i>o&&!a?o+=Dg:i<o&&a&&(i+=Dg),a){var p=o;o=i,i=p}for(var h=0;h<o;h+=Math.PI/2)h>i&&(Rg[0]=Ig(h)*n+e,Rg[1]=Eg(h)*r+t,u(s,Rg,s),c(l,Rg,l))}var Ug={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zg=[],Hg=[],Vg=[],Wg=[],Yg=[],Gg=[],qg=Math.min,Qg=Math.max,Zg=Math.cos,Xg=Math.sin,$g=Math.abs,Kg=Math.PI,Jg=2*Kg,em="undefined"!=typeof Float32Array,tm=[];function nm(e){return Math.round(e/Kg*1e8)/1e8%2*Kg}var rm=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=$g(n/gh/e)||0,this._uy=$g(n/gh/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ug.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=$g(e-this._xi),r=$g(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Ug.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(Ug.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Ug.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),tm[0]=r,tm[1]=i,function(e,t){var n=nm(e[0]);n<0&&(n+=Jg);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Jg?i=n+Jg:t&&n-i>=Jg?i=n-Jg:!t&&n>i?i=n+(Jg-nm(n-i)):t&&n<i&&(i=n-(Jg-nm(i-n))),e[0]=n,e[1]=i}(tm,o),r=tm[0];var a=(i=tm[1])-r;return this.addData(Ug.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=Zg(i)*n+e,this._yi=Xg(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Ug.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ug.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!em||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();em&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},e.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,em&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Vg[0]=Vg[1]=Yg[0]=Yg[1]=Number.MAX_VALUE,Wg[0]=Wg[1]=Gg[0]=Gg[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(i=n=t[e],o=r=t[e+1]),a){case Ug.M:n=i=t[e++],r=o=t[e++],Yg[0]=i,Yg[1]=o,Gg[0]=i,Gg[1]=o;break;case Ug.L:Ng(n,r,t[e],t[e+1],Yg,Gg),n=t[e++],r=t[e++];break;case Ug.C:Pg(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Yg,Gg),n=t[e++],r=t[e++];break;case Ug.Q:jg(n,r,t[e++],t[e++],t[e],t[e+1],Yg,Gg),n=t[e++],r=t[e++];break;case Ug.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(i=Zg(p)*c+l,o=Xg(p)*d+u),Fg(l,u,c,d,p,h,f,Yg,Gg),n=Zg(h)*c+l,r=Xg(h)*d+u;break;case Ug.R:Ng(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],Yg,Gg);break;case Ug.Z:n=i,r=o}nc(Vg,Vg,Yg),rc(Wg,Wg,Gg)}return 0===e&&(Vg[0]=Vg[1]=Wg[0]=Wg[1]=0),new Qc(Vg[0],Vg[1],Wg[0]-Vg[0],Wg[1]-Vg[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(p){case Ug.M:i=a=e[d++],o=s=e[d++];break;case Ug.L:var g=e[d++],m=(x=e[d++])-o;($g(I=g-i)>n||$g(m)>r||d===t-1)&&(f=Math.sqrt(I*I+m*m),i=g,o=x);break;case Ug.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=Bd(i,o,v,y,g,x,_,b,10),i=_,o=b;break;case Ug.Q:f=zd(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case Ug.A:var w=e[d++],S=e[d++],C=e[d++],T=e[d++],M=e[d++],A=e[d++],E=A+M;d+=1,e[d++],h&&(a=Zg(M)*C+w,s=Xg(M)*T+S),f=Qg(C,T)*qg(Jg,Math.abs(A)),i=Zg(E)*C+w,o=Xg(E)*T+S;break;case Ug.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case Ug.Z:var I=a-i;m=s-o;f=Math.sqrt(I*I+m*m),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=p[_++],w=1===_;switch(w&&(n=i=p[_],r=o=p[_+1]),b!==Ug.L&&x>0&&(e.lineTo(c,d),x=0),b){case Ug.M:n=i=p[_++],r=o=p[_++],e.moveTo(i,o);break;case Ug.L:a=p[_++],s=p[_++];var S=$g(a-i),C=$g(s-o);if(S>h||C>f){if(m){if(v+(Q=l[y++])>u){var T=(u-v)/Q;e.lineTo(i*(1-T)+a*T,o*(1-T)+s*T);break e}v+=Q}e.lineTo(a,s),i=a,o=s,x=0}else{var M=S*S+C*C;M>x&&(c=a,d=s,x=M)}break;case Ug.C:var A=p[_++],E=p[_++],I=p[_++],D=p[_++],O=p[_++],k=p[_++];if(m){if(v+(Q=l[y++])>u){Ld(i,A,I,O,T=(u-v)/Q,zg),Ld(o,E,D,k,T,Hg),e.bezierCurveTo(zg[1],Hg[1],zg[2],Hg[2],zg[3],Hg[3]);break e}v+=Q}e.bezierCurveTo(A,E,I,D,O,k),i=O,o=k;break;case Ug.Q:A=p[_++],E=p[_++],I=p[_++],D=p[_++];if(m){if(v+(Q=l[y++])>u){Ud(i,A,I,T=(u-v)/Q,zg),Ud(o,E,D,T,Hg),e.quadraticCurveTo(zg[1],Hg[1],zg[2],Hg[2]);break e}v+=Q}e.quadraticCurveTo(A,E,I,D),i=I,o=D;break;case Ug.A:var R=p[_++],N=p[_++],L=p[_++],B=p[_++],P=p[_++],j=p[_++],F=p[_++],U=!p[_++],z=L>B?L:B,H=$g(L-B)>.001,V=P+j,W=!1;if(m)v+(Q=l[y++])>u&&(V=P+j*(u-v)/Q,W=!0),v+=Q;if(H&&e.ellipse?e.ellipse(R,N,L,B,F,P,V,U):e.arc(R,N,z,P,V,U),W)break e;w&&(n=Zg(P)*L+R,r=Xg(P)*B+N),i=Zg(V)*L+R,o=Xg(V)*B+N;break;case Ug.R:n=i=p[_],r=o=p[_+1],a=p[_++],s=p[_++];var Y=p[_++],G=p[_++];if(m){if(v+(Q=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+qg(q,Y),s),(q-=Y)>0&&e.lineTo(a+Y,s+qg(q,G)),(q-=G)>0&&e.lineTo(a+Qg(Y-q,0),s+G),(q-=Y)>0&&e.lineTo(a,s+Qg(G-q,0));break e}v+=Q}e.rect(a,s,Y,G);break;case Ug.Z:if(m){var Q;if(v+(Q=l[y++])>u){T=(u-v)/Q;e.lineTo(i*(1-T)+n*T,o*(1-T)+r*T);break e}v+=Q}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Ug,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),im=rm;function om(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function am(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;if(c>t+d&&c>r+d&&c>o+d&&c>s+d||c<t-d&&c<r-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)return!1;var p=function(e,t,n,r,i,o,a,s,l,u,c){var d,p,h,f,g,m=.005,v=1/0;Md[0]=l,Md[1]=u;for(var y=0;y<1;y+=.05)Ad[0]=Od(e,n,i,a,y),Ad[1]=Od(t,r,o,s,y),(f=ec(Md,Ad))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Sd);x++)p=d-m,h=d+m,Ad[0]=Od(e,n,i,a,p),Ad[1]=Od(t,r,o,s,p),f=ec(Ad,Md),p>=0&&f<v?(d=p,v=f):(Ed[0]=Od(e,n,i,a,h),Ed[1]=Od(t,r,o,s,h),g=ec(Ed,Md),h<=1&&g<v?(d=h,v=g):m*=.5);return c&&(c[0]=Od(e,n,i,a,d),c[1]=Od(t,r,o,s,d)),bd(v)}(e,t,n,r,i,o,a,s,u,c,null);return p<=d/2}function sm(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;if(l>t+u&&l>r+u&&l>o+u||l<t-u&&l<r-u&&l<o-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)return!1;var c=function(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Md[0]=a,Md[1]=s;for(var p=0;p<1;p+=.05)Ad[0]=Pd(e,n,i,p),Ad[1]=Pd(t,r,o,p),(m=ec(Md,Ad))<d&&(u=p,d=m);d=1/0;for(var h=0;h<32&&!(c<Sd);h++){var f=u-c,g=u+c;Ad[0]=Pd(e,n,i,f),Ad[1]=Pd(t,r,o,f);var m=ec(Ad,Md);if(f>=0&&m<d)u=f,d=m;else{Ed[0]=Pd(e,n,i,g),Ed[1]=Pd(t,r,o,g);var v=ec(Ed,Md);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=Pd(e,n,i,u),l[1]=Pd(t,r,o,u)),bd(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var lm=2*Math.PI;function um(e){return(e%=lm)<0&&(e+=lm),e}var cm=2*Math.PI;function dm(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%cm<1e-4)return!0;if(o){var d=r;r=um(i),i=um(d)}else r=um(r),i=um(i);r>i&&(i+=cm);var p=Math.atan2(l,s);return p<0&&(p+=cm),p>=r&&p<=i||p+cm>=r&&p+cm<=i}function pm(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r)return 0;if(r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var hm=im.CMD,fm=2*Math.PI;var gm=[-1,-1,-1],mm=[-1,-1];function vm(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c,d=Rd(t,r,o,s,u,gm);if(0===d)return 0;for(var p=0,h=-1,f=void 0,g=void 0,m=0;m<d;m++){var v=gm[m],y=0===v||1===v?.5:1;Od(e,n,i,a,v)<l||(h<0&&(h=Nd(t,r,o,s,mm),mm[1]<mm[0]&&h>1&&(c=void 0,c=mm[0],mm[0]=mm[1],mm[1]=c),f=Od(t,r,o,s,mm[0]),h>1&&(g=Od(t,r,o,s,mm[1]))),2===h?v<mm[0]?p+=f<t?y:-y:v<mm[1]?p+=g<f?y:-y:p+=s<g?y:-y:v<mm[0]?p+=f<t?y:-y:p+=s<f?y:-y)}return p}function ym(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(Id(o))Dd(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(Id(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=bd(u),p=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}(t,r,o,s,gm);if(0===l)return 0;var u=Fd(t,r,o);if(u>=0&&u<=1){for(var c=0,d=Pd(t,r,o,u),p=0;p<l;p++){var h=0===gm[p]||1===gm[p]?.5:1;Pd(e,n,i,gm[p])<a||(gm[p]<u?c+=d<t?h:-h:c+=o<d?h:-h)}return c}h=0===gm[0]||1===gm[0]?.5:1;return Pd(e,n,i,gm[0])<a?0:o<t?h:-h}function xm(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);gm[0]=-l,gm[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=fm-1e-4){r=0,i=fm;var c=o?1:-1;return a>=gm[0]+e&&a<=gm[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=fm,i+=fm);for(var p=0,h=0;h<2;h++){var f=gm[h];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=fm+g),(g>=r&&g<=i||g+fm>=r&&g+fm<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function _m(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,p=0,h=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===hm.M&&m>1&&(n||(d+=pm(p,h,f,g,r,i))),y&&(f=p=u[m],g=h=u[m+1]),v){case hm.M:p=f=u[m++],h=g=u[m++];break;case hm.L:if(n){if(om(p,h,u[m],u[m+1],t,r,i))return!0}else d+=pm(p,h,u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case hm.C:if(n){if(am(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=vm(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case hm.Q:if(n){if(sm(p,h,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=ym(p,h,u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case hm.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],S=u[m++],C=u[m++];m+=1;var T=!!(1-u[m++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):d+=pm(p,h,o,a,r,i);var M=(r-x)*w/b+x;if(n){if(dm(x,_,w,S,S+C,T,t,M,i))return!0}else d+=xm(x,_,w,S,S+C,T,M,i);p=Math.cos(S+C)*b+x,h=Math.sin(S+C)*w+_;break;case hm.R:if(f=p=u[m++],g=h=u[m++],o=f+u[m++],a=g+u[m++],n){if(om(f,g,o,g,t,r,i)||om(o,g,o,a,t,r,i)||om(o,a,f,a,t,r,i)||om(f,a,f,g,t,r,i))return!0}else d+=pm(o,g,o,a,r,i),d+=pm(f,a,f,g,r,i);break;case hm.Z:if(n){if(om(p,h,f,g,t,r,i))return!0}else d+=pm(p,h,f,g,r,i);p=f,h=g}}return n||(s=h,l=g,Math.abs(s-l)<1e-4)||(d+=pm(p,h,f,g,r,i)||0),0!==d}var bm=ou({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yg),wm={style:ou({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xg.style)},Sm=Mh.concat(["invisible","culling","z","z2","zlevel","parent"]),Cm=function(e){function t(t){return e.call(this,t)||this}var n;return L(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<Sm.length;++s)i[Sm[s]]=this[Sm[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=hu(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?iu(this.style,a):this.useStyle(a):"shape"===o?iu(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(yu(e)){var t=hp(e,0);return t>.5?mh:t>.2?"#eee":vh}if(e)return vh}return mh},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(yu(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===hp(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new im(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return _m(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return _m(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:iu(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return zu(bm,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=iu({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=iu({},r.shape),iu(s,n.shape)):(s=iu({},i?this.shape:r.shape),iu(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=iu({},this.shape);for(var u={},c=hu(s),d=0;d<c.length;d++){var p=c[d];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return wm},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return L(n,t),n.prototype.getDefaultStyle=function(){return nu(e.style)},n.prototype.getDefaultShape=function(){return nu(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Tg),Tm=Cm,Mm=ou({strokeFirst:!0,font:Pl,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},bm),Am=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return zu(Mm,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Oh(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Tg);Am.prototype.type="tspan";var Em=Am,Im=ou({x:0,y:0},yg),Dm={style:ou({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xg.style)};var Om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.createStyle=function(e){return zu(Im,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=function(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Dm},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Qc(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Tg);Om.prototype.type="image";var km=Om;var Rm=Math.round;function Nm(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(Rm(2*r)===Rm(2*i)&&(e.x1=e.x2=Bm(r,s,!0)),Rm(2*o)===Rm(2*a)&&(e.y1=e.y2=Bm(o,s,!0)),e):e}}function Lm(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Bm(r,s,!0),e.y=Bm(i,s,!0),e.width=Math.max(Bm(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(Bm(i+a,s,!1)-e.y,0===a?0:1),e):e}}function Bm(e,t,n){if(!t)return e;var r=Rm(2*e);return(r+Rm(t))%2==0?r/2:(r+(n?1:-1))/2}var Pm=function(){this.x=0,this.y=0,this.width=0,this.height=0},jm={},Fm=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new Pm},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Lm(jm,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=o=d:d instanceof Array?1===d.length?n=r=i=o=d[0]:2===d.length?(n=i=d[0],r=o=d[1]):3===d.length?(n=d[0],r=o=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],o=d[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Tm);Fm.prototype.type="rect";var Um=Fm,zm={fill:"#000"},Hm={style:ou({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},xg.style)},Vm=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=zm,n.attr(t),n}return L(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,Xm(e=this.style),uu(e.rich,Xm),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Qc(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||zm},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return iu(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=hu(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},iu(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Hm},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||Pl,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Nh(o),l=Eu(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,p=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?mg(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,h=Eu(t.height,p);if(p>h&&c){var f=Math.floor(h/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=sg(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=lg(n[m],g);var v=h,y=0;for(m=0;m<n.length;m++)y=Math.max(Ih(n[m],o),y);null==d&&(d=y);var x=y;return i&&(v+=i[0]+i[2],x+=i[1]+i[3],d+=i[1]+i[3]),u&&(x=d),{lines:n,height:h,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:p,width:d}}(ev(e),e),i=tv(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,v=Rh(h,r.contentHeight,g);if(i||n){var y=kh(p,s,f),x=Rh(h,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=Jm(p,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(Km("fill"in e?e.fill:(b=!0,d.fill))),S=($m("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),C=e.textShadowBlur>0,T=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,A=0;A<u.length;A++){var E=this._getOrCreateChild(Em),I=E.createStyle();E.useStyle(I),I.text=u[A],I.x=m,I.y=v,f&&(I.textAlign=f),I.textBaseline="middle",I.opacity=e.opacity,I.strokeFirst=!0,C&&(I.shadowBlur=e.textShadowBlur||0,I.shadowColor=e.textShadowColor||"transparent",I.shadowOffsetX=e.textShadowOffsetX||0,I.shadowOffsetY=e.textShadowOffsetY||0),I.stroke=S,I.fill=w,S&&(I.lineWidth=e.lineWidth||_,I.lineDash=e.lineDash,I.lineDashOffset=e.lineDashOffset||0),I.font=t,Qm(I,e),v+=c,T&&E.setBoundingRect(new Qc(kh(I.x,e.width,I.textAlign),Rh(I.y,M,I.textBaseline),l,M))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new pg;if(null!=e&&(e+=""),!e)return n;for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},l=og.lastIndex=0;null!=(r=og.exec(e));){var u=r.index;u>l&&hg(n,e.substring(l,u),t,s),hg(n,r[2],t,s,r[1]),l=og.lastIndex}l<e.length&&hg(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,_=0,b=0;b<y.tokens.length;b++){var w=(k=y.tokens[b]).styleName&&t.rich[k.styleName]||{},S=k.textPadding=w.padding,C=S?S[1]+S[3]:0,T=k.font=w.font||t.font;k.contentHeight=Nh(T);var M=Eu(w.height,k.contentHeight);if(k.innerHeight=M,S&&(M+=S[0]+S[2]),k.height=M,k.lineHeight=Iu(w.lineHeight,t.lineHeight,M),k.align=w&&w.align||t.align,k.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&d+k.lineHeight>o){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var A=w.width,E=null==A||"auto"===A;if("string"==typeof A&&"%"===A.charAt(A.length-1))k.percentWidth=A,c.push(k),k.contentWidth=Ih(k.text,T);else{if(E){var I=w.backgroundColor,D=I&&I.image;D&&ig(D=tg(D))&&(k.width=Math.max(k.width,D.width*M/D.height))}var O=f&&null!=i?i-_:null;null!=O&&O<k.width?!E||O<C?(k.text="",k.width=k.contentWidth=0):(k.text=ag(k.text,O-C,T,t.ellipsis,{minChar:t.truncateMinChar}),k.width=k.contentWidth=Ih(k.text,T)):k.contentWidth=Ih(k.text,T)}k.width+=C,_+=k.width,w&&(x=Math.max(x,k.lineHeight))}m(y,_,x)}for(n.outerWidth=n.width=Eu(i,p),n.outerHeight=n.height=Eu(o,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),v=0;v<c.length;v++){var k,R=(k=c[v]).percentWidth;k.width=parseInt(R,10)/100*n.width}return n}(ev(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=kh(a,r,u),p=Rh(s,i,c),h=d,f=p;o&&(h+=o[3],f+=o[0]);var g=h+n;tv(e)&&this._renderBackground(e,e,d,p,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,S=0,C=h,T=g,M=_-1,A=void 0;S<_&&(!(A=x[S]).align||"left"===A.align);)this._placeToken(A,e,b,f,C,"left",m),w-=A.width,C+=A.width,S++;for(;M>=0&&"right"===(A=x[M]).align;)this._placeToken(A,e,b,f,T,"right",m),w-=A.width,T-=A.width,M--;for(C+=(n-(C-h)-(g-T)-w)/2;S<=M;)A=x[S],this._placeToken(A,e,b,f,C+A.width/2,"center",m),C+=A.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&tv(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=Jm(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(Em),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,v=Km("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=$m("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=u,x&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||Pl,h.opacity=Iu(s.opacity,t.opacity,1),Qm(h,s),y&&(h.lineWidth=Iu(s.lineWidth,t.lineWidth,m),h.lineDash=Eu(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=y),v&&(h.fill=v);var _=e.contentWidth,b=e.contentHeight;p.setBoundingRect(new Qc(kh(h.x,_,h.textAlign),Rh(h.y,b,h.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild(Um)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=i,m.height=o,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=Eu(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(km)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Eu(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Iu(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Zm(e)&&(t=[e.fontStyle,e.fontWeight,qm(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Ru(t)||e.textFont||e.font},t}(Tg),Wm={left:!0,right:1,center:1},Ym={top:1,bottom:1,middle:1},Gm=["fontStyle","fontWeight","fontSize","fontFamily"];function qm(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function Qm(e,t){for(var n=0;n<Gm.length;n++){var r=Gm[n],i=t[r];null!=i&&(e[r]=i)}}function Zm(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function Xm(e){if(e){e.font=Vm.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||Wm[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Ym[n]?n:"top",e.padding&&(e.padding=Ou(e.padding))}}function $m(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Km(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Jm(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function ev(e){var t=e.text;return null!=t&&(t+=""),t}function tv(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var nv=Vm,rv=Nf(),iv=1,ov={},av=Nf(),sv=Nf(),lv=["emphasis","blur","select"],uv=["normal","emphasis","blur","select"],cv="highlight",dv="downplay",pv="select",hv="unselect",fv="toggleSelect";function gv(e){return null!=e&&"none"!==e}var mv=new Qd(100);function vv(e){if(yu(e)){var t=mv.get(e);return t||(t=up(e,-.1),mv.put(e,t)),t}if(Tu(e)){var n=iu({},e);return n.colorStops=cu(e.colorStops,(function(e){return{offset:e.offset,color:up(e.color,-.1)}})),n}return e}function yv(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function xv(e){yv(e,"emphasis",2)}function _v(e){2===e.hoverState&&yv(e,"normal",0)}function bv(e){yv(e,"blur",1)}function wv(e){1===e.hoverState&&yv(e,"normal",0)}function Sv(e){e.selected=!0}function Cv(e){e.selected=!1}function Tv(e,t,n){t(e,n)}function Mv(e,t,n){Tv(e,t,n),e.isGroup&&e.traverse((function(e){Tv(e,t,n)}))}function Av(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function Ev(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&au(n,"select")>=0,o=!1;if(e instanceof Tm){var a=av(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(gv(s)||gv(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=iu({},r),(u=iu({},u)).fill=s):!gv(u.fill)&&gv(s)?(o=!0,r=iu({},r),(u=iu({},u)).fill=vv(s)):!gv(u.stroke)&&gv(l)&&(o||(r=iu({},r),u=iu({},u)),u.stroke=vv(l)),r.style=u}}if(r&&null==r.z2){o||(r=iu({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=au(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=iu({},n),a=iu({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=iu({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function Iv(e){e.stateProxy=Ev;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Ev),n&&(n.stateProxy=Ev)}function Dv(e,t){!Pv(e,t)&&!e.__highByOuter&&Mv(e,xv)}function Ov(e,t){!Pv(e,t)&&!e.__highByOuter&&Mv(e,_v)}function kv(e,t){e.__highByOuter|=1<<(t||0),Mv(e,xv)}function Rv(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mv(e,_v)}function Nv(e){Mv(e,wv)}function Lv(e){Mv(e,Sv)}function Bv(e){Mv(e,Cv)}function Pv(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function jv(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=sv(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){wv(e)})),a&&n.push(i)),o.isBlured=!1})),uu(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Fv(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Nv(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries((function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&i&&"self"===t||bv(e)})),lu(t))o(e.getData(),t);else if(bu(t))for(var c=hu(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),sv(e).isBlured=!0}})),i.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}}))}}function Uv(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){sv(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){bv(e)}))}}}function zv(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var o=r.getModel().getComponent(e,t);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===rv(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Hv(e){uu(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Lv(t):Bv(t)}))}))}function Vv(e){var t=[];return e.eachSeries((function(e){uu(e.getAllData(),(function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function Wv(e,t,n){Zv(e,!0),Mv(e,Iv),function(e,t,n){var r=rv(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function Yv(e,t,n,r){r?function(e){Zv(e,!1)}(e):Wv(e,t,n)}var Gv=["emphasis","blur","select"],qv={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Qv(e,t,n,r){n=n||"itemStyle";for(var i=0;i<Gv.length;i++){var o=Gv[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[qv[n]]()}}function Zv(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function Xv(e){return!(!e||!e.__highDownDispatcher)}function $v(e){var t=e.type;return t===pv||t===hv||t===fv}function Kv(e){var t=e.type;return t===cv||t===dv}var Jv=im.CMD,ey=[[],[],[]],ty=Math.sqrt,ny=Math.atan2;var ry=Math.sqrt,iy=Math.sin,oy=Math.cos,ay=Math.PI;function sy(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ly(e,t){return(e[0]*t[0]+e[1]*t[1])/(sy(e)*sy(t))}function uy(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(ly(e,t))}function cy(e,t,n,r,i,o,a,s,l,u,c){var d=l*(ay/180),p=oy(d)*(e-n)/2+iy(d)*(t-r)/2,h=-1*iy(d)*(e-n)/2+oy(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=ry(f),s*=ry(f));var g=(i===o?-1:1)*ry((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,v=g*-s*p/a,y=(e+n)/2+oy(d)*m-iy(d)*v,x=(t+r)/2+iy(d)*m+oy(d)*v,_=uy([1,0],[(p-m)/a,(h-v)/s]),b=[(p-m)/a,(h-v)/s],w=[(-1*p-m)/a,(-1*h-v)/s],S=uy(b,w);if(ly(b,w)<=-1&&(S=ay),ly(b,w)>=1&&(S=0),S<0){var C=Math.round(S/ay*1e6)/1e6;S=2*ay+C%2*ay}c.addData(u,y,x,a,s,_,S,d,o)}var dy=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,py=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var hy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.applyTransform=function(e){},t}(Tm);function fy(e){return null!=e.setData}function gy(e,t){var n=function(e){var t=new im;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=im.CMD,l=e.match(dy);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(py)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=r,T=i,M=void 0,A=void 0;switch(d){case"l":r+=h[m++],i+=h[m++],p=s.L,t.addData(p,r,i);break;case"L":r=h[m++],i=h[m++],p=s.L,t.addData(p,r,i);break;case"m":r+=h[m++],i+=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="l";break;case"M":r=h[m++],i=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,i);break;case"H":r=h[m++],p=s.L,t.addData(p,r,i);break;case"v":i+=h[m++],p=s.L,t.addData(p,r,i);break;case"V":i=h[m++],p=s.L,t.addData(p,r,i);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],i=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i),r+=h[m-2],i+=h[m-1];break;case"S":v=r,y=i,M=t.len(),A=t.data,n===s.C&&(v+=r-A[M-4],y+=i-A[M-3]),p=s.C,C=h[m++],T=h[m++],r=h[m++],i=h[m++],t.addData(p,v,y,C,T,r,i);break;case"s":v=r,y=i,M=t.len(),A=t.data,n===s.C&&(v+=r-A[M-4],y+=i-A[M-3]),p=s.C,C=r+h[m++],T=i+h[m++],r+=h[m++],i+=h[m++],t.addData(p,v,y,C,T,r,i);break;case"Q":C=h[m++],T=h[m++],r=h[m++],i=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"q":C=h[m++]+r,T=h[m++]+i,r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"T":v=r,y=i,M=t.len(),A=t.data,n===s.Q&&(v+=r-A[M-4],y+=i-A[M-3]),r=h[m++],i=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"t":v=r,y=i,M=t.len(),A=t.data,n===s.Q&&(v+=r-A[M-4],y+=i-A[M-3]),r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"A":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],cy(C=r,T=i,r=h[m++],i=h[m++],w,S,x,_,b,p=s.A,t);break;case"a":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],cy(C=r,T=i,r+=h[m++],i+=h[m++],w,S,x,_,b,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=o,i=a),n=p}return t.toStatic(),t}(e),r=iu({},t);return r.buildPath=function(e){if(fy(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=Jv.M,d=Jv.C,p=Jv.L,h=Jv.R,f=Jv.A,g=Jv.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=ty(t[0]*t[0]+t[1]*t[1]),x=ty(t[2]*t[2]+t[3]*t[3]),_=ny(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=_,l[i++]+=_,o=i+=2;break;case h:s[0]=l[i++],s[1]=l[i++],tc(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],tc(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var b=ey[a];b[0]=l[i++],b[1]=l[i++],tc(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var my=function(){this.cx=0,this.cy=0,this.r=0},vy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new my},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Tm);vy.prototype.type="circle";var yy=vy,xy=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},_y=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new xy},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(r-o,i),e.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),e.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),e.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),e.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),e.closePath()},t}(Tm);_y.prototype.type="ellipse";var by=_y,wy=Math.PI,Sy=2*wy,Cy=Math.sin,Ty=Math.cos,My=Math.acos,Ay=Math.atan2,Ey=Math.abs,Iy=Math.sqrt,Dy=Math.max,Oy=Math.min,ky=1e-4;function Ry(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Iy(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,v=(h+g)/2,y=f-p,x=g-h,_=y*y+x*x,b=i-o,w=p*g-f*h,S=(x<0?-1:1)*Iy(Dy(0,b*b*_-w*w)),C=(w*x-y*S)/_,T=(-w*y-x*S)/_,M=(w*x+y*S)/_,A=(-w*y+x*S)/_,E=C-m,I=T-v,D=M-m,O=A-v;return E*E+I*I>D*D+O*O&&(C=M,T=A),{cx:C,cy:T,x0:-c,y0:-d,x1:C*(i/b-1),y1:T*(i/b-1)}}function Ny(e,t){var n,r=Dy(t.r,0),i=Dy(t.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,p=Ey(l-s),h=p>Sy&&p%Sy;if(h>ky&&(p=h),r>ky)if(p>Sy-ky)e.moveTo(u+r*Ty(s),c+r*Cy(s)),e.arc(u,c,r,s,l,!d),i>ky&&(e.moveTo(u+i*Ty(l),c+i*Cy(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=void 0,T=void 0,M=void 0,A=void 0,E=void 0,I=void 0,D=r*Ty(s),O=r*Cy(s),k=i*Ty(l),R=i*Cy(l),N=p>ky;if(N){var L=t.cornerRadius;L&&(n=function(e){var t;if(mu(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(L),f=n[0],g=n[1],m=n[2],v=n[3]);var B=Ey(r-i)/2;if(y=Oy(B,m),x=Oy(B,v),_=Oy(B,f),b=Oy(B,g),C=w=Dy(y,x),T=S=Dy(_,b),(w>ky||S>ky)&&(M=r*Ty(l),A=r*Cy(l),E=i*Ty(s),I=i*Cy(s),p<wy)){var P=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,p=d*l-c*u;if(!(p*p<ky))return[e+(p=(c*(t-o)-d*(e-i))/p)*l,t+p*u]}(D,O,E,I,M,A,k,R);if(P){var j=D-P[0],F=O-P[1],U=M-P[0],z=A-P[1],H=1/Cy(My((j*U+F*z)/(Iy(j*j+F*F)*Iy(U*U+z*z)))/2),V=Iy(P[0]*P[0]+P[1]*P[1]);C=Oy(w,(r-V)/(H+1)),T=Oy(S,(i-V)/(H-1))}}}if(N)if(C>ky){var W=Oy(m,C),Y=Oy(v,C),G=Ry(E,I,D,O,r,W,d),q=Ry(M,A,k,R,r,Y,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),C<w&&W===Y?e.arc(u+G.cx,c+G.cy,C,Ay(G.y0,G.x0),Ay(q.y0,q.x0),!d):(W>0&&e.arc(u+G.cx,c+G.cy,W,Ay(G.y0,G.x0),Ay(G.y1,G.x1),!d),e.arc(u,c,r,Ay(G.cy+G.y1,G.cx+G.x1),Ay(q.cy+q.y1,q.cx+q.x1),!d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,Ay(q.y1,q.x1),Ay(q.y0,q.x0),!d))}else e.moveTo(u+D,c+O),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+O);if(i>ky&&N)if(T>ky){W=Oy(f,T),G=Ry(k,R,M,A,i,-(Y=Oy(g,T)),d),q=Ry(D,O,E,I,i,-W,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),T<S&&W===Y?e.arc(u+G.cx,c+G.cy,T,Ay(G.y0,G.x0),Ay(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,Ay(G.y0,G.x0),Ay(G.y1,G.x1),!d),e.arc(u,c,i,Ay(G.cy+G.y1,G.cx+G.x1),Ay(q.cy+q.y1,q.cx+q.x1),d),W>0&&e.arc(u+q.cx,c+q.cy,W,Ay(q.y1,q.x1),Ay(q.y0,q.x0),!d))}else e.lineTo(u+k,c+R),e.arc(u,c,i,l,s,d);else e.lineTo(u+k,c+R)}else e.moveTo(u,c);e.closePath()}}}var Ly=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},By=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new Ly},t.prototype.buildPath=function(e,t){Ny(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Tm);By.prototype.type="sector";var Py=By,jy=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Fy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new jy},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Tm);Fy.prototype.type="ring";var Uy=Fy;function zy(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)nc(a,a,e[p]),rc(s,s,e[p]);nc(a,a,r[0]),rc(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)i=e[p?p-1:h-1],o=e[(p+1)%h];else{if(0===p||p===h-1){l.push(qu(e[p]));continue}i=e[p-1],o=e[p+1]}Zu(u,o,i),Xu(u,u,t);var g=Ku(f,i),m=Ku(f,o),v=g+m;0!==v&&(g/=v,m/=v),Xu(c,u,-g),Xu(d,u,m);var y=Qu([],f,c),x=Qu([],f,d);r&&(rc(y,y,a),nc(y,y,s),rc(x,x,a),nc(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Hy=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Vy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultShape=function(){return new Hy},t.prototype.buildPath=function(e,t){zy(e,t,!0)},t}(Tm);Vy.prototype.type="polygon";var Wy=Vy,Yy=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Gy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Yy},t.prototype.buildPath=function(e,t){zy(e,t,!1)},t}(Tm);Gy.prototype.type="polyline";var qy=Gy,Qy={},Zy=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Xy=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Zy},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Nm(Qy,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Tm);Xy.prototype.type="line";var $y=Xy,Ky=[],Jy=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function ex(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?kd:Od)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?kd:Od)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?jd:Pd)(e.x1,e.cpx1,e.x2,t),(n?jd:Pd)(e.y1,e.cpy1,e.y2,t)]}var tx=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Jy},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(Ud(n,a,i,c,Ky),a=Ky[1],i=Ky[2],Ud(r,s,o,c,Ky),s=Ky[1],o=Ky[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Ld(n,a,l,i,c,Ky),a=Ky[1],l=Ky[2],i=Ky[3],Ld(r,s,u,o,c,Ky),s=Ky[1],u=Ky[2],o=Ky[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return ex(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=ex(this.shape,e,!0);return $u(t,t)},t}(Tm);tx.prototype.type="bezier-curve";var nx=tx,rx=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},ix=function(e){function t(t){return e.call(this,t)||this}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new rx},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(Tm);ix.prototype.type="arc";var ox=ix,ax=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return L(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Tm.prototype.getBoundingRect.call(this)},t}(Tm),sx=ax,lx=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),ux=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return L(t,e),t}(lx),cx=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return L(t,e),t}(lx),dx=[0,0],px=[0,0],hx=new jc,fx=new jc,gx=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new jc;for(n=0;n<2;n++)this._axes[n]=new jc;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);jc.sub(r[0],n[1],n[0]),jc.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return hx.set(1/0,1/0),fx.set(0,0),!this._intersectCheckOneSide(this,e,hx,fx,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,hx,fx,r,-1)&&(n=!1,r)||r||jc.copy(t,n?hx:fx),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,dx),this._getProjMinMaxOnAxis(s,t._corners,px),dx[1]<px[0]||dx[0]>px[1]){if(a=!1,i)return a;var u=Math.abs(px[0]-dx[1]),c=Math.abs(dx[0]-px[1]);Math.min(u,c)>r.len()&&(u<c?jc.scale(r,l,-u*o):jc.scale(r,l,c*o))}else if(n){u=Math.abs(px[0]-dx[1]),c=Math.abs(dx[0]-px[1]);Math.min(u,c)<n.len()&&(u<c?jc.scale(n,l,u*o):jc.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),mx=gx,vx=[],yx=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return L(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Qc(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(vx)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Tg),xx=Nf();function _x(e,t,n,r,i,o,a){var s,l=!1;vu(i)?(a=o,o=i,i=null):bu(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=Eu(r.duration,200),u=Eu(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),vu(c)&&(c=c(n,i)),vu(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function bx(e,t,n,r,i,o){_x("update",e,t,n,r,i,o)}function Sx(e,t,n,r,i,o){_x("enter",e,t,n,r,i,o)}function Cx(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function Tx(e,t,n,r,i,o){Cx(e)||_x("leave",e,t,n,r,i,o)}function Mx(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Tx(e,{style:{opacity:0}},t,n,r)}function Ax(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||Mx(e,t,n,r)})):Mx(e,t,n,r)}function Ex(e){xx(e).oldStyle=e.style}var Ix=Math.max,Dx=Math.min,Ox={};var kx=function(e,t){var n=gy(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return L(t,e),t}(hy)};function Rx(e,t){Ox[e]=t}function Nx(e,t,n,r){var i=function(e,t){return new hy(gy(e,t))}(e,t);return n&&("center"===r&&(n=Bx(n,i.getBoundingRect())),jx(i,n)),i}function Lx(e,t,n){var r=new km({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(Bx(t,i))}}});return r}function Bx(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var Px=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new Tm(t);return a.createPathProxy(),a.buildPath=function(e){if(fy(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function jx(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function Fx(e,t){return Nm(e,e,{lineWidth:t}),e}var Ux=Bm;function zx(e,t){for(var n=kc([]);e&&e!==t;)Rc(n,e.getLocalTransform(),n),e=e.parent;return n}function Hx(e,t,n){return t&&!lu(t)&&(t=Th.getLocalTransform(t)),n&&(t=Bc([],t)),tc([],e,t)}function Vx(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return o=Hx(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Wx(e){return!e.isGroup}function Yx(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){Wx(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(Wx(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),bx(e,r,n,rv(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=iu({},e.shape)),t}}function Gx(e,t){return cu(e,(function(e){var n=e[0];n=Ix(n,t.x),n=Dx(n,t.x+t.width);var r=e[1];return r=Ix(r,t.y),[n,r=Dx(r,t.y+t.height)]}))}function qx(e,t,n){var r=iu({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),ou(i,n),new km(r)):Nx(e.replace("path://",""),r,n,"center")}function Qx(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(Zx(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function Zx(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,p=s-o,h=Xx(d,p,u,c);if((l=h)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=Xx(f,g,u,c)/h;if(m<0||m>1)return!1;var v=Xx(f,g,d,p)/h;return!(v<0||v>1)}function Xx(e,t,n,r){return e*r-n*t}function $x(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=yu(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&uu(hu(l),(function(e){Vu(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=rv(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:ou({content:r,formatterParams:s},i)}}function Kx(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Jx(e,t){if(e)if(mu(e))for(var n=0;n<e.length;n++)Kx(e[n],t);else Kx(e,t)}Rx("circle",yy),Rx("ellipse",by),Rx("sector",Py),Rx("ring",Uy),Rx("polygon",Wy),Rx("polyline",qy),Rx("rect",Um),Rx("line",$y),Rx("bezierCurve",nx),Rx("arc",ox);var e_=Object.freeze({__proto__:null,updateProps:bx,initProps:Sx,removeElement:Tx,removeElementWithFadeOut:Ax,isElementRemoved:Cx,extendShape:function(e){return Tm.extend(e)},extendPath:function(e,t){return kx(e,t)},registerShape:Rx,getShapeClass:function(e){if(Ox.hasOwnProperty(e))return Ox[e]},makePath:Nx,makeImage:Lx,mergePath:Px,resizePath:jx,subPixelOptimizeLine:Fx,subPixelOptimizeRect:function(e){return Lm(e.shape,e.shape,e.style),e},subPixelOptimize:Ux,getTransform:zx,applyTransform:Hx,transformDirection:Vx,groupTransition:Yx,clipPointsByRect:Gx,clipRectByRect:function(e,t){var n=Ix(e.x,t.x),r=Dx(e.x+e.width,t.x+t.width),i=Ix(e.y,t.y),o=Dx(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:qx,linePolygonIntersect:Qx,lineLineIntersect:Zx,setTooltipConfig:$x,traverseElements:Jx,Group:Zh,Image:km,Text:nv,Circle:yy,Ellipse:by,Sector:Py,Ring:Uy,Polygon:Wy,Polyline:qy,Rect:Um,Line:$y,BezierCurve:nx,Arc:ox,IncrementalDisplayable:yx,CompoundPath:sx,LinearGradient:ux,RadialGradient:cx,BoundingRect:Qc,OrientedBoundingRect:mx,Point:jc,Path:Tm}),t_={};function n_(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=vu(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<lv.length;u++){var c=lv[u],d=t[c];l[c]=Eu(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function r_(e,t,n,r){n=n||t_;for(var i=e instanceof nv,o=!1,a=0;a<uv.length;a++){if((p=t[uv[a]])&&p.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new nv,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=n_(n,t),u=t.normal,c=!!u.getShallow("show"),d=o_(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(a_(u,n,!1));for(a=0;a<lv.length;a++){var p,h=lv[a];if(p=t[h]){var f=s.ensureState(h),g=!!Eu(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=o_(p,r&&r[h],n,!0,!i),f.style.text=l[h],!i)e.ensureState(h).textConfig=a_(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(d_(s).setLabelText=function(e){var r=n_(n,t,e);!function(e,t){for(var n=0;n<lv.length;n++){var r=lv[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function i_(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<lv.length;r++){var i=lv[r];n[i]=e.getModel([i,t])}return n}function o_(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||t_;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||t_).rich;if(n){t=t||{};for(var r=hu(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);c_(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p);c_(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&iu(o,t),o}function a_(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=Eu(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var s_=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],l_=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],u_=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function c_(e,t,n,r,i,o,a,s){n=!i&&n||t_;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Eu(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=Eu(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=Eu(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=Eu(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<s_.length;g++){var m=s_[g];null!=(y=Eu(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<l_.length;g++){m=l_[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<u_.length;g++){var y;m=u_[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var d_=Nf();var p_,h_,f_=["textStyle","color"],g_=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],m_=new nv,v_=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(f_):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Ru([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<g_.length;n++)t[g_[n]]=this.getShallow(g_[n]);return m_.useStyle(t),m_.update(),m_.getBoundingRect()},e}(),y_=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],x_=$f(y_),__=function(){function e(){}return e.prototype.getLineStyle=function(e){return x_(this,e)},e}(),b_=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],w_=$f(b_),S_=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return w_(this,e,t)},e}(),C_=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){ru(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(nu(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Ll.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Yf(C_),p_=C_,h_=["__\0is_clz",qf++].join("_"),p_.prototype[h_]=!0,p_.isInstance=function(e){return!(!e||!e[h_])},su(C_,__),su(C_,S_),su(C_,Jf),su(C_,v_);var T_=C_,M_=Math.round(10*Math.random());function A_(e){return[e||"",M_++].join("_")}function E_(e,t){return ru(ru({},e,!0),t,!0)}var I_="ZH",D_="EN",O_=D_,k_={},R_={},N_=Ll.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(I_)>-1?I_:O_;function L_(e,t){e=e.toUpperCase(),R_[e]=new T_(t),k_[e]=t}L_(D_,{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"}},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:". "}}}}),L_(I_,{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:"旭日图"}},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 B_=1e3,P_=6e4,j_=36e5,F_=864e5,U_=31536e6,z_={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},H_="{yyyy}-{MM}-{dd}",V_={year:"{yyyy}",month:"{yyyy}-{MM}",day:H_,hour:H_+" "+z_.hour,minute:H_+" "+z_.minute,second:H_+" "+z_.second,millisecond:z_.none},W_=["year","month","day","hour","minute","second","millisecond"],Y_=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function G_(e,t){return"0000".substr(0,t-(e+="").length)+e}function q_(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Q_(e){return e===q_(e)}function Z_(e,t,n,r){var i=pf(e),o=i[K_(n)](),a=i[J_(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[eb(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[tb(n)](),d=(c-1)%12+1,p=i[nb(n)](),h=i[rb(n)](),f=i[ib(n)](),g=r instanceof T_?r:function(e){return R_[e]}(r||N_)||R_[O_],m=g.getModel("time"),v=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,G_(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,G_(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,G_(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,G_(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,G_(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,G_(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,G_(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,G_(f,3)).replace(/{S}/g,f+"")}function X_(e,t){var n=pf(e),r=n[J_(t)]()+1,i=n[eb(t)](),o=n[tb(t)](),a=n[nb(t)](),s=n[rb(t)](),l=0===n[ib(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,p=d&&1===i;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function $_(e,t,n){var r=_u(e)?pf(e):e;switch(t=t||X_(e,n)){case"year":return r[K_(n)]();case"half-year":return r[J_(n)]()>=6?1:0;case"quarter":return Math.floor((r[J_(n)]()+1)/4);case"month":return r[J_(n)]();case"day":return r[eb(n)]();case"half-day":return r[tb(n)]()/24;case"hour":return r[tb(n)]();case"minute":return r[nb(n)]();case"second":return r[rb(n)]();case"millisecond":return r[ib(n)]()}}function K_(e){return e?"getUTCFullYear":"getFullYear"}function J_(e){return e?"getUTCMonth":"getMonth"}function eb(e){return e?"getUTCDate":"getDate"}function tb(e){return e?"getUTCHours":"getHours"}function nb(e){return e?"getUTCMinutes":"getMinutes"}function rb(e){return e?"getUTCSeconds":"getSeconds"}function ib(e){return e?"getUTCMilliseconds":"getMilliseconds"}function ob(e){return e?"setUTCFullYear":"setFullYear"}function ab(e){return e?"setUTCMonth":"setMonth"}function sb(e){return e?"setUTCDate":"setDate"}function lb(e){return e?"setUTCHours":"setHours"}function ub(e){return e?"setUTCMinutes":"setMinutes"}function cb(e){return e?"setUTCSeconds":"setSeconds"}function db(e){return e?"setUTCMilliseconds":"setMilliseconds"}function pb(e){if(isNaN(gf(e)))return yu(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function hb(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var fb=Ou;function gb(e,t,n){function r(e){return e&&Ru(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?pf(e):e;if(!isNaN(+s))return Z_(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return xu(e)?r(e):_u(e)&&i(e)?e+"":"-";var l=gf(e);return i(l)?pb(l):xu(e)?r(e):"boolean"==typeof e?e+"":"-"}var mb=["a","b","c","d","e","f","g"],vb=function(e,t){return"{"+e+(null==t?"":t)+"}"};function yb(e,t,n){mu(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=mb[o];e=e.replace(vb(a),vb(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(vb(mb[l],s),n?yc(u):u)}return e}function xb(e,t){return t=t||"transparent",yu(e)?e:bu(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function _b(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var bb=uu,wb=["left","right","top","bottom","width","height"],Sb=[["width","left","right"],["height","top","bottom"]];function Cb(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var Tb=Cb;function Mb(e,t,n){n=fb(n||0);var r=t.width,i=t.height,o=nf(e.left,r),a=nf(e.top,i),s=nf(e.right,r),l=nf(e.bottom,i),u=nf(e.width,r),c=nf(e.height,i),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-o),isNaN(c)&&(c=i-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=r-s-u-p),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-p-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new Qc(o+n[3],a+n[0],u,c);return f.margin=n,f}function Ab(e){var t=e.layoutMode||e.constructor.layoutMode;return bu(t)?t:t?{type:t}:null}function Eb(e,t,n){var r=n&&n.ignoreSize;!mu(r)&&(r=[r,r]);var i=a(Sb[0],0),o=a(Sb[1],1);function a(n,i){var o={},a=0,u={},c=0;if(bb(n,(function(t){u[t]=e[t]})),bb(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var p=n[d];if(!s(o,p)&&s(e,p)){o[p]=e[p];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){bb(e,(function(e){t[e]=n[e]}))}u(Sb[0],e,i),u(Sb[1],e,o)}function Ib(e){return function(e,t){return t&&e&&bb(wb,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}gu(Cb,"vertical"),gu(Cb,"horizontal");var Db=Nf(),Ob=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=A_("ec_cpt_model"),i}return L(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ab(this),r=n?Ib(e):{};ru(e,t.getTheme().get(this.mainType)),ru(e,this.getDefaultOption()),n&&Eb(e,r,n)},t.prototype.mergeOption=function(e,t){ru(this.option,e,!0);var n=Ab(this);n&&Eb(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Vf])}(e))return e.defaultOption;var t=Db(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=ru(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Uf(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(T_);Gf(Ob,T_),Xf(Ob),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Wf(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=Wf(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(Ob),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return uu(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return uu(e,(function(e){au(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),uu(s,(function(e){au(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);au(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(uu(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),uu(d.successor,p?f:h)}uu(u,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}(Ob,(function(e){var t=[];uu(Ob.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=cu(t,(function(e){return Wf(e).main})),"dataset"!==e&&au(t,"dataset")<=0&&t.unshift("dataset");return t}));var kb=Ob,Rb="";"undefined"!=typeof navigator&&(Rb=navigator.platform||"");var Nb="rgba(0, 0, 0, 0.2)",Lb={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Nb,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Nb,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Nb,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Nb,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Nb,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Nb,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Rb.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},Bb=Uu(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Pb="original",jb="arrayRows",Fb="objectRows",Ub="keyedColumns",zb="typedArray",Hb="unknown",Vb="column",Wb="row",Yb=1,Gb=2,qb=3,Qb=Nf();function Zb(e,t,n){var r={},i=Xb(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=Qb(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;uu(e=e.slice(),(function(t,n){var i=bu(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return uu(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=p.valueWayDim;h(r[n],a,i),h(l,a,i),p.valueWayDim+=i}else if(o===t)h(r[n],0,i),h(s,0,i);else{a=p.categoryWayDim;h(r[n],a,i),h(l,a,i),p.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function Xb(e){if(!e.get("data",!0))return Uf(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},jf).models[0]}function $b(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Su(e))return qb;if(r){var c=r[o];bu(c)?(s=c.name,l=c.type):yu(c)&&(s=c)}if(null!=l)return"ordinal"===l?Yb:qb;if(t===jb){var d=e;if(n===Wb){for(var p=d[o],h=0;h<(p||[]).length&&h<u;h++)if(null!=(a=x(p[i+h])))return a}else for(h=0;h<d.length&&h<u;h++){var f=d[i+h];if(f&&null!=(a=x(f[o])))return a}}else if(t===Fb){var g=e;if(!s)return qb;for(h=0;h<g.length&&h<u;h++){if((v=g[h])&&null!=(a=x(v[s])))return a}}else if(t===Ub){if(!s)return qb;if(!(p=e[s])||Su(p))return qb;for(h=0;h<p.length&&h<u;h++)if(null!=(a=x(p[h])))return a}else if(t===Pb){var m=e;for(h=0;h<m.length&&h<u;h++){var v,y=Tf(v=m[h]);if(!mu(y))return qb;if(null!=(a=x(y[o])))return a}}function x(e){var t=yu(e);return null!=e&&isFinite(e)&&""!==e?t?Gb:qb:t&&"-"!==e?Yb:void 0}return qb}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var Kb=Uu();var Jb=Nf();Nf();var ew,tw,nw,rw=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=wf(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,Jb,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,Jb)},e}();var iw="\0_ec_inner",ow=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new T_(r),this._locale=new T_(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=lw(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,lw(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):nw(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&uu(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Uu(),s=t&&t.replaceMergeMainTypeMap;Qb(this).datasetMap=Uu(),uu(e,(function(e,t){null!=e&&(kb.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?nu(e):ru(n[t],e,!0))})),s&&s.each((function(e,t){kb.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),kb.topologicalTravel(o,kb.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=Kb.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,wf(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=Af(a,o,l);(function(e,t,n){uu(e,(function(e){var r=e.newOption;bu(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,kb),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],p=[],h=0;uu(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=kb.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=iu({componentIndex:n},e.keyInfo);iu(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))}),this),n[t]=d,r.set(t,p),i.set(t,h),"series"===t&&ew(this)}),this),this._seriesIndices||ew(this)},t.prototype.getOption=function(){var e=nu(this.option);return uu(e,(function(t,n){if(kb.hasClass(n)){for(var r=wf(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!kf(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[iw],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],uu(wf(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?aw("id",i,a):null!=o?aw("name",o,a):pu(a,(function(e){return!!e})),sw(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]}),u=l?this.queryComponents(l):pu(this._componentsMap.get(s),(function(e){return!!e}));return o=sw(u,e),e.filter?pu(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(vu(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=yu(e)?r.get(e):bu(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=Df(e,null);return pu(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return pu(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return pu(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){tw(this),uu(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){uu(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){tw(this),uu(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return uu(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return tw(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){tw(this);var n=[];uu(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Uu(n)},t.prototype.restoreData=function(e){ew(this);var t=this._componentsMap,n=[];t.each((function(e,t){kb.hasClass(t)&&n.push(t)})),kb.topologicalTravel(n,kb.getAllClassMainTypes(),(function(n){uu(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()}))}))},t.internalField=(ew=function(e){var t=e._seriesIndices=[];uu(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Uu(t)},tw=function(e){},void(nw=function(e,t){e.option={},e.option[iw]=1,e._componentsMap=Uu({series:[]}),e._componentsCount=Uu();var n=t.aria;bu(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;uu(t,(function(t,r){"colorLayer"===r&&n||kb.hasClass(r)||("object"==typeof t?e[r]=e[r]?ru(e[r],t,!1):nu(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),ru(t,Lb,!1),e._mergeOption(t,null)})),t}(T_);function aw(e,t,n){if(mu(t)){var r=Uu();return uu(t,(function(e){null!=e&&(null!=Df(e,null)&&r.set(e,!0))})),pu(n,(function(t){return t&&r.get(t[e])}))}var i=Df(t,null);return pu(n,(function(t){return t&&null!=i&&t[e]===i}))}function sw(e,t){return t.hasOwnProperty("subType")?pu(e,(function(e){return e&&e.subType===t.subType})):e}function lw(e){var t=Uu();return e&&uu(wf(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}su(ow,rw);var uw=ow,cw=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],dw=function(e){uu(cw,(function(t){this[t]=fu(e[t],e)}),this)},pw={},hw=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];uu(pw,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){uu(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){pw[e]=t},e.get=function(e){return pw[e]},e}(),fw=/^(min|max)?(.+)$/,gw=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(uu(wf(e.series),(function(e){e&&e.data&&Su(e.data)&&Lu(e.data)})),uu(wf(e.dataset),(function(e){e&&e.source&&Su(e.source)&&Lu(e.source)}))),e=nu(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&mu(u)&&uu(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function p(e){uu(t,(function(t){t(e,n)}))}return p(i),uu(l,(function(e){return p(e)})),uu(o,(function(e){return p(e.option)})),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],nu(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=nu(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)mw(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=cu(s,(function(e){return nu(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function mw(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return uu(e,(function(e,t){var n=t.match(fw);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var vw=gw,yw=uu,xw=bu,_w=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function bw(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=_w.length;n<r;n++){var i=_w[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?ru(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?ru(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function ww(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,ou(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function Sw(e){ww(e,"itemStyle"),ww(e,"lineStyle"),ww(e,"areaStyle"),ww(e,"label"),ww(e,"labelLine"),ww(e,"upperLabel"),ww(e,"edgeLabel")}function Cw(e,t){var n=xw(e)&&e[t],r=xw(n)&&n.textStyle;if(r)for(var i=0,o=Cf.length;i<o;i++){var a=Cf[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function Tw(e){e&&(Sw(e),Cw(e,"label"),e.emphasis&&Cw(e.emphasis,"label"))}function Mw(e){return mu(e)?e:e?[e]:[]}function Aw(e){return(mu(e)?e[0]:e)||{}}function Ew(e,t){yw(Mw(e.series),(function(e){xw(e)&&function(e){if(xw(e)){bw(e),Sw(e),Cw(e,"label"),Cw(e,"upperLabel"),Cw(e,"edgeLabel"),e.emphasis&&(Cw(e.emphasis,"label"),Cw(e.emphasis,"upperLabel"),Cw(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(bw(t),Tw(t));var n=e.markLine;n&&(bw(n),Tw(n));var r=e.markArea;r&&Tw(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Su(o))for(var a=0;a<o.length;a++)Tw(o[a]);uu(e.categories,(function(e){Sw(e)}))}if(i&&!Su(i))for(a=0;a<i.length;a++)Tw(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)Tw(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)mu(l[a])?(Tw(l[a][0]),Tw(l[a][1])):Tw(l[a])}"gauge"===e.type?(Cw(e,"axisLabel"),Cw(e,"title"),Cw(e,"detail")):"treemap"===e.type?(ww(e.breadcrumb,"itemStyle"),uu(e.levels,(function(e){Sw(e)}))):"tree"===e.type&&Sw(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),yw(n,(function(t){yw(Mw(e[t]),(function(e){e&&(Cw(e,"axisLabel"),Cw(e.axisPointer,"label"))}))})),yw(Mw(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Cw(t,"axisLabel"),Cw(t&&t.axisPointer,"label")})),yw(Mw(e.calendar),(function(e){ww(e,"itemStyle"),Cw(e,"dayLabel"),Cw(e,"monthLabel"),Cw(e,"yearLabel")})),yw(Mw(e.radar),(function(e){Cw(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),yw(Mw(e.geo),(function(e){xw(e)&&(Tw(e),yw(Mw(e.regions),(function(e){Tw(e)})))})),yw(Mw(e.timeline),(function(e){Tw(e),ww(e,"label"),ww(e,"itemStyle"),ww(e,"controlStyle",!0);var t=e.data;mu(t)&&uu(t,(function(e){bu(e)&&(ww(e,"label"),ww(e,"itemStyle"))}))})),yw(Mw(e.toolbox),(function(e){ww(e,"iconStyle"),yw(e.feature,(function(e){ww(e,"iconStyle")}))})),Cw(Aw(e.axisPointer),"label"),Cw(Aw(e.tooltip).axisPointer,"label")}function Iw(e){e&&uu(Dw,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Dw=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ow=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],kw=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Rw(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<kw.length;n++){var r=kw[n][1],i=kw[n][0];null!=t[r]&&(t[i]=t[r])}}function Nw(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function Lw(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function Bw(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&Bw(e[n].children,t)}function Pw(e,t){Ew(e,t),e.series=wf(e.series),uu(e.series,(function(e){if(bu(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),Nw(e.label),(i=e.data)&&!Su(i))for(var n=0;n<i.length;n++)Nw(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(Rw(e),Rw(e.backgroundStyle),Rw(e.emphasis),(i=e.data)&&!Su(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(Rw(i[n]),Rw(i[n]&&i[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),Lw(e),Bw(e.data,Lw)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&ou(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),Iw(e)}})),e.dataRange&&(e.visualMap=e.dataRange),uu(Ow,(function(t){var n=e[t];n&&(mu(n)||(n=[n]),uu(n,(function(e){Iw(e)})))}))}function jw(e){uu(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return i;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var v=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=lf(h,v),f=v;break}}}return r[0]=h,r[1]=f,r}))}))}var Fw,Uw,zw,Hw,Vw,Ww=function(e){this.data=e.data||(e.sourceFormat===Ub?{}:[]),this.sourceFormat=e.sourceFormat||Hb,this.seriesLayoutBy=e.seriesLayoutBy||Vb,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&$b(this,n)===Yb&&(r.type="ordinal")}};function Yw(e){return e instanceof Ww}function Gw(e,t,n){n=n||Zw(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:Xw(i),startIndex:a,dimensionsDetectedCount:o};if(t===jb){var s=e;"auto"===r||null==r?$w((function(e){null!=e&&"-"!==e&&(yu(e)?null==a&&(a=1):a=0)}),n,s,10):a=_u(r)?r:r?1:0,i||1!==a||(i=[],$w((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===Wb?s.length:s[0]?s[0].length:null}else if(t===Fb)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return hu(t)}(e));else if(t===Ub)i||(i=[],uu(e,(function(e,t){i.push(t)})));else if(t===Pb){var l=Tf(e[0]);o=mu(l)&&l.length||1}return{startIndex:a,dimensionsDefine:Xw(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new Ww({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:nu(t)})}function qw(e){return new Ww({data:e,sourceFormat:Su(e)?zb:Pb})}function Qw(e){return new Ww({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:nu(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Zw(e){var t=Hb;if(Su(e))t=zb;else if(mu(e)){0===e.length&&(t=jb);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(mu(i)){t=jb;break}if(bu(i)){t=Fb;break}}}}else if(bu(e))for(var o in e)if(Vu(e,o)&&lu(e[o])){t=Ub;break}return t}function Xw(e){if(e){var t=Uu();return cu(e,(function(e,n){var r={name:(e=bu(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r}))}}function $w(e,t,n,r){if(t===Wb)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function Kw(e){var t=e.sourceFormat;return t===Fb||t===Ub}var Jw=function(){function e(e,t){var n=Yw(e)?e:qw(e);this._source=n;var r=this._data=n.data;n.sourceFormat===zb&&(this._offset=0,this._dimSize=t,this._data=r),Vw(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Vw=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(iu(e,Hw[uS(a,s)]),a===zb)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=nS(a,s);e.getItem=fu(c,null,i,l,u);var d=oS(a,s);e.count=fu(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=i[p*o+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[jb+"_"+Vb]={pure:!0,appendData:i},e[jb+"_"+Wb]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Fb]={pure:!0,appendData:i},e[Ub]={pure:!0,appendData:function(e){var t=this._data;uu(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[Pb]={appendData:i},e[zb]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},Hw=e}(),e}(),eS=function(e,t,n,r){return e[r]},tS=((Fw={})[jb+"_"+Vb]=function(e,t,n,r){return e[r+t]},Fw[jb+"_"+Wb]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},Fw[Fb]=eS,Fw[Ub]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},Fw[Pb]=eS,Fw);function nS(e,t){return tS[uS(e,t)]}var rS=function(e,t,n){return e.length},iS=((Uw={})[jb+"_"+Vb]=function(e,t,n){return Math.max(0,e.length-t)},Uw[jb+"_"+Wb]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Uw[Fb]=rS,Uw[Ub]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},Uw[Pb]=rS,Uw);function oS(e,t){return iS[uS(e,t)]}var aS=function(e,t,n){return e[t]},sS=((zw={})[jb]=aS,zw[Fb]=function(e,t,n){return e[n]},zw[Ub]=aS,zw[Pb]=function(e,t,n){var r=Tf(e);return r instanceof Array?r[t]:r},zw[zb]=aS,zw);function lS(e){return sS[e]}function uS(e,t){return e===jb?e+"_"+t:e}function cS(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return lS(o)(r,a,s)}var l=r;return o===Pb&&(l=Tf(r)),l}}}var dS=/\{@(.+?)\}/g,pS=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=r&&mu(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return vu(i)?(s.status=t,s.dimensionIndex=r,i(s)):yu(i)?yb(i,s).replace(dS,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=cS(a,e,i);if(o&&mu(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return cS(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function hS(e){var t,n;return bu(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function fS(e){return new gS(e)}var gS=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||p<h)){var f=this._progress;if(mu(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){mS.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:mS.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),mu(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),mS=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function vS(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||_u(e)||null==e||"-"===e||(e=+pf(e)),null==e||""===e?NaN:+e)}Uu({number:function(e){return parseFloat(e)},time:function(e){return+pf(e)},trim:function(e){return yu(e)?Ru(e):e}});var yS=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=_u(e)?e:gf(e),r=_u(t)?t:gf(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=yu(e),s=yu(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),xS=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return vS(e,t)},e}();function _S(e){if(!MS(e.sourceFormat)){xf("")}return e.data}function bS(e){var t=e.sourceFormat,n=e.data;if(!MS(t)){xf("")}if(t===jb){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===Fb){for(r=[],i=0,o=n.length;i<o;i++)r.push(iu({},n[i]));return r}}function wS(e,t,n){if(null!=n)return _u(n)||!isNaN(n)&&!Vu(t,n)?e[n]:Vu(t,n)?t[n]:void 0}function SS(e){return nu(e)}var CS=Uu();function TS(e,t,n,r){t.length||xf(""),bu(e)||xf("");var i=e.type,o=CS.get(i);o||xf("");var a=cu(t,(function(e){return function(e,t){var n=new xS,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==Vb&&xf("");var a=[],s={},l=e.dimensionsDefine;if(l)uu(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(Vu(s,n)&&xf(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=nS(i,Vb);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=fu(_S,null,e)),n.cloneRawData=fu(bS,null,e);var d=oS(i,Vb);n.count=fu(d,null,r,o,a);var p=lS(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=fu(wS,null,a,s),n.cloneAllDimensionInfo=fu(SS,null,a),n}(e,o)}));return cu(wf(o.transform({upstream:a[0],upstreamList:a,config:nu(e.config)})),(function(e,n){var r;bu(e)||xf(""),e.data||xf(""),MS(Zw(e.data))||xf("");var i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:Vb,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:Vb,sourceHeader:0,dimensions:e.dimensions};return Gw(e.data,r,null)}))}function MS(e){return e===jb||e===Fb}var AS,ES="undefined",IS=typeof Uint32Array===ES?Array:Uint32Array,DS=typeof Uint16Array===ES?Array:Uint16Array,OS=typeof Int32Array===ES?Array:Int32Array,kS=typeof Float64Array===ES?Array:Float64Array,RS={float:kS,int:OS,ordinal:Array,number:Array,time:kS};function NS(e){return e>65535?IS:DS}function LS(e,t,n,r,i){var o=RS[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var BS=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Uu()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=AS[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Kw(r),this._dimensions=cu(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new RS[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){LS(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<i;p++){var h=r[p],f=AS.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=cu(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),LS(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=i[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=NS(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(NS(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)o[h]=u[e[h]][p];o[h]=c,d=t.apply(null,o)}d&&(i[s++]=p)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=hu(e),i=r.length;if(!i)return this;var o=t.count(),a=new(NS(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=h),h++}p=!0}else if(2===i){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===i)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[r[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,S=(b=t.getRawIndex(g),0);S<i;S++){var C=r[S];((x=d[C][b])<e[C][0]||x>e[C][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=[1/0,-1/0];for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<o;p++)s[p]=r[t[p]][d];s[o]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!=typeof h&&(i[0]=h,h=i);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(NS(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,v=h;v<f;v++){var y=a[T=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-h;var x=p,_=Math.min(p+u,s),b=p-1,w=a[c];n=-1,i=x;var S=-1,C=0;for(v=x;v<_;v++){var T;y=a[T=this.getRawIndex(v)];isNaN(y)?(C++,S<0&&(S=T)):(r=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=r,i=T)}C>0&&C<_-x&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(NS(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=v}return i._count=p,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r,i,o=new e,a=this._chunks,s=t&&du(t,(function(e,t){return e[t]=!0,e}),{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=a[l],i=void 0,(i=r.constructor)===Array?r.slice():new i(r)):a[l];else o._chunks=a;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=nu(this._extent),e._rawExtent=nu(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return vS(e[r],this._dimensions[r])}AS={arrayRows:e,objectRows:function(e,t,n,r){return vS(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return vS(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),PS=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(jS(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Su(a=o.get("data",!0))?zb:Pb,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=Eu(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=Eu(c.sourceHeader,d.sourceHeader),f=Eu(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[Gw(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[Gw(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&FS("")}var o=[],a=[];return uu(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||FS(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=wf(e),r=n.length;r||xf("");for(var i=0,o=r;i<o;i++)t=TS(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[Qw(o[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];jS(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new BS).initData(new Jw(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(jS(e)){var t=Xb(e);return t?[t.getSourceManager()]:[]}return cu(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Uf(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},jf).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(jS(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function jS(e){return"series"===e.mainType}function FS(e){throw new Error(e)}var US="line-height:1";function zS(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+yc(r+"")+"px;color:"+yc(n)+";font-weight:"+yc(i+""),valueStyle:"font-size:"+yc(a+"")+"px;color:"+yc(o)+";font-weight:"+yc(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var HS=[0,10,20,30],VS=["","\n","\n\n","\n\n\n"];function WS(e,t){return t.type=e,t}function YS(e){return"section"===e.type}function GS(e){return YS(e)?QS:ZS}function qS(e){if(YS(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return uu(e.blocks,(function(e){var n=qS(e);n>=t&&(t=n+ +(r&&(!n||YS(e)&&!e.noHeader)))})),t}return 0}function QS(e,t,n,r){var i,o=t.noHeader,a=(i=qS(t),{html:HS[i],richText:VS[i]}),s=[],l=t.blocks||[];ku(!l||mu(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Vu(c,u)){var d=new yS(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}uu(l,(function(n,i){var o=t.valueFormatter,l=GS(n)(o?iu(iu({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var p="richText"===e.renderMode?s.join(a.richText):$S(s.join(""),o?n:a.html);if(o)return p;var h=gb(t.header,"ordinal",e.useUTC),f=zS(r,e.renderMode).nameStyle;return"richText"===e.renderMode?KS(e,h,f)+a.richText+p:$S('<div style="'+f+";"+US+';">'+yc(h)+"</div>"+p,n)}function ZS(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return cu(e=mu(e)?e:[e],(function(e,t){return gb(e,mu(h)?h[t]:h,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=o?"":gb(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value),g=!s||!o,m=!s&&o,v=zS(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":KS(e,p,y))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(mu(t)?t.join(" "):t,o)}(e,f,g,m,x)):$S((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+yc(e)+"</span>"}(p,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=mu(e)?e:[e],'<span style="'+o+";"+r+'">'+cu(e,(function(e){return yc(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function XS(e,t,n,r,i,o){if(e)return GS(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function $S(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+US+';">'+e+'<div style="clear:both"></div></div>'}function KS(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function JS(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var eC=function(){function e(){this.richTextStyles={},this._nextStyleNameId=mf()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=yu(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+yc(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+yc(r)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return yu(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};mu(t)?uu(t,(function(e){return iu(n,e)})):iu(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function tC(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),p=mu(d),h=function(e,t){return xb(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||p&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=du(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(WS("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?uu(r,(function(e){c(cS(o,n,e),e)})):uu(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=cS(l,a,u[0]),n=g.type}else i=t=p?d[0]:d;var m=Of(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return WS("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[WS("nameValue",{markerType:"item",markerColor:h,name:x,noName:!Ru(x),value:t,valueType:n})].concat(r||[])})}var nC=Nf();function rC(e,t){return e.getName(t)||e.getId(t)}var iC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return L(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=fS({count:aC,reset:sC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(nC(this).sourceManager=new PS(this)).prepareSource();var r=this.getInitialData(e,n);uC(r,this),this.dataTask.context.data=r,nC(this).dataBeforeProcessed=r,oC(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ab(this),r=n?Ib(e):{},i=this.subType;kb.hasClass(i)&&(i+="Series"),ru(e,t.getTheme().get(this.subType)),ru(e,this.getDefaultOption()),Sf(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Eb(e,r,n)},t.prototype.mergeOption=function(e,t){e=ru(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Ab(this);n&&Eb(this.option,e,n);var r=nC(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);uC(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,nC(this).dataBeforeProcessed=i,oC(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Su(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Sf(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=dC(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return nC(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=dC(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}nC(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Uu(e)},t.prototype.getSourceManager=function(){return nC(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return nC(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return tC({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ll.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=rw.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=rC(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=hu(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[rC(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){bu(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=rC(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=rC(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return kb.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(kb);function oC(e){var t=e.name;Of(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return uu(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function aC(e){return e.model.getRawData().count()}function sC(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),lC}function lC(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function uC(e,t){uu(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,gu(cC,t))}))}function cC(e,t){var n=dC(e);return n&&n.setOutputEnd((t||this).count()),t}function dC(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}su(iC,pS),su(iC,rw),Gf(iC,kb);var pC=iC,hC=function(){function e(){this.group=new Zh,this.uid=A_("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Yf(hC),Xf(hC);var fC=hC;function gC(){var e=Nf();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var mC=Nf(),vC=gC(),yC=function(){function e(){this.group=new Zh,this.uid=A_("viewChart"),this.renderTask=fS({plan:bC,reset:wC}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&_C(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&_C(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Jx(this.group,e)},e.markUpdateMethod=function(e,t){mC(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function xC(e,t,n){e&&Xv(e)&&("emphasis"===t?kv:Rv)(e,n)}function _C(e,t,n){var r=Rf(e,t),i=t&&null!=t.highlightKey?function(e){var t=ov[e];return null==t&&iv<=32&&(t=ov[e]=iv++),t}(t.highlightKey):null;null!=r?uu(wf(r),(function(t){xC(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){xC(e,n,i)}))}function bC(e){return vC(e.model)}function wC(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&mC(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),SC[l]}Yf(yC),Xf(yC);var SC={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},CC=yC,TC="\0__throttleOriginMethod",MC="\0__throttleRate",AC="\0__throttleType";function EC(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),o=this,a=e;var h=s||t,f=s||n;s=null,i=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):i>=0?d():c=setTimeout(d,-i),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function IC(e,t,n,r){var i=e[t];if(i){var o=i[TC]||i,a=i[AC];if(i[MC]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=EC(o,n,"debounce"===r))[TC]=o,i[AC]=r,i[MC]=n}return i}}function DC(e,t){var n=e[t];n&&n[TC]&&(n.clear&&n.clear(),e[t]=n[TC])}var OC=Nf(),kC={itemStyle:$f(b_,!0),lineStyle:$f(y_,!0)},RC={lineStyle:"stroke",itemStyle:"fill"};function NC(e,t){var n=e.visualStyleMapper||kC[t];return n||(console.warn("Unknown style type '"+t+"'."),kC.itemStyle)}function LC(e,t){var n=e.visualDrawType||RC[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var BC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=NC(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=LC(e,r),l=o[s],u=vu(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||vu(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||vu(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=iu({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},PC=new T_,jC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=NC(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){PC.option=n[r];var a=i(PC);iu(e.ensureUniqueItemVisual(t,"style"),a),PC.option.decal&&(e.setItemVisual(t,"decal",PC.option.decal),PC.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},FC={performRawSeries:!0,overallReset:function(e){var t=Uu();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),OC(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=OC(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=LC(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}}))}}))}},UC=Math.PI;var zC=function(){function e(e,t,n,r){this._stageTaskMap=Uu(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Uu();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;uu(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});ku(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}uu(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);p.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.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)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Uu(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||fS({plan:GC,reset:qC,count:XC}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||fS({reset:HC});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Uu(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,fS({reset:VC,onDirty:YC})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}ku(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,uu(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return vu(e)&&(e={overallReset:e,seriesType:$C(e)}),e.uid=A_("stageHandler"),t&&(e.visualType=t),e},e}();function HC(e){e.overallReset(e.ecModel,e.api,e.payload)}function VC(e){return e.overallProgress&&WC}function WC(){this.agent.dirty(),this.getDownstream().dirty()}function YC(){this.agent&&this.agent.dirty()}function GC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function qC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=wf(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?cu(t,(function(e,t){return ZC(t)})):QC}var QC=ZC(0);function ZC(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function XC(e){return e.data.count()}function $C(e){KC=null;try{e(JC,eT)}catch(e){}return KC}var KC,JC={},eT={};function tT(e,t){for(var n in t.prototype)e[n]=Wu}tT(JC,uw),tT(eT,dw),JC.eachSeriesByType=JC.eachRawSeriesByType=function(e){KC=e},JC.eachComponent=function(e){"series"===e.mainType&&e.subType&&(KC=e.subType)};var nT=zC,rT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],iT={color:rT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],rT]},oT="#B9B8CE",aT="#100C2A",sT=function(){return{axisLine:{lineStyle:{color:oT}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},lT=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],uT={darkMode:!0,color:lT,backgroundColor:aT,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:oT}},textStyle:{color:oT},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:oT}},dataZoom:{borderColor:"#71708A",textStyle:{color:oT},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:oT}},timeline:{lineStyle:{color:oT},label:{color:oT},controlStyle:{color:oT,borderColor:oT}},calendar:{itemStyle:{color:aT},dayLabel:{color:oT},monthLabel:{color:oT},yearLabel:{color:oT}},timeAxis:sT(),logAxis:sT(),valueAxis:sT(),categoryAxis:sT(),line:{symbol:"circle"},graph:{color:lT},gauge:{title:{color:oT},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:oT},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};uT.categoryAxis.splitLine.show=!1;var cT=uT,dT=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(yu(e)){var i=Wf(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};uu(e,(function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),pT=["symbol","symbolSize","symbolRotate","symbolOffset"],hT=pT.concat(["symbolKeepAspect"]),fT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<pT.length;a++){var s=pT[a],l=e.get(s);vu(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(iu({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=hu(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}},gT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<hT.length;r++){var i=hT[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function mT(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function vT(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=Rf(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:mu(u)?l.getName(u[0]):l.getName(u),selected:yu(r)?r:iu({},r)})}}))}function yT(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var xT=Math.round(9*Math.random()),_T="function"==typeof Object.defineProperty,bT=function(){function e(){this._id="__ec_inner_"+xT++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return _T?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),wT=bT,ST=Tm.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),CT=Tm.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),TT=Tm.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),MT=Tm.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),AT={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},ET={};uu({line:$y,rect:Um,roundRect:Um,square:Um,circle:yy,diamond:CT,pin:TT,arrow:MT,triangle:ST},(function(e,t){ET[t]=new e}));var IT=Tm.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Bh(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=ET[r];i||(i=ET[r="rect"]),AT[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function DT(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function OT(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?Lx(e.slice(8),new Qc(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?Nx(e.slice(7),{},new Qc(t,n,r,i),a?"center":"cover"):new IT({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=DT,o&&s.setColor(o),s}function kT(e,t){if(null!=e)return mu(e)||(e=[e,e]),[nf(e[0],t[0])||0,nf(Eu(e[1],e[0]),t[1])||0]}function RT(e){return isFinite(e)}function NT(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=RT(a)?a:.5,s=RT(s)?s:.5,l=l>=0&&RT(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=RT(r)?r:0,i=RT(i)?i:1,o=RT(o)?o:0,a=RT(a)?a:0,e.createLinearGradient(r,o,i,a)}(e,t,n),i=t.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function LT(e){return parseInt(e,10)}function BT(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||LT(s[r])||LT(e.style[r]))-(LT(s[o])||0)-(LT(s[a])||0)|0}function PT(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:_u(t)?[t]:mu(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=cu(i,(function(e){return e/a})),o/=a)}return[i,o]}var jT=new im(!0);function FT(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function UT(e){return"string"==typeof e&&"none"!==e}function zT(e){var t=e.fill;return null!=t&&"none"!==t}function HT(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function VT(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function WT(e,t,n){var r=ng(t.image,t.__image,n);if(ig(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*Yu),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var YT=["shadowBlur","shadowOffsetX","shadowOffsetY"],GT=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qT(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){XT(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?yg.opacity:a}(r||t.blend!==n.blend)&&(o||(XT(e,i),o=!0),e.globalCompositeOperation=t.blend||yg.blend);for(var s=0;s<YT.length;s++){var l=YT[s];(r||t[l]!==n[l])&&(o||(XT(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(XT(e,i),o=!0),e.shadowColor=t.shadowColor||yg.shadowColor),o}function QT(e,t,n,r,i){var o=$T(t,i.inHover),a=r?null:n&&$T(n,i.inHover)||{};if(o===a)return!1;var s=qT(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(XT(e,i),s=!0),UT(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(XT(e,i),s=!0),UT(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(XT(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(XT(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<GT.length;u++){var c=GT[u],d=c[0];(r||o[d]!==a[d])&&(s||(XT(e,i),s=!0),e[d]=o[d]||c[1])}return s}function ZT(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function XT(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function $T(e,t){return t&&e.__hoverStyle||e.style}function KT(e,t){JT(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function JT(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(XT(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(XT(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),ZT(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,p=t instanceof Tm&&t.autoBatch&&function(e){var t=zT(e),n=FT(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(XT(e,n),ZT(e,t)):p||XT(e,n);var h=$T(t,n.inHover);t instanceof Tm?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),QT(e,t,u,l,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=FT(n),a=zT(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||jT,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=o&&!!h.colorStops,m=a&&!!p.image,v=o&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?NT(e,p,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?NT(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?WT(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?WT(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var S,C,T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=PT(t))[0],C=i[1]);var M=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),M=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),M&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=C),r||(n.strokeFirst?(o&&VT(e,n),a&&HT(e,n)):(a&&HT(e,n),o&&VT(e,n))),S&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof Em?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),QT(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||Pl,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=PT(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(FT(n)&&e.strokeText(i,n.x,n.y),zT(n)&&e.fillText(i,n.x,n.y)):(zT(n)&&e.fillText(i,n.x,n.y),FT(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,h)):t instanceof km?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){qT(e,$T(t,i.inHover),n&&$T(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=ng(n.image,t.__image,t,t.onload);if(r&&ig(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),JT(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),JT(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),p&&r&&XT(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var eM=new wT,tM=new Qd(100),nM=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function rM(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&eM.delete(e);var o=eM.get(e);if(o)return o;var a=ou(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<nM.length;++l){var u=a[nM[l]];if(null!=u&&!mu(u)&&!yu(u)&&!_u(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=tM.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,p=oM(a.dashArrayX),h=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(_u(e)){var t=Math.ceil(e);return[t,t]}var n=cu(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=iM(a.symbol),g=(_=p,cu(_,(function(e){return aM(e)}))),m=aM(h),v=!i&&zl.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=yf(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=yf(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<p[u].length;++t)w+=p[u][t];if(w<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),C=g+p[u][_]*S,T=o+h[s]*S,M=p[u][_]*a.symbolSize,A=h[s]*a.symbolSize,E=b/2%f[c].length;I(C,T,M,A,f[c][E])}g+=p[u][_],++b,++_===p[u].length&&(_=0)}++u===p.length&&(u=0)}o+=h[s],++l,++s===h.length&&(s=0)}function I(e,t,o,s,l){var u=i?1:n,c=OT(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var p=r.painter.renderOneToVNode(c);p&&y.children.push(p)}else KT(d,c)}})(),s&&tM.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,eM.set(e,s),e.dirty=!1,s}function iM(e){if(!e||0===e.length)return[["rect"]];if(yu(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!yu(e[n])){t=!1;break}if(t)return iM([e]);var r=[];for(n=0;n<e.length;++n)yu(e[n])?r.push([e[n]]):r.push(e[n]);return r}function oM(e){if(!e||0===e.length)return[[0,0]];if(_u(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!_u(e[n])){t=!1;break}if(t)return oM([e]);var r=[];for(n=0;n<e.length;++n)if(_u(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=cu(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function aM(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var sM=new lc,lM={};var uM=2e3,cM=4500,dM={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:uM,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:cM,ARIA:6e3,DECAL:7e3}},pM="__flagInMainProcess",hM="__pendingUpdate",fM="__needsUpdateStatus",gM=/^[a-zA-Z0-9_]+$/,mM="__connectUpdateStatus";function vM(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return xM(this,e,t);this.id}}function yM(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return xM(this,e,t)}}function xM(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),lc.prototype[t].apply(e,n)}var _M,bM,wM,SM,CM,TM,MM,AM,EM,IM,DM,OM,kM,RM,NM,LM,BM,PM,jM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t}(lc),FM=jM.prototype;FM.on=yM("on"),FM.off=yM("off");var UM=function(e){function t(t,n,r){var i=e.call(this,new dT)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},yu(n)&&(n=QM[n]),i._dom=t;var o=i._zr=Jh(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Eu(r.useDirtyRect,!1),useCoarsePointer:Eu(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=EC(fu(o.flush,o),17),(n=nu(n))&&Pw(n,!0),i._theme=n,i._locale=function(e){if(yu(e)){var t=k_[e.toUpperCase()]||{};return e===I_||e===D_?nu(t):ru(nu(t),nu(k_[O_]),!1)}return ru(nu(e),nu(k_[O_]),!1)}(r.locale||N_),i._coordSysMgr=new hw;var a=i._api=NM(i);function s(e,t){return e.__prio-t.__prio}return dd(qM,s),dd(YM,s),i._scheduler=new nT(i,a,YM,qM),i._messageCenter=new jM,i._initEvents(),i.resize=fu(i.resize,i),o.animation.on("frame",i._onframe,i),IM(o,i),DM(o,i),Lu(i),i}return L(t,e),t.prototype._onframe=function(){if(!this._disposed){PM(this);var e=this._scheduler;if(this[hM]){var t=this[hM].silent;this[pM]=!0;try{_M(this),SM.update.call(this,null,this[hM].updateParams)}catch(e){throw this[pM]=!1,this[hM]=null,e}this._zr.flush(),this[pM]=!1,this[hM]=null,AM.call(this,t),EM.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),TM(this,r),e.performVisualTasks(r),RM(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[pM])if(this._disposed)this.id;else{var r,i,o;if(bu(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[pM]=!0,!this._model||t){var a=new vw(this._api),s=this._theme,l=this._model=new uw;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},GM);var u={seriesTransition:o,optionChanged:!0};if(n)this[hM]={silent:r,updateParams:u},this[pM]=!1,this.getZr().wakeUp();else{try{_M(this),SM.update.call(this,null,u)}catch(e){throw this[hM]=null,this[pM]=!1,e}this._ssr||this._zr.flush(),this[hM]=null,this[pM]=!1,AM.call(this,r),EM.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ll.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Ll.svgSupported){var e=this._zr;return uu(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;uu(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return uu(r,(function(e){e.group.ignore=!1})),o}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if($M[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();uu(XM,(function(o,d){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(nu(e)),h=o.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=i(h.right,l),u=i(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}}));var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=zl.createCanvas(),g=Jh(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return uu(c,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Um({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),uu(c,(function(e){var t=new km({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return CM(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return CM(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return uu(Bf(this._model,e),(function(e,r){r.indexOf("Models")>=0&&uu(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}}),this)}),this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=Bf(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?mT(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;uu(HM,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&yT(o,(function(e){var t=rv(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=iu({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),uu(WM,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),uu(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(vT("map","selectchanged",t,r,e),vT("pie","selectchanged",t,r,e)):"select"===e.fromAction?(vT("map","selected",t,r,e),vT("pie","selected",t,r,e)):"unselect"===e.fromAction&&(vT("map","unselected",t,r,e),vT("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&zf(this.getDom(),eA,"");var e=this,t=e._api,n=e._model;uu(e._componentsViews,(function(e){e.dispose(n,t)})),uu(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete XM[e.id]}},t.prototype.resize=function(e){if(!this[pM])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[hM]&&(null==r&&(r=this[hM].silent),n=!0,this[hM]=null),this[pM]=!0;try{n&&_M(this),SM.update.call(this,{type:"resize",animation:iu({duration:0},e&&e.animation)})}catch(e){throw this[pM]=!1,e}this[pM]=!1,AM.call(this,r),EM.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(bu(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),ZM[e]){var n=ZM[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=iu({},e);return t.type=WM[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(bu(t)||(t={silent:!!t}),VM[e.type]&&this._model)if(this[pM])this._pendingActions.push(e);else{var n=t.silent;MM.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Ll.browser.weChat&&this._throttledZrFlush(),AM.call(this,n),EM.call(this,n)}},t.prototype.updateLabelLayout=function(){sM.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,i,-1/0),!0}))}}function r(e,t,n,i){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(o&&(o.z=t,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered((function(e){if(!Cx(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function o(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(Cx(e))return;if(e instanceof Tm&&function(e){var t=av(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}_M=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),bM(e,!0),bM(e,!1),t.plan()},bM=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=Wf(e.type);(c=new(t?fC.getClass(d.main,d.sub):CC.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&u(t)})):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},wM=function(e,t,n,r,i){var o=e._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=Uu(),uu(wf(u),(function(e){var t=Df(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(Kv(n))if(t instanceof pC)n.type!==cv||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Rf(i,t);o=(mu(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=rv(a);Fv(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Fv(r,c,d,n)}}}(t,n,e._api);else{var r=zv(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===cv&&i&&!n.notBlur&&Uv(t.mainType,t.componentIndex,e._api),o&&uu(o,(function(e){n.type===cv?kv(e):Rv(e)}))}else $v(n)&&t instanceof pC&&(!function(e,t){if($v(t)){var n=t.dataType,r=Rf(e.getData(n),t);mu(r)||(r=[r]),e[t.type===fv?"toggleSelect":t.type===pv?"select":"unselect"](r,n)}}(t,n,e._api),Hv(t),BM(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else uu([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},SM={prepareAndUpdate:function(e){_M(this),SM.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),TM(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),OM(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),sM.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}));var a=Uu();r.eachSeries((function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),RM(this,r,i,t,{},a),sM.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),CC.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),OM(this,n,this._api,t,{}),sM.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),CC.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),sM.trigger("afterupdate",r,this._api))},updateLayout:function(e){SM.update.call(this,e)}},CM=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Bf(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},TM=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},MM=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=VM[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&Wf(l[0]);this[pM]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=cu(e.batch,(function(t){return(t=ou(iu({},t),e)).batch=null,t})));var h,f=[],g=$v(e),m=Kv(e);if(m&&jv(this._api),uu(d,(function(t){if((h=(h=a.action(t,n._model,n._api))||iu({},t)).type=s.event||h.type,f.push(h),m){var r=Pf(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";wM(n,u,t,o),BM(n)}else g?(wM(n,u,t,"series"),BM(n)):c&&wM(n,u,t,c.main,c.sub)})),"none"!==u&&!m&&!g&&!c)try{this[hM]?(_M(this),SM.update.call(this,e),this[hM]=null):SM[u].call(this,e)}catch(e){throw this[pM]=!1,e}if(h=p?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[pM]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),g){var y={type:"selectchanged",escapeConnect:o,selected:Vv(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},AM=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();MM.call(this,n,e)}},EM=function(e){!e&&this.trigger("updated")},IM=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[hM]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},DM=function(e,t){e.on("mouseover",(function(e){var n=yT(e.target,Xv);n&&(!function(e,t,n){var r=rv(e),i=zv(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&Uv(r.componentMainType,r.componentIndex,n),uu(o,(function(e){return Dv(e,t)}))):(Fv(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Uv(r.componentMainType,r.componentIndex,n),Dv(e,t))}(n,e,t._api),BM(t))})).on("mouseout",(function(e){var n=yT(e.target,Xv);n&&(!function(e,t,n){jv(n);var r=rv(e),i=zv(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?uu(i,(function(e){return Ov(e,t)})):Ov(e,t)}(n,e,t._api),BM(t))})).on("click",(function(e){var n=yT(e.target,(function(e){return null!=rv(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=rv(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},OM=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,o,a=t.concat(n);dd(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),uu(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}(t),kM(e,t,n,r,i),uu(e._chartsViews,(function(e){e.__alive=!1})),RM(e,t,n,r,i),uu(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},kM=function(e,t,r,a,s,l){uu(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},RM=function(e,t,r,a,s,l){var u=e._scheduler;s=iu(s||{},{updatedSeries:t.getSeries()}),sM.trigger("series:beforeupdate",t,r,s);var c=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Hv(t)})),u.unfinished=c||u.unfinished,sM.trigger("series:layoutlabels",t,r,s),sM.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),o(t,r)})),function(e,t){var n=e._zr,r=n.storage,i=0;r.traverse((function(e){e.isGroup||i++})),i>t.get("hoverLayerThreshold")&&!Ll.node&&!Ll.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),sM.trigger("series:afterupdate",t,r,s)},BM=function(e){e[fM]=!0,e.getZr().wakeUp()},PM=function(e){e[fM]&&(e.getZr().storage.traverse((function(e){Cx(e)||t(e)})),e[fM]=!1)},NM=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return L(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){kv(t,n),BM(e)},n.prototype.leaveEmphasis=function(t,n){Rv(t,n),BM(e)},n.prototype.enterBlur=function(t){!function(e){Mv(e,bv)}(t),BM(e)},n.prototype.leaveBlur=function(t){Nv(t),BM(e)},n.prototype.enterSelect=function(t){Lv(t),BM(e)},n.prototype.leaveSelect=function(t){Bv(t),BM(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(dw))(e)},LM=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][mM]=t}}uu(WM,(function(n,r){e._messageCenter.on(r,(function(n){if($M[e.group]&&0!==e[mM]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];uu(XM,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),uu(i,(function(e){1!==e[mM]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(lc),zM=UM.prototype;zM.on=vM("on"),zM.off=vM("off"),zM.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)};var HM=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var VM={},WM={},YM=[],GM=[],qM=[],QM={},ZM={},XM={},$M={},KM=+new Date-0,JM=+new Date-0,eA="_echarts_instance_";function tA(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return XM[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,eA)]}(e);if(i)return i}var o=new UM(e,t,n);return o.id="ec_"+KM++,XM[o.id]=o,r&&zf(e,eA,o.id),LM(o),sM.trigger("afterinit",o),o}function nA(e){if(mu(e)){var t=e;e=null,uu(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+JM++,uu(t,(function(t){t.group=e}))}return $M[e]=!0,e}function rA(e){$M[e]=!1}function iA(e,t){QM[e]=t}function oA(e){au(GM,e)<0&&GM.push(e)}function aA(e,t){dA(YM,e,t,2e3)}function sA(e,t){sM.on(e,t)}function lA(e,t,n){vu(t)&&(n=t,t="");var r=bu(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,WM[t]||(ku(gM.test(r)&&gM.test(t)),VM[r]||(VM[r]={action:n,actionInfo:e}),WM[t]=r)}function uA(e,t){dA(qM,e,t,3e3,"visual")}var cA=[];function dA(e,t,n,r,i){if((vu(t)||bu(t))&&(n=t,t=r),!(au(cA,n)>=0)){cA.push(n);var o=nT.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function pA(e,t){ZM[e]=t}var hA=function(e){var t=(e=nu(e)).type;t||xf("");var n=t.split(":");2!==n.length&&xf("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,CS.set(t,e)};function fA(e){return null==e?0:e.length||1}function gA(e){return e}uA(uM,BC),uA(cM,jC),uA(cM,FC),uA(uM,fT),uA(cM,gT),uA(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=rM(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=rM(i,t)}}))})),oA(Pw),aA(900,(function(e){var t=Uu();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(jw)})),pA("default",(function(e,t){ou(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Zh,r=new Um({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new nv({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Um({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new ox({shape:{startAngle:-UC/2,endAngle:-UC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*UC/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*UC/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),lA({type:cv,event:cv,update:cv},Wu),lA({type:dv,event:dv,update:dv},Wu),lA({type:pv,event:pv,update:pv},Wu),lA({type:hv,event:hv,update:hv},Wu),lA({type:fv,event:fv,update:fv},Wu),iA("light",iT),iA("dark",cT);var mA=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||gA,this._newKeyGetter=r||gA,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=fA(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=fA(l),d=fA(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=fA(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=fA(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),vA=mA,yA=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function xA(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var _A=function(e){this.otherDims={},null!=e&&iu(this,e)},bA=Nf(),wA={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SA=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=MA(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Eu(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Kw(this.source),n=!AA(e),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=wA[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:i,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function CA(e){return e instanceof SA}function TA(e){for(var t=Uu(),n=0;n<(e||[]).length;n++){var r=e[n],i=bu(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function MA(e){var t=bA(e);return t.dimNameMap||(t.dimNameMap=TA(e.dimensionsDefine))}function AA(e){return e>30}var EA,IA,DA,OA,kA,RA,NA,LA=bu,BA=cu,PA="undefined"==typeof Int32Array?Array:Int32Array,jA=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],FA=["_approximateExtent"],UA=function(){function e(e,t){var n;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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;CA(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=yu(c)?new _A({name:c}):c instanceof _A?c:new _A(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};o.push(p),i[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Uu();uu(o,(function(e){f.set(i[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(_u(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof BS&&(r=e),!r){var o=this.dimensions,a=Yw(e)||lu(e)?new Jw(e,o.length):e;r=new BS;var s=BA(o,(function(e){return{type:i._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Uu(),o=[],a=[],s={};uu(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;xA(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),xA(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}Bb.each((function(e,t){var n=xA(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)}))}));var l=[],u={};i.each((function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=cu(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new yA(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&NA(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==zb&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===Pb&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Mf(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Df(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=Df(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)NA(this,a);EA(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){LA(e)?iu(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=DA(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return IA(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return mu(e)?r.getValues(BA(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){vu(e)&&(n=t,t=e,e=[]);var r=n||this,i=BA(OA(e),this._getStoreDimIndex,this);this._store.each(i,r?fu(t,r):t)},e.prototype.filterSelf=function(e,t,n){vu(e)&&(n=t,t=e,e=[]);var r=n||this,i=BA(OA(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?fu(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return uu(hu(e),(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r]})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){vu(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=BA(OA(e),this._getStoreDimIndex,this),a=RA(this);return a._store=this._store.map(o,i?fu(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=BA(OA(e),this._getStoreDimIndex,this);this._store.modify(o,i?fu(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=RA(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=RA(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new T_(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new vA(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return IA(e,t)}),(function(e){return IA(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},LA(e)?iu(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(mu(i=this.getVisual(t))?i=i.slice():LA(i)&&(i=iu({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,LA(t)?iu(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){LA(e)?iu(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?iu(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=rv(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=rv(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){uu(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:BA(this.dimensions,this._getDimInfo,this),this.hostModel)),kA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];vu(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Du(arguments)))})},e.internalField=(EA=function(e){var t=e._invertedIndicesMap;uu(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new PA(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},DA=function(e,t,n){return Df(e._getCategory(t,n),null)},IA=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=DA(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},OA=function(e){return mu(e)||(e=null!=e?[e]:[]),e},RA=function(t){var n=new e(t._schema?t._schema:BA(t.dimensions,t._getDimInfo,t),t.hostModel);return kA(n,t),n},kA=function(e,t){uu(jA.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,uu(FA,(function(n){e[n]=nu(t[n])})),e._calculationInfo=iu({},t._calculationInfo)},void(NA=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=DA(e,i,t)),null==s&&null!=o&&(r[t]=s=DA(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}(),zA=UA;function HA(e,t){Yw(e)||(e=qw(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Uu(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return uu(t,(function(e){var t;bu(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&AA(a),l=r===e.dimensionsDefine,u=l?MA(e):TA(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Uu(c),p=new OS(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],i=bu(n)?n:{name:n},a=new _A,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return p[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(h=0;h<a;h++)f(h);d.each((function(e,t){var n=wf(e).slice();if(1===n.length&&!yu(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);uu(n,(function(e,n){var i=yu(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,m(f(i),t,n))}))}}));var g=0;function m(e,t,n){null!=Bb.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}uu(n,(function(e){var t,n,r,i;if(yu(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=iu({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=wf(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}uu(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(ou(a,i),t,o),null==a.name&&n){var s=n[o];!bu(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&ou(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)uu(o,(function(e){b(e)})),o.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<a;w++){var S=f(w);null==S.coordDim&&(S.coordDim=VA(_,i,x),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||$b(e,w)!==Yb&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=Uu(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(o),new SA({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function VA(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var WA=function(e){this.coordSysDims=[],this.axisMap=Uu(),this.categoryAxisMap=Uu(),this.coordSysName=e};var YA={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",jf).models[0],o=e.getReferringComponents("yAxis",jf).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),GA(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),GA(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",jf).models[0];t.coordSysDims=["single"],n.set("single",i),GA(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",jf).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),GA(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),GA(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();uu(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),GA(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function GA(e){return"category"===e.get("type")}function qA(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!CA(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,p=!(!e||!e.get("stack"));if(uu(r,(function(e,t){yu(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;uu(r,(function(e){e.coordDim===h&&g++}));var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function QA(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function ZA(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=qw(e)):o=(r=i.getSource()).sourceFormat===Pb;var a=function(e){var t=e.get("coordinateSystem"),n=new WA(t),r=YA[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=hw.get(r);return t&&t.coordSysDims&&(n=cu(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=vu(l)?l:l?gu(Zb,s,t):null,c=HA(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&uu(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(c),h=qA(t,{schema:c,store:p}),f=new zA(c,t);f.setCalculationInfo(h);var g=null!=d&&function(e){if(e.sourceFormat===Pb){return!mu(Tf(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(o?r:p,null,g),f}var XA=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Xf(XA);var $A=XA,KA=0,JA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++KA}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&cu(r,eE);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!yu(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Uu(this.categories))},e}();function eE(e){return bu(e)&&null!=e.value?e.value:e+""}var tE=JA;function nE(e){return"interval"===e.type||"log"===e.type}function rE(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=ff(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=oE(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),aE(e,0,t),aE(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[rf(Math.ceil(e[0]/a)*a,s),rf(Math.floor(e[1]/a)*a,s)],e),i}function iE(e){var t=Math.pow(10,hf(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,rf(n*t)}function oE(e){return af(e)+2}function aE(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function sE(e,t){return e>=t[0]&&e<=t[1]}function lE(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function uE(e,t){return e*(t[1]-t[0])+t[0]}var cE=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new tE({})),mu(r)&&(r=new tE({categories:cu(r,(function(e){return bu(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return L(t,e),t.prototype.parse=function(e){return null==e?NaN:yu(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return sE(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return lE(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(uE(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}($A);$A.registerClass(cE);var dE=cE,pE=rf,hE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return L(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return sE(e,this._extent)},t.prototype.normalize=function(e){return lE(e,this._extent)},t.prototype.scale=function(e){return uE(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=oE(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:pE(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=pE(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:pE(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=pE(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=af(e.value)||0:"auto"===n&&(n=this._intervalPrecision),pb(pE(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=rE(r,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=pE(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=pE(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}($A);$A.registerClass(hE);var fE=hE,gE="undefined"!=typeof Float32Array,mE=gE?Float32Array:Array;function vE(e){return mu(e)?gE?new Float32Array(e):e:new mE(e)}function yE(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function xE(e){return e.dim+e.index}function _E(e,t){var n=[];return t.eachSeriesByType(e,(function(e){SE(e)&&n.push(e)})),n}function bE(e){var t=function(e){var t={};uu(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return uu(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(o[1]-o[0])/d.count()}var p=nf(e.get("barWidth"),r),h=nf(e.get("barMaxWidth"),r),f=nf(e.get("barMinWidth")||(CE(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:xE(i),stackId:yE(e)})})),function(e){var t={};uu(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var p=e.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return uu(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=hu(r).length;o=Math.max(35-4*a,15)+"%"}var s=nf(o,i),l=nf(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),uu(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;uu(r,(function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)})),p&&(h-=p.width*l);var f=-h/2;uu(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}(n)}function wE(e,t){var n=_E(e,t),r=bE(n);uu(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=yE(e),o=r[xE(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function SE(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function CE(e){return e.pipelineContext&&e.pipelineContext.large}var TE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return L(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return Z_(e.value,V_[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(q_(this._minLevelUnit))]||V_.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(yu(n))o=n;else if(vu(n))o=n(e.value,t,{level:e.level});else{var a=iu({},z_);if(e.level>0)for(var s=0;s<W_.length;++s)a[W_[s]]="{primary|"+a[W_[s]]+"}";var l=n?!1===n.inherit?n:ou(n,a):a,u=X_(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=Y_.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(mu(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return Z_(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){var i=1e4,o=Y_,a=0;function s(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,i,o){var a=[],l=!i.length;if(!function(e,t,n,r){var i=pf(t),o=pf(n),a=function(e){return $_(i,e,r)===$_(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")},h=function(){return p()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return h()}}(q_(e),r[0],r[1],n)){l&&(i=[{value:kE(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0,g=!1;switch(e){case"year":p=Math.max(1,Math.round(t/F_/365)),h=K_(n),f=ob(n);break;case"half-year":case"quarter":case"month":p=EE(t),h=J_(n),f=ab(n);break;case"week":case"half-week":case"day":p=AE(t),h=eb(n),f=sb(n),g=!0;break;case"half-day":case"quarter-day":case"hour":p=IE(t),h=tb(n),f=lb(n);break;case"minute":p=DE(t,!0),h=nb(n),f=ub(n);break;case"second":p=DE(t,!1),h=rb(n),f=cb(n);break;case"millisecond":p=OE(t),h=ib(n),f=db(n)}s(p,c,d,h,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,p=0,h=0;h<o.length&&a++<i;++h){var f=q_(o[h]);if(Q_(o[h]))if(l(o[h],u[u.length-1]||[],c),f!==(o[h+1]?q_(o[h+1]):null)){if(c.length){p=d,c.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&p>y/1.5)break;if(u.push(g),d>y||e===o[h])break}c=[]}}var x=pu(cu(u,(function(e){return pu(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),_=[],b=x.length-1;for(h=0;h<x.length;++h)for(var w=x[h],S=0;S<w.length;++S)_.push({value:w[S].value,level:b-h});_.sort((function(e,t){return e.value-t.value}));var C=[];for(h=0;h<_.length;++h)0!==h&&_[h].value===_[h-1].value||C.push(_[h]);return C}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=F_,t[1]+=F_),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-F_}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=ME.length,a=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(ME,this._approxInterval,0,o),o-1);this._interval=ME[a][1],this._minLevelUnit=ME[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return _u(e)?e:+pf(e)},t.prototype.contain=function(e){return sE(this.parse(e),this._extent)},t.prototype.normalize=function(e){return lE(this.parse(e),this._extent)},t.prototype.scale=function(e){return uE(e,this._extent)},t.type="time",t}(fE),ME=[["second",B_],["minute",P_],["hour",j_],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",U_/2],["year",U_]];function AE(e,t){return(e/=F_)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function EE(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function IE(e){return(e/=j_)>12?12:e>6?6:e>3.5?4:e>2?2:1}function DE(e,t){return(e/=t?P_:B_)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function OE(e){return ff(e,!0)}function kE(e,t,n){var r=new Date(e);switch(q_(t)){case"year":case"month":r[ab(n)](0);case"day":r[sb(n)](1);case"hour":r[lb(n)](0);case"minute":r[ub(n)](0);case"second":r[cb(n)](0),r[db(n)](0)}return r.getTime()}$A.registerClass(TE);var RE=TE,NE=$A.prototype,LE=fE.prototype,BE=rf,PE=Math.floor,jE=Math.ceil,FE=Math.pow,UE=Math.log,zE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new fE,t._interval=0,t}return L(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return cu(LE.getTicks.call(this,e),(function(e){var t=e.value,i=rf(FE(this.base,t));return i=t===n[0]&&this._fixMin?VE(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?VE(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=UE(this.base);e=UE(Math.max(0,e))/n,t=UE(Math.max(0,t))/n,LE.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=NE.getExtent.call(this);t[0]=FE(e,t[0]),t[1]=FE(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=VE(t[0],n[0])),this._fixMax&&(t[1]=VE(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=UE(e[0])/UE(t),e[1]=UE(e[1])/UE(t),NE.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,hf(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[rf(jE(t[0]/i)*i),rf(PE(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){LE.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return sE(e=UE(e)/UE(this.base),this._extent)},t.prototype.normalize=function(e){return lE(e=UE(e)/UE(this.base),this._extent)},t.prototype.scale=function(e){return e=uE(e,this._extent),FE(this.base,e)},t.type="log",t}($A),HE=zE.prototype;function VE(e,t){return BE(e,af(t))}HE.getMinorTicks=LE.getMinorTicks,HE.getLabel=LE.getLabel,$A.registerClass(zE);var WE=zE,YE=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);vu(i)?this._modelMinNum=ZE(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=ZE(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(vu(o)?this._modelMaxNum=ZE(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=ZE(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=mu(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Lh(s[0],1),Lh(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Mu(a)||Mu(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[qE[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[GE[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),GE={min:"_determinedMin",max:"_determinedMax"},qE={min:"_dataMin",max:"_dataMax"};function QE(e,t,n){var r=e.rawExtentInfo;return r||(r=new YE(e,t,n),e.rawExtentInfo=r,r)}function ZE(e,t){return null==t?null:Mu(t)?NaN:e.parse(t)}function XE(e,t){var n=e.type,r=QE(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=_E("bar",a),l=!1;if(uu(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=bE(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t){var r=e[xE(t)];return null!=r&&null!=n?r[yE(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;uu(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;uu(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function $E(e,t){var n=t,r=XE(e,n),i=r.extent,o=n.get("splitNumber");e instanceof WE&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function KE(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):yu(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):vu(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(JE(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function JE(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function eI(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new Qc(e.x,e.y,o,a)}function tI(e){var t=e.get("interval");return null==t?"auto":t}function nI(e){return"category"===e.type&&0===tI(e.getLabelModel())}function rI(e,t){var n={};return uu(e.mapDimensionsAll(t),(function(t){n[function(e,t){return QA(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),hu(n)}var iI=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),oI=[],aI={registerPreprocessor:oA,registerProcessor:aA,registerPostInit:function(e){sA("afterinit",e)},registerPostUpdate:function(e){sA("afterupdate",e)},registerUpdateLifecycle:sA,registerAction:lA,registerCoordinateSystem:function(e,t){hw.register(e,t)},registerLayout:function(e,t){dA(qM,e,t,1e3,"layout")},registerVisual:uA,registerTransform:hA,registerLoading:pA,registerMap:function(e,t,n){var r=function(e){return lM[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){lM[e]=t},PRIORITY:dM,ComponentModel:kb,ComponentView:fC,SeriesModel:pC,ChartView:CC,registerComponentModel:function(e){kb.registerClass(e)},registerComponentView:function(e){fC.registerClass(e)},registerSeriesModel:function(e){pC.registerClass(e)},registerChartView:function(e){CC.registerClass(e)},registerSubTypeDefaulter:function(e,t){kb.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){Xh[e]=t}(e,t)}};function sI(e){mu(e)?uu(e,(function(e){sI(e)})):au(oI,e)>=0||(oI.push(e),vu(e)&&(e={install:e}),e.install(aI))}function lI(e,t){return Math.abs(e-t)<1e-8}function uI(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var o=1;o<e.length;o++){var a=e[o];r+=pm(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return lI(i[0],s[0])&&lI(i[1],s[1])||(r+=pm(i[0],i[1],s[0],s[1],t,n)),0!==r}var cI=Nf();function dI(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=hI(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=KE(e);return{labels:cu(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function pI(e,t){return"category"===e.type?function(e,t){var n,r,i=fI(e,"ticks"),o=tI(t),a=gI(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(vu(o))n=yI(e,o,!0);else if("auto"===o){var s=hI(e,e.getLabelModel());r=s.labelCategoryInterval,n=cu(s.labels,(function(e){return e.tickValue}))}else n=vI(e,r=o,!0);return mI(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:cu(e.scale.getTicks(),(function(e){return e.value}))}}function hI(e,t){var n,r,i=fI(e,"labels"),o=tI(t),a=gI(i,o);return a||(vu(o)?n=yI(e,o):(r="auto"===o?function(e){var t=cI(e).autoInterval;return null!=t?t:cI(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=vI(e,r)),mI(i,o,{labels:n,labelCategoryInterval:r}))}function fI(e,t){return cI(e)[t]||(cI(e)[t]=[])}function gI(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function mI(e,t,n){return e.push({key:t,value:n}),n}function vI(e,t,n){var r=KE(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=nI(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&f-l!==o[1]&&g(o[1]),s}function yI(e,t,n){var r=e.scale,i=KE(e),o=[];return uu(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var xI=[0,1],_I=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return sf(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&bI(n=n.slice(),r.count()),tf(e,xI,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&bI(n=n.slice(),r.count());var i=tf(e,n,xI,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=cu(pI(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;uu(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=rf(e),t=rf(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),cu(this.scale.getMinorTicks(e),(function(e){return cu(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return dI(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=KE(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=o[1];l+=s){var f,g,m=Oh(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var v=p/c,y=h/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=cI(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function bI(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var wI=_I;function SI(e,t){return e===t||e!=e&&t!=t}function CI(e,t){for(var n=e.length;n--;)if(SI(e[n][0],t))return n;return-1}var TI=Array.prototype.splice;function MI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MI.prototype.clear=function(){this.__data__=[],this.size=0},MI.prototype.delete=function(e){var t=this.__data__,n=CI(t,e);return!(n<0)&&(n==t.length-1?t.pop():TI.call(t,n,1),--this.size,!0)},MI.prototype.get=function(e){var t=this.__data__,n=CI(t,e);return n<0?void 0:t[n][1]},MI.prototype.has=function(e){return CI(this.__data__,e)>-1},MI.prototype.set=function(e,t){var n=this.__data__,r=CI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function AI(e){if(!Di(e))return!1;var t=Hi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var EI,II=Ni["__core-js_shared__"],DI=(EI=/[^.]+$/.exec(II&&II.keys&&II.keys.IE_PROTO||""))?"Symbol(src)_1."+EI:"";var OI=Function.prototype.toString;function kI(e){if(null!=e){try{return OI.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var RI=/^\[object .+?Constructor\]$/,NI=Function.prototype,LI=Object.prototype,BI=NI.toString,PI=LI.hasOwnProperty,jI=RegExp("^"+BI.call(PI).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FI(e){return!(!Di(e)||(t=e,DI&&DI in t))&&(AI(e)?jI:RI).test(kI(e));var t}function UI(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return FI(n)?n:void 0}var zI=UI(Ni,"Map"),HI=UI(Object,"create");var VI=Object.prototype.hasOwnProperty;var WI=Object.prototype.hasOwnProperty;function YI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function GI(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function qI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}YI.prototype.clear=function(){this.__data__=HI?HI(null):{},this.size=0},YI.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},YI.prototype.get=function(e){var t=this.__data__;if(HI){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return VI.call(t,e)?t[e]:void 0},YI.prototype.has=function(e){var t=this.__data__;return HI?void 0!==t[e]:WI.call(t,e)},YI.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=HI&&void 0===t?"__lodash_hash_undefined__":t,this},qI.prototype.clear=function(){this.size=0,this.__data__={hash:new YI,map:new(zI||MI),string:new YI}},qI.prototype.delete=function(e){var t=GI(this,e).delete(e);return this.size-=t?1:0,t},qI.prototype.get=function(e){return GI(this,e).get(e)},qI.prototype.has=function(e){return GI(this,e).has(e)},qI.prototype.set=function(e,t){var n=GI(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function QI(e){var t=this.__data__=new MI(e);this.size=t.size}QI.prototype.clear=function(){this.__data__=new MI,this.size=0},QI.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},QI.prototype.get=function(e){return this.__data__.get(e)},QI.prototype.has=function(e){return this.__data__.has(e)},QI.prototype.set=function(e,t){var n=this.__data__;if(n instanceof MI){var r=n.__data__;if(!zI||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qI(r)}return n.set(e,t),this.size=n.size,this};var ZI=function(){try{var e=UI(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function XI(e,t,n){"__proto__"==t&&ZI?ZI(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var $I=Object.prototype.hasOwnProperty;function KI(e,t,n){var r=e[t];$I.call(e,t)&&SI(r,n)&&(void 0!==n||t in e)||XI(e,t,n)}function JI(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?XI(n,s,l):KI(n,s,l)}return n}function eD(e){return Vi(e)&&"[object Arguments]"==Hi(e)}var tD=Object.prototype,nD=tD.hasOwnProperty,rD=tD.propertyIsEnumerable,iD=eD(function(){return arguments}())?eD:function(e){return Vi(e)&&nD.call(e,"callee")&&!rD.call(e,"callee")};var oD="object"==typeof exports&&exports&&!exports.nodeType&&exports,aD=oD&&"object"==typeof module&&module&&!module.nodeType&&module,sD=aD&&aD.exports===oD?Ni.Buffer:void 0,lD=(sD?sD.isBuffer:void 0)||function(){return!1},uD=/^(?:0|[1-9]\d*)$/;function cD(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&uD.test(e))&&e>-1&&e%1==0&&e<t}function dD(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var pD={};function hD(e){return function(t){return e(t)}}pD["[object Float32Array]"]=pD["[object Float64Array]"]=pD["[object Int8Array]"]=pD["[object Int16Array]"]=pD["[object Int32Array]"]=pD["[object Uint8Array]"]=pD["[object Uint8ClampedArray]"]=pD["[object Uint16Array]"]=pD["[object Uint32Array]"]=!0,pD["[object Arguments]"]=pD["[object Array]"]=pD["[object ArrayBuffer]"]=pD["[object Boolean]"]=pD["[object DataView]"]=pD["[object Date]"]=pD["[object Error]"]=pD["[object Function]"]=pD["[object Map]"]=pD["[object Number]"]=pD["[object Object]"]=pD["[object RegExp]"]=pD["[object Set]"]=pD["[object String]"]=pD["[object WeakMap]"]=!1;var fD="object"==typeof exports&&exports&&!exports.nodeType&&exports,gD=fD&&"object"==typeof module&&module&&!module.nodeType&&module,mD=gD&&gD.exports===fD&&ki.process,vD=function(){try{var e=gD&&gD.require&&gD.require("util").types;return e||mD&&mD.binding&&mD.binding("util")}catch(e){}}(),yD=vD&&vD.isTypedArray,xD=yD?hD(yD):function(e){return Vi(e)&&dD(e.length)&&!!pD[Hi(e)]},_D=Object.prototype.hasOwnProperty;function bD(e,t){var n=Oi(e),r=!n&&iD(e),i=!n&&!r&&lD(e),o=!n&&!r&&!i&&xD(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!_D.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||cD(u,l))||s.push(u);return s}var wD=Object.prototype;function SD(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wD)}function CD(e,t){return function(n){return e(t(n))}}var TD=CD(Object.keys,Object),MD=Object.prototype.hasOwnProperty;function AD(e){return null!=e&&dD(e.length)&&!AI(e)}function ED(e){return AD(e)?bD(e):function(e){if(!SD(e))return TD(e);var t=[];for(var n in Object(e))MD.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var ID=Object.prototype.hasOwnProperty;function DD(e){if(!Di(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=SD(e),n=[];for(var r in e)("constructor"!=r||!t&&ID.call(e,r))&&n.push(r);return n}function OD(e){return AD(e)?bD(e,!0):DD(e)}var kD="object"==typeof exports&&exports&&!exports.nodeType&&exports,RD=kD&&"object"==typeof module&&module&&!module.nodeType&&module,ND=RD&&RD.exports===kD?Ni.Buffer:void 0,LD=ND?ND.allocUnsafe:void 0;function BD(){return[]}var PD=Object.prototype.propertyIsEnumerable,jD=Object.getOwnPropertySymbols,FD=jD?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(jD(e),(function(t){return PD.call(e,t)})))}:BD,UD=FD;function zD(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var HD=CD(Object.getPrototypeOf,Object),VD=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)zD(t,UD(e)),e=HD(e);return t}:BD;function WD(e,t,n){var r=t(e);return Oi(e)?r:zD(r,n(e))}function YD(e){return WD(e,ED,UD)}function GD(e){return WD(e,OD,VD)}var qD=UI(Ni,"DataView"),QD=UI(Ni,"Promise"),ZD=UI(Ni,"Set"),XD=UI(Ni,"WeakMap"),$D="[object Map]",KD="[object Promise]",JD="[object Set]",eO="[object WeakMap]",tO="[object DataView]",nO=kI(qD),rO=kI(zI),iO=kI(QD),oO=kI(ZD),aO=kI(XD),sO=Hi;(qD&&sO(new qD(new ArrayBuffer(1)))!=tO||zI&&sO(new zI)!=$D||QD&&sO(QD.resolve())!=KD||ZD&&sO(new ZD)!=JD||XD&&sO(new XD)!=eO)&&(sO=function(e){var t=Hi(e),n="[object Object]"==t?e.constructor:void 0,r=n?kI(n):"";if(r)switch(r){case nO:return tO;case rO:return $D;case iO:return KD;case oO:return JD;case aO:return eO}return t});var lO=sO,uO=Object.prototype.hasOwnProperty;var cO=Ni.Uint8Array;function dO(e){var t=new e.constructor(e.byteLength);return new cO(t).set(new cO(e)),t}var pO=/\w*$/;var hO=Li?Li.prototype:void 0,fO=hO?hO.valueOf:void 0;function gO(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return dO(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?dO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?dO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,pO.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,fO?Object(fO.call(r)):{}}}var mO=Object.create,vO=function(){function e(){}return function(t){if(!Di(t))return{};if(mO)return mO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),yO=vO;var xO=vD&&vD.isMap,_O=xO?hD(xO):function(e){return Vi(e)&&"[object Map]"==lO(e)};var bO=vD&&vD.isSet,wO=bO?hD(bO):function(e){return Vi(e)&&"[object Set]"==lO(e)},SO="[object Arguments]",CO="[object Function]",TO="[object Object]",MO={};function AO(e,t,n,r,i,o){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Di(e))return e;var c=Oi(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&uO.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,a)}else{var d=lO(e),p=d==CO||"[object GeneratorFunction]"==d;if(lD(e))return function(e,t){if(t)return e.slice();var n=e.length,r=LD?LD(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==TO||d==SO||p&&!i){if(a=l||p?{}:function(e){return"function"!=typeof e.constructor||SD(e)?{}:yO(HD(e))}(e),!s)return l?function(e,t){return JI(e,VD(e),t)}(e,function(e,t){return e&&JI(t,OD(t),e)}(a,e)):function(e,t){return JI(e,UD(e),t)}(e,function(e,t){return e&&JI(t,ED(t),e)}(a,e))}else{if(!MO[d])return i?e:{};a=gO(e,d,s)}}o||(o=new QI);var h=o.get(e);if(h)return h;o.set(e,a),wO(e)?e.forEach((function(r){a.add(AO(r,t,n,r,e,o))})):_O(e)&&e.forEach((function(r,i){a.set(i,AO(r,t,n,i,e,o))}));var f=c?void 0:(u?l?GD:YD:l?OD:ED)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(f||e,(function(r,i){f&&(r=e[i=r]),KI(a,i,AO(r,t,n,i,e,o))})),a}MO[SO]=MO["[object Array]"]=MO["[object ArrayBuffer]"]=MO["[object DataView]"]=MO["[object Boolean]"]=MO["[object Date]"]=MO["[object Float32Array]"]=MO["[object Float64Array]"]=MO["[object Int8Array]"]=MO["[object Int16Array]"]=MO["[object Int32Array]"]=MO["[object Map]"]=MO["[object Number]"]=MO[TO]=MO["[object RegExp]"]=MO["[object Set]"]=MO["[object String]"]=MO["[object Symbol]"]=MO["[object Uint8Array]"]=MO["[object Uint8ClampedArray]"]=MO["[object Uint16Array]"]=MO["[object Uint32Array]"]=!0,MO["[object Error]"]=MO[CO]=MO["[object WeakMap]"]=!1;var EO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(kb),IO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",jf).models[0]},t.type="cartesian2dAxis",t}(kb);su(IO,iI);var DO={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},OO=ru({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},DO),kO=ru({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},DO),RO={category:OO,value:kO,time:ru({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},kO),log:ou({logBase:10},kO)},NO={value:1,category:1,time:1,log:1};function LO(e,t,n,r){uu(NO,(function(i,o){var a=ru(ru({},RO[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return L(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ab(this),r=n?Ib(e):{};ru(e,t.getTheme().get(o+"Axis")),ru(e,this.getDefaultOption()),e.type=BO(e),n&&Eb(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=tE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",BO)}function BO(e){return e.type||(e.data?"category":"value")}var PO=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return cu(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),pu(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),jO=["x","y"];function FO(e){return"interval"===e.type||"time"===e.type}var UO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=jO,t}return L(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(FO(e)&&FO(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=Bc([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new Qc(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return tc(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return tc(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new Qc(n,r,i,o)},t}(PO),zO=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return L(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(wI),HO=zO;function VO(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Au(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function WO(e){return"cartesian2d"===e.get("coordinateSystem")}function YO(e){var t={xAxisModel:null,yAxisModel:null};return uu(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,jf).models[0];t[r]=o})),t}var GO=Math.log;var qO=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=jO,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=hu(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;nE(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):($E(l,s),nE(l)&&(t=a))}i.length&&(t||$E((t=i.pop()).scale,t.model),uu(i,(function(e){!function(e,t,n){var r=fE.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=XE(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=GO(e.base);u=[GO(u[0])/p,GO(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=iE(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=iE(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=iE(f));var v=f*a;(g=rf((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=rf(v)):m>0&&u[1]<=0&&(m=0,g=-rf(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};uu(n.x,(function(e){ZO(n,"y",e,i)})),uu(n.y,(function(e){ZO(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Mb(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){uu(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(uu(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof dE?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=KE(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=l(r?r[c]:{value:o[0]+c},c),p=eI(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),uu(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}bu(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",jf).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",jf).models[0],a=e.gridModel,s=this._coordsList;if(r)au(s,t=r.coordinateSystem)<0&&(t=null);else if(i&&o)t=this.getCartesian(i.componentIndex,o.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(QO(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new HO(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new dE({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new RE({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new($A.getClass(t)||fE)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,uu(a.x,(function(t,n){uu(a.y,(function(i,o){var a="x"+n+"y"+o,s=new UO(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){uu(rI(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}uu(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(WO(e)){var r=YO(e),i=r.xAxisModel,o=r.yAxisModel;if(!QO(i,t)||!QO(o,t))return;var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return uu(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);au(t,i)<0&&t.push(i),au(n,o)<0&&n.push(o)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(WO(e)){var t=YO(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=jO,e}();function QO(e,t){return e.getCoordSysModel()===t}function ZO(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)XO(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&XO(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function XO(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var $O=qO,KO=Math.PI,JO=function(){function e(e,t){this.group=new Zh,this.opt=t,this.axisModel=e,ou(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Zh({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!ek[e]},e.prototype.add=function(e){ek[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=uf(t-e);return cf(o)?(i=n>0?"top":"bottom",r="center"):cf(o-KO)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<KO?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),ek={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(tc(s,s,a),tc(l,l,a));var c=iu({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new $y({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Fx(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);yu(p)&&(p=[p,p]),(yu(h)||_u(h))&&(h=[h,h]);var f=kT(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];uu([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==p[r]&&null!=p[r]){var i=OT(p[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=ik(i.getTicksCoords(),t.transform,l,ou(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,r,t,e),o=function(e,t,n,r){var i=n.axis,o=Au(r.axisLabelShow,n.get(["axisLabel","show"]));if(!o||i.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=i.getViewLabels(),u=(Au(r.labelRotate,a.get("rotate"))||0)*KO/180,c=JO.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],h=JO.isLabelSilent(n),f=n.get("triggerEvent");return uu(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,g=o.formattedLabel,m=o.rawLabel,v=a;if(d&&d[u]){var y=d[u];bu(y)&&y.textStyle&&(v=new T_(y.textStyle,a,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(u),b=new nv({x:_,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:h,z2:10+(o.level||0),style:o_(v,{text:g,align:v.getShallow("align",!0)||c.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||c.textVerticalAlign,fill:vu(x)?x("category"===i.type?m:"value"===i.type?u+"":u,l):x})});if(b.anid="label_"+u,f){var w=JO.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=m,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),rv(b).eventData=w}t.add(b),b.updateTransform(),p.push(b),e.add(b),b.decomposeTransform()})),p}(n,r,t,e);(function(e,t,n){if(nI(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(tk(o),tk(u)):nk(o,a)&&(r?(tk(a),tk(c)):(tk(o),tk(u)));!1===i?(tk(s),tk(d)):nk(l,s)&&(i?(tk(l),tk(p)):(tk(s),tk(d)))}(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=ou(s.getLineStyle(),ou(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=ik(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&function(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new Qc(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new mx(f.localRect,f.transform)),d||(d=new mx(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new mx(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(cu(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=Au(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,rk(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*KO/180),rk(s)?o=JO.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=uf(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;cf(a-KO/2)?(o=l?"bottom":"top",i="center"):cf(a-1.5*KO)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*KO&&a>KO/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=Au(e.nameTruncateMaxWidth,m.maxWidth,a),x=new nv({x:h[0],y:h[1],rotation:o.rotation,silent:JO.isLabelSilent(t),style:o_(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if($x({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=JO.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,rv(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function tk(e){e&&(e.ignore=!0)}function nk(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=kc([]);return Lc(i,i,-e.rotation),n.applyTransform(Rc([],i,e.getLocalTransform())),r.applyTransform(Rc([],i,t.getLocalTransform())),n.intersect(r)}}function rk(e){return"middle"===e||"center"===e}function ik(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(tc(a,a,t),tc(s,s,t));var c=new $y({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});Fx(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var ok=JO;function ak(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),o=i.get("link",!0)||[],a=[];uu(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=ck(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(uu(n.getAxes(),gu(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&uu(p.baseAxes,gu(h,!d||"cross",c)),d&&uu(p.otherAxes,gu(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",i),p=d.get("show");if(p&&("auto"!==p||r||uk(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};uu(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=nu(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&ou(l,c.textStyle)}}return e.model.getModel("axisPointer",new T_(s,n,r))}(c,u,i,t,r,s):d;var h=d.get("snap"),f=d.get("triggerEmphasis"),g=ck(c.model),m=s||h||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:uk(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(sk(o[r+"AxisId"],n.id)||sk(o[r+"AxisIndex"],n.componentIndex)||sk(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&uu(e.coordSysAxesInfo[ck(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function sk(e,t){return"all"===e||mu(e)&&au(e,t)>=0||e===t}function lk(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[ck(e)]}function uk(e){return!!e.get(["handle","show"])}function ck(e){return e.type+"||"+e.id}var dk={},pk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=lk(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=uk(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=function(e){var t=lk(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){dk[e]=t},t.getAxisPointerClass=function(e){return e&&dk[e]},t.type="axis",t}(fC),hk=pk,fk=Nf();var gk=["axisLine","axisTickLabel","axisName"],mk=["splitArea","splitLine","minorSplitLine"],vk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return L(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Zh,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=VO(a,t),l=new ok(t,iu({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(nE(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));uu(gk,l.add,l),this._axisGroup.add(l.getGroup()),uu(mk,(function(e){t.get([e,"show"])&&yk[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||Yx(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){fk(this).splitAreaColors=null},t.type="cartesianAxis",t}(hk),yk={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=mu(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),p=[],h=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(p[0]=m,p[1]=l.y,h[0]=m,h[1]=l.y+l.height):(p[0]=l.x,p[1]=m,h[0]=l.x+l.width,h[1]=m);var v=c++%s.length,y=d[g].tickValue,x=new $y({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:h[0],y2:h[1]},style:ou({stroke:s[v]},f),silent:!0});Fx(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=i.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new $y({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});Fx(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=fk(e).splitAreaColors,p=Uu(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();for(s=mu(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var S=u[f-1].tickValue;null!=S&&p.set(S,h),t.add(new Um({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:ou({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%c}fk(e).splitAreaColors=p}}}(e,t,n,r)}},xk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="xAxis",t}(vk),_k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=xk.type,t}return L(t,e),t.type="yAxis",t}(vk),bk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return L(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Um({shape:e.coordinateSystem.getRect(),style:ou({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(fC),wk={offset:0};function Sk(e){e.registerComponentView(bk),e.registerComponentModel(EO),e.registerCoordinateSystem("cartesian2d",$O),LO(e,"x",IO,wk),LO(e,"y",IO,wk),e.registerComponentView(xk),e.registerComponentView(_k),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var Ck=Nf(),Tk=nu,Mk=fu,Ak=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=gu(Ek,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Zh,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);kk(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=lk(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=Ck(e).pointerEl=new e_[i.type](Tk(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Ck(e).labelEl=new nv(Tk(t.label));e.add(i),Dk(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Ck(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Ck(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),Dk(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=qx(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Ac(e.event)},onmousedown:Mk(this._onHandleDragMove,this,0,0),drift:Mk(this._onHandleDragMove,this),ondragend:Mk(this._onHandleDragEnd,this)}),r.add(i)),kk(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");mu(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,IC(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){Ek(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Ok(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Ok(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Ok(r)),Ck(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),DC(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function Ek(e,t,n,r){Ik(Ck(n).lastProp,r)||(Ck(n).lastProp=r,t?bx(n,r,e):(n.stopAnimation(),n.attr(r)))}function Ik(e,t){if(bu(e)&&bu(t)){var n=!0;return uu(t,(function(t,r){n=n&&Ik(e[r],t)})),!!n}return e===t}function Dk(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Ok(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function kk(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function Rk(e,t,n,r,i){var o=Nk(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=fb(a.get("padding")||0),l=a.getFont(),u=Oh(o,l),c=i.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:o_(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function Nk(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:JE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};uu(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),yu(a)?o=a.replace("{value}",o):vu(a)&&(o=a(s))}return o}function Lk(e,t,n){var r=[1,0,0,1,0,0];return Lc(r,r,n.rotation),Nc(r,r,n.position),Hx([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var Bk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=Pk(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=jk[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=ok.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),Rk(t,r,i,o,{position:Lk(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,VO(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=VO(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=Lk(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=Pk(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(Ak);function Pk(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var jk={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=Fk(e),{x1:r[o=o||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],o=Fk(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function Fk(e){return"x"===e.dim?0:1}var Uk=Bk,zk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(kb),Hk=Nf(),Vk=uu;function Wk(e,t,n){if(!Ll.node){var r=t.getZr();Hk(r).records||(Hk(r).records={}),function(e,t){if(Hk(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);Vk(Hk(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}Hk(e).initialized=!0,n("click",gu(Gk,"click")),n("mousemove",gu(Gk,"mousemove")),n("globalout",Yk)}(r,t),(Hk(r).records[e]||(Hk(r).records[e]={})).handler=n}}function Yk(e,t,n){e.handler("leave",null,n)}function Gk(e,t,n,r){t.handler(e,n,r)}function qk(e,t){if(!Ll.node){var n=t.getZr();(Hk(n).records||{})[e]&&(Hk(n).records[e]=null)}}var Qk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Wk("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){qk("axisPointer",t)},t.prototype.dispose=function(e,t){qk("axisPointer",t)},t.type="axisPointer",t}(fC),Zk=Qk;function Xk(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Rf(o,e);if(null==a||a<0||mu(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=o.mapDimension(d),f=[];f[p]=o.get(h,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(cu(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var $k=Nf();function Kk(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||fu(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){rR(i)&&(i=Xk({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=rR(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||rR(i),p={},h={},f={list:[],map:{}},g={showPointer:gu(eR,h),showTooltip:gu(tR,f)};uu(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);uu(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&Jk(e,a,g,!1,p)}}))}));var m={};return uu(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&uu(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,nR(t),nR(e)))),m[e.key]=o}}))})),uu(m,(function(e,t){Jk(c[t],e,g,!0,p)})),function(e,t,n){var r=n.axesInfo=[];uu(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,p),function(e,t,n,r){if(rR(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=$k(r)[i]||{},a=$k(r)[i]={};uu(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&uu(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];uu(o,(function(e,t){!a[t]&&l.push(e)})),uu(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function Jk(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return uu(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,i=u,o.length=0),uu(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&iu(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function eR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function tR(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=ck(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function nR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function rR(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function iR(e){hk.registerAxisPointerClass("CartesianAxisPointer",Uk),e.registerComponentModel(zk),e.registerComponentView(Zk),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!mu(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=ak(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Kk)}function oR(e){sI(Sk),sI(iR)}var aR="\0_ec_interaction_mutex";function sR(e,t){return!!lR(e)[t]}function lR(e){return e[aR]||(e[aR]={})}lA({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Wu);var uR=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=fu(n._mousedownHandler,n),i=fu(n._mousemoveHandler,n),o=fu(n._mouseupHandler,n),a=fu(n._mousewheelHandler,n),s=fu(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=ou(nu(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return L(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Ec(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&pR("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!sR(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Ac(e.event),dR(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Ec(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=pR("zoomOnMouseWheel",e,this._opt),n=pR("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;cR(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);cR(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){sR(this._zr,"globalPan")||cR(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(lc);function cR(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(Ac(r.event),dR(e,t,n,r,i))}function dR(e,t,n,r,i){i.isAvailableBehavior=fu(pR,null,n,r),e.trigger(t,i)}function pR(e,t,n){var r=n[e];return!e||r&&(!yu(r)||t.event[r+"Key"])}var hR=uR,fR={axisPointer:1,tooltip:1,brush:1};function gR(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=vR(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=vR(s,[0,a]),i=o=vR(s,[i,o]),r=0}t[0]=vR(t[0],n),t[1]=vR(t[1],n);var l=mR(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=vR(t[r],d),u=mR(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=mR(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function mR(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function vR(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var yR=!0,xR=Math.min,_R=Math.max,bR=Math.pow,wR="globalPan",SR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},TR={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},MR=0,AR=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Zh,n._uid="brushController_"+MR++,uu(eN,(function(e,t){this._handlers[t]=fu(e,this)}),n),n}return L(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){lR(e)[t]=n}(t,wR,this._uid),uu(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=ru(nu(TR),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=lR(e);r[t]===n&&(r[t]=null)}(e,wR,this._uid),uu(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};uu(e,(function(e){t[e.panelId]=nu(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=cu(e,(function(e){return ru(nu(TR),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new vA(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(a).update(a).remove((function(e){t[e]!==i&&r.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):IR(r,ER(r,s));kR(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),BR(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(lc);function ER(e,t){var n=nN[t.brushType].createCover(e,t);return n.__brushOption=t,OR(n,t),e.group.add(n),n}function IR(e,t){var n=RR(t);return n.endCreating&&(n.endCreating(e,t),OR(t,t.__brushOption)),t}function DR(e,t){var n=t.__brushOption;RR(t).updateCoverShape(e,t,n.range,n)}function OR(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function kR(e,t){RR(t).updateCommon(e,t),DR(e,t)}function RR(e){return nN[e.__brushOption.brushType]}function NR(e,t,n){var r,i=e._panels;if(!i)return yR;var o=e._transform;return uu(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function LR(e,t){var n=e._panels;if(!n)return yR;var r=t.__brushOption.panelId;return null!=r?n[r]:yR}function BR(e){var t=e._covers,n=t.length;return uu(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function PR(e,t){var n=cu(e._covers,(function(e){var t=e.__brushOption,n=nu(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function jR(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function FR(e,t,n,r){var i=new Zh;return i.add(new Um({name:"main",style:VR(n),silent:!0,draggable:!0,cursor:"move",drift:gu(GR,e,t,i,["n","s","w","e"]),ondragend:gu(PR,t,{isEnd:!0})})),uu(r,(function(n){i.add(new Um({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:gu(GR,e,t,i,n),ondragend:gu(PR,t,{isEnd:!0})}))})),i}function UR(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=_R(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],p=c-o+i/2,h=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;HR(e,t,"main",a,s,f,g),r.transformable&&(HR(e,t,"w",l,u,o,v),HR(e,t,"e",p,u,o,v),HR(e,t,"n",l,u,m,o),HR(e,t,"s",l,h,m,o),HR(e,t,"nw",l,u,o,o),HR(e,t,"ne",p,u,o,o),HR(e,t,"sw",l,h,o,o),HR(e,t,"se",p,h,o,o))}function zR(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(VR(n)),i.attr({silent:!r,cursor:r?"move":"default"}),uu([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?YR(e,n[0]):function(e,t){var n=[YR(e,t[0]),YR(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?CR[o]+"-resize":null})}))}function HR(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=xR(e[0][0],e[1][0]),n=xR(e[0][1],e[1][1]),r=_R(e[0][0],e[1][0]),i=_R(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(ZR(e,t,[[r,i],[r+o,i+a]])))}function VR(e){return ou({strokeNoScale:!0},e.brushStyle)}function WR(e,t,n,r){var i=[xR(e,n),xR(t,r)],o=[_R(e,n),_R(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function YR(e,t){var n=Vx({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return zx(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function GR(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=QR(t,i,o);uu(r,(function(e){var t=SR[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(WR(s[0][0],s[1][0],s[0][1],s[1][1])),kR(t,n),PR(t,{isEnd:!1})}function qR(e,t,n,r){var i=t.__brushOption.range,o=QR(e,n,r);uu(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),kR(e,t),PR(e,{isEnd:!1})}function QR(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function ZR(e,t,n){var r=LR(e,t);return r&&r!==yR?r.clipPath(n,e._transform):nu(n)}function XR(e){var t=e.event;t.preventDefault&&t.preventDefault()}function $R(e,t,n){return e.childOfName("main").contain(t,n)}function KR(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return bR(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&BR(e);var l=nu(s);l.brushType=JR(l.brushType,a),l.panelId=a===yR?null:a.panelId,o=e._creatingCover=ER(e,l),e._covers.push(o)}if(o){var u=nN[JR(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(ZR(e,o,e._track)),r&&(IR(e,o),u.updateCommon(e,o)),DR(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&NR(e,t,n)&&BR(e)&&(i={isEnd:r,removeOnClick:!0});return i}function JR(e,t){return"auto"===e?t.defaultBrushType:e}var eN={mousedown:function(e){if(this._dragging)tN(this,e);else if(!e.target||!e.target.draggable){XR(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=NR(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=NR(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===yR||s.panelId===o.panelId)&&nN[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){XR(e);var i=KR(this,e,r,!1);i&&PR(this,i)}},mouseup:function(e){tN(this,e)}};function tN(e,t){if(e._dragging){XR(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=KR(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&PR(e,o)}}var nN={lineX:rN(0),lineY:rN(1),rect:{createCover:function(e,t){function n(e){return e}return FR({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=jR(e);return WR(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){UR(e,t,n,r)},updateCommon:zR,contain:$R},polygon:{createCover:function(e,t){var n=new Zh;return n.add(new qy({name:"main",style:VR(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Wy({name:"main",draggable:!0,drift:gu(qR,e,t),ondragend:gu(PR,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:ZR(e,t,n)})},updateCommon:zR,contain:$R}};function rN(e){return{createCover:function(t,n){return FR({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=jR(t);return[xR(n[0][e],n[1][e]),_R(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=LR(t,n);if(a!==yR&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),UR(t,n,l,i)},updateCommon:zR,contain:$R}}var iN=AR;function oN(e){return e=lN(e),function(t){return Gx(t,e)}}function aN(e,t){return e=lN(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function sN(e,t,n){var r=lN(e);return function(e,i){return r.contain(i[0],i[1])&&!function(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!fR.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function lN(e){return Qc.create(e)}var uN=["x","y","radius","angle","single"],cN=["cartesian2d","polar","singleAxis"];function dN(e){return e+"Axis"}function pN(e,t){var n,r=Uu(),i=[],o=Uu();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function hN(e){var t=e.ecModel,n={infoList:[],infoMap:Uu()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(dN(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var fN=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),gN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return L(t,e),t.prototype.init=function(e,t,n){var r=mN(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=mN(e);ru(this.option,e,!0),ru(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;uu([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Uu();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return uu(uN,(function(n){var r=this.getReferringComponents(dN(n),Ff);if(r.specified){t=!0;var i=new fN;uu(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new fN;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",jf).models[0];a&&uu(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",jf).models[0]&&o.add(e.componentIndex)}))}}}r&&uu(uN,(function(t){if(r){var i=n.findComponents({mainType:dN(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new fN;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");uu([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(dN(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){uu(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(dN(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;uu([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;uu(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(kb);function mN(e){var t={};return uu(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var vN=gN,yN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(fC),xN=uu,_N=of,bN=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return au(cN,t)>=0}(t)){var n=dN(this._dimName),r=t.getReferringComponents(n,jf).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return nu(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];xN(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(tf(c,o,n))):(t=!0,c=tf(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c})),_N(s),_N(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";gR(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=tf(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];xN(n,(function(e){!function(e,t,n){t&&uu(rI(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=QE(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&xN(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=cu(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],p=u>o[1];if(c&&!d&&!p)return!0;c&&(i=!0),d&&(t=!0),p&&(n=!0)}return i&&t&&n}))}else xN(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));xN(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;xN(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=tf(n[0]+o,n,[0,100],!0):null!=i&&(o=tf(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=sf(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();var wN=bN,SN={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(dN(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new wN(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Uu();return uu(n,(function(e){uu(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var CN=!1;function TN(e){CN||(CN=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,SN),function(e){e.registerAction("dataZoom",(function(e,t){uu(pN(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}var MN=function(){},AN={};var EN=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],IN=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=ON(t,e);uu(kN,(function(e,t){(!n||!n.include||au(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=LN[e.brushType](0,n,t);e.__rangeOffset={offset:PN[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){uu(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&uu(r.coordSyses,(function(r){var i=LN[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){uu(e,(function(e){var n,r,i,o,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=LN[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?PN[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=FN(n),o=FN(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return cu(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:oN(r),isTargetByCursor:sN(r,e,n.coordSysModel),getLinearBrushOtherExtent:aN(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&au(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=ON(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<RN.length;s++)if(RN[s](r,o))return o}return!0},e}();function DN(e){return e[0]>e[1]&&e.reverse(),e}function ON(e,t){return Bf(e,t,{includeMainTypes:EN})}var kN={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Uu(),a={},s={};(n||r||i)&&(uu(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),uu(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),uu(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];uu(i.getCartesians(),(function(e,t){(au(n,e.getAxis("x").model)>=0||au(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:NN.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){uu(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:NN.geo})}))}},RN=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],NN={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(zx(e)),t}},LN={lineX:gu(BN,0),lineY:gu(BN,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[DN([i[0],o[0]]),DN([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:cu(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function BN(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=DN(cu([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var PN={lineX:gu(jN,0),lineY:gu(jN,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return cu(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function jN(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function FN(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var UN=IN,zN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(kb);function HN(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function VN(e){if(Ll.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var WN=VN(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function YN(e,t){if(!e)return t;t=hb(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var GN=YN(VN(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),qN=YN(WN,"transform"),QN="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ll.transform3dSupported?"will-change:transform;":"");function ZN(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ll.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Ll.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+qN+":"+a+";":[["top",0],["left",0],[WN,a]]}function XN(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=JS(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&i&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Ll.transformSupported?","+qN+r:",left"+r+",top"+r),GN+":"+i}(i,n)),o&&r.push("background-color:"+o),uu(["width","color","radius"],(function(t){var n="border-"+t,i=hb(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),uu(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+fb(d).join("px ")+"px"),r.join(";")+";"}function $N(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){fc(hc,t,r,i,!0)&&fc(e,n,hc[0],hc[1])}(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var KN=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ll.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;$N(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Tc(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t,n,r,i=this._container,o=(n="position",(r=(t=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t))?n?r[n]:r:null),a=i.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative");var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=QN+XN(e,!this._firstShow,this._longHide)+ZN(i[0],i[1],!0)+"border-color:"+xb(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(yu(i)&&"item"===n.get("trigger")&&!HN(n)&&(a=function(e,t,n){if(!yu(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=xb(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=qN+":";au(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,p=l+i,h=p*Math.abs(Math.cos(d))+p*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-p)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),yu(e))o.innerHTML=e+a;else if(e){o.innerHTML="",mu(e)||(e=[e]);for(var s=0;s<e.length;s++)Cu(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if($N(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;uu(ZN(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Ll.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(fu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),JN=KN;function eL(e){return Math.max(0,e)}function tL(e){var t=eL(e.shadowBlur||0),n=eL(e.shadowOffsetX||0),r=eL(e.shadowOffsetY||0);return{left:eL(t-n),right:eL(t+n),top:eL(t-r),bottom:eL(t+r)}}function nL(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var rL=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),nL(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;bu(e)&&xf(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new nv({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:JS(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),uu(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),uu(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=tL(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;nL(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=eL(i.borderWidth||0),a=tL(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(fu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),iL=new Um({shape:{x:-1,y:-1,width:2,height:2}}),oL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.init=function(e,t){if(!Ll.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Ll.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new rL(t):new JN(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!Ll.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?IC(this,"_updatePosition",50,"fixRate"):DC(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");Wk("itemTooltip",this._api,fu((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ll.node&&n.getDom()){var i=sL(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=Pf(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Uf(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=rv(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=iL;l.x=r.x,l.y=r.y,l.update(),rv(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=Xk(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(sL(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===aL([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,yT(n,(function(e){return null!=rv(e).dataIndex?(i=e,!0):null!=rv(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=fu(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=aL([t.tooltipOption],r),a=this._renderMode,s=[],l=WS("section",{blocks:[],noHeader:!0}),u=[],c=new eC;uu(e,(function(e){uu(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=Nk(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=WS("section",{header:o,noHeader:!Ru(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),uu(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=JE(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",xb(f.color),a);var g=hS(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var v=aL([p],r).get("valueFormatter");d.blocks.push(v?iu({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,p=o.get("order"),h=XS(l,c,a,p,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=rv(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=aL([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new eC;g.marker=m.makeTooltipMarker("item",xb(g.color),d);var v=hS(s.formatTooltip(l,!1,u)),y=h.get("order"),x=h.get("valueFormatter"),_=v.frag,b=_?XS(x?iu({valueFormatter:x},_):_,m,d,y,r.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=rv(t),i=r.tooltipConfig.option||{};if(yu(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:i.content});var s=e.positionDefault,l=aL(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new eC;this._showOrMove(l,(function(){var n=nu(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(yu(c)){var h=e.ecModel.get("useUTC"),f=mu(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=Z_(f.axisValue,d,h)),d=yb(d,n,!0)}else if(vu(c)){var g=fu((function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||mu(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:mu(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),vu(t)&&(t=t([n,r],o,i.el,p,{viewSize:[s,l],contentSize:u.slice()})),mu(t))n=nf(t[0],s),r=nf(t[1],l);else if(bu(t)){var h=t;h.width=u[0],h.height=u[1];var f=Mb(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(yu(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,p,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>r?e-=l+o:e+=o);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=lL(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=lL(d)?u[1]/2:"bottom"===d?u[1]:0),HN(e)){g=function(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&uu(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&uu(a,(function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&uu(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&uu(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Ll.node&&t.getDom()&&(DC(this,"_updatePosition"),this._tooltipContent.dispose(),qk("itemTooltip",t))},t.type="tooltip",t}(fC);function aL(e,t,n){var r,i=t.ecModel;n?(r=new T_(n,i,i),r=new T_(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof T_&&(a=a.get("tooltip",!0)),yu(a)&&(a={formatter:a}),a&&(r=new T_(a,r,i)))}return r}function sL(e,t){return e.dispatchAction||fu(t.dispatchAction,t)}function lL(e){return"center"===e||"middle"===e}var uL=oL;function cL(e){sI(iR),e.registerComponentModel(zN),e.registerComponentView(uL),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Wu),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Wu)}var dL=["rect","polygon","keep","clear"];function pL(e,t){var n=wf(e?e.brush:[]);if(n.length){var r=[];uu(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;mu(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};uu(e,(function(e){t[e]=1})),e.length=0,uu(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,dL)}}var hL=uu,fL=bu,gL=-1,mL=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=nu(t);this.type=r,this.mappingMethod=n,this._normalizeData=ML[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(vL(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,uu(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(hL(t,(function(e,t){n[e]=t})),!mu(r)){var i=[];bu(r)?hL(r,(function(e,t){var r=n[t];i[null!=r?r:gL]=e})):i[-1]=r,r=TL(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):vL(i,!0):(ku("linear"!==n||i.dataExtent),vL(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return fu(this._normalizeData,this)},e.listVisualTypes=function(){return hu(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){bu(e)?uu(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=mu(t)?[]:bu(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&hL(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(mu(e))e=e.slice();else{if(!fL(e))return[];var t=[];hL(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||yu(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(AL(c[1],e,u[1]))return o}else if(u[1]===1/0){if(AL(c[0],u[0],e))return o}else if(AL(c[0],u[0],e)&&AL(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:_L("color"),getColorMapper:function(){var e=this.option;return fu("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),bL.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=cp(t,e.parsedVisual,r),i?r:pp(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return pp(cp(e,this.option.parsedVisual),"rgba")},category:bL,piecewise:function(e,t){var n=CL.call(this,t);return null==n&&(n=pp(cp(e,this.option.parsedVisual),"rgba")),n},fixed:wL}},colorHue:yL((function(e,t){return dp(e,t)})),colorSaturation:yL((function(e,t){return dp(e,null,t)})),colorLightness:yL((function(e,t){return dp(e,null,null,t)})),colorAlpha:yL((function(e,t){return function(e,t){var n=sp(e);if(n&&null!=t)return n[3]=$d(t),pp(n,"rgba")}(e,t)})),decal:{applyVisual:_L("decal"),_normalizedToVisual:{linear:null,category:bL,piecewise:null,fixed:null}},opacity:{applyVisual:_L("opacity"),_normalizedToVisual:SL([0,1])},liftZ:{applyVisual:_L("liftZ"),_normalizedToVisual:{linear:wL,category:wL,piecewise:wL,fixed:wL}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:xL,category:bL,piecewise:function(e,t){var n=CL.call(this,t);return null==n&&(n=xL.call(this,e)),n},fixed:wL}},symbolSize:{applyVisual:_L("symbolSize"),_normalizedToVisual:SL([0,1])}},e}();function vL(e,t){var n=e.visual,r=[];bu(n)?hL(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),TL(e,r)}function yL(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:SL([0,1])}}function xL(e){var t=this.option.visual;return t[Math.round(tf(e,[0,1],[0,t.length-1],!0))]||{}}function _L(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function bL(e){var t=this.option.visual;return t[this.option.loop&&e!==gL?e%t.length:e]}function wL(){return this.option.visual[0]}function SL(e){return{linear:function(t){return tf(t,e,this.option.visual,!0)},category:bL,piecewise:function(t,n){var r=CL.call(this,n);return null==r&&(r=tf(t,e,this.option.visual,!0)),r},fixed:wL}}function CL(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[mL.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function TL(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=cu(t,(function(e){var t=sp(e);return t||[0,0,0,1]}))),t}var ML={linear:function(e){return tf(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=mL.findPieceIndex(e,t,!0);if(null!=n)return tf(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?gL:t},fixed:Wu};function AL(e,t,n){return e?t<=n:t<n}var EL=mL,IL=uu;function DL(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var OL={lineX:kL(0),lineY:kL(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&uI(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,l=r[0];return!!(uI(r,i,o)||uI(r,i+a,o)||uI(r,i,o+s)||uI(r,i+a,o+s)||Qc.create(e).contain(l[0],l[1])||Qx(i,o,i+a,o,r)||Qx(i,o,i,o+s,r)||Qx(i+a,o,i+a,o+s,r)||Qx(i,o+s,i+a,o+s,r))||void 0}}};function kL(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return RL(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),RL(s[0],a)||RL(s[1],a)||RL(a[0],s)||RL(a[1],s)}}}}function RL(e,t){return t[0]<=e&&e<=t[1]}var NL=["inBrush","outOfBrush"],LL="__ecBrushSelect",BL="__ecInBrushSelectEvent";function PL(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new UN(t.option,e)).setInputRanges(t.areas,e)}))}function jL(e,t,n){var r,i,o=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),PL(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:nu(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,i=s.throttleDelay);var h=cu(t.areas,(function(e){var t=zL[e.brushType],n=ou({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return OL[t].point(r,n,e)},rect:function(r){return OL[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return IL(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);IL(e[t],(function(e,r){if(EL.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new EL(i),"opacity"===r&&((i=nu(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new EL(i))}}))})),r}(t.option,NL,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}mu(l)&&uu(l,(function(e){u[e]=1})),e.eachSeries((function(n,r){var i=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,r):function(n,r,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(mu(n)?au(n,t)<0:t!==n)}(t,r))return;if(uu(h,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),p=p||m(i)})),g(r)&&m(i)){var o=n.getData();o.each((function(e){UL(n,i,o,e)&&(c[e]=1)}))}}(n,r,i)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],i=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return UL(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return mT(n,a,e)}function u(e,t){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=r.call(i,e),h=t[p],f=s[p],g=0,m=f.length;g<m;g++){var v=f[g];h[v]&&h[v].applyVisual(e,l,u)}}uu(e,(function(e){var n=EL.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(NL,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[BL])return;o[LL]||(o[LL]=FL);var a=IC(o,LL,n,t);a(e,r)}(t,r,i,o,n)}function FL(e,t){if(!e.isDisposed()){var n=e.getZr();n[BL]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[BL]=!1}}function UL(e,t,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}var zL={rect:function(e){return HL(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[r];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&HL(t)}};function HL(e){return new Qc(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var VL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new iN(t.getZr())).on("brush",fu(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){PL(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:nu(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:nu(n),$from:t})},t.type="brush",t}(fC),WL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return L(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;uu(n,(function(e){t.hasOwnProperty(e)&&DL(t[e])&&(r=!0)})),r&&uu(n,(function(n){t.hasOwnProperty(n)&&DL(t[n])?e[n]=nu(t[n]):delete e[n]}))}(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=cu(e,(function(e){return YL(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=YL(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(kb);function YL(e,t){return ru({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new T_(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var GL=WL,qL=["rect","polygon","lineX","lineY","keep","clear"],QL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,uu(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return uu(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:qL.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:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(MN),ZL=QL;function XL(e){e.registerComponentView(VL),e.registerComponentModel(GL),e.registerPreprocessor(pL),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,jL),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Wu),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Wu),function(e,t){AN[e]=t}("brush",ZL)}var $L=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return L(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(kb),KL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Eu(e.get("textBaseline"),e.get("textVerticalAlign")),l=new nv({style:o_(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new nv({style:o_(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",(function(){_b(p,"_"+e.get("target"))})),h&&d.on("click",(function(){_b(h,"_"+e.get("subtarget"))})),rv(l).eventData=rv(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Mb(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new Um({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(b)}},t.type="title",t}(fC);function JL(e){e.registerComponentModel($L),e.registerComponentView(KL)}function eB(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=cS(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(cS(e,t,n[a]));return o.join(" ")}}function tB(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!mu(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}var nB=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return L(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=OT(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=rB,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){kv(this.childAt(0))},t.prototype.downplay=function(){Rv(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):bx(p,d,a,n),Ex(p)}if(this._updateCommon(e,n,s,r,i),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Sx(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=i_(m),p=v.getShallow("scale"),h=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=kT(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof km){var w=f.style;f.useStyle(iu({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(iu({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var T=i&&i.useNameLabel;r_(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return T?e.getName(t):eB(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var A=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;M.scaleX=this._sizeX*A,M.scaleY=this._sizeY*A,this.setSymbolScale(1),Yv(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=rv(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&Tx(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Tx(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return mu(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(Zh);function rB(e,t){this.parent.drift(e,t)}var iB=nB;function oB(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function aB(e){return null==e||bu(e)||(e={isIgnore:e}),e||{}}function sB(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:i_(t),cursorStyle:t.get("cursor")}}var lB=function(){function e(e){this.group=new Zh,this._SymbolCtor=e||iB}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=aB(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=sB(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(oB(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var p=i.getItemGraphicEl(d),h=u(c);if(oB(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):bx(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=sB(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=aB(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(oB(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){Jx(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}(),uB=lB;function cB(e,t){return e.type===t}var dB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return L(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),mu(t)&&uu(t,(function(e,r){yu(e)&&(e={type:e}),t[r]=ru(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&Of(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=Uu(),o=cu(r,(function(e){return(yu(e)||_u(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new T_(e,this,this.ecModel))}),this);this._data=pu(o,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&uu(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;uu(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;uu(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&au(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(kb),pB=dB,hB=gu,fB=uu,gB=Zh,mB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return L(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new gB),this.group.add(this._selectorGroup=new gB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Mb(l,u,c),p=this.layoutInner(e,i,d,r,a,s),h=Mb(ou({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=fb(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new Um({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=Uu(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),fB(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new gB;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style");this._createItem(p,a,o,i,t,e,f,m,g,u,r).on("click",hB(vB,a,null,r,c)).on("mouseover",hB(xB,p.name,null,r,c)).on("mouseout",hB(_B,p.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),p=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),f=sp(p.fill);f&&0===f[3]&&(f[3]=.2,p=iu(iu({},p),{fill:pp(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},p,h,u,r).on("click",hB(vB,null,a,r,c)).on("mouseover",hB(xB,null,a,r,c)).on("mouseout",hB(_B,null,a,r,c)),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();fB(e,(function(e){var r=e.type,i=new nv({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),r_(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Wv(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,p=i.get("itemWidth"),h=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),fB(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?rM(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new gB,_=r.getModel("textStyle");if(!vu(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=OT(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:h,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,S=o,C=i.get("formatter"),T=t;yu(C)&&C?T=C.replace("{name}",null!=t?t:""):vu(C)&&(T=C(t));var M=f?_.getTextColor():r.get("inactiveColor");x.add(new nv({style:o_(_,{text:T,x:w,y:h/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var A=new Um({shape:x.getBoundingRect(),invisible:!0}),E=r.getModel("tooltip");return E.get("show")&&$x({el:A,componentModel:i,itemName:t,itemTooltipOption:E.option}),x.add(A),x.eachChild((function(e){e.silent=!0})),A.silent=!u,this.getContentGroup().add(x),Wv(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Tb(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){Tb("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===o?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-h]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(fC);function vB(e,t,n,r){_B(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),xB(e,t,n,r)}function yB(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function xB(e,t,n,r){yB(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function _B(e,t,n,r){yB(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var bB=mB;function wB(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function SB(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),uu(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function CB(e){e.registerComponentModel(pB),e.registerComponentView(bB),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,wB),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",gu(SB,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",gu(SB,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",gu(SB,"inverseSelect")),e.registerAction("legendSelect","legendselected",gu(SB,"select")),e.registerAction("legendUnSelect","legendunselected",gu(SB,"unSelect"))}(e)}function TB(e,t,n){var r=[1,1];r[e.getOrient().index]=0,Eb(t,n,{type:"box",ignoreSize:!!r})}var MB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Ib(t);e.prototype.init.call(this,t,n,r),TB(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),TB(this,this.option,t)},t.type="legend.scroll",t.defaultOption=E_(pB.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}(pB),AB=Zh,EB=["width","height"],IB=["x","y"],DB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return L(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new AB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new AB)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=mu(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",o=qx(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:fu(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new nv({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=EB[s],u=IB[s],c=EB[1-s],d=IB[1-s];i&&Tb("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=nu(n);i&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+p;else{var v=h[l]+p;f[s]-=v,m[u]-=v}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;Tb(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),Tb("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],v=Eu(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-p[i]:g[r]+=p[i]+v);m[1-r]+=d[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=h?n[i]:d[i],y[o]=Math.max(d[o],p[o]),y[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[i],h){var x={x:0,y:0};x[i]=Math.max(n[i]-p[i]-v,0),x[o]=y[o],u.setClipPath(new Um({shape:x})),u.__rectSize=x[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&bx(l,{x:_.contentPosition[0],y:_.contentPosition[1]},h?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;uu(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",yu(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=EB[i],a=IB[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=y(u);p.contentPosition[i]=-h.s;for(var f=s+1,g=h,m=h,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=v;for(f=s-1,g=h,m=h,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=v;return p;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(bB),OB=DB;function kB(e){sI(CB),e.registerComponentModel(MB),e.registerComponentView(OB),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}function RB(e){sI(CB),sI(kB)}var NB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="dataZoom.inside",t.defaultOption=E_(vN.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(vN),LB=Nf();function BB(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function PB(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function jB(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function FB(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=LB(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Uu());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){uu(hN(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:gu(jB,t),dispatchAction:gu(PB,e),dataZoomInfoMap:null,controller:null},r=n.controller=new hR(e.getZr());return uu(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Uu())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each((function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),IC(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else BB(r,e)}))}))}var UB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return L(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){LB(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:fu(zB.pan,this),zoom:fu(zB.zoom,this),scrollMove:fu(zB.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=LB(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||BB(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(yN),zB={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=VB[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return gR(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:HB((function(e,t,n,r,i,o){var a=VB[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:HB((function(e,t,n,r,i,o){return VB[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function HB(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return gR(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var VB={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},WB=UB;function YB(e){TN(e),e.registerComponentModel(NB),e.registerComponentView(WB),FB(e)}var GB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=E_(vN.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(vN),qB=Um,QB="horizontal",ZB="vertical",XB=["line","bar","candlestick","scatter"],$B={easing:"cubicOut",duration:100,delay:0},KB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return L(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=fu(this._onBrush,this),this._onBrushEnd=fu(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),IC(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){DC(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Zh;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===QB?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Ib(e.option);uu(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=Mb(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===ZB&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==QB||i?n===QB&&i?{scaleY:a?1:-1,scaleX:-1}:n!==ZB||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new qB({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new qB({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:fu(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:tf(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new Zh,r=new Wy({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new qy({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){uu(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&au(XB,e.get("type"))<0)){var a,s=r.getComponent(dN(i),o).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new qB({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new qB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),uu([0,1],(function(t){var o=a.get("handleIcon");!ET[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=OT(o,-1,0,2,2,null,!0);s.attr({cursor:JB(this._orient),draggable:!0,drift:fu(this._onDragMove,this,t),ondragend:fu(this._onDragEnd,this),onmouseover:fu(this._showDataInfo,this,!0),onmouseout:fu(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=nf(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Wv(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new nv({silent:!0,invisible:!0,style:o_(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var p=nf(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new Um({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=OT(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));(d=t.moveZone=new Um({invisible:!0,shape:{y:o[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:JB(this._orient),drift:fu(this._onDragMove,this,"all"),ondragstart:fu(this._showDataInfo,this,!0),ondragend:fu(this._onDragEnd,this),onmouseover:fu(this._showDataInfo,this,!0),onmouseout:fu(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[tf(e[0],[0,100],t,!0),tf(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];gR(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?tf(o.minSpan,a,i,!0):null,null!=o.maxSpan?tf(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=of([tf(r[0],i,a,!0),tf(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=of(n.slice()),i=this._size;uu([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new Um,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=of(this._handleEnds.slice());function d(e){var t=zx(n.handles[e].parent,this.group),a=Vx(0===e?"right":"left",t),s=this._handleWidth/2+5,l=Hx([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===QB?"middle":a,align:i===QB?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return vu(r)?r(e,o):yu(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,Ac(r.event);var i=Hx([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new jc(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=of([tf(n.x,r,i,!0),tf(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Ac(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new qB({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?$B:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=hN(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(yN);function JB(e){return"vertical"===e?"ns-resize":"ew-resize"}var eP=KB;function tP(e){e.registerComponentModel(GB),e.registerComponentView(eP),TN(e)}function nP(e){sI(YB),sI(tP)}var rP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return L(t,e),t.prototype.getInitialData=function(e){return ZA(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Zh,n=OT("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=OT(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?i:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(pC);function iP(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),o=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:_u(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=cu(e.dimensions,(function(e){return t.mapDimension(e)})),p=!1,h=t.getCalculationInfo("stackResultDimension");return QA(t,d[0])&&(p=!0,d[0]=h),QA(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function oP(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var aP=Math.min,sP=Math.max;function lP(e,t){return isNaN(e)||isNaN(t)}function uP(e,t,n,r,i,o,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(lP(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,p=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],S=t[2*b+1];w===v&&S===y&&m<r;)m++,g+=o,w=t[2*(b+=o)],S=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var C=m+1;if(l)for(;lP(w,S)&&C<r;)C++,w=t[2*(b+=o)],S=t[2*b+1];var T=.5,M=0,A=0,E=void 0,I=void 0;if(C>=r||lP(w,S))h=v,f=y;else{M=w-u,A=S-c;var D=v-u,O=w-v,k=y-c,R=S-y,N=void 0,L=void 0;if("x"===s){var B=M>0?1:-1;h=v-B*(N=Math.abs(D))*a,f=y,E=v+B*(L=Math.abs(O))*a,I=y}else if("y"===s){var P=A>0?1:-1;h=v,f=y-P*(N=Math.abs(k))*a,E=v,I=y+P*(L=Math.abs(R))*a}else N=Math.sqrt(D*D+k*k),h=v-M*a*(1-(T=(L=Math.sqrt(O*O+R*R))/(L+N))),f=y-A*a*(1-T),I=y+A*a*T,E=aP(E=v+M*a*T,sP(w,v)),I=aP(I,sP(S,y)),E=sP(E,aP(w,v)),f=y-(A=(I=sP(I,aP(S,y)))-y)*N/L,h=aP(h=v-(M=E-v)*N/L,sP(u,v)),f=aP(f,sP(c,y)),E=v+(M=v-(h=sP(h,aP(u,v))))*L/N,I=y+(A=y-(f=sP(f,aP(c,y))))*L/N}e.bezierCurveTo(d,p,h,f,v,y),d=E,p=I}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var cP=function(){this.smooth=0,this.smoothConstraint=!0},dP=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return L(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cP},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&lP(n[2*i-2],n[2*i-1]);i--);for(;r<i&&lP(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=uP(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=im.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(i[l++]){case o.M:n=i[l++],r=i[l++];break;case o.L:if(u=i[l++],c=i[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],p=i[l++],h=i[l++],f=i[l++];var v=a?Rd(n,u,d,h,e,s):Rd(r,c,p,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Od(r,c,p,f,x):Od(n,u,d,h,x);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(Tm),pP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t}(cP),hP=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return L(t,e),t.prototype.getDefaultShape=function(){return new pP},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&lP(n[2*o-2],n[2*o-1]);o--);for(;i<o&&lP(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=uP(e,n,i,o,o,1,t.smooth,a,t.connectNulls);uP(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(Tm);function fP(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,a=Math.floor(a),l=Math.round(l);var d=new Um({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=vu(i)?function(e){i(e,d)}:null;Sx(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function gP(e,t,n){var r=e.getArea(),i=rf(r.r0,1),o=rf(r.r,1),a=new Py({shape:{cx:rf(e.cx,1),cy:rf(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,Sx(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function mP(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function vP(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function yP(e,t){var n=vP(e),r=n[0],i=n[1],o=vP(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function xP(e){return _u(e)?e:e?.5:0}function _P(e,t,n,r){var i=t.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,h=[];l[o]=h[o]=p,l[1-o]=u[1-o],h[1-o]=c[1-o],a.push(l[0],l[1]),a.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function bP(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=sp(t[i]),s=sp(t[o]),l=r-i,u=pp([Xd(tp(a[0],s[0],l)),Xd(tp(a[1],s[1],l)),Xd(tp(a[2],s[2],l)),$d(tp(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function wP(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*iB.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return uu(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function SP(e,t){return[e[2*t],e[2*t+1]]}function CP(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<lv.length;t++)if(e.get([lv[t],"endLabel","show"]))return!0;return!1}function TP(e,t,n,r){if(cB(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=CP(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=fP(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return gP(t,n,r)}var MP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.init=function(){var e=new Zh,t=new uB;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===i.type,d=this._coordSys,p=this._symbolDraw,h=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),x=iP(i,a,y),_=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=vE(2*r),o=0;o<r;o++){var a=oP(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,x),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!c&&wP(e,a,i),C=this._data;C&&C.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),C.setItemGraphicEl(t,null))})),b||p.remove(),o.add(g);var T,M=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(T=i.getArea()).width?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var A=function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=cu(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=bP(u,"x"===i?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";uu(p,(function(e){e.offset=(e.coord-f)/m})),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var v=new ux(0,0,0,0,p,!0);return v[i]=f,v[i+"2"]=g,v}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&d.type===i.type&&M===this._step){v&&!f?f=this._newPolygon(u,_):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,xb(A));var E=g.getClipPath();if(E)Sx(E,{shape:TP(this,i,!1,e).shape},e);else g.setClipPath(TP(this,i,!0,e));b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),mP(this._stackedOnPoints,_)&&mP(this._points,u)||(m?this._doUpdateAnimation(a,_,i,n,M,y,w):(M&&(u=_P(u,i,M,w),_&&(_=_P(_,i,M,w))),h.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))}else b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,i,T),M&&(u=_P(u,i,M,w),_&&(_=_P(_,i,M,w))),h=this._newPolyline(u),v?f=this._newPolygon(u,_):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,xb(A)),g.setClipPath(TP(this,i,!0,e));var I=e.getModel("emphasis"),D=I.get("focus"),O=I.get("blurScope"),k=I.get("disabled");(h.useStyle(ou(s.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Qv(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);rv(h).seriesIndex=e.seriesIndex,Yv(h,D,O,k);var R=xP(e.get("smooth")),N=e.get("smoothMonotone");if(h.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var L=a.getCalculationInfo("stackedOnSeries"),B=0;f.useStyle(ou(l.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(B=xP(L.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:B,smoothMonotone:N,connectNulls:w}),Qv(f,e,"areaStyle"),rv(f).seriesIndex=e.seriesIndex,Yv(f,D,O,k)}var P=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=P)})),this._polyline.onHoverStateChange=P,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){rv(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=Rf(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new iB(i,o)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else CC.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Rf(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else CC.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Av(this._polyline,e),t&&Av(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new dP({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new hP({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");vu(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=vu(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var v=n;r?(p=v.x,h=v.x+v.width,f=e.x):(p=v.y+v.height,h=v.y,f=e.y)}var y=h===p?0:(f-p)/(h-p);a&&(y=1-y);var x=vu(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(CP(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new nv({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(r_(o,i_(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?tB(i,n):eB(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=o.get("precision"),h=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?h:0)*(m?-1:1),_=(g?0:-h)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,C=S[1]-S[0],T=void 0;if(C>=1){if(C>1&&!d){var M=SP(u,S[0]);s.attr({x:M[0]+x,y:M[1]+_}),i&&(T=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+x,y:M[1]+_});var A=c.getRawValue(S[0]),E=c.getRawValue(S[1]);i&&(T=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(_u(r))return rf(f=_f(n||0,r,i),o?Math.max(af(n||0),af(r)):t);if(yu(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=_f(p,h,i);a[c]=rf(f,o?Math.max(af(p),af(h)):t)}}return a}(n,p,A,E,w.t))}r.lastFrameIndex=S[0]}else{var I=1===e||r.lastFrameIndex>0?S[0]:0;M=SP(u,I);i&&(T=c.getRawValue(I)),s.attr({x:M[0]+x,y:M[1]+_})}if(i){var D=d_(s);"function"==typeof D.setLabelText&&D.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],p=[],h=[],f=[],g=iP(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],C=m[b+1],T=v[w],M=v[w+1];(isNaN(S)||isNaN(C))&&(S=T,C=M),l.push(S,C),u.push(T,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var A=x.idx,E=g.dataDimsForPoint,I=i.dataToPoint([t.get(E[0],A),t.get(E[1],A)]);w=2*A,l.push(I[0],I[1]),u.push(v[w],v[w+1]);var D=oP(g,i,t,A);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(A));break;case"-":_=!1}_&&(p.push(x),h.push(h.length))}h.sort((function(e,t){return f[e]-f[t]}));var O=l.length,k=vE(O),R=vE(O),N=vE(O),L=vE(O),B=[];for(y=0;y<h.length;y++){var P=h[y],j=2*y,F=2*P;k[j]=l[F],k[j+1]=l[F+1],R[j]=u[F],R[j+1]=u[F+1],N[j]=c[F],N[j+1]=c[F+1],L[j]=d[F],L[j+1]=d[F+1],B[y]=p[P]}return{current:k,next:R,stackedOnCurrent:N,stackedOnNext:L,status:B}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(i&&(d=_P(c.current,n,i,a),p=_P(c.stackedOnCurrent,n,i,a),h=_P(c.next,n,i,a),f=_P(c.stackedOnNext,n,i,a)),yP(d,h)>3e3||l&&yP(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),bx(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),bx(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(CC),AP=MP;var EP={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},IP=function(e){return Math.round(e.length/2)};function DP(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p));var h=void 0;yu(i)?h=EP[i]:vu(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,IP))}}}}}function OP(e){e.registerChartView(AP),e.registerSeriesModel(rP),e.registerLayout(function(e,t){return{seriesType:e,plan:gC(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=cu(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");QA(n,a[0])&&(a[0]=l),QA(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&vE(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);o?(i[h++]=f[0],i[h++]=f[1]):t.setItemLayout(p,f.slice())}o&&t.setLayout("points",i)}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,DP("line"))}var kP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.getInitialData=function(e,t){return ZA(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)uu(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,d=0;d<r.length;d++){var p=r[d].coord,h=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(h===a){u=p;break}if(h<a)l=p;else if(null!=l&&h>a){u=(p+l)/2;break}1===d&&(c=h-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(pC);pC.registerClass(kP);var RP=kP,NP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return L(t,e),t.prototype.getInitialData=function(){return ZA(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=E_(RP.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(RP),LP=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},BP=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return L(t,e),t.prototype.getDefaultShape=function(){return new LP},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*i+n,f*i+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(Tm),PP=BP;function jP(e,t,n){return t*Math.sin(e)*(n?-1:1)}function FP(e,t,n){return t*Math.cos(e)*(n?1:-1)}var UP=Math.max,zP=Math.min;var HP=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return L(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Jx(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=function(e,t){var n=e.getArea&&e.getArea();if(cB(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=XP[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Py:Um;return new r({shape:rj(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=XP[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&ZP[l.type](r)){var s=!1;p&&(s=VP[l.type](h,r));var m=WP[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),KP(m,a,t,n,r,e,i,"polar"===l.type),_?m.attr({shape:r}):d?YP(d,c,m,r,t,i,!1,!1):Sx(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=XP[l.type](a,t,r);if(g){var C=void 0;0===x.length?C=w(n):((C=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var T=XP[l.type](a,t);bx(C,{shape:rj(i,T,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&ZP[l.type](S)){var A=!1;if(p&&(A=VP[l.type](h,S))&&o.remove(M),M?Ex(M):M=WP[l.type](e,a,t,S,i,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),b){var E=M.getTextContent();if(E){var I=d_(E);null!=I.prevValue&&(I.prevValue=I.value)}}else KP(M,a,t,r,S,e,i,"polar"===l.type);_?M.attr({shape:S}):d?YP(d,c,M,S,t,i,!0,b):bx(M,{shape:S},e,t,null),a.setItemGraphicEl(t,M),M.ignore=A,o.add(M)}else o.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&Ax(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Zh);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),tj(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),tj(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?gP(e,t,n):"cartesian2d"===e.type?fP(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:cu(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){Ax(t,e,rv(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(CC),VP={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=UP(t.x,e.x),s=zP(t.x+t.width,i),l=UP(t.y,e.y),u=zP(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=zP(t.r,e.r),o=UP(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},WP={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new Um({shape:iu({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?PP:Py,c=new u({shape:r,z2:1});c.name="item";var d,p,h=$P(i);if(c.calculateTextPosition=(d=h,p=({isRoundCap:u===PP}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return Bh(e,t,n);var i=d(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,h=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=p?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(i){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+h*y(f)+jP(f,o+v,!1),b=l+h*x(f)+FP(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+h*y(f)+jP(f,-o+v,!1),b=l+h*x(f)+FP(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+h*y(m),b=l+h*x(m),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",S="top";break;case"endAngle":_=s+h*y(g)+jP(g,o+v,!0),b=l+h*x(g)+FP(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+h*y(g)+jP(g,-o+v,!0),b=l+h*x(g)+FP(g,-o+v,!0),w="right",S="middle";break;default:return Bh(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?bx:Sx)(c,{shape:g},o)}return c}};function YP(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?bx:Sx)(n,{shape:l},t,i,null),(a?bx:Sx)(n,{shape:u},t?e.baseAxis.model:null,i)}function GP(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var qP=["x","y","width","height"],QP=["cx","cy","r","startAngle","endAngle"],ZP={cartesian2d:function(e){return!GP(e,qP)},polar:function(e){return!GP(e,QP)}},XP={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}(n,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function $P(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function KP(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;iu(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;mu(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:cu(r,(function(e){return Lh(e,i)}))}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=i_(r);r_(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:eB(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(_u(r))e.setTextConfig({rotation:r});else if(mu(t))e.setTextConfig({rotation:0});else{var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?p:g,$P(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=d_(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,h,o.getRawValue(n),(function(e){return tB(t,e)}));var m=r.getModel(["emphasis"]);Yv(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Qv(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",uu(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var JP=function(){},ej=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return L(t,e),t.prototype.getDefaultShape=function(){return new JP},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(Tm);function tj(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new ej({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new ej({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),rv(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",nj),d.on("mousemove",nj)),n&&n.push(d)}var nj=EC((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[i]=o[p+2],s[r]=o[p+r],s[i]=o[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);rv(this).dataIndex=t>=0?t:null}),30,!1);function rj(e,t,n){if(cB(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var ij=HP;function oj(e){e.registerChartView(ij),e.registerSeriesModel(NP),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,gu(wE,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:gC(),reset:function(e){if(SE(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=QA(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),p=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),h=CE(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=h&&vE(3*i),u=h&&s&&vE(3*i),y=h&&vE(i),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?g:o,r),C=b.get(a,r),T=p,M=void 0;c&&(M=+S-b.get(o,r));var A=void 0,E=void 0,I=void 0,D=void 0;if(d){var O=n.dataToPoint([S,C]);c&&(T=n.dataToPoint([M,C])[0]),A=T,E=O[1]+v,I=O[0]-T,D=m,Math.abs(I)<f&&(I=(I<0?-1:1)*f)}else O=n.dataToPoint([C,S]),c&&(T=n.dataToPoint([C,M])[1]),A=O[0]+v,E=T,I=m,D=O[1]-T,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);h?(l[w]=A,l[w+1]=E,l[w+2]=d?I:D,u&&(u[w]=d?x.x:A,u[w+1]=d?E:x.y,u[w+2]=_),y[r]=r):t.setItemLayout(r,{x:A,y:E,width:I,height:D}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,DP("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var aj=Math.sin,sj=Math.cos,lj=Math.PI,uj=2*Math.PI,cj=180/lj,dj=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=vp(c-uj)||(u?l>=uj:-l>=uj),p=l>0?l%uj:l%uj+uj,h=!1;h=!!d||!vp(c)&&p>=lj==!!u;var f=e+n*sj(o),g=t+r*aj(o);this._start&&this._add("M",f,g);var m=Math.round(i*cj);if(d){var v=1/this._p,y=(u?1:-1)*(uj-v);this._add("A",n,r,m,1,+u,e+n*sj(o+y),t+r*aj(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*sj(a),_=t+r*aj(a);this._add("A",n,r,m,+h,+u,x,_)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),pj="none",hj=Math.round;var fj=["lineCap","miterLimit","lineJoin"],gj=cu(fj,(function(e){return"stroke-"+e.toLowerCase()}));function mj(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof km)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==pj}(t)){var o=gp(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*i:o.opacity*i;(r||a<1)&&e("fill-opacity",a)}else e("fill",pj);if(function(e){var t=e.stroke;return null!=t&&t!==pj}(t)){var s=gp(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*i:s.opacity*i,d=t.strokeFirst;if((r||1!==u)&&e("stroke-width",u),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||c<1)&&e("stroke-opacity",c),t.lineDash){var p=PT(n),h=p[0],f=p[1];h&&(f=hj(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",pj);for(var g=0;g<fj.length;g++){var m=fj[g];if(r||t[m]!==bm[m]){var v=t[m]||bm[m];v&&e(gj[g],v)}}}else r&&e("stroke",pj)}}var vj="http://www.w3.org/2000/svg",yj="http://www.w3.org/1999/xlink";function xj(e){return document.createElementNS(vj,e)}function _j(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function bj(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,i=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var i=t[r],o=r;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(i,o)+("style"!==i?yc(a):a||"")+(r?""+n+cu(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function wj(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Sj(e,t,n,r){return _j("svg","root",{width:e,height:t,xmlns:vj,"xmlns:xlink":yj,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var Cj={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"},Tj="transform-origin";function Mj(e,t,n){var r=iu({},e.shape);iu(r,t),e.buildPath(n,r);var i=new dj;return i.reset(Ap(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Aj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[Tj]=n+"px "+r+"px")}var Ej={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Ij(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Dj(e){return yu(e)?Cj[e]?"cubic-bezier("+Cj[e]+")":Vd(e)?e:"":""}function Oj(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof sx){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(uu(o,(function(e){var t=wj(n.zrId);t.animation=!0,Oj(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=hu(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=Ij(a,n);return r.replace(i,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],p=Dj(c.getClip().easing),h=c.getDelay();p?d.push(p):d.push("linear"),h&&d.push(h/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/i*100)+"%",h=Dj(c.easing),f=c.rawValue;(yu(f)||_u(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(S=(w=a[h]).targetName)?"shape"===S&&p(w,u):!r&&p(w,l)}for(var f in l){var g={};Ah(g,e),iu(g,l[f]);var m=Ep(g),v=l[f][d];c[f]=m?{transform:m}:{},Aj(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new im);var _=o.len();o.reset(),c[f].d=Mj(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var w,S;"style"===(S=(w=a[h]).targetName)&&p(w,c,(function(e){return Ej[e]}))}var C,T=hu(c),M=!0;for(h=1;h<T.length;h++){var A=T[h-1],E=T[h];if(c[A][Tj]!==c[E][Tj]){M=!1;break}C=c[A][Tj]}if(M&&C){for(var f in c)c[f][Tj]&&delete c[f][Tj];t[Tj]=C}if(pu(T,(function(e){return hu(c[e]).length>0})).length)return Ij(c,n)+" "+i[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}var kj=Math.round;function Rj(e){return e&&yu(e.src)}function Nj(e){return e&&vu(e.toDataURL)}function Lj(e,t,n,r){mj((function(i,o){var a="fill"===i||"stroke"===i;a&&Tp(o)?Yj(t,e,i,r):a&&wp(o)?Gj(n,e,i,r):e[i]=o}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[i];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=gp(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=_j("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[_j("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=Mp(a)}}(n,e,r)}function Bj(e){return vp(e[0]-1)&&vp(e[1])&&vp(e[2])&&vp(e[3]-1)}function Pj(e,t,n){if(t&&(!function(e){return vp(e[4])&&vp(e[5])}(t)||!Bj(t))){var r=n?10:1e4;e.transform=Bj(t)?"translate("+kj(t[4]*r)/r+" "+kj(t[5]*r)/r+")":function(e){return"matrix("+yp(e[0])+","+yp(e[1])+","+yp(e[2])+","+yp(e[3])+","+xp(e[4])+","+xp(e[5])+")"}(t)}}function jj(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(kj(r[o][0]*n)/n),i.push(kj(r[o][1]*n)/n);t.points=i.join(" ")}function Fj(e){return!e.smooth}var Uj,zj,Hj={circle:[(Uj=["cx","cy","r"],zj=cu(Uj,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<zj.length;r++){var i=zj[r],o=e[i[0]];null!=o&&(t[i[1]]=kj(o*n)/n)}})],polyline:[jj,Fj],polygon:[jj,Fj]};function Vj(e,t){var n=e.style,r=e.shape,i=Hj[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&Ap(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new dj),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return Pj(o,e.transform),Lj(o,n,e,t),t.animation&&Oj(e,o,t),_j(s,e.id+"",o)}function Wj(e,t){return e instanceof Tm?Vj(e,t):e instanceof km?function(e,t){var n=e.style,r=n.image;if(r&&!yu(r)&&(Rj(r)?r=r.src:Nj(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),Pj(a,e.transform),Lj(a,n,e,t),t.animation&&Oj(e,a,t),_j("image",e.id+"",a)}}(e,t):e instanceof Em?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||Pl,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Nh(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":_p[n.textAlign]||n.textAlign};if(Zm(n)){var l="",u=n.fontStyle,c=qm(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Bl,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),Pj(s,e.transform),Lj(s,n,e,t),t.animation&&Oj(e,s,t),_j("text",e.id+"",s,void 0,r)}}(e,t):void 0}function Yj(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Sp(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Cp(o))return;i="radialGradient",a.cx=Eu(o.x,.5),a.cy=Eu(o.y,.5),a.r=Eu(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*xp(s[u].offset)+"%",p=gp(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(_j("stop",u+"",g))}var m=bj(_j(i,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=_j(i,y,a,l)),t[n]=Mp(y)}function Gj(e,t,n,r){var i,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(bp(o)){var p=o.imageWidth,h=o.imageHeight,f=void 0,g=o.image;if(yu(g)?f=g:Rj(g)?f=g.src:Nj(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";ku(p,m),ku(h,m)}else if(null==p||null==h){var v=function(e,t){if(e){var n=e.elm,r=p||t.width,i=h||t.height;"pattern"===e.tag&&(c?(i=1,r/=a.width):d&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute("width",r),n.setAttribute("height",i))}},y=ng(f,null,e,(function(e){u||v(w,e),v(i,e)}));y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}i=_j("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else o.svgElement&&(i=nu(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=Ep(o);b&&(s.patternTransform=b);var w=_j("pattern","",s,[i]),S=bj(w),C=r.patternCache,T=C[S];T||(T=r.zrId+"-p"+r.patternIdx++,C[S]=T,s.id=T,w=r.defs[T]=_j("pattern",T,s,[i])),t[n]=Mp(T)}}function qj(e,t,n){var r=n.clipPathCache,i=n.defs,o=r[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=o,i[o]=_j("clipPath",o,a,[Vj(e,n)])}t["clip-path"]=Mp(o)}function Qj(e){return document.createTextNode(e)}function Zj(e,t,n){e.insertBefore(t,n)}function Xj(e,t){e.removeChild(t)}function $j(e,t){e.appendChild(t)}function Kj(e){return e.parentNode}function Jj(e){return e.nextSibling}function eF(e,t){e.textContent=t}var tF=_j("","");function nF(e){return void 0===e}function rF(e){return void 0!==e}function iF(e,t,n){for(var r={},i=t;i<=n;++i){var o=e[i].key;void 0!==o&&(r[o]=i)}return r}function oF(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function aF(e){var t,n=e.children,r=e.tag;if(rF(r)){var i=e.elm=xj(r);if(uF(tF,e),mu(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&$j(i,aF(o))}else rF(e.text)&&!bu(e.text)&&$j(i,Qj(e.text))}else e.elm=Qj(e.text);return e.elm}function sF(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&Zj(e,aF(o),t)}}function lF(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(rF(i.tag))Xj(Kj(i.elm),i.elm);else Xj(e,i.elm)}}function uF(e,t){var n,r=t.elm,i=e&&e.attrs||{},o=t.attrs||{};if(i!==o){for(n in o){var a=o[n];i[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?r.setAttributeNS(yj,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function cF(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(uF(e,t),nF(t.text)?rF(r)&&rF(i)?r!==i&&function(e,t,n){for(var r,i,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:oF(u,p)?(cF(u,p),u=t[++a],p=n[++s]):oF(c,h)?(cF(c,h),c=t[--l],h=n[--d]):oF(u,h)?(cF(u,h),Zj(e,u.elm,Jj(c.elm)),u=t[++a],h=n[--d]):oF(c,p)?(cF(c,p),Zj(e,c.elm,u.elm),c=t[--l],p=n[++s]):(nF(r)&&(r=iF(t,a,l)),nF(i=r[p.key])||(o=t[i]).tag!==p.tag?Zj(e,aF(p),u.elm):(cF(o,p),t[i]=void 0,Zj(e,o.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?sF(e,null==n[d+1]?null:n[d+1].elm,n,s,d):lF(e,t,a,l))}(n,r,i):rF(i)?(rF(e.text)&&eF(n,""),sF(n,null,i,0,i.length-1)):rF(r)?lF(n,r,0,r.length-1):rF(e.text)&&eF(n,""):e.text!==t.text&&(rF(r)&&lF(n,r,0,r.length-1),eF(n,t.text)))}var dF=0,pF=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=iu({},n),this.root=e,this._id="zr"+dF++,this._oldVNode=Sj(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=xj("svg");uF(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(oF(e,t))cF(e,t);else{var n=e.elm,r=Kj(n);aF(t),null!==r&&(Zj(r,t.elm,Jj(n)),lF(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return Wj(e,wj(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=wj(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=_j("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Tp(n))Yj({fill:n},i.attrs,"fill",r);else if(wp(n))Gj({style:{fill:n},dirty:Wu,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=gp(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=e.compress?null:this._mainVNode=_j("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=cu(hu(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(_j("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=cu(hu(e),(function(t){return t+i+cu(hu(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=cu(hu(t),(function(e){return"@keyframes "+e+i+cu(hu(t[e]),(function(n){return n+i+cu(hu(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=_j("style","stl",{},[],u);o.push(c)}}return Sj(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},bj(this.renderToVNode({animation:Eu(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Eu(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=i&&i.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var v={};qj(d[m],v,t);var y=_j("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=Wj(c,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&i&&(i.style.display="none",e=BT(r,0,n),t=BT(r,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(wp(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Ip(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var hF=pF;function fF(e,t,n){var r=zl.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var gF=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||gh,"string"==typeof t?i=fF(t,n,r):bu(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Hu(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return L(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=fF("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new Qc(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new Qc(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new Qc(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new Qc(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c]).shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function p(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Tu(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||NT(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=WT(i,t,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?p(0,0,o,a):n.length&&uu(n,(function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(lc),mF=gF,vF=1e5,yF=314159,xF=.01;var _F=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=iu({},n||{}),this.dpr=n.devicePixelRatio||gh,this._singleCanvas=i,this.root=e,e.style&&(Hu(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new mF(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=yF,o.push(yF),this._domRoot=e}else{this._width=BT(e,0,n),this._height=BT(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(vF)),r||(r=n.ctx).save(),JT(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(vF)},e.prototype.paintOne=function(e,t){KT(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;vd((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(yF).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=i[a],d=l.ctx,h=o&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b<h.length;++b){var w=h[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<i.length;h++)d(h);return Ll.wxa&&uu(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(JT(a,e,i,o),e.setPrevPaintRect(s))}else JT(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=yF);var n=this._layers[e];return n||((n=new mF("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?ru(n,this._layerConfig[e],!0):this._layerConfig[e-xF]&&ru(n,this._layerConfig[e-xF],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<e.length;i++){var s,l=(s=e[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?xF:0),this._needsManuallyCompositing),u.__builtin__||tu("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,uu(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ru(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+xF)ru(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(au(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=BT(i,0,r),t=BT(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(yF).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new mF("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];JT(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),bF=_F;function wF(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current}sI([JL,cL,RB,oR,nP,OP,oj,function(e){e.registerPainter("canvas",bF)},XL]);var SF=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,CF=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,TF=r.makeStyles((function(){return{outlierOnlyButton:{borderRadius:"8px"},metricPanel:{position:"relative"},overideMuiSelect:{"& .yb-MuiInput-input":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},"& .yb-MuiInput-root":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"}},overrideDefaultMuiSelect:{maxHeight:"300px","& .yb-MuiInput-root":{minWidth:"70px",height:"32px"},"& .yb-MuiSelect-select":{paddingRight:"24px !important"}},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},menuItem:{fontWeight:300,fontSize:"14px",padding:"15px 20px",height:"52px"},outlierButtonContainer:{position:"absolute",top:"12px",right:"8px",zIndex:2,pointerEvents:"auto",display:"flex"},prometheusIcon:{position:"absolute",top:"15px",right:"15px",marginLeft:"17px",marginTop:"5px"}}})),MF=S.default.memo((function(n){var i,a,s=n.metricData,l=n.appName,u=n.metricKey,c=n.metricMeasure,d=n.operations,p=n.groupByOperations;n.height;var h=n.timezone,f=n.graphTitle,g=n.graphType,m=n.queryData,v=n.dateTimeRange,y=n.isHistoricalQueryView,x=n.showTitle,_=void 0===x||x,b=n.onEChartsDateSelect,w=n.onSelectAshLabel,S=n.registerChartInstance,C=TF(),T=d,M="".concat("echart-").concat(u),A=t.useState(null==p?void 0:p[0]),E=A[0],I=A[1],D=t.useState(null==T?void 0:T[0]),O=D[0],k=D[1],R=t.useState("undefined"!=typeof window?window.innerWidth:1280),N=R[0],L=R[1],P=t.useState([]),j=P[0],F=P[1],z=t.useRef(j),V=t.useRef(null),W=t.useRef(null),Y=wF(s),G=t.useCallback((function(){var e,t,n=g===exports.GraphType.SINGLE_SUPPORTING||g===exports.GraphType.MAIN_RCA,r=null===(t=null===(e=V.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:N;if(n)return Math.max(.99*i,250);var o=Math.floor(i/500),a=16*((o=Math.max(1,o))-1),s=Math.floor((i-a)/o);return Math.max(Math.min(s,SF),l===exports.AppName.YBM?CF:490)}),[g,N]),q=t.useCallback((function(e){var t,n,r,i,o,a,u,p=AO(s,5),g=_?null!=f?f:null===(t=p.layout)||void 0===t?void 0:t.title:"";if(!Qi(p)||!qi(p.data))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:g,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"}},legend:{data:[]},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};var y=c===exports.MetricMeasure.OUTLIER,x=c===exports.MetricMeasure.OUTLIER_TABLES,b=c===exports.MetricMeasure.OUTLIER_DB,w=null!=e?e:null==d?void 0:d[0];((null==d?void 0:d.length)||e)&&(y||x||b)&&(p.data=p.data.filter((function(e){return(null==e?void 0:e.name)===w})));var S=null!==(o=null===(i=null===(r=null===(n=p.layout)||void 0===n?void 0:n.yaxis)||void 0===r?void 0:r.ticksuffix)||void 0===i?void 0:i.replace(/(&nbsp;|\s)+/g,""))&&void 0!==o?o:null,C=0,T=p.data.map((function(e,t){var n,r,i,o,a,s,l,u,d,f,g,v=e.name;if(e.instanceName&&e.name!==e.instanceName)v="".concat(e.name," (").concat(e.instanceName,")"),c===exports.MetricMeasure.OUTLIER&&(v=e.instanceName);else if(c!==exports.MetricMeasure.OUTLIER||e.instanceName||e.global){if(x)v=e.tableName;else if(b)v=e.dbName;else if((null===(n=null==p?void 0:p.layout)||void 0===n?void 0:n.type)===Cr&&c===exports.MetricMeasure.OVERALL&&(null===(o=null===(i=null===(r=null==p?void 0:p.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===exports.WaitEventClassification.QUERY_ID){var y=null==m?void 0:m.find((function(t){return t.id.queryId===e.name}));v=null==y?void 0:y.query}}else v=Ir.NODE_AVERAGE;var _=v,w=(null==v?void 0:v.length)>30;(null===(a=null==p?void 0:p.layout)||void 0===a?void 0:a.type)===Cr&&c===exports.MetricMeasure.OVERALL&&(null===(u=null===(l=null===(s=null==p?void 0:p.layout)||void 0===s?void 0:s.metadata)||void 0===l?void 0:l.currentGroupBy)||void 0===u?void 0:u[0])===exports.WaitEventClassification.QUERY_ID?_=(null==v?void 0:v.substring(0,30))+"...":w&&c!==exports.MetricMeasure.OUTLIER?_=v.substring(0,30)+"...":c!==exports.MetricMeasure.OUTLIER||e.global?x?_=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:b&&(_=e.namespaceName):_=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):Ir.NODE_AVERAGE;var S=e.x.map((function(t,n){return[t,e.y[n]]})),C=(null===(d=null==p?void 0:p.layout)||void 0===d||d.type,S);return B(B({name:_,fullname:v,type:(null===(f=null==p?void 0:p.layout)||void 0===f?void 0:f.type)===Cr?"bar":"line",data:C,color:yi[t%yi.length]},e.name===Ir.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:h});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:(null===(g=null==p?void 0:p.layout)||void 0===g?void 0:g.type)===Cr?"total":void 0,smooth:!1,showSymbol:!1})}));Qi(null===(a=p.layout)||void 0===a?void 0:a.yaxis)&&"µs"===S&&qi(p.data)&&Ki(p.data)&&(T.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),S="ms");var M=0;T.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>M&&(M=t)}));C=1.5*M,(null===(u=null==p?void 0:p.layout)||void 0===u?void 0:u.type)===Cr&&(C=3.5*M),0===C&&(C=1.01);var A={title:{text:l!==exports.AppName.YBA&&S?"".concat(g," (").concat(S,")"):g,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:Ar,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",formatter:function(e){var t,n=(null===(t=e[0])||void 0===t?void 0:t.axisValue)||"",r=new Date(n),i=Sl(h?Cl(r,h):r,"MMM d HH:mm (zzz)",{timeZone:null!=h?h:void 0}),o=e.map((function(e){var t=e.value[1],n=ba(e.color,e.seriesName),r=wa(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(i,'</b><br/><span style="margin-top: 16px;">').concat(o,"</span></div>")}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:{left:"3%",right:"4%",bottom:"20%",containLabel:!0,top:"22%"},xAxis:{type:"time",boundaryGap:!1,splitNumber:6,axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},interval:"auto",formatter:function(e){var t,n=new Date(e),r=(t=v.startDateTime,(v.endDateTime-t)/864e5);return Sl(n,r>5?"MM/dd":r>2&&r<=5?"MM/dd, HH:mm":"HH:mm")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}}},yAxis:{type:"value",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},formatter:function(e){return"".concat(null==e?void 0:e.toFixed(2)," ").concat(null!=S?S:"")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}},min:0,max:C},series:T,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0},legend:{type:T.length>3?"scroll":"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:Ar},symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,bottom:10,data:T.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return A}),[l,v,f,s,c,d,m,_,h]),Q=function(e){var t,n,r,i,o;null===(t=null==e?void 0:e.current)||void 0===t||t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}});var a=!1,s=null;null===(r=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getZr())||void 0===r||r.on("mousedown",(function(t){var n,r,i=[t.offsetX,t.offsetY],o=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},i);s=null!==(r=null==o?void 0:o[0])&&void 0!==r?r:null,a=!0})),null===(o=null===(i=null==e?void 0:e.current)||void 0===i?void 0:i.getZr())||void 0===o||o.on("mouseup",(function(t){var n;if(a){var r=[t.offsetX,t.offsetY],i=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},r),o=null==i?void 0:i[0];if(null!==s&&null!==o&&Math.abs(o-s)>10){var l=Math.min(s,o),u=Math.max(s,o);b(l,u)}}a=!1}))},Z=t.useCallback((function(){var e;if(V.current){W.current||(W.current=tA(V.current,"light",{renderer:"canvas"})),S&&S(W.current);var t=q(O);W.current.setOption(t,!0),g===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=W.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==V?void 0:V.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),Q(W)})):(null===(e=W.current)||void 0===e||e.resize({width:G()}),Q(W)),function(e){var t;null===(t=null==e?void 0:e.current)||void 0===t||t.on("legendselectchanged",(function(t){var n,r,i=t.name,o=U([],z.current,!0),a=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===z.current.length||z.current.length===s.length?[i]:z.current.includes(i)?z.current.filter((function(e){return e!==i})):U(U([],z.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),F(o)}))}(W)}}),[O,q,G]);t.useEffect((function(){var e=function(){return L(window.innerWidth)};return window.addEventListener("resize",e),Z(),function(){window.removeEventListener("resize",e),W.current&&(W.current.dispose(),W.current=null)}}),[Z]),t.useEffect((function(){z.current=j}),[j]),t.useEffect((function(){var e;if(W.current){var t=q(O);W.current.setOption(t,!0),g===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=W.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==V?void 0:V.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),Q(W)})):(null===(e=W.current)||void 0===e||e.resize({width:G()}),Q(W))}}),[s,Y,O,E,G,q]);t.useEffect((function(){var e;W.current&&(g===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=W.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==V?void 0:V.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=W.current)||void 0===e||e.resize({width:G()}))}),[N,G]);var X=O||(null==d?void 0:d[0]);return e.jsxs(r.Box,B({id:u,onClick:function(e){return e.stopPropagation()},className:C.metricPanel},{children:[e.jsxs("span",B({className:C.outlierButtonContainer},{children:[(null===(i=null==s?void 0:s.layout)||void 0===i?void 0:i.type)===Cr&&(c===exports.MetricMeasure.OUTLIER||c===exports.MetricMeasure.OUTLIER_TABLES||c===exports.MetricMeasure.OUTLIER_DB||y)&&qi(p)&&e.jsx(r.Box,B({ml:2,mr:2},{children:e.jsx(o.YBSelect,B({value:E,className:H(C.outlierOnlyButton,C.overrideDefaultMuiSelect,C.overrideDefaultMuiFormControl),dataTestId:"group-by-operation-select"},{children:null==p?void 0:p.map((function(t,n){return e.jsx(r.MenuItem,B({value:t,onClick:function(e){!function(e){var t;I(e),(null===(t=null==s?void 0:s.layout)||void 0===t?void 0:t.type)!==Cr||c!==exports.MetricMeasure.OUTLIER&&c!==exports.MetricMeasure.OUTLIER_TABLES&&c!==exports.MetricMeasure.OUTLIER_DB&&!y||null==w||w(e,s,!!y)}(t),e.stopPropagation()}},{children:t}),n)}))}))})),qi(T)&&((null===(a=null==s?void 0:s.layout)||void 0===a?void 0:a.type)===Cr||(null==T?void 0:T.length)>1)&&e.jsx(r.Box,B({mr:2},{children:e.jsx(o.YBSelect,B({value:O,className:H(C.outlierOnlyButton,C.overrideDefaultMuiSelect,C.overrideDefaultMuiFormControl),dataTestId:"metric-operation-select"},{children:null==T?void 0:T.map((function(t,n){return e.jsx(r.MenuItem,B({className:H(t===X&&C.overideMuiSelect,C.menuItem),value:t,onClick:function(e){!function(e){var t;if(k(e),(null===(t=null==s?void 0:s.layout)||void 0===t?void 0:t.type)===Cr&&c===exports.MetricMeasure.OVERALL&&qi(d)&&(null==w||w(e,s,!!y)),W.current){var n=q(e);W.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))}))]})),e.jsx("div",{ref:V,id:M,style:{overflow:"hidden",position:"relative",zIndex:1,minHeight:l===exports.AppName.WEB?320:340,width:"100%",minWidth:0}})]}))})),AF={exports:{}},EF=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},IF=EF,DF=Object.prototype.toString;function OF(e){return"[object Array]"===DF.call(e)}function kF(e){return void 0===e}function RF(e){return null!==e&&"object"==typeof e}function NF(e){if("[object Object]"!==DF.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function LF(e){return"[object Function]"===DF.call(e)}function BF(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),OF(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var PF={isArray:OF,isArrayBuffer:function(e){return"[object ArrayBuffer]"===DF.call(e)},isBuffer:function(e){return null!==e&&!kF(e)&&null!==e.constructor&&!kF(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:RF,isPlainObject:NF,isUndefined:kF,isDate:function(e){return"[object Date]"===DF.call(e)},isFile:function(e){return"[object File]"===DF.call(e)},isBlob:function(e){return"[object Blob]"===DF.call(e)},isFunction:LF,isStream:function(e){return RF(e)&&LF(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:BF,merge:function e(){var t={};function n(n,r){NF(t[r])&&NF(n)?t[r]=e(t[r],n):NF(n)?t[r]=e({},n):OF(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)BF(arguments[r],n);return t},extend:function(e,t,n){return BF(t,(function(t,r){e[r]=n&&"function"==typeof t?IF(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},jF=PF;function FF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var UF=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(jF.isURLSearchParams(t))r=t.toString();else{var i=[];jF.forEach(t,(function(e,t){null!=e&&(jF.isArray(e)?t+="[]":e=[e],jF.forEach(e,(function(e){jF.isDate(e)?e=e.toISOString():jF.isObject(e)&&(e=JSON.stringify(e)),i.push(FF(t)+"="+FF(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},zF=PF;function HF(){this.handlers=[]}HF.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},HF.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},HF.prototype.forEach=function(e){zF.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var VF,WF,YF,GF,qF,QF,ZF,XF,$F,KF,JF,eU,tU,nU,rU,iU,oU,aU,sU=HF,lU=PF,uU=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function cU(){if(WF)return VF;WF=1;var e=uU;return VF=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)},VF}function dU(){if(GF)return YF;GF=1;var e=cU();return YF=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function pU(){if(QF)return qF;QF=1;var e=PF;return qF=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(i)&&s.push("path="+i),e.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},qF}function hU(){return XF?ZF:(XF=1,ZF=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function fU(){return KF?$F:(KF=1,$F=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function gU(){if(eU)return JF;eU=1;var e=hU(),t=fU();return JF=function(n,r){return n&&!e(r)?t(n,r):r}}function mU(){if(nU)return tU;nU=1;var e=PF,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return tU=function(n){var r,i,o,a={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([i]):a[r]?a[r]+", "+i:i}})),a):a}}function vU(){if(iU)return rU;iU=1;var e=PF;return rU=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var yU,xU,_U,bU,wU,SU={exports:{}},CU={exports:{}},TU={exports:{}};function MU(){if(xU)return yU;xU=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return yU=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(i){var o=Math.abs(i);if(o>=r)return a(i,o,r,"day");if(o>=n)return a(i,o,n,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},yU}function AU(){if(bU)return _U;return bU=1,_U=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=MU(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},_U}var EU,IU,DU,OU,kU,RU,NU,LU,BU,PU={exports:{}};function jU(){return IU?EU:(IU=1,EU=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function FU(){return kU||(kU=1,function(e,t){const n=I.default,r=D.default;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(OU)return DU;OU=1;const e=O.default,t=I.default,n=jU(),{env:r}=process;let i;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,o){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===i)return 0;const a=i||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),DU={supportsColor:function(e){return o(a(e,e&&e.isTTY))},stdout:o(a(!0,t.isatty(1))),stderr:o(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=AU()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(PU,PU.exports)),PU.exports}function UU(){return RU||(RU=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?CU.exports=(wU||(wU=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=AU()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(TU,TU.exports)),TU.exports):CU.exports=FU()),CU.exports}function zU(){if(BU)return SU.exports;BU=1;var e,t,n,r=M.default,i=r.URL,o=C.default,a=T.default,s=A.default.Writable,l=E.default,u=function(){return LU||(LU=1,NU=function(){if(!e){try{e=UU()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),NU;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=L(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var c=!1;try{l(new i(""))}catch(e){c="ERR_INVALID_URL"===e.code}var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);p.forEach((function(e){h[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=k("ERR_INVALID_URL","Invalid URL",TypeError),g=k("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=k("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),v=k("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=k("ERR_STREAM_WRITE_AFTER_END","write after end"),x=s.prototype.destroy||w;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",a=n[o]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,i&&s instanceof i?e=D(e):N(e)?e=D(S(e)):(a=r,r=I(e),e={protocol:o}),L(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,N(r.host)||N(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new _(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function S(e){var t;if(c)t=new i(e);else if(!N((t=I(r.parse(e))).protocol))throw new f({input:e});return t}function I(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new f({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new f({input:e.href||e});return e}function D(e,t){var n=t||{};for(var r of d)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function O(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function k(e,t,n){function r(n){L(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function R(e,t){for(var n of p)e.removeListener(n,h[n]);e.on("error",w),e.destroy(t)}function N(e){return"string"==typeof e||e instanceof String}function L(e){return"function"==typeof e}return _.prototype=Object.create(s.prototype),_.prototype.abort=function(){R(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return R(this._currentRequest,e),x.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!N(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;L(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new v),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(L(e)?(n=e,e=t=null):L(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,p))i.on(o,h[o]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(R(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],O(/^content-/i,this._options.headers));var d=O(/^host$/i,this._options.headers),p=S(this._currentUrl),h=d||p.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(p,{host:h})),g=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",g.href),this._isRedirect=!0,D(g,this._options),(g.protocol!==p.protocol&&"https:"!==g.protocol||g.host!==h&&!function(e,t){l(N(e)&&N(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(g.host,h))&&O(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),L(a)){var v={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,v,y),this._sanitizeOptions(this._options)}this._performRequest()},SU.exports=b({http:o,https:a}),SU.exports.wrap=b,SU.exports}var HU,VU,WU={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function YU(){if(VU)return HU;VU=1;var e=PF,t=dU(),n=gU(),r=UF,i=C.default,o=T.default,a=zU().http,s=zU().https,l=M.default,u=k.default,c=WU,d=cU(),p=uU,h=/https:?/;function f(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,f(e,t,e.href)}}return HU=function(g){return new Promise((function(m,v){var y=function(e){m(e)},x=function(e){v(e)},_=g.data,b=g.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+c.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",g));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var w=void 0;g.auth&&(w=(g.auth.username||"")+":"+(g.auth.password||""));var S=n(g.baseURL,g.url),C=l.parse(S),T=C.protocol||"http:";if(!w&&C.auth){var M=C.auth.split(":");w=(M[0]||"")+":"+(M[1]||"")}w&&delete b.Authorization;var A=h.test(T),E=A?g.httpsAgent:g.httpAgent,I={path:r(C.path,g.params,g.paramsSerializer).replace(/^\?/,""),method:g.method.toUpperCase(),headers:b,agent:E,agents:{http:g.httpAgent,https:g.httpsAgent},auth:w};g.socketPath?I.socketPath=g.socketPath:(I.hostname=C.hostname,I.port=C.port);var D,O=g.proxy;if(!O&&!1!==O){var k=T.slice(0,-1)+"_proxy",R=process.env[k]||process.env[k.toUpperCase()];if(R){var N=l.parse(R),L=process.env.no_proxy||process.env.NO_PROXY,B=!0;if(L)B=!L.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e))}));if(B&&(O={host:N.hostname,port:N.port,protocol:N.protocol},N.auth)){var P=N.auth.split(":");O.auth={username:P[0],password:P[1]}}}}O&&(I.headers.host=C.hostname+(C.port?":"+C.port:""),f(I,O,T+"//"+C.hostname+(C.port?":"+C.port:"")+I.path));var j=A&&(!O||h.test(O.protocol));g.transport?D=g.transport:0===g.maxRedirects?D=j?o:i:(g.maxRedirects&&(I.maxRedirects=g.maxRedirects),D=j?s:a),g.maxBodyLength>-1&&(I.maxBodyLength=g.maxBodyLength);var F=D.request(I,(function(n){if(!F.aborted){var r=n,i=n.req||F;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==g.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(u.createUnzip()),delete n.headers["content-encoding"]}var o={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:g,request:i};if("stream"===g.responseType)o.data=r,t(y,x,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,g.maxContentLength>-1&&s>g.maxContentLength&&(r.destroy(),x(d("maxContentLength size of "+g.maxContentLength+" exceeded",g,null,i)))})),r.on("error",(function(e){F.aborted||x(p(e,g,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==g.responseType&&(n=n.toString(g.responseEncoding),g.responseEncoding&&"utf8"!==g.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,x,o)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(p(e,g,null,F))})),g.timeout){var U=parseInt(g.timeout,10);if(isNaN(U))return void x(d("error trying to parse `config.timeout` to int",g,"ERR_PARSE_TIMEOUT",F));F.setTimeout(U,(function(){F.abort(),x(d("timeout of "+U+"ms exceeded",g,g.transitional&&g.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}g.cancelToken&&g.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(p(e,g,null,F))})).pipe(F):F.end(_)}))}}var GU=PF,qU=function(e,t){lU.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},QU=uU,ZU={"Content-Type":"application/x-www-form-urlencoded"};function XU(e,t){!GU.isUndefined(e)&&GU.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var $U,KU={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?$U=function(){if(aU)return oU;aU=1;var e=PF,t=dU(),n=pU(),r=UF,i=gU(),o=mU(),a=vU(),s=cU();return oU=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var g=l.auth.username||"",m=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+m)}var v=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&($U=YU()),$U),transformRequest:[function(e,t){return qU(t,"Accept"),qU(t,"Content-Type"),GU.isFormData(e)||GU.isArrayBuffer(e)||GU.isBuffer(e)||GU.isStream(e)||GU.isFile(e)||GU.isBlob(e)?e:GU.isArrayBufferView(e)?e.buffer:GU.isURLSearchParams(e)?(XU(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):GU.isObject(e)||t&&"application/json"===t["Content-Type"]?(XU(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&GU.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw QU(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};KU.headers={common:{Accept:"application/json, text/plain, */*"}},GU.forEach(["delete","get","head"],(function(e){KU.headers[e]={}})),GU.forEach(["post","put","patch"],(function(e){KU.headers[e]=GU.merge(ZU)}));var JU,ez,tz=KU,nz=PF,rz=tz;function iz(){return ez?JU:(ez=1,JU=function(e){return!(!e||!e.__CANCEL__)})}var oz=PF,az=function(e,t,n){var r=this||rz;return nz.forEach(n,(function(n){e=n.call(r,e,t)})),e},sz=iz(),lz=tz;function uz(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var cz=PF,dz=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return cz.isPlainObject(e)&&cz.isPlainObject(t)?cz.merge(e,t):cz.isPlainObject(t)?cz.merge({},t):cz.isArray(t)?t.slice():t}function l(r){cz.isUndefined(t[r])?cz.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}cz.forEach(r,(function(e){cz.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),cz.forEach(i,l),cz.forEach(o,(function(r){cz.isUndefined(t[r])?cz.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),cz.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(i).concat(o).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return cz.forEach(c,l),n},pz=WU,hz={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){hz[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var fz={},gz=pz.version.split(".");function mz(e,t){for(var n=t?t.split("."):gz,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}hz.transitional=function(e,t,n){var r=t&&mz(t);function i(e,t){return"[Axios v"+pz.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new Error(i(o," has been removed in "+t));return r&&!fz[o]&&(fz[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var vz,yz,xz,_z,bz,wz,Sz,Cz,Tz={isOlderVersion:mz,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:hz},Mz=PF,Az=UF,Ez=sU,Iz=function(e){return uz(e),e.headers=e.headers||{},e.data=az.call(e,e.data,e.headers,e.transformRequest),e.headers=oz.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oz.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||lz.adapter)(e).then((function(t){return uz(e),t.data=az.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return sz(t)||(uz(e),t&&t.response&&(t.response.data=az.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Dz=dz,Oz=Tz,kz=Oz.validators;function Rz(e){this.defaults=e,this.interceptors={request:new Ez,response:new Ez}}function Nz(){if(yz)return vz;function e(e){this.message=e}return yz=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,vz=e}Rz.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Dz(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&Oz.assertOptions(t,{silentJSONParsing:kz.transitional(kz.boolean,"1.0.0"),forcedJSONParsing:kz.transitional(kz.boolean,"1.0.0"),clarifyTimeoutError:kz.transitional(kz.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[Iz,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),i=Promise.resolve(e);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{i=Iz(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},Rz.prototype.getUri=function(e){return e=Dz(this.defaults,e),Az(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Mz.forEach(["delete","get","head","options"],(function(e){Rz.prototype[e]=function(t,n){return this.request(Dz(n||{},{method:e,url:t,data:(n||{}).data}))}})),Mz.forEach(["post","put","patch"],(function(e){Rz.prototype[e]=function(t,n,r){return this.request(Dz(r||{},{method:e,url:t,data:n}))}}));var Lz=PF,Bz=EF,Pz=Rz,jz=dz;function Fz(e){var t=new Pz(e),n=Bz(Pz.prototype.request,t);return Lz.extend(n,Pz.prototype,t),Lz.extend(n,t),n}var Uz=Fz(tz);Uz.Axios=Pz,Uz.create=function(e){return Fz(jz(Uz.defaults,e))},Uz.Cancel=Nz(),Uz.CancelToken=function(){if(_z)return xz;_z=1;var e=Nz();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},xz=t}(),Uz.isCancel=iz(),Uz.all=function(e){return Promise.all(e)},Uz.spread=wz?bz:(wz=1,bz=function(e){return function(t){return e.apply(null,t)}}),Uz.isAxiosError=Cz?Sz:(Cz=1,Sz=function(e){return"object"==typeof e&&!0===e.isAxiosError}),AF.exports=Uz,AF.exports.default=Uz;var zz,Hz,Vz=V(AF.exports),Wz="undefined"!=typeof process&&process.env?process.env:{},Yz="development"===Wz.NODE_ENV,Gz=null!==(zz=Wz.REACT_APP_API_URL)&&void 0!==zz?zz:Yz?"http://localhost:8080/api":"/api",qz=null;exports.QUERY_KEY=void 0,(Hz=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",Hz.fetchGraphs="fetchGraphs",Hz.fetchQueries="fetchQueries",Hz.fetchUniverseMetadataList="fetchUniverseMetadataList",Hz.deleteUniverseMetadata="deleteUniverseMetadata",Hz.updateUniverseMetadata="updateUniverseMetadata",Hz.fetchUniverseListDetails="fetchUniverseListDetails",Hz.fetchUniverseById="fetchUniverseById",Hz.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",Hz.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",Hz.fetchAnomaliesPage="fetchAnomaliesPage",Hz.fetchQueriesPage="fetchQueriesPage",Hz.fetchQueriesStatsPage="fetchQueriesStatsPage",Hz.fetchQueriesDatabases="fetchQueriesDatabases",Hz.fetchCustomerMetadataList="fetchCustomerMetadataList",Hz.fetchQueryStats="fetchQueryStats",Hz.fetchTablesPage="fetchTablesPage",Hz.fetchNamespaces="fetchNamespaces",Hz.deleteRuntimeConfig="deleteRuntimeConfig",Hz.fetchRuntimeConfigs="fetchRuntimeConfigs",Hz.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",Hz.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",Hz.updateRuntimeConfig="updateRuntimeConfig",Hz.fetchAnomalyGroups="fetchAnomalyGroups",Hz.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",Hz.fetchAnomalyGroupsById="fetchAnomalyGroupsById",Hz.getUniverseMetadata="getUniverseMetadata",Hz.fetchMetricsGraphs="fetchMetricsGraphs";var Qz=Vz.create({baseURL:Gz});Qz.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var Zz,Xz,$z,Kz,Jz,eH,tH,nH,rH,iH=function(){this.fetchAnomalies=function(e,t,n,r){var i=Zi(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),Qz.get(i,{params:o}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,i,o,a,s){void 0===r&&(r=10);var l=Zi(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return i&&(u.startTime=i),o&&(u.endTime=o),a&&a!==wr&&(u.category=a),Zi(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,Qz.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=Zi(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),Zi(s)&&(p.query=s),l&&l!==wr&&(p.dbName=l),p.sortBy=Xi(u)?"dbName":u,p.direction=Xi(c)?"DESC":c,p.offset=n*i,p.needTotalCount=!0,p.limit=i,Qz.get(d,{params:p})},this.fetchQueriesStatsPage=function(e,t,n,r){var i=t.currentTablePage,o=t.apiUrl,a=t.pageSize,s=t.startTime,l=t.endTime,u=t.searchInput,c=t.database,d=t.sortBy,p=t.sortDirection,h=t.queryType,f=t.groupByOperation,g=n(),m=g.cluster,v=g.region,y=g.zone,x=g.node,_=new URLSearchParams;if(Zi(m)&&m!==wr&&_.append("clusterUuid",m),Zi(v)&&v!==wr&&_.append("regionCode",v),Zi(y)&&y!==wr&&_.append("azCode",y),Zi(x)&&x!==wr&&_.append("instanceName",x),qi(r)){var b=f===exports.WaitEventClassification.WAIT_EVENT?"events":"eventTypes";r.forEach((function(e){return _.append(b,e)}))}var w=Zi(o)?"".concat(o,"/universe/").concat(e,"/queries/stats/page?").concat(_.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(_.toString()),S={};return h&&(S.queryType=h.toUpperCase()),s&&(S.startTime=s),l&&(S.endTime=l),Zi(u)&&(S.query=u),c&&c!==wr&&(S.namespaceName=c),f&&f===exports.WaitEventClassification.WAIT_EVENT&&(S.groupEventsBy=rr.waitEvent),S.sortBy=Xi(d)?"eps":d,S.direction=Xi(p)?"DESC":p,S.offset=i*a,S.needTotalCount=!0,S.limit=a,S.excludeTpUser=!0,Qz.get(w,{params:S})},this.fetchNamespaceSchemas=function(e,t,n){var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return Qz.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},i=t.startTime,o=t.endTime,a=t.queryId,s=t.dbId;i&&(r.startTime=i),o&&(r.endTime=o),a&&(r.queryId=a),s&&(r.dbId=s);var l=Zi(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return Qz.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=Zi(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),Zi(s)&&(h.tableName=s),l&&l!==wr&&(h.namespaceName=l),u&&u!==wr&&(h.schemaName=u),h.sortBy=Xi(c)?"namespaceName":c,h.direction=Xi(d)?"DESC":d,h.offset=n*i,h.needTotalCount=!0,h.limit=i,Qz.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return Qz.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return Qz.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return Qz.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n){qz&&qz.abort(),qz=new AbortController;var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),i=Vz.CancelToken.source();return qz.signal.addEventListener("abort",(function(){i.cancel("Request aborted")})),Qz.post(r,t,{cancelToken:i.token}).then((function(e){return e.data}))},this.fetchQueries=function(e,t,n){var r={};Qi(n)&&(r.db_id=null==n?void 0:n.dbId,r.query_id=null==n?void 0:n.queryId,r.user_id=null==n?void 0:n.userId);var i=Zi(t)?"".concat(t,"/universe/").concat(e,"/queries"):"/universe/".concat(e,"/queries");return Qz.get(i,{params:r}).then((function(e){return e.data}))},this.fetchCustomerMetadataList=function(e){var t=Zi(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return Qz.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Zi(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Qz.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Zi(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Qz.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Zi(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Qz.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Zi(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return Qz.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Qz.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Zi(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Qz.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Qz.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=Zi(e)?"".concat(e,"/universe/details"):"/universe/details";return Qz.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return Qz.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return Qz.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Zi(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return Qz.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=Zi(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Qz.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Zi(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Qz.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var i=Zi(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Qz.put(i,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Zi(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Qz.delete(r).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,i,o){void 0===r&&(r="");var a=i(),s=a.cluster,l=a.region,u=a.zone,c=a.node,d=new URLSearchParams;if(t&&d.append("startTime",t),n&&d.append("endTime",n),null===t&&null===n)return{};Zi(r)&&d.append("anomalyType",r),Zi(s)&&s!==wr&&d.append("clusterUuid",s),Zi(l)&&l!==wr&&d.append("regionCode",l),Zi(u)&&u!==wr&&d.append("azCode",u),Zi(c)&&c!==wr&&d.append("instanceName",c);var p=Zi(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return Qz.get(p).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=Zi(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return Qz.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=Zi(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return Qz.get(o).then((function(e){return e.data}))}},oH=new iH;function aH(){return aH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aH.apply(null,arguments)}const sH=e=>w.createElement("svg",aH({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),Zz||(Zz=w.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),Xz||(Xz=w.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),$z||($z=w.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),Kz||(Kz=w.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),Jz||(Jz=w.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),eH||(eH=w.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),tH||(tH=w.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),nH||(nH=w.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),rH||(rH=w.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},w.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),w.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var lH=function(i){var a,s,l,u=i.metricMeasure,c=i.apiUrl,d=i.universeQueryStatsData,p=i.appName,h=i.timezone,f=i.urlParams,g=i.dateTimeRange,m=i.getClusterDetails,v=i.onEChartsDateSelect,y=wi(),x=t.useRef([]),_=t.useState(null),b=_[0],w=_[1],S=t.useState([]),C=S[0],T=S[1],M=m(),A=M.universeUuid,E=M.cluster,I=M.region,D=M.zone,O=M.node,k=M.numNodes,R=M.outlierType,N=function(e,t,n){void 0===n&&(n=!1);var r=zr.WAIT_EVENT_COMPONENT;if("Class"===e?r=zr.WAIT_EVENT_CLASS:"Type"===e?r=zr.WAIT_EVENT_TYPE:"Event"===e?r=zr.WAIT_EVENT:"Query"===e?r=zr.QUERY:"Client IP"===e&&(r=zr.CLIENT_NODE_IP),n){var i=JSON.parse(JSON.stringify(C)),o=null;if(n){var a=null==i?void 0:i.filter((function(e){return e.name===(null==t?void 0:t.name)}));if(a.length>=2){var s=a.find((function(e,n){return n===a.length-1&&e.name===(null==t?void 0:t.name)}));o=s}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}))}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}));o&&(o.groupBy=[r]),i.map((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)?o:e})),T(i),L.mutate(i)}},L=n.useMutation({mutationKey:["fetchHistoricalQueryGraphs",A],mutationFn:function(e){return oH.fetchGraphs(A,e,c)},onSuccess:function(e){w(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),P=null===(l=null===(s=null===(a=null==L?void 0:L.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;t.useEffect((function(){var e,t=ya(!0,!1,0,m(),null,B(B({},f),{type:null!==(e=f.type)&&void 0!==e?e:null}));t&&T(t),t&&L.mutate(t)}),[u,g,I,E,D,O,R,k]);var j=function(e,t){x.current[t]=e};return t.useEffect((function(){x.current=[]}),[u]),t.useEffect((function(){return L.isSuccess&&b&&b.length>0&&x.current.length===b.length&&nA(x.current),function(){rA(x.current)}}),[L.isSuccess,b]),e.jsxs(r.Box,B({mt:3},{children:[L.isLoading&&e.jsx(r.Box,B({mt:2,className:y.loadingBox},{children:e.jsx(sH,{className:H(y.icon,y.inProgressIcon)})})),L.isError&&e.jsxs(r.Box,B({mt:4},{children:[(p===exports.AppName.YBA||p===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(P)?P:_i.QUERIES_GRAPHS_FETCH_ERROR}),p===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(P)?P:_i.QUERIES_GRAPHS_FETCH_ERROR})]})),L.isSuccess&&e.jsxs(r.Box,{children:[e.jsx(r.Box,B({className:H(y.gridBox,y.gridBoxSingle)},{children:null==b?void 0:b.filter((function(e){var t;return null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history")})).map((function(t,n){var i,o,a=ma(u,t,exports.GraphType.SINGLE_SUPPORTING,!0,C,!0),s=null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.startsWith("active_session_history"),l=t.name;if(s){var c=t.layout.metadata,f=c.currentGroupBy,m=null===(o=c.supportedGroupBy.find((function(e){return e.label===f[0]})))||void 0===o?void 0:o.name;m&&a.groupByOperations.sort((function(e,t){return e===m?-1:t===m?1:0}))}return e.jsx(r.Box,B({id:"HistoricalQueryView-ash-".concat(u,"-").concat(n)},{children:e.jsx(r.Box,B({style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF"}},{children:e.jsx(MF,{metricData:t,metricKey:l,dateTimeRange:g,containerWidth:null,metricMeasure:u,operations:u===exports.MetricMeasure.OVERALL?[]:a.uniqueOperations,registerChartInstance:function(e){return j(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:a.groupByOperations,appName:p,timezone:h,queryData:d,onSelectAshLabel:N,isHistoricalQueryView:!0,onEChartsDateSelect:v,showTitle:!0},"".concat(u,"-").concat(l))}))}),"HistoricalQueryView-ash-".concat(u,"-").concat(n))}))})),e.jsx(r.Box,B({className:H(y.gridBox,y.gridBoxThree)},{children:null==b?void 0:b.filter((function(e){var t;return!(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history"))})).map((function(t,n){var i=ma(u,t,exports.GraphType.SINGLE_SUPPORTING,!0,C,!0),o=t.name;return e.jsx(r.Box,B({id:"HistoricalQueryView-".concat(u,"-").concat(n)},{children:e.jsx(r.Box,B({style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF",marginTop:"16px",marginBottom:"16px"}},{children:e.jsx(MF,{metricData:t,metricKey:o,dateTimeRange:g,containerWidth:null,metricMeasure:u,operations:u===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return j(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:i.groupByOperations,appName:p,timezone:h,queryData:d,onSelectAshLabel:N,isHistoricalQueryView:!0,onEChartsDateSelect:v,showTitle:!0},"".concat(u,"-").concat(o))}))}),"HistoricalQueryView-".concat(u,"-").concat(n))}))}))]})]}))},uH=function(n){var i=n.sourceData,o=n.expandAll,a=void 0!==o&&o,s=n.showMoreOptions,l=void 0!==s&&s,u=n.onClickShowMoreAnomalies,c=n.onSelectedIssue,d=n.startTime,p=n.name,h=n.endTime,f=n.appName,g=n.showMultiline,m=void 0===g||g,v=n.isInsightsTab,x=void 0!==v&&v;n.currentTab;var _=n.viewAllAnomalies,b=void 0!==_&&_,w=f===exports.AppName.YBM?27:35,S=t.useState({}),C=S[0],T=S[1],M=t.useState({}),A=M[0],E=M[1],I=t.useRef(null),D=t.useRef(null);t.useEffect((function(){if(i){if(l){var e=function(e){for(var t,n={},r=0,i=Object.entries(e.groups);r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=Object.keys(s);for(var l=function(e,r){n[e]=(null===(t=r.groups)||void 0===t?void 0:t.map((function(t,n){return"".concat(e,"_").concat(n)})))||[]},u=0,c=Object.entries(s);u<c.length;u++){var d=c[u];l(d[0],d[1])}}return n}(i),t=function(e){for(var t={},n=0,r=Object.entries(e.groups);n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=!1;for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(i);E(e),T(t)}else E({}),T({})}}),[i]),t.useEffect((function(){T((function(e){var t=B({},e);return Object.keys(t).forEach((function(e){t[e]=a})),t}))}),[a]);var O=function(e){var t,n=0;for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))n+=null===(t=e[r])||void 0===t?void 0:t.totalCount}return n},k=function(e){for(var t=0,n=Object.entries(A);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return k(i)}return e};function R(){var e,t,n,r,i,o;document.querySelectorAll(".custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-top, .custom-group-separator-bottom").forEach((function(e){return e.remove()}));var a=Array.from(document.querySelectorAll(".vis-labelset .vis-label.custom-group-row-1"));a.forEach((function(e,t){var n,r=function(e){var t=e.nextElementSibling;for(;t&&!t.classList.contains("custom-group-row-1");)t=t.nextElementSibling;return t}(e);if(r){var i=document.createElement("div");i.className="custom-group-separator-left",null===(n=e.parentNode)||void 0===n||n.insertBefore(i,r)}var o=document.querySelector(".vis-foreground");if(o&&null!==e.offsetTop&&t>0){var a=document.createElement("div");a.className="custom-group-separator-right",a.style.top="".concat(e.offsetTop,"px"),a.style.position="absolute",o.appendChild(a)}}));var s=a[0];if(!(null===(e=s.previousElementSibling)||void 0===e?void 0:e.classList.contains("custom-group-separator-top"))){var l=document.createElement("div");l.className="custom-group-separator-top",null===(t=s.parentNode)||void 0===t||t.insertBefore(l,s)}var u=a[a.length-1],c=function(e){var t=e.nextElementSibling;for(;t&&(t.classList.contains("custom-group-row-2")||t.classList.contains("custom-group-row-3"));)t=t.nextElementSibling;return t}(u);if(!(null===(n=null==c?void 0:c.previousElementSibling)||void 0===n?void 0:n.classList.contains("custom-group-separator-bottom"))&&!(null===(r=u.nextElementSibling)||void 0===r?void 0:r.classList.contains("custom-group-separator-bottom"))){var d=document.createElement("div");d.className="custom-group-separator-bottom",c?null===(i=u.parentNode)||void 0===i||i.insertBefore(d,c):null===(o=u.parentNode)||void 0===o||o.appendChild(d)}}return t.useEffect((function(){if((Object.keys(C).length>0||qi(i))&&I.current){var e=l?function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:O(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"&#xff0b;&nbsp;&nbsp;&nbsp;".concat(s):"&#x2212;&nbsp;&nbsp;&nbsp;".concat(s),parent:e,name:s,categoryCount:o.totalCount});var u=[];if(o.groups.forEach((function(e,i){var o,s,l="".concat(a,"_").concat(i),c=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:l,name:c,content:c,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:l})})),u.push.apply(u,e.anomalyIntervals)})),o.hasMore&&l){var c="".concat(a,"_").concat(qr),d=qr;t.push({id:c,name:d,content:Qr,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(qr),content:"anomaly-".concat(a,"-").concat(qr),start:"",end:"",group:a})}_a(u).forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},a=0,s=Object.entries(i);a<s.length;a++){var u=s[a];o(u[0],u[1])}var c=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));_a(c).forEach((function(t){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:t.startTime,end:t.endTime,group:e})}))},o=0,a=Object.entries(null==e?void 0:e.groups);o<a.length;o++){var s=a[o];i(s[0],s[1])}return{groups:t,items:n}}(i):function(e){var t=[],n=[],r=0;return null==e||e.forEach((function(e,i){var o=e.lastInstance,a="group-".concat(i),s=(null==o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:a,content:s,name:s,uuid:null==o?void 0:o.uuid,categoryLevel:1}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))})),{groups:t,items:n}}(i),t=e.items,n=e.groups,r={items:t,groups:n},o=n;if(l){var a=n.map((function(e){var t,n,r=(null===(t=A[e.id])||void 0===t?void 0:t.length)>0,i=null!==(n=C[e.id])&&void 0!==n&&n,o=r?i?"&#x2212;":"&#xff0b;":"",a=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,s="",l=k(e.id);3===e.categoryLevel&&e.name===qr&&(l=e.grandParent),1===e.categoryLevel?s="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?s="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;":3===e.categoryLevel&&(s="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var u=0;2===e.categoryLevel?u=40:3===e.categoryLevel&&(u=44);var c="margin-left: ".concat(u,"px;"),d=r||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",p="".concat(c).concat(d).concat("color: #0B1117 !important;").concat(s),h="",f="";if(l)switch(l){case exports.AnomalyCategory.DB:h="db-background",f="Database";break;case exports.AnomalyCategory.NODE:h="node-background",f="Node";break;case exports.AnomalyCategory.SQL:h="sql-background",f="SQL";break;case exports.AnomalyCategory.APP:h="app-background",f="Application";break;case exports.AnomalyCategory.INFRA:h="infra-background",f="Infrastructure"}var g="";1===e.categoryLevel?g="custom-group-row-1":2===e.categoryLevel?g="custom-group-row-2":3===e.categoryLevel&&(g="custom-group-row-3");var m=e.content.replace(/&nbsp;/g,"").length>w?"".concat(e.content.substring(0,w),"..."):e.content;return B(B({},e),{content:r?'<a title="'.concat(e.name,'">').concat(o,"&nbsp;&nbsp;&nbsp;").concat((null==e?void 0:e.name)&&e.name.length>w?1===e.categoryLevel?f:"".concat(e.name.substring(0,w),"..."):1===e.categoryLevel?f:e.name,"</a>").concat(1!==e.categoryLevel&&2!==e.categoryLevel||i?"":"<span>".concat(e.categoryCount,"</span>")):'<a title="'.concat(e.content,'">').concat(o).concat(m,"</a>").concat(a?"<span>".concat(3===e.categoryCount?"&#xff0b;":"").concat(e.categoryCount,"</span>"):""),className:[g,h].filter(Boolean).join(" "),style:p,visible:!e.parent||C[e.parent]})})),s=a.filter((function(e){return e.visible}));Object.entries(A).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=a.find((function(t){return t.id===e}));n&&(n.visible=C[t])}))}));var g=t.filter((function(e){var t,n=a.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=A[n.id])||void 0===t?void 0:t.length)>0,i=C[n.id];return!r||!i}return!1}));r={items:S=g.map((function(e){var t=a.find((function(t){return t.id===e.group})),n=t?k(t.id):null,r="#CCCCCC";if(n)switch(n){case exports.AnomalyCategory.DB:r=xi[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=xi[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=xi[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=xi[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=xi[exports.AnomalyCategory.INFRA]}return B(B({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:s}}else{var v="custom-group-row",_=n.map((function(e){return B(B({},e),{content:m?'<a title="'.concat(e.content,'"> ').concat(e.content.length>w?"".concat(e.content.substring(0,w),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[v].filter(Boolean).join(" ")})})),S=t.map((function(e){var t,n,r="#CCCCCC",o=null===(n=null===(t=null==i?void 0:i[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(o)switch(o){case exports.AnomalyCategory.DB:r=xi[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=xi[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=xi[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=xi[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=xi[exports.AnomalyCategory.INFRA]}return B(B({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));r={items:S,groups:_}}if(D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current.setOptions(M),D.current.setItems(r.items),D.current.setGroups(r.groups),l&&!x&&R()}else{var M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new y.Timeline(I.current,r.items,r.groups,M)}D.current.on("changed",(function(){if(b){document.querySelectorAll(".vis-label.custom-group-row .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")}))}else{document.querySelectorAll(".vis-label.custom-group-row-1 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-1")})),document.querySelectorAll(".vis-label.custom-group-row-2 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-2")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-3")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")})),document.querySelectorAll(".vis-label.db-background .vis-inner span").forEach((function(e){return e.classList.add("db-inner-background")})),document.querySelectorAll(".vis-label.node-background .vis-inner span").forEach((function(e){return e.classList.add("node-inner-background")})),document.querySelectorAll(".vis-label.sql-background .vis-inner span").forEach((function(e){return e.classList.add("sql-inner-background")})),document.querySelectorAll(".vis-label.app-background .vis-inner span").forEach((function(e){return e.classList.add("app-inner-background")})),document.querySelectorAll(".vis-label.infra-background .vis-inner span").forEach((function(e){return e.classList.add("infra-inner-background")})),l&&!x&&R();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=p===hi?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=p===hi?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==D||D.current.on("click",(function(e){var t=window.scrollY;setTimeout((function(){return window.scrollTo(0,t)}),0);var n,r,i,a=e.group,s="",l=null;a&&(l=o.find((function(e){return e.id===a})))&&"string"==typeof l.content&&(s=l.id),(null==l?void 0:l.uuid)&&(f===exports.AppName.YBM?(n=l.uuid,r=new URLSearchParams(window.location.search),(i={}).duration=r.get("duration"),i.startTime=r.get("startTime"),i.endTime=r.get("endTime"),null==c||c(n,i)):f!==exports.AppName.WEB&&f!==exports.AppName.YBA||function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();f===exports.AppName.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(l.uuid)),(null==l?void 0:l.name)===qr&&(null==u||u(l.parent)),s&&function(e){T((function(t){var n=B({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=A[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(s)}))}else if(Gi(i)&&I.current&&!D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new y.Timeline(I.current,[],[],M),D.current.setOptions(M),D.current.setItems([]),D.current.setGroups([])}return function(){D.current&&(D.current.destroy(),D.current=null)}}),[C,i]),e.jsxs(r.Box,B({id:p},{children:[e.jsx("div",{ref:I,style:{backgroundColor:"#FFFFFF"}},p),e.jsx("style",{children:"\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),p)},cH=function(i){var a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,A,E,I,D,O=i.metricMeasure,k=i.appName,R=i.timezone,N=i.universeQueryData,L=i.amomalyGraphRequestParams,P=i.formattedAnomalyRca,j=i.anomalyData,F=i.gantChartData,U=i.dateTimeRange,z=i.urlParams,V=i.apiUrl,W=i.getClusterDetails,Y=i.onEChartsDateSelect,G=i.onSelectedIssue,q=t.useRef([]),Q=wi(),Z=t.useState(!1);Z[0],Z[1];var X=t.useState(0),$=X[0],K=X[1],J=t.useState(j),ee=J[0],te=J[1],ne=t.useState(null),re=ne[0],ie=ne[1],oe=t.useState(L),ae=oe[0],se=oe[1],le=W(),ue=le.universeUuid,ce=le.cluster,de=le.region,pe=le.zone,he=le.node,fe=le.numNodes,ge=le.outlierType,me=wF(O),ve=function(e,t,n){var r,i,o=zr.WAIT_EVENT_COMPONENT;if("Class"===e?o=zr.WAIT_EVENT_CLASS:"Type"===e?o=zr.WAIT_EVENT_TYPE:"Event"===e?o=zr.WAIT_EVENT:"Query"===e?o=zr.QUERY:"Client IP"===e&&(o=zr.CLIENT_NODE_IP),(null===(r=null==j?void 0:j.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==j?void 0:j.lastInstance)||void 0===i?void 0:i.category)!==exports.AnomalyCategory.DB){var a=JSON.parse(JSON.stringify(ae)),s=null==a?void 0:a.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));s&&(s.groupBy=[o]),a.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?s:e})),se(a),ye.mutate(a)}};t.useEffect((function(){te(j)}),[j]),t.useEffect((function(){var e;me&&me!==O&&ie(null);var t=JSON.parse(JSON.stringify(ae)),n=W(),r=ya(!1,!1,0,n,t,B(B({},z),{type:null!==(e=z.type)&&void 0!==e?e:null})),i=null!=r?r:ae;se(i),ye.mutate(i)}),[O,U,de,ce,pe,he,ge,fe]);var ye=n.useMutation({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return oH.fetchGraphs(ue,e,V)},onSuccess:function(e){ie(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),xe=null===(l=null===(s=null===(a=null==ye?void 0:ye.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,_e=function(t,n,i,o,a,s){return e.jsx(r.Box,B({mt:3,mr:8},{children:e.jsx(MF,{metricData:t,metricKey:t.name,graphTitle:s,containerWidth:null,dateTimeRange:U,metricMeasure:O,operations:n,groupByOperations:i,registerChartInstance:function(e){return we(e,a)},appName:k,graphType:o,timezone:R,queryData:N,onSelectAshLabel:ve,onEChartsDateSelect:Y},"".concat(O,"-").concat(t.name))}))},be=null==P?void 0:P.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0}));t.useEffect((function(){q.current=[]}),[O]);var we=function(e,t){q.current[t]=e};return t.useEffect((function(){return ye.isSuccess&&re&&re.length>0&&nA(q.current),function(){rA(q.current)}}),[ye.isSuccess,re,$]),e.jsx(r.Box,{children:e.jsx(Jn,{bodyClassName:H(k===exports.AppName.WEB?Q.panelItemBody:Q.panelItemBodyYBM),body:e.jsxs(e.Fragment,{children:[ye.isLoading&&e.jsx(r.Box,B({mt:2,className:Q.loadingBox},{children:e.jsx(sH,{className:H(Q.icon,Q.inProgressIcon)})})),ye.isError&&e.jsxs(r.Box,B({mt:4},{children:[(k===exports.AppName.YBA||k===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(xe)?xe:_i.RCA_GRAPHS_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(xe)?xe:_i.RCA_GRAPHS_FETCH_ERROR})]})),ye.isSuccess&&e.jsxs(r.Box,{children:[qi(re)&&qi(null===(u=null==j?void 0:j.lastInstance)||void 0===u?void 0:u.mainGraphs)&&(null===(c=null==j?void 0:j.lastInstance)||void 0===c?void 0:c.mainGraphs.map((function(t,n){var i,o,a,s=null==re?void 0:re.find((function(e){return e.name===t.name})),l=t.groupByControl,u=O===exports.MetricMeasure.OVERALL?{uniqueOperations:[],groupByOperations:[]}:ma(O,s,exports.GraphType.MAIN_RCA,l,L);return e.jsxs(r.Box,B({className:H(Q.mainGraphBox,k===exports.AppName.WEB?null:Q.mainGraphBoxYBM)},{children:[e.jsx(r.Box,B({className:Q.mainGraphMetadataBox},{children:e.jsxs(r.Box,B({className:Q.anomalyMetadataOneBox},{children:[e.jsx("span",B({className:Q.headerTitle},{children:oi})),e.jsx("span",B({className:Q.metadataDetails},{children:null===(i=null==j?void 0:j.lastInstance)||void 0===i?void 0:i.title})),e.jsx("span",B({className:H(Q.regularMetadata,(null===(o=null==j?void 0:j.lastInstance)||void 0===o?void 0:o.category)===exports.AnomalyCategory.SQL&&Q.restrictLines)},{children:null===(a=null==j?void 0:j.lastInstance)||void 0===a?void 0:a.summary}))]}))})),e.jsx(r.Box,B({mt:1,className:Q.boxContainer},{children:_e(s,u.uniqueOperations,u.groupByOperations,exports.GraphType.MAIN_RCA,n+10)}))]}))}))),e.jsxs(r.Box,B({mt:2,mb:1,className:Q.ghantChartContainer},{children:[F.isLoading&&e.jsx(r.Box,B({mt:2,className:Q.loadingBox},{children:e.jsx(sH,{className:H(Q.icon,Q.inProgressIcon)})})),F.isError&&404!==(null===(p=null===(d=null==F?void 0:F.error)||void 0===d?void 0:d.response)||void 0===p?void 0:p.status)&&e.jsxs(r.Box,B({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx(mt,{customErrorMessage:Zi(null===(g=null===(f=null===(h=null==F?void 0:F.error)||void 0===h?void 0:h.response)||void 0===f?void 0:f.data)||void 0===g?void 0:g.error)?null===(y=null===(v=null===(m=null==F?void 0:F.error)||void 0===m?void 0:m.response)||void 0===v?void 0:v.data)||void 0===y?void 0:y.error:_i.GANTCHART_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(null===(b=null===(_=null===(x=null==F?void 0:F.error)||void 0===x?void 0:x.response)||void 0===_?void 0:_.data)||void 0===b?void 0:b.error)?null===(C=null===(S=null===(w=null==F?void 0:F.error)||void 0===w?void 0:w.response)||void 0===S?void 0:S.data)||void 0===C?void 0:C.error:_i.GANTCHART_FETCH_ERROR})]})),(F.isSuccess||F.isError&&404===(null===(M=null===(T=null==F?void 0:F.error)||void 0===T?void 0:T.response)||void 0===M?void 0:M.status))&&(Qi(ee)?e.jsx(r.Box,B({className:H(k===exports.AppName.WEB?Q.rcaGantChartBox:Q.rcaGantChartBoxYBM)},{children:e.jsx(uH,{sourceData:F.isError&&404===(null===(E=null===(A=null==F?void 0:F.error)||void 0===A?void 0:A.response)||void 0===E?void 0:E.status)?[]:[ee],name:hi,showMoreOptions:!1,expandAll:!0,startTime:null===(I=null==U?void 0:U.startDateTime)||void 0===I?void 0:I.toISOString(),endTime:null===(D=null==U?void 0:U.endDateTime)||void 0===D?void 0:D.toISOString(),onSelectedIssue:G,appName:k,showMultiline:!1},hi)})):e.jsxs(r.Box,B({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx("span",{children:"Failed to fetch anomaly data, please try again."}),k===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:"Failed to fetch anomaly data, please try again."})]})))]})),qi(re)&&qi(be)&&e.jsxs(r.Box,B({className:H(Q.causesBox,k===exports.AppName.WEB?null:Q.causesBoxYBM)},{children:[e.jsx(o.YBTabs,B({value:$,onChange:function(e,t){var n=window.scrollY;K(t),setTimeout((function(){return window.scrollTo(0,n)}),0)},"aria-label":"anomaly causes tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:null==be?void 0:be.map((function(t,n){return e.jsx(o.YBTab,{component:"div",label:t.cause,className:Q.causeTabButton},n)}))})),null==be?void 0:be.map((function(t,n){var i,o;return e.jsx(r.Box,B({role:"tabpanel",hidden:$!==n,id:"tabpanel-".concat(n),"aria-labelledby":"tab-".concat(n)},{children:$===n&&e.jsxs(r.Box,B({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx("span",B({className:Q.causeText},{children:t.cause})),e.jsxs(r.Box,{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",alt:"path"}),e.jsx("span",B({className:Q.descriptionText},{children:t.description}))]}),e.jsx(r.Box,B({mt:2,className:(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.length)>1?H(Q.gridBox,Q.gridBoxDouble):""},{children:null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.map((function(i,o){var a,s,l,u=null==re?void 0:re.find((function(e,n){return n>0&&(null==e?void 0:e.name)===i&&t.index.includes(n)})),c=1===(null===(a=null==t?void 0:t.name)||void 0===a?void 0:a.length),d=null===(s=t.groupByControl)||void 0===s?void 0:s[0];if(Zi(null!==(l=null==u?void 0:u.errorMessage)&&void 0!==l?l:""))return e.jsx(r.Box,{});var p=ma(O,u,exports.GraphType.MULTI_SUPPORTING,d,L);return e.jsx(r.Box,B({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:c?"0px":"16px"}},{children:_e(u,p.uniqueOperations,p.groupByOperations,c?exports.GraphType.SINGLE_SUPPORTING:exports.GraphType.MULTI_SUPPORTING,n+o,t.title)}))}))}))]}))}),n)}))]}))]})]})})})},dH=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},pH=V(dH),hH=Object.getOwnPropertySymbols,fH=Object.prototype.hasOwnProperty,gH=Object.prototype.propertyIsEnumerable;var mH=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))fH.call(n,a)&&(i[a]=n[a]);if(hH){r=hH(n);for(var s=0;s<r.length;s++)gH.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},vH=mH,yH={};function xH(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var _H="mixins";var bH=function(e,t,n){var r=[],i={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},o={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},a={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)l(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=vH({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=vH({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=c(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=vH({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(xH(!(n in a),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return xH("DEFINE_MANY_MERGED"===(o.hasOwnProperty(n)?o[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=c(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function s(e,t){var n=i.hasOwnProperty(t)?i[t]:null;g.hasOwnProperty(t)&&xH("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&xH("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function l(e,n){if(n){xH("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),xH(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,o=r.__reactAutoBindPairs;for(var l in n.hasOwnProperty(_H)&&a.mixins(e,n.mixins),n)if(n.hasOwnProperty(l)&&l!==_H){var u=n[l],p=r.hasOwnProperty(l);if(s(p,l),a.hasOwnProperty(l))a[l](e,u);else{var h=i.hasOwnProperty(l);if("function"==typeof u&&!h&&!p&&!1!==n.autobind)o.push(l,u),r[l]=u;else if(p){var f=i[l];xH(h&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,l),"DEFINE_MANY_MERGED"===f?r[l]=c(r[l],u):"DEFINE_MANY"===f&&(r[l]=d(r[l],u))}else r[l]=u}}}}function u(e,t){for(var n in xH(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(xH(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return u(i,n),u(i,r),i}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){return t.bind(e)}var h={componentDidMount:function(){this.__isMounted=!0}},f={componentWillUnmount:function(){this.__isMounted=!1}},g={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},m=function(){};return vH(m.prototype,e.prototype,g),function(e){var t=function(e,r,i){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=p(e,i)}}(this),this.props=e,this.context=r,this.refs=yH,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;xH("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o};for(var o in t.prototype=new m,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],r.forEach(l.bind(null,t)),l(t,h),l(t,e),l(t,f),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),xH(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),i)t.prototype[o]||(t.prototype[o]=null);return t}},wH=S.default,SH=bH;if(void 0===wH)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var CH,TH,MH,AH,EH=(new wH.Component).updater,IH=V(SH(wH.Component,wH.isValidElement,EH)),DH={exports:{}};DH.exports=function(){if(AH)return MH;AH=1;var e=TH?CH:(TH=1,CH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,MH=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();var OH=DH.exports,kH=V(OH),RH=function(){};function NH(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var LH=Object.create(null);function BH(e){return LH[e]||(LH[e]=function(e){for(var t="",n=[],r=[],i=void 0,o=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g;i=a.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=NH(e.slice(o,i.index))),i[1]?(t+="([^/]+)",n.push(i[1])):"**"===i[0]?(t+="(.*)",n.push("splat")):"*"===i[0]?(t+="(.*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]?t+=")?":"\\("===i[0]?t+="\\(":"\\)"===i[0]&&(t+="\\)"),r.push(i[0]),o=a.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=NH(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),LH[e]}function PH(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=BH(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===o[o.length-1]&&(r+="$");var a=t.match(new RegExp("^"+r,"i"));if(null==a)return null;var s=a[0],l=t.substr(s.length);if(l){if("/"!==s.charAt(s.length-1))return null;l="/"+l}return{remainingPathname:l,paramNames:i,paramValues:a.slice(1).map((function(e){return e&&decodeURIComponent(e)}))}}function jH(e){return BH(e).paramNames}function FH(e,t){t=t||{};for(var n=BH(e).tokens,r=0,i="",o=0,a=[],s=void 0,l=void 0,u=0,c=n.length;u<c;++u)if("*"===(s=n[u])||"**"===s)null!=(l=Array.isArray(t.splat)?t.splat[o++]:t.splat)||r>0||pH(!1),null!=l&&(i+=encodeURI(l));else if("("===s)a[r]="",r+=1;else if(")"===s){var d=a.pop();(r-=1)?a[r-1]+=d:i+=d}else if("\\("===s)i+="(";else if("\\)"===s)i+=")";else if(":"===s.charAt(0))if(null!=(l=t[s.substring(1)])||r>0||pH(!1),null==l){if(r){a[r-1]="";for(var p=n.indexOf(s),h=n.slice(p,n.length),f=-1,g=0;g<h.length;g++)if(")"==h[g]){f=g;break}f>0||pH(!1),u=p+f-1}}else r?a[r-1]+=encodeURIComponent(l):i+=encodeURIComponent(l);else r?a[r-1]+=s:i+=s;return r<=0||pH(!1),i.replace(/\/+/g,"/")}function UH(e,t){var n=e&&e.routes,r=t.routes,i=void 0,o=void 0,a=void 0;if(n){var s=!1;i=n.filter((function(n){if(s)return!0;var i=-1===r.indexOf(n)||function(e,t,n){return!!e.path&&jH(e.path).some((function(e){return t.params[e]!==n.params[e]}))}(n,e,t);return i&&(s=!0),i})),i.reverse(),a=[],o=[],r.forEach((function(e){var t=-1===n.indexOf(e),r=-1!==i.indexOf(e);t||r?a.push(e):o.push(e)}))}else i=[],o=[],a=r;return{leaveRoutes:i,changeRoutes:o,enterRoutes:a}}function zH(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0;function l(){i=!0,o?s=[].concat(Array.prototype.slice.call(arguments)):n.apply(this,arguments)}!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t.call(this,r++,u,l);o=!1,i?n.apply(this,s):r>=e&&a&&(i=!0,n())}}()}function HH(e,t,n){var r=e.length,i=[];if(0===r)return n(null,i);var o=!1,a=0;e.forEach((function(e,s){t(e,s,(function(e,t){!function(e,t,s){o||(t?(o=!0,n(t)):(i[e]=s,(o=++a===r)&&n(null,i)))}(s,e,t)}))}))}var VH=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=[],this.add=function(e){return t.hooks.push(e)},this.remove=function(e){return t.hooks=t.hooks.filter((function(t){return t!==e}))},this.has=function(e){return-1!==t.hooks.indexOf(e)},this.clear=function(){return t.hooks=[]}};function WH(){var e=new VH,t=new VH;function n(e,t,n,r){var i=e.length<n,o=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];(e.apply(t,r),i)&&(0,r[r.length-1])()};return r.add(o),o}function r(e,t,n){if(e){var r=void 0;zH(e,(function(e,n,o){t(e,i,(function(e){e||r?o(e,r):n()}))}),n)}else n();function i(e){r=e}}return{runEnterHooks:function(t,i,o){e.clear();var a=function(t){return t.reduce((function(t,r){return r.onEnter&&t.push(n(r.onEnter,r,3,e)),t}),[])}(t);return r(a.length,(function(t,n,r){a[t](i,n,(function(){e.has(a[t])&&(r.apply(void 0,arguments),e.remove(a[t]))}))}),o)},runChangeHooks:function(e,i,o,a){t.clear();var s=function(e){return e.reduce((function(e,r){return r.onChange&&e.push(n(r.onChange,r,4,t)),e}),[])}(e);return r(s.length,(function(e,n,r){s[e](i,o,n,(function(){t.has(s[e])&&(r.apply(void 0,arguments),t.remove(s[e]))}))}),a)},runLeaveHooks:function(e,t){for(var n=0,r=e.length;n<r;++n)e[n].onLeave&&e[n].onLeave.call(e[n],t)}}}var YH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function GH(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return GH(e,t[n])}));if("object"===(void 0===e?"undefined":YH(e))){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!GH(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function qH(e,t){return null==t?null==e:null==e||GH(e,t)}function QH(e,t,n,r,i){var o=e.pathname,a=e.query;return null!=n&&("/"!==o.charAt(0)&&(o="/"+o),!!(function(e,t){return"/"!==t.charAt(0)&&(t="/"+t),"/"!==e.charAt(e.length-1)&&(e+="/"),"/"!==t.charAt(t.length-1)&&(t+="/"),t===e}(o,n.pathname)||!t&&function(e,t,n){for(var r=e,i=[],o=[],a=0,s=t.length;a<s;++a){var l=t[a].path||"";if("/"===l.charAt(0)&&(r=e,i=[],o=[]),null!==r&&l){var u=PH(l,r);if(u?(r=u.remainingPathname,i=[].concat(i,u.paramNames),o=[].concat(o,u.paramValues)):r=null,""===r)return i.every((function(e,t){return String(o[t])===String(n[e])}))}}return!1}(o,r,i))&&qH(a,n.query))}function ZH(e){return e&&"function"==typeof e.then}function XH(e,t){HH(e.routes,(function(t,n,r){!function(e,t,n){if(t.component||t.components)n(null,t.component||t.components);else{var r=t.getComponent||t.getComponents;if(r){var i=r.call(t,e,n);ZH(i)&&i.then((function(e){return n(null,e)}),n)}else n()}}(e,t,r)}),t)}var $H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function KH(e){return null==e||S.default.isValidElement(e)}function JH(e){return KH(e)||Array.isArray(e)&&e.every(KH)}function eV(e){var t,n,r=e.type,i=(t=r.defaultProps,n=e.props,$H({},t,n));if(i.children){var o=tV(i.children,i);o.length&&(i.childRoutes=o),delete i.children}return i}function tV(e,t){var n=[];return S.default.Children.forEach(e,(function(e){if(S.default.isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(eV(e))})),n}function nV(e){return JH(e)?e=tV(e):e&&!Array.isArray(e)&&(e=[e]),e}var rV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function iV(e,t,n,r,i){if(e.childRoutes)return[null,e.childRoutes];if(!e.getChildRoutes)return[];var o=!0,a=void 0,s={location:t,params:aV(n,r)},l=e.getChildRoutes(s,(function(e,t){t=!e&&nV(t),o?a=[e,t]:i(e,t)}));return ZH(l)&&l.then((function(e){return i(null,nV(e))}),i),o=!1,a}function oV(e,t,n,r,i){if(e.indexRoute)i(null,e.indexRoute);else if(e.getIndexRoute){var o={location:t,params:aV(n,r)},a=e.getIndexRoute(o,(function(e,t){i(e,!e&&nV(t)[0])}));ZH(a)&&a.then((function(e){return i(null,nV(e)[0])}),i)}else if(e.childRoutes||e.getChildRoutes){var s=function(e,o){if(e)i(e);else{var a=o.filter((function(e){return!e.path}));zH(a.length,(function(e,i,o){oV(a[e],t,n,r,(function(t,n){if(t||n){var r=[a[e]].concat(Array.isArray(n)?n:[n]);o(t,r)}else i()}))}),(function(e,t){i(null,t)}))}},l=iV(e,t,n,r,s);l&&s.apply(void 0,l)}else i()}function aV(e,t){return function(e,t,n){return t.reduce((function(e,t,r){var i=n&&n[r];return Array.isArray(e[t])?e[t].push(i):e[t]=t in e?[e[t],i]:i,e}),e)}({},e,t)}function sV(e,t,n,r,i,o){var a=e.path||"";if("/"===a.charAt(0)&&(n=t.pathname,r=[],i=[]),null!==n&&a){try{var s=PH(a,n);s?(n=s.remainingPathname,r=[].concat(r,s.paramNames),i=[].concat(i,s.paramValues)):n=null}catch(e){o(e)}if(""===n){var l={routes:[e],params:aV(r,i)};return void oV(e,t,r,i,(function(e,t){if(e)o(e);else{var n;if(Array.isArray(t))(n=l.routes).push.apply(n,t);else t&&l.routes.push(t);o(null,l)}}))}}if(null!=n||e.childRoutes){var u=function(a,s){a?o(a):s?lV(s,t,(function(t,n){t?o(t):n?(n.routes.unshift(e),o(null,n)):o()}),n,r,i):o()},c=iV(e,t,r,i,u);c&&u.apply(void 0,c)}else o()}function lV(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];void 0===r&&("/"!==t.pathname.charAt(0)&&(t=rV({},t,{pathname:"/"+t.pathname})),r=t.pathname),zH(e.length,(function(n,a,s){sV(e[n],t,r,i,o,(function(e,t){e||t?s(e,t):a()}))}),n)}var uV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function cV(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function dV(e,t,n){if(e[t])return new Error("<"+n+'> should not have a "'+t+'" prop')}OH.shape({listen:OH.func.isRequired,push:OH.func.isRequired,replace:OH.func.isRequired,go:OH.func.isRequired,goBack:OH.func.isRequired,goForward:OH.func.isRequired});var pV,hV=OH.elementType,fV=OH.oneOfType([hV,OH.object]),gV=OH.oneOfType([OH.object,OH.element]),mV=OH.oneOfType([gV,OH.arrayOf(gV)]),vV={exports:{}},yV={};vV.exports=function(){if(pV)return yV;pV=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return yV.AsyncMode=l,yV.ConcurrentMode=u,yV.ContextConsumer=s,yV.ContextProvider=a,yV.Element=t,yV.ForwardRef=c,yV.Fragment=r,yV.Lazy=f,yV.Memo=h,yV.Portal=n,yV.Profiler=o,yV.StrictMode=i,yV.Suspense=d,yV.isAsyncMode=function(e){return _(e)||x(e)===l},yV.isConcurrentMode=_,yV.isContextConsumer=function(e){return x(e)===s},yV.isContextProvider=function(e){return x(e)===a},yV.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},yV.isForwardRef=function(e){return x(e)===c},yV.isFragment=function(e){return x(e)===r},yV.isLazy=function(e){return x(e)===f},yV.isMemo=function(e){return x(e)===h},yV.isPortal=function(e){return x(e)===n},yV.isProfiler=function(e){return x(e)===o},yV.isStrictMode=function(e){return x(e)===i},yV.isSuspense=function(e){return x(e)===d},yV.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},yV.typeOf=x,yV}();var xV=vV.exports;var _V=kH.shape({subscribe:kH.func.isRequired,eventIndex:kH.number.isRequired});function bV(e){return"@@contextSubscriber/"+e}var wV=void 0!==S.default.forwardRef;var SV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TV=IH({displayName:"RouterContext",mixins:[function(e){var t,n,r=bV(e),i=r+"/listeners",o=r+"/eventIndex",a=r+"/subscribe",s=((n={childContextTypes:(t={},t[r]=_V.isRequired,t),getChildContext:function(){var e;return(e={})[r]={eventIndex:this[o],subscribe:this[a]},e},componentWillMount:function(){this[i]=[],this[o]=0},componentWillReceiveProps:function(){this[o]++},componentDidUpdate:function(){var e=this;this[i].forEach((function(t){return t(e[o])}))}})[a]=function(e){var t=this;return this[i].push(e),function(){t[i]=t[i].filter((function(t){return t!==e}))}},n);return wV&&(s.UNSAFE_componentWillMount=s.componentWillMount,s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillMount,delete s.componentWillReceiveProps),s}("router")],propTypes:{router:OH.object.isRequired,location:OH.object.isRequired,routes:OH.array.isRequired,params:OH.object.isRequired,components:OH.array.isRequired,createElement:OH.func.isRequired},getDefaultProps:function(){return{createElement:S.default.createElement}},childContextTypes:{router:OH.object.isRequired},getChildContext:function(){return{router:this.props.router}},createElement:function(e,t){return null==e?null:this.props.createElement(e,t)},render:function(){var e=this,t=this.props,n=t.location,r=t.routes,i=t.params,o=t.components,a=t.router,s=null;return o&&(s=o.reduceRight((function(t,o,s){if(null==o)return t;var l=r[s],u=function(e,t){var n={};return e.path?(jH(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n}(l,i),c={location:n,params:i,route:l,router:a,routeParams:u,routes:r};if(JH(t))c.children=t;else if(t)for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(c[d]=t[d]);if("object"===(void 0===o?"undefined":CV(o))&&!xV.isValidElementType(o)){var p={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(p[h]=e.createElement(o[h],SV({key:h},c)));return p}return e.createElement(o,c)}),s)),null===s||!1===s||S.default.isValidElement(s)||pH(!1),s}}),MV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function AV(e,t){var n=t.location,r=t.params,i=t.routes;return e.location=n,e.params=r,e.routes=i,e}var EV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var IV={history:OH.object,children:mV,routes:mV,render:OH.func,createElement:OH.func,onError:OH.func,onUpdate:OH.func,matchContext:OH.object},DV=void 0!==S.default.forwardRef,OV=IH({displayName:"Router",propTypes:IV,getDefaultProps:function(){return{render:function(e){return S.default.createElement(TV,e)}}},getInitialState:function(){return{location:null,routes:null,params:null,components:null}},handleError:function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},createRouterObject:function(e){var t=this.props.matchContext;return t?t.router:function(e,t,n){return AV(MV({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive}),n)}(this.props.history,this.transitionManager,e)},createTransitionManager:function(){var e=this.props.matchContext;if(e)return e.transitionManager;var t=this.props.history,n=this.props,r=n.routes,i=n.children;return t.getCurrentLocation||pH(!1),function(e,t){var n={},r=WH(),i=r.runEnterHooks,o=r.runChangeHooks,a=r.runLeaveHooks,s=void 0;function l(e,n){s&&s.location===e?u(s,n):lV(t,e,(function(t,r){t?n(t):r?u(uV({},r,{location:e}),n):n()}))}function u(e,t){var r=UH(n,e),s=r.leaveRoutes,l=r.changeRoutes,u=r.enterRoutes;function c(r,i){if(r||i)return d(r,i);XH(e,(function(r,i){r?t(r):t(null,null,n=uV({},e,{components:i}))}))}function d(e,n){e?t(e):t(null,n)}a(s,n),s.filter((function(e){return-1===u.indexOf(e)})).forEach(y),o(l,n,e,(function(t,n){if(t||n)return d(t,n);i(u,e,c)}))}var c=1;function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.__id__||t&&(e.__id__=c++)}var p=Object.create(null);function h(e){return e.map((function(e){return p[d(e)]})).filter((function(e){return e}))}function f(e,r){lV(t,e,(function(t,i){if(null!=i){s=uV({},i,{location:e});for(var o=h(UH(n,s).leaveRoutes),a=void 0,l=0,u=o.length;null==a&&l<u;++l)a=o[l](e);r(a)}else r()}))}function g(){if(n.routes){for(var e=h(n.routes),t=void 0,r=0,i=e.length;"string"!=typeof t&&r<i;++r)t=e[r]();return t}}var m=void 0,v=void 0;function y(e){var t=d(e);t&&(delete p[t],cV(p)||(m&&(m(),m=null),v&&(v(),v=null)))}return{isActive:function(t,r){return QH(t=e.createLocation(t),r,n.location,n.routes,n.params)},match:l,listenBeforeLeavingRoute:function(t,n){var r=!cV(p),i=d(t,!0);return p[i]=n,r&&(m=e.listenBefore(f),e.listenBeforeUnload&&(v=e.listenBeforeUnload(g))),function(){y(t)}},listen:function(t){function r(r){n.location===r?t(null,n):l(r,(function(n,r,i){n?t(n):r?e.replace(r):i&&t(null,i)}))}var i=e.listen(r);return n.location?t(null,n):r(e.getCurrentLocation()),i}}}(t,nV(r||i))},componentWillMount:function(){var e=this;this.transitionManager=this.createTransitionManager(),this.router=this.createRouterObject(this.state),this._unlisten=this.transitionManager.listen((function(t,n){t?e.handleError(t):(AV(e.router,n),e.setState(n,e.props.onUpdate))}))},componentWillReceiveProps:function(e){},componentWillUnmount:function(){this._unlisten&&this._unlisten()},render:function(){var e=this.state,t=e.location,n=e.routes,r=e.params,i=e.components,o=this.props,a=o.createElement,s=o.render,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(o,["createElement","render"]);return null==t?null:(Object.keys(IV).forEach((function(e){return delete l[e]})),s(EV({},l,{router:this.router,location:t,routes:n,params:r,components:i,createElement:a})))}});DV&&(OV.prototype.UNSAFE_componentWillReceiveProps=OV.prototype.componentWillReceiveProps,OV.prototype.UNSAFE_componentWillMount=OV.prototype.componentWillMount,delete OV.prototype.componentWillReceiveProps,delete OV.prototype.componentWillMount);var kV=OH.shape({push:OH.func.isRequired,replace:OH.func.isRequired,go:OH.func.isRequired,goBack:OH.func.isRequired,goForward:OH.func.isRequired,setRouteLeaveHook:OH.func.isRequired,isActive:OH.func.isRequired});OH.shape({pathname:OH.string.isRequired,search:OH.string.isRequired,state:OH.object,action:OH.string.isRequired,key:OH.string});var RV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function NV(e,t){return"function"==typeof e?e(t.location):e}var LV=IH({displayName:"Link",mixins:[function(e){var t,n,r=bV(e),i=r+"/lastRenderedEventIndex",o=r+"/handleContextUpdate",a=r+"/unsubscribe",s=((n={contextTypes:(t={},t[r]=_V,t),getInitialState:function(){var e;return this.context[r]?((e={})[i]=this.context[r].eventIndex,e):{}},componentDidMount:function(){this.context[r]&&(this[a]=this.context[r].subscribe(this[o]))},componentWillReceiveProps:function(){var e;this.context[r]&&this.setState(((e={})[i]=this.context[r].eventIndex,e))},componentWillUnmount:function(){this[a]&&(this[a](),this[a]=null)}})[o]=function(e){var t;e!==this.state[i]&&this.setState(((t={})[i]=e,t))},n);return wV&&(s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillReceiveProps),s}("router")],contextTypes:{router:kV},propTypes:{to:OH.oneOfType([OH.string,OH.object,OH.func]),activeStyle:OH.object,activeClassName:OH.string,onlyActiveOnIndex:OH.bool.isRequired,onClick:OH.func,target:OH.string,innerRef:OH.oneOfType([OH.string,OH.func,OH.shape({current:OH.elementType})])},getDefaultProps:function(){return{onlyActiveOnIndex:!1,style:{}}},handleClick:function(e){if(this.props.onClick&&this.props.onClick(e),!e.defaultPrevented){var t=this.context.router;t||pH(!1),!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&function(e){return 0===e.button}(e)&&(this.props.target||(e.preventDefault(),t.push(NV(this.props.to,t))))}},render:function(){var e=this.props,t=e.to,n=e.activeClassName,r=e.activeStyle,i=e.onlyActiveOnIndex,o=e.innerRef,a=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","activeClassName","activeStyle","onlyActiveOnIndex","innerRef"]),s=this.context.router;if(s){if(!t)return S.default.createElement("a",RV({},a,{ref:o}));var l=NV(t,s);a.href=s.createHref(l),(n||null!=r&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r))&&s.isActive(l,i)&&(n&&(a.className?a.className+=" "+n:a.className=n),r&&(a.style=RV({},a.style,r)))}return S.default.createElement("a",RV({},a,{onClick:this.handleClick,ref:o}))}}),BV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};IH({displayName:"IndexLink",render:function(){return S.default.createElement(LV,BV({},this.props,{onlyActiveOnIndex:!0}))}});var PV,jV={exports:{}},FV={};jV.exports=function(){if(PV)return FV;PV=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return FV.AsyncMode=l,FV.ConcurrentMode=u,FV.ContextConsumer=s,FV.ContextProvider=a,FV.Element=t,FV.ForwardRef=c,FV.Fragment=r,FV.Lazy=f,FV.Memo=h,FV.Portal=n,FV.Profiler=o,FV.StrictMode=i,FV.Suspense=d,FV.isAsyncMode=function(e){return _(e)||x(e)===l},FV.isConcurrentMode=_,FV.isContextConsumer=function(e){return x(e)===s},FV.isContextProvider=function(e){return x(e)===a},FV.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},FV.isForwardRef=function(e){return x(e)===c},FV.isFragment=function(e){return x(e)===r},FV.isLazy=function(e){return x(e)===f},FV.isMemo=function(e){return x(e)===h},FV.isPortal=function(e){return x(e)===n},FV.isProfiler=function(e){return x(e)===o},FV.isStrictMode=function(e){return x(e)===i},FV.isSuspense=function(e){return x(e)===d},FV.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},FV.typeOf=x,FV}();var UV=jV.exports,zV={};zV[UV.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zV[UV.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var HV=IH({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=eV(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){var r=e.location,i=e.params,o=void 0;if("/"===t.to.charAt(0))o=FH(t.to,i);else if(t.to){var a=e.routes.indexOf(t);o=FH(HV.getRoutePattern(e.routes,a-1).replace(/\/*$/,"/")+t.to,i)}else o=r.pathname;n({pathname:o,query:t.query||r.query,state:t.state||r.state})},t},getRoutePattern:function(e,t){for(var n="",r=t;r>=0;r--){var i=e[r].path||"";if(n=i.replace(/\/*$/,"/")+n,0===i.indexOf("/"))break}return"/"+n}},propTypes:{path:OH.string,from:OH.string,to:OH.string.isRequired,query:OH.object,state:OH.object,onEnter:dV,children:dV},render:function(){pH(!1)}});IH({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=HV.createRouteFromReactElement(e))}},propTypes:{to:OH.string.isRequired,query:OH.object,state:OH.object,onEnter:dV,children:dV},render:function(){pH(!1)}}),IH({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=eV(e))}},propTypes:{path:dV,component:hV,components:fV,getComponent:OH.func,getComponents:OH.func},render:function(){pH(!1)}}),IH({displayName:"Route",statics:{createRouteFromReactElement:eV},propTypes:{path:OH.string,component:hV,components:fV,getComponent:OH.func,getComponents:OH.func},render:function(){pH(!1)}});var VV={__esModule:!0,PUSH:"PUSH",REPLACE:"REPLACE",POP:"POP"},WV={},YV=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},GV=mH;function qV(e,t){return t.encode?t.strict?YV(e):encodeURIComponent(e):e}function QV(e){return Array.isArray(e)?e.sort():"object"==typeof e?QV(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}WV.extract=function(e){return e.split("?")[1]||""},WV.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=GV({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=QV(n):e[t]=n,e}),Object.create(null))):r},WV.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[qV(t,e),"[",r,"]"].join(""):[qV(t,e),"[",qV(r,e),"]=",qV(n,e)].join("")};case"bracket":return function(t,n){return null===n?qV(t,e):[qV(t,e),"[]=",qV(n,e)].join("")};default:return function(t,n){return null===n?qV(t,e):[qV(t,e),"=",qV(n,e)].join("")}}}(t=GV({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return qV(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return qV(r,t)+"="+qV(i,t)})).filter((function(e){return e.length>0})).join("&"):""};var ZV,XV={__esModule:!0};!(ZV=RH)||ZV.__esModule;XV.default=function(e,t,n){var r=e(t,n);e.length<2&&n(r)};var $V={},KV={__esModule:!0};KV.createPath=KV.parsePath=KV.getQueryStringValueFromPath=KV.stripQueryStringValueFromPath=KV.addQueryStringValueToPath=void 0,function(e){e&&e.__esModule}(RH),KV.addQueryStringValueToPath=function(e,t,n){var r=JV(e),i=r.pathname,o=r.search,a=r.hash;return eW({pathname:i,search:o+(-1===o.indexOf("?")?"?":"&")+t+"="+n,hash:a})},KV.stripQueryStringValueFromPath=function(e,t){var n=JV(e),r=n.pathname,i=n.search,o=n.hash;return eW({pathname:r,search:i.replace(new RegExp("([?&])"+t+"=[a-zA-Z0-9]+(&?)"),(function(e,t,n){return"?"===t?t:n})),hash:o})},KV.getQueryStringValueFromPath=function(e,t){var n=JV(e).search.match(new RegExp("[?&]"+t+"=([a-zA-Z0-9]+)"));return n&&n[1]};var JV=KV.parsePath=function(e){var t=function(e){var t=e.match(/^(https?:)?\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}(e),n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substring(i),t=t.substring(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}},eW=KV.createPath=function(e){if(null==e||"string"==typeof e)return e;var t=e.basename,n=e.pathname,r=e.search,i=e.hash,o=(t||"")+n;return r&&"?"!==r&&(o+=r),i&&(o+=i),o};$V.__esModule=!0,$V.locationsAreEqual=$V.statesAreEqual=$V.createLocation=$V.createQuery=void 0;var tW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rW=aW(dH);aW(RH);var iW=KV,oW=VV;function aW(e){return e&&e.__esModule?e:{default:e}}$V.createQuery=function(e){return nW(Object.create(null),e)},$V.createLocation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oW.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"==typeof e?(0,iW.parsePath)(e):e;return{pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:r.state,action:t,key:n}};var sW=function(e){return"[object Date]"===Object.prototype.toString.call(e)},lW=$V.statesAreEqual=function e(t,n){if(t===n)return!0;var r=void 0===t?"undefined":tW(t);if(r!==(void 0===n?"undefined":tW(n)))return!1;if("function"===r&&(0,rW.default)(!1),"object"===r){if(sW(t)&&sW(n)&&(0,rW.default)(!1),!Array.isArray(t)){var i=Object.keys(t),o=Object.keys(n);return i.length===o.length&&i.every((function(r){return e(t[r],n[r])}))}return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}return!1};$V.locationsAreEqual=function(e,t){return e.key===t.key&&e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&lW(e.state,t.state)};var uW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cW=WV,dW=function(e){return e&&e.__esModule?e:{default:e}}(XV),pW=$V,hW=KV;var fW=function(e){return(0,cW.stringify)(e).replace(/%20/g,"+")},gW=cW.parse,mW=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.stringifyQuery,i=t.parseQueryString;"function"!=typeof r&&(r=fW),"function"!=typeof i&&(i=gW);var o=function(e){return e?(null==e.query&&(e.query=i(e.search.substring(1))),e):e},a=function(e,t){if(null==t)return e;var n="string"==typeof e?(0,hW.parsePath)(e):e,i=r(t);return uW({},n,{search:i?"?"+i:""})};return uW({},n,{getCurrentLocation:function(){return o(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,dW.default)(e,o(t),n)}))},listen:function(e){return n.listen((function(t){return e(o(t))}))},push:function(e){return n.push(a(e,e.query))},replace:function(e){return n.replace(a(e,e.query))},createPath:function(e){return n.createPath(a(e,e.query))},createHref:function(e){return n.createHref(a(e,e.query))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var s=n.createLocation.apply(n,[a(e,e.query)].concat(r));return e.query&&(s.query=(0,pW.createQuery)(e.query)),o(s)}})}},vW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yW=function(e){return e&&e.__esModule?e:{default:e}}(XV),xW=KV;var _W=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.basename,i=function(e){return e?(r&&null==e.basename&&(0===e.pathname.toLowerCase().indexOf(r.toLowerCase())?(e.pathname=e.pathname.substring(r.length),e.basename=r,""===e.pathname&&(e.pathname="/")):e.basename=""),e):e},o=function(e){if(!r)return e;var t="string"==typeof e?(0,xW.parsePath)(e):e,n=t.pathname,i="/"===r.slice(-1)?r:r+"/",o="/"===n.charAt(0)?n.slice(1):n;return vW({},t,{pathname:i+o})};return vW({},n,{getCurrentLocation:function(){return i(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,yW.default)(e,i(t),n)}))},listen:function(e){return n.listen((function(t){return e(i(t))}))},push:function(e){return n.push(o(e))},replace:function(e){return n.replace(o(e))},createPath:function(e){return n.createPath(o(e))},createHref:function(e){return n.createHref(o(e))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return i(n.createLocation.apply(n,[o(e)].concat(r)))}})}},bW={},wW={__esModule:!0,loopAsync:function(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0,l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];i=!0,o?s=t:n.apply(void 0,t)};!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t(r++,u,l);o=!1,i?n.apply(void 0,s):r>=e&&a&&(i=!0,n())}}()}};bW.__esModule=!0;var SW=wW,CW=KV,TW=function(e){return e&&e.__esModule?e:{default:e}}(XV),MW=VV,AW=$V;function EW(e){return e&&e.__esModule?e:{default:e}}bW.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getCurrentLocation,n=e.getUserConfirmation,r=e.pushLocation,i=e.replaceLocation,o=e.go,a=e.keyLength,s=void 0,l=void 0,u=[],c=[],d=[],p=function(e){var t=l&&l.action===MW.POP?d.indexOf(l.key):s?d.indexOf(s.key):-1;(s=e).action===MW.PUSH?d=[].concat(d.slice(0,t+1),[s.key]):s.action===MW.REPLACE&&(d[t]=s.key),c.forEach((function(e){return e(s)}))},h=function(e){var t,a;s&&(0,AW.locationsAreEqual)(s,e)||l&&(0,AW.locationsAreEqual)(l,e)||(l=e,t=e,a=function(t){if(l===e)if(l=null,t){if(e.action===MW.PUSH){var n=(0,CW.createPath)(s);(0,CW.createPath)(e)===n&&(0,AW.statesAreEqual)(s.state,e.state)&&(e.action=MW.REPLACE)}e.action===MW.POP?p(e):e.action===MW.PUSH?!1!==r(e)&&p(e):e.action===MW.REPLACE&&!1!==i(e)&&p(e)}else if(s&&e.action===MW.POP){var a=d.indexOf(s.key),u=d.indexOf(e.key);-1!==a&&-1!==u&&o(a-u)}},(0,SW.loopAsync)(u.length,(function(e,n,r){(0,TW.default)(u[e],t,(function(e){return null!=e?r(e):n()}))}),(function(e){n&&"string"==typeof e?n(e,(function(e){return a(!1!==e)})):a(!1!==e)})))},f=function(){return Math.random().toString(36).substr(2,a||6)},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f();return(0,AW.createLocation)(e,t,n)};return{getCurrentLocation:t,listenBefore:function(e){return u.push(e),function(){return u=u.filter((function(t){return t!==e}))}},listen:function(e){return c.push(e),function(){return c=c.filter((function(t){return t!==e}))}},transitionTo:h,push:function(e){return h(g(e,MW.PUSH))},replace:function(e){return h(g(e,MW.REPLACE))},go:o,goBack:function(){return o(-1)},goForward:function(){return o(1)},createKey:f,createPath:CW.createPath,createHref:function(e){return(0,CW.createPath)(e)},createLocation:g}},EW(RH),EW(dH),EW(bW);var IW={__esModule:!0};IW.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);var DW={},OW={__esModule:!0,addEventListener:function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},supportsHistory:function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},supportsGoWithoutReloadUsingHash:function(){return-1===window.navigator.userAgent.indexOf("Firefox")},supportsPopstateOnHashchange:function(){return-1===window.navigator.userAgent.indexOf("Trident")},isExtraneousPopstateEvent:function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},kW={__esModule:!0};kW.readState=kW.saveState=void 0,function(e){e&&e.__esModule}(RH);var RW={QuotaExceededError:!0,QUOTA_EXCEEDED_ERR:!0},NW={SecurityError:!0},LW=function(e){return"@@History/"+e};kW.saveState=function(e,t){if(window.sessionStorage)try{null==t?window.sessionStorage.removeItem(LW(e)):window.sessionStorage.setItem(LW(e),JSON.stringify(t))}catch(e){if(NW[e.name])return;if(RW[e.name]&&0===window.sessionStorage.length)return;throw e}},kW.readState=function(e){var t=void 0;try{t=window.sessionStorage.getItem(LW(e))}catch(e){if(NW[e.name])return}if(t)try{return JSON.parse(t)}catch(e){}},DW.__esModule=!0,DW.go=DW.replaceLocation=DW.pushLocation=DW.startListener=DW.getUserConfirmation=DW.getCurrentLocation=void 0;var BW=$V,PW=OW,jW=kW,FW=KV,UW="popstate",zW="hashchange",HW=IW.canUseDOM&&!(0,PW.supportsPopstateOnHashchange)(),VW=function(e){var t=e&&e.key;return(0,BW.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:t?(0,jW.readState)(t):void 0},void 0,t)},WW=DW.getCurrentLocation=function(){var e=void 0;try{e=window.history.state||{}}catch(t){e={}}return VW(e)};DW.getUserConfirmation=function(e,t){return t(window.confirm(e))},DW.startListener=function(e){var t=function(t){(0,PW.isExtraneousPopstateEvent)(t)||e(VW(t.state))};(0,PW.addEventListener)(window,UW,t);var n=function(){return e(WW())};return HW&&(0,PW.addEventListener)(window,zW,n),function(){(0,PW.removeEventListener)(window,UW,t),HW&&(0,PW.removeEventListener)(window,zW,n)}};var YW=function(e,t){var n=e.state,r=e.key;void 0!==n&&(0,jW.saveState)(r,n),t({key:r},(0,FW.createPath)(e))};DW.pushLocation=function(e){return YW(e,(function(e,t){return window.history.pushState(e,null,t)}))},DW.replaceLocation=function(e){return YW(e,(function(e,t){return window.history.replaceState(e,null,t)}))},DW.go=function(e){e&&window.history.go(e)};var GW={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=DW;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}});var n=$V,r=KV;e.getCurrentLocation=function(){return(0,n.createLocation)(window.location)},e.pushLocation=function(e){return window.location.href=(0,r.createPath)(e),!1},e.replaceLocation=function(e){return window.location.replace((0,r.createPath)(e)),!1}}(GW);var qW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW=tY(dH),ZW=IW,XW=eY(DW),$W=eY(GW),KW=OW,JW=tY(bW);function eY(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function tY(e){return e&&e.__esModule?e:{default:e}}var nY=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ZW.canUseDOM||(0,QW.default)(!1);var t=e.forceRefresh||!(0,KW.supportsHistory)()?$W:XW,n=t.getUserConfirmation,r=t.getCurrentLocation,i=t.pushLocation,o=t.replaceLocation,a=t.go,s=(0,JW.default)(qW({getUserConfirmation:n},e,{getCurrentLocation:r,pushLocation:i,replaceLocation:o,go:a})),l=0,u=void 0,c=function(e,t){1==++l&&(u=XW.startListener(s.transitionTo));var n=t?s.listenBefore(e):s.listen(e);return function(){n(),0==--l&&u()}};return qW({},s,{listenBefore:function(e){return c(e,!0)},listen:function(e){return c(e,!1)}})},rY=!("undefined"==typeof window||!window.document||!window.document.createElement);function iY(e){var t=void 0;return rY&&(t=function(e){return function(t){return mW(_W(e))(t)}}(e)()),t}iY(nY);var oY={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.startListener=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=DW;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}}),function(e){e&&e.__esModule}(RH);var n=$V,r=OW,i=kW,o=KV;var a="hashchange",s=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},l=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},u=e.getCurrentLocation=function(e,t){var r=e.decodePath(s()),a=(0,o.getQueryStringValueFromPath)(r,t),l=void 0;a&&(r=(0,o.stripQueryStringValueFromPath)(r,t),l=(0,i.readState)(a));var u=(0,o.parsePath)(r);return u.state=l,(0,n.createLocation)(u,void 0,a)},c=void 0;e.startListener=function(e,t,n){var i=function(){var r=s(),i=t.encodePath(r);if(r!==i)l(i);else{var o=u(t,n);if(c&&o.key&&c.key===o.key)return;c=o,e(o)}},o=s(),d=t.encodePath(o);return o!==d&&l(d),(0,r.addEventListener)(window,a,i),function(){return(0,r.removeEventListener)(window,a,i)}};var d=function(e,t,n,r){var a=e.state,s=e.key,l=t.encodePath((0,o.createPath)(e));void 0!==a&&(l=(0,o.addQueryStringValueToPath)(l,n,s),(0,i.saveState)(s,a)),c=e,r(l)};e.pushLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&function(e){window.location.hash=e}(e)}))},e.replaceLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&l(e)}))}}(oY);var aY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};pY(RH);var sY=pY(dH),lY=IW,uY=OW,cY=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(oY),dY=pY(bW);function pY(e){return e&&e.__esModule?e:{default:e}}var hY=function(e){return"/"===e.charAt(0)?e:"/"+e},fY={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!"+e},decodePath:function(e){return"!"===e.charAt(0)?e.substring(1):e}},noslash:{encodePath:function(e){return"/"===e.charAt(0)?e.substring(1):e},decodePath:hY},slash:{encodePath:hY,decodePath:hY}};iY((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};lY.canUseDOM||(0,sY.default)(!1);var t=e.queryKey,n=e.hashType;"string"!=typeof t&&(t="_k"),null==n&&(n="slash"),n in fY||(n="slash");var r=fY[n],i=cY.getUserConfirmation,o=(0,dY.default)(aY({getUserConfirmation:i},e,{getCurrentLocation:function(){return cY.getCurrentLocation(r,t)},pushLocation:function(e){return cY.pushLocation(e,r,t)},replaceLocation:function(e){return cY.replaceLocation(e,r,t)},go:cY.go})),a=0,s=void 0,l=function(e,n){1==++a&&(s=cY.startListener(o.transitionTo,r,t));var i=n?o.listenBefore(e):o.listen(e);return function(){i(),0==--a&&s()}};(0,uY.supportsGoWithoutReloadUsingHash)();return aY({},o,{listenBefore:function(e){return l(e,!0)},listen:function(e){return l(e,!1)},go:function(e){o.go(e)},createHref:function(e){return"#"+r.encodePath(o.createHref(e))}})}));var gY=function(n){var i,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,A,E,I,D,O,k,R,N,L,P=n.appName,j=n.universeData,F=n.anomalyData,U=n.isDrilldownView,z=void 0===U||U,V=n.queryObject,W=n.onSelectedQuery,Y=n.onSelectedIssue,G=wi(),q=ft(),Q=t.useState(!0),Z=Q[0],X=Q[1],$=window.location.pathname.includes("".concat(_r.INSIGHTS)),K=window.location.href,J=K.substring(0,K.lastIndexOf("/")),ee=new URLSearchParams(window.location.search),te=ee.get("duration"),ne=ee.get("startTime"),re=ee.get("endTime"),ie=ee.get("dbId"),oe=ee.get("userId"),ae=ee.get("universeId"),se=ee.get("type"),le=ee.get("tab"),ue=new URLSearchParams;Zi(te)&&ue.append("duration",te),Zi(ne)&&ue.append("startTime",ne),Zi(re)&&ue.append("endTime",re),Zi(ie)&&ue.delete("dbId",ie),Zi(oe)&&ue.delete("userId",oe),Zi(ae)&&ue.delete("universeId",ae),Zi(se)&&ue.delete("type",se),P===exports.AppName.YBA&&Zi(le)&&ue.append("tab",le),L="".concat(J).concat(ue.toString()?"?".concat(ue.toString()):"");var ce=new URL(window.location.href);if(P===exports.AppName.YBM){["universeId","queryId","dbId","userId"].forEach((function(e){return ce.searchParams.delete(e)}))}var de="HOT_TABLET"===(null===(i=null==F?void 0:F.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(a=null==F?void 0:F.lastInstance)||void 0===a?void 0:a.type),pe=null===(s=null==F?void 0:F.lastInstance)||void 0===s?void 0:s.entityDisplayName,he=null===(l=null==F?void 0:F.lastInstance)||void 0===l?void 0:l.category,fe=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(p=null===(d=null===(c=null===(u=null==j?void 0:j.universeDetails)||void 0===u?void 0:u.nodeDetailsSet)||void 0===c?void 0:c.find((function(e){return e.nodeName===pe})))||void 0===d?void 0:d.cloudInfo)||void 0===p?void 0:p.region),ge=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(m=null===(g=null===(f=null===(h=null==j?void 0:j.universeDetails)||void 0===h?void 0:h.nodeDetailsSet)||void 0===f?void 0:f.find((function(e){return e.nodeName===pe})))||void 0===g?void 0:g.cloudInfo)||void 0===m?void 0:m.az);return e.jsxs(r.Box,{children:[e.jsxs(r.Box,B({display:"flex",mb:3},{children:[e.jsx(r.Box,{children:z&&e.jsxs(r.Breadcrumbs,B({className:G.breadCrumb,separator:e.jsx(r.Typography,B({variant:"body2",style:{fontSize:"18px"}},{children:"/"})),"aria-label":"breadcrumb","data-testid":"GenericHeader-Breadcrumb"},{children:[e.jsx(r.Link,B({className:G.breadcrumbColor,component:LV,variant:"h5",onClick:function(){P===exports.AppName.YBM?F?(null==Y||Y(null),window.history.pushState({},"",window.location.href)):(null==W||W(null),window.history.pushState({},"",ce.toString())):window.location.href=L},to:"#"},{children:e.jsx("span",B({className:G.breadCrumbText},{children:"Cluster Load"}))})),e.jsx(r.Link,B({className:G.breadcrumbColor,component:LV,variant:"h5",onClick:function(){P===exports.AppName.YBM?F?(null==Y||Y(null),window.history.pushState({},"",window.location.href)):(null==W||W(null),window.history.pushState({},"",ce.toString())):window.location.href=L},to:"#"},{children:F?e.jsx("span",B({className:H(G.breadCrumbText),style:{color:"capitalize"}},{children:he?"".concat(he.charAt(0).toUpperCase()+he.slice(1).toLowerCase()," ").concat($?"Insights":"Anomalies"," "):"Unknown ".concat($?"Insights":"Anomalies")})):e.jsx("span",B({className:G.breadCrumbText},{children:"Query"}))})),e.jsx(r.Link,B({className:G.breadcrumbDefaultColor,component:"span",variant:"h5"},{children:F?e.jsx("span",B({className:H(G.breadCrumbText)},{children:(null!==(v=null==pe?void 0:pe.length)&&void 0!==v?v:0)>30?"".concat(null==pe?void 0:pe.substring(0,30),"..."):pe})):e.jsx("span",B({className:H(G.breadCrumbText)},{children:(null!==(x=null===(y=null==V?void 0:V.query)||void 0===y?void 0:y.length)&&void 0!==x?x:0)>30?"".concat(null===(_=null==V?void 0:V.query)||void 0===_?void 0:_.substring(0,30),"..."):null==V?void 0:V.query}))}))]}))}),e.jsx(r.Box,B({ml:2,style:{marginTop:"-2px"}},{children:!Z&&e.jsx(o.YBButton,B({size:"small",variant:"secondary",onClick:function(){return X(!0)},dataTestId:"BreadCrumbsAndMetadataHeader-ShowDetails",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Maximize Icon"})},{children:"Show Details"}))}))]})),z&&Z&&e.jsx(r.Box,B({className:H(G.headerMetadataBox,G.boxContainer,G.flexColumn),mt:1},{children:F?e.jsxs(r.Box,B({className:G.flexRow,width:"100%",justifyContent:"space-between"},{children:[e.jsxs(r.Box,B({className:G.flexColumn},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:oi})),e.jsx(r.Box,B({className:G.anomalyTypeTag},{children:e.jsx("span",B({className:G.anomalyTypeText},{children:Gr[null===(b=null==F?void 0:F.lastInstance)||void 0===b?void 0:b.type]}))}))]})),e.jsxs(r.Box,B({className:G.flexColumn},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:null===(S=Jr[null===(w=null==F?void 0:F.lastInstance)||void 0===w?void 0:w.type])||void 0===S?void 0:S.title})),e.jsxs(r.Box,{children:[e.jsx("span",B({className:G.regularMetadata},{children:(null===(T=null===(C=null==F?void 0:F.lastInstance)||void 0===C?void 0:C.entityDisplayName)||void 0===T?void 0:T.length)>30?"".concat(null==pe?void 0:pe.substring(0,he===exports.AnomalyCategory.SQL?40:30),"..."):pe})),e.jsx("img",{src:"data:image/svg+xml,%3csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.5 7.001V8.001H7C6.17157 8.001 5.5 8.67257 5.5 9.501V18.501C5.5 19.3294 6.17157 20.001 7 20.001H14C14.8284 20.001 15.5 19.3294 15.5 18.501V17.001H16.5V18.501C16.5 19.8817 15.3807 21.001 14 21.001H7C5.61929 21.001 4.5 19.8817 4.5 18.501V9.501C4.5 8.12029 5.61929 7.001 7 7.001H8.5ZM16.5 4.001H11C10.1716 4.001 9.5 4.67258 9.5 5.501V14.501C9.5 15.3294 10.1716 16.001 11 16.001H18C18.8284 16.001 19.5 15.3294 19.5 14.501V7.001H17C16.7239 7.001 16.5 6.77714 16.5 6.501V4.001ZM20.5 6.52898V14.501C20.5 15.8817 19.3807 17.001 18 17.001H11C9.61929 17.001 8.5 15.8817 8.5 14.501V5.501C8.5 4.12029 9.61929 3.001 11 3.001H16.972C17.1048 2.99258 17.2429 3.03684 17.3536 3.14745L20.3536 6.14745C20.4642 6.25806 20.5084 6.39623 20.5 6.52898ZM17.5 6.001H18.7929L17.5 4.70811V6.001ZM12 13.001C11.7239 13.001 11.5 12.7771 11.5 12.501C11.5 12.2249 11.7239 12.001 12 12.001H14C14.2761 12.001 14.5 12.2249 14.5 12.501C14.5 12.7771 14.2761 13.001 14 13.001H12ZM12 11.001C11.7239 11.001 11.5 10.7771 11.5 10.501C11.5 10.2249 11.7239 10.001 12 10.001H17C17.2761 10.001 17.5 10.2249 17.5 10.501C17.5 10.7771 17.2761 11.001 17 11.001H12ZM12 9.001C11.7239 9.001 11.5 8.77714 11.5 8.501C11.5 8.22486 11.7239 8.001 12 8.001H17C17.2761 8.001 17.5 8.22486 17.5 8.501C17.5 8.77714 17.2761 9.001 17 9.001H12Z' fill='%230B1117'/%3e%3c/svg%3e",alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(pe)}})]})]})),e.jsxs(r.Box,B({className:G.flexColumn},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:he===exports.AnomalyCategory.DB?void 0!==de?de?ii:ri:ni:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?ai:null})),e.jsx(r.Box,{children:e.jsx("span",B({className:G.regularMetadata},{children:he===exports.AnomalyCategory.DB?de?null===(I=null===(E=null===(A=null===(M=null==F?void 0:F.lastInstance)||void 0===M?void 0:M.mainGraphs)||void 0===A?void 0:A[0].filters)||void 0===E?void 0:E.tabletId)||void 0===I?void 0:I[0]:null===(R=null===(k=null===(O=null===(D=null==F?void 0:F.lastInstance)||void 0===D?void 0:D.mainGraphs)||void 0===O?void 0:O[0].filters)||void 0===k?void 0:k.tableName)||void 0===R?void 0:R[0]:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?e.jsxs(e.Fragment,{children:[fe,fe&&ge&&" / ",ge]}):null}))})]})),e.jsx(r.Box,{children:e.jsx(o.YBButton,B({size:"small",variant:"ghost",onClick:function(){return X(!1)},dataTestId:"BreadCrumbsAndMetadataHeader-HideDetails"},{children:e.jsx("span",B({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))})]})):e.jsxs(r.Box,{children:[e.jsxs(r.Box,B({className:G.flexRow,width:"100%"},{children:[e.jsxs(r.Box,B({className:G.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:ei})),e.jsx(r.Box,{children:null==V?void 0:V.namespaceName})]})),e.jsxs(r.Box,B({className:G.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,B({className:G.headerTitle},{children:ti})),e.jsx(r.Box,{children:null==V?void 0:V.queryType})]})),e.jsx(r.Box,B({className:G.flexColumn,alignItems:"flex-start",ml:"auto"},{children:e.jsx(o.YBButton,B({size:"small",variant:"ghost",onClick:function(){return X(!1)},dataTestId:"BreadCrumbsAndMetadataHeader-HideDetails"},{children:e.jsx("span",B({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))}))]})),e.jsx(r.Box,B({className:G.flexColumn,mt:1},{children:e.jsx(r.Box,B({width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"}},{children:e.jsx(ht,{text:null!==(N=null==V?void 0:V.query)&&void 0!==N?N:"",showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:P===exports.AppName.YBM?q.queryCodeElement:q.queryCodeElementWeb,preClassName:q.queryPreBlockFull,containerClassName:q.queryContainerCode},"TableHelperQueries-query")}))}))]})}))]})},mY=S.default.memo((function(i){var o,a=i.universeUuid,s=i.universeData,l=i.anomalyData,u=i.amomalyGraphRequestParams,c=i.appName,d=i.timezone,p=i.formattedAnomalyRca,h=i.apiUrl,f=i.universeQueryData,g=i.universeQueryStatsData,m=i.isHistoricalQueryView,v=i.troubleshootUuid,y=i.queryIdParam,x=i.onSelectedIssue,_=i.onSelectedQuery,b=wi(),w=function(e){var t,n,r,i,o,a,s=exports.MetricMeasure.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===or.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===or.NONE&&(s=exports.MetricMeasure.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==ir.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==ir.BOTTOM||(s=exports.MetricMeasure.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===or.TABLE?s=exports.MetricMeasure.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===or.NAMESPACE&&(s=exports.MetricMeasure.OUTLIER_DB)),s}(l),S=function(e){var t,n,r=ir.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===ir.TOP?r=ir.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===ir.BOTTOM&&(r=ir.BOTTOM),r}(l),C=function(e){var t,n,r=3;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitCount)>0&&(r=null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitCount),r}(l),T=new URLSearchParams(window.location.search),M={startTime:T.get("startTime"),endTime:T.get("endTime"),duration:T.get("duration"),dbId:T.get("dbId"),queryId:null!=y?y:void 0,userId:T.get("userId"),type:T.get("type"),universeId:a},A=null==M?void 0:M.endTime,E=A?new Date(A):new Date,I=new Date(E);(null==M?void 0:M.startTime)?I=new Date(null==M?void 0:M.startTime):I.setDate(I.getDate()-1);var D=t.useState(br),O=D[0],k=D[1],R=t.useState(Sr),N=R[0],L=R[1],P=t.useState(!0),j=P[0],F=P[1],U=t.useState(wr),z=U[0],V=U[1],W=t.useState(wr),Y=W[0],G=W[1],q=t.useState(wr),Q=q[0],Z=q[1],X=t.useState(wr),$=X[0],K=X[1],J=t.useState(w),ee=J[0],te=J[1],ne=t.useState(S),re=ne[0],ie=ne[1],oe=t.useState(null!==(o=null==M?void 0:M.duration)&&void 0!==o?o:$r[0].value),ae=oe[0],se=oe[1],le=t.useState(C),ue=le[0],ce=le[1],de=t.useState((function(){return Ca(ae,E,I)})),pe=de[0],he=de[1],fe=t.useState(null),ge=fe[0],me=fe[1],ve=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsById,a,null==l?void 0:l.groupId,pe.startDateTime,pe.endDateTime],(function(){return l&&(null==l?void 0:l.groupId)?oH.fetchAnomalyGroupById(a,l.groupId,pe.startDateTime.toISOString(),pe.endDateTime.toISOString(),h):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){me(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!m&&Zi(v)}),ye=function(){var e,t,n=null===(e=pe.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=pe.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:a,cluster:z,region:Y,zone:Q,node:$,metricMeasure:ee,numNodes:ue,outlierType:re,formattedStartDate:n,formattedEndDate:r}},xe=function(){if(ae!==Xr.CUSTOM){var e=Sa(ae,E),t=e.formattedStartDate,n=e.formattedEndDate;he({startDateTime:t,endDateTime:n})}};t.useEffect((function(){xe()}),[ae]);var _e=function(e,t){he({startDateTime:new Date(e),endDateTime:new Date(t)})};t.useEffect((function(){(null==M?void 0:M.duration)&&Zi(M.duration)&&xe()}),[]);var be=function(e){te(e)},we=function(e){ie(e)},Se=function(e){ce(e>10?10:e)},Ce=function(e,t,n,r){F(r),n===br&&(k(br),V(wr),G(wr)),(e||t)&&(k(n),e&&(V(n),G("")),t&&(G(n),V("")))},Te=function(e,t,n){n===Sr&&(L(Sr),Z(wr),K(wr)),(e||t)&&(L(n),e&&(Z(n),K("")),t&&(Z(""),K(n)))},Me=null==M?void 0:M.queryId,Ae=m?Me:null==Me?void 0:Me[0],Ee=null==g?void 0:g.find((function(e){return e.queryId===Ae}));return e.jsxs(r.Box,B({style:{height:"100vh",display:"flex",flexDirection:"column"}},{children:[e.jsx(gY,{appName:c,universeData:s,queryObject:Ee,anomalyData:Qi(ge)?ge:null,onSelectedIssue:Qi(l)?x:void 0,onSelectedQuery:_}),e.jsx(r.Box,B({className:H(c===exports.AppName.WEB?b.stickyHeader:b.stickyHeaderYBM)},{children:e.jsx(kl,{appName:c,filterDuration:ae,startDateTime:pe.startDateTime,endDateTime:pe.endDateTime,timezone:d,onSelectedFilterDuration:function(e){se(e)},metricMeasure:ee,onStartDateChange:function(e){e&&he((function(t){return B(B({},t),{startDateTime:e})}))},onEndDateChange:function(e){e&&he((function(t){return B(B({},t),{endDateTime:e})}))},onRefresh:function(){he((function(e){return B(B({},e),{endDateTime:new Date})}))}})})),e.jsx(r.Box,B({className:H(c===exports.AppName.WEB&&b.headerContainer),style:{flex:1,overflow:"auto",paddingTop:c===exports.AppName.WEB?"16px":"0px"}},{children:Qi(ge)?e.jsxs(e.Fragment,{children:[e.jsx(Ta,{appName:c,universeData:s,anomalyData:ge,clusterRegionItem:O,zoneNodeItem:N,isPrimaryCluster:j,cluster:z,region:Y,metricMeasure:ee,outlierType:re,numNodes:ue,onZoneNodeSelected:Te,onClusterRegionSelected:Ce,onOutlierTypeSelected:we,onSplitTypeSelected:be,onNumNodesChanged:Se}),e.jsx(cH,{metricMeasure:ee,appName:c,dateTimeRange:pe,timezone:d,universeQueryData:f,amomalyGraphRequestParams:u,formattedAnomalyRca:p,apiUrl:h,anomalyData:ge,gantChartData:ve,onEChartsDateSelect:_e,onSelectedIssue:x,urlParams:M,getClusterDetails:ye})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ta,{appName:c,universeData:s,anomalyData:null,clusterRegionItem:O,zoneNodeItem:N,isPrimaryCluster:j,cluster:z,region:Y,metricMeasure:ee,outlierType:re,numNodes:ue,onZoneNodeSelected:Te,onClusterRegionSelected:Ce,onOutlierTypeSelected:we,onSplitTypeSelected:be,onNumNodesChanged:Se}),e.jsx(lH,{urlParams:M,getClusterDetails:ye,metricMeasure:ee,apiUrl:h,appName:c,timezone:d,dateTimeRange:pe,universeQueryStatsData:g,onEChartsDateSelect:_e})]})}))]}))})),vY=o.yba.ybaTheme,yY=function(t){var n=t.children,r=t.appName;return e.jsx(o.YBThemeProvider,B({theme:r===exports.AppName.YBM?o.coreTheme:vY},{children:n}))};function xY(){return xY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xY.apply(this,arguments)}function _Y(e){return"number"==typeof e&&!isNaN(e)}function bY(e){return"boolean"==typeof e}function wY(e){return"string"==typeof e}function SY(e){return"function"==typeof e}function CY(e){return wY(e)||SY(e)?e:null}function TY(e){return 0===e||e}var MY=!("undefined"==typeof window||!window.document||!window.document.createElement);function AY(e){return t.isValidElement(e)||wY(e)||SY(e)||_Y(e)}var EY={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},IY={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function DY(e){var n=e.enter,r=e.exit,i=e.appendPosition,o=void 0!==i&&i,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var i=e.children,a=e.position,l=e.preventExitTransition,c=e.done,d=e.nodeRef,p=e.isIn,h=o?n+"--"+a:n,f=o?r+"--"+a:r,g=t.useRef(),m=t.useRef(0);function v(){var e=d.current;e.removeEventListener("animationend",v),0===m.current&&(e.className=g.current)}function y(){var e=d.current;e.removeEventListener("animationend",y),s?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,c,u):c()}return t.useLayoutEffect((function(){!function(){var e=d.current;g.current=e.className,e.className+=" "+h,e.addEventListener("animationend",v)}()}),[]),t.useEffect((function(){p||(l?y():function(){m.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",y)}())}),[p]),S.default.createElement(S.default.Fragment,null,i)}}var OY={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function kY(e,n){void 0===n&&(n=!1);var r=t.useRef(e);return t.useEffect((function(){n&&(r.current=e)})),r.current}function RY(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return TY(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function NY(e){var n=t.useReducer((function(e){return e+1}),0)[1],r=t.useReducer(RY,[]),i=r[0],o=r[1],a=t.useRef(null),s=kY(0),l=kY([]),u=kY({}),c=kY({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:d,getToast:function(e){return u[e]||null}});function d(e){return-1!==i.indexOf(e)}function p(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(s-=l.length,l=[])}function h(e){o({type:1,toastId:e})}function f(){var e=l.shift();m(e.toastContent,e.toastProps,e.staleId)}function g(e,r){var i=r.delay,o=r.staleId,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["delay","staleId"]);if(AY(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||u[n]&&null==r)}(d)){var p=d.toastId,g=d.updateId,v=c.props,y=function(){return h(p)},x=null==d.updateId;x&&s++;var _,b,w={toastId:p,updateId:g,isIn:!1,key:d.key||c.toastKey++,type:d.type,closeToast:y,closeButton:d.closeButton,rtl:v.rtl,position:d.position||v.position,transition:d.transition||v.transition,className:CY(d.className||v.toastClassName),bodyClassName:CY(d.bodyClassName||v.bodyClassName),style:d.style||v.toastStyle,bodyStyle:d.bodyStyle||v.bodyStyle,onClick:d.onClick||v.onClick,pauseOnHover:bY(d.pauseOnHover)?d.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:bY(d.pauseOnFocusLoss)?d.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:bY(d.draggable)?d.draggable:v.draggable,draggablePercent:_Y(d.draggablePercent)?d.draggablePercent:v.draggablePercent,draggableDirection:d.draggableDirection||v.draggableDirection,closeOnClick:bY(d.closeOnClick)?d.closeOnClick:v.closeOnClick,progressClassName:CY(d.progressClassName||v.progressClassName),progressStyle:d.progressStyle||v.progressStyle,autoClose:(_=d.autoClose,b=v.autoClose,!1===_||_Y(_)&&_>0?_:b),hideProgressBar:bY(d.hideProgressBar)?d.hideProgressBar:v.hideProgressBar,progress:d.progress,role:wY(d.role)?d.role:v.role,deleteToast:function(){!function(e){delete u[e];var t=l.length;s=TY(e)?s-1:s-c.displayedToast,s<0&&(s=0);if(t>0){var r=TY(e)?1:c.props.limit;if(1===t||1===r)c.displayedToast++,f();else{var i=r>t?t:r;c.displayedToast=i;for(var o=0;o<i;o++)f()}}else n()}(p)}};SY(d.onOpen)&&(w.onOpen=d.onOpen),SY(d.onClose)&&(w.onClose=d.onClose),"y"===w.draggableDirection&&80===w.draggablePercent&&(w.draggablePercent*=1.5);var S=v.closeButton;!1===d.closeButton||AY(d.closeButton)?S=d.closeButton:!0===d.closeButton&&(S=!AY(v.closeButton)||v.closeButton),w.closeButton=S;var C=e;t.isValidElement(e)&&!wY(e.type)?C=t.cloneElement(e,{closeToast:y,toastProps:w}):SY(e)&&(C=e({closeToast:y,toastProps:w})),v.limit&&v.limit>0&&s>v.limit&&x?l.push({toastContent:C,toastProps:w,staleId:o}):_Y(i)&&i>0?setTimeout((function(){m(C,w,o)}),i):m(C,w,o)}}function m(e,t,n){var r=t.toastId;n&&delete u[n],u[r]={content:e,props:t},o({type:0,toastId:r,staleId:n})}return t.useEffect((function(){return c.containerId=e.containerId,OY.cancelEmit(3).on(0,g).on(1,(function(e){return a.current&&h(e)})).on(5,p).emit(2,c),function(){return OY.emit(3,c)}}),[]),t.useEffect((function(){c.isToastActive=d,c.displayedToast=i.length,OY.emit(4,i.length,e.containerId)}),[i]),t.useEffect((function(){c.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(u).reverse():Object.keys(u),i=0;i<r.length;i++){var o=u[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:u,containerRef:a,isToastActive:d}}function LY(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function BY(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function PY(e){var n=t.useState(!0),r=n[0],i=n[1],o=t.useState(!1),a=o[0],s=o[1],l=t.useRef(null),u=kY({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),c=kY(e,!0),d=e.autoClose,p=e.pauseOnHover,h=e.closeToast,f=e.onClick,g=e.closeOnClick;function m(t){if(e.draggable){var n=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=n.getBoundingClientRect(),n.style.transition="",u.x=LY(t.nativeEvent),u.y=BY(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function v(){if(u.boundingRect){var t=u.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&u.x>=i&&u.x<=o&&u.y>=n&&u.y<=r?x():y()}}function y(){i(!0)}function x(){i(!1)}function _(t){if(u.canDrag){t.preventDefault();var n=l.current;r&&x(),u.x=LY(t),u.y=BY(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance))}}function b(){var t=l.current;if(u.canDrag){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}t.useEffect((function(){return SY(e.onOpen)&&e.onOpen(t.isValidElement(e.children)&&e.children.props),function(){SY(c.onClose)&&c.onClose(t.isValidElement(c.children)&&c.children.props)}}),[]),t.useEffect((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),document.addEventListener("touchmove",_),document.addEventListener("touchend",b)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",b))}}),[e.draggable]),t.useEffect((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||x();window.addEventListener("focus",y),window.addEventListener("blur",x)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",x))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:m,onTouchStart:m,onMouseUp:v,onTouchEnd:v};return d&&p&&(w.onMouseEnter=x,w.onMouseLeave=y),g&&(w.onClick=function(e){f&&f(e),u.canCloseOnClick&&h()}),{playToast:y,pauseToast:x,isRunning:r,preventExitTransition:a,toastRef:l,eventHandlers:w}}function jY(e){var n=e.closeToast,r=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":o},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function FY(e){var n,r,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,p=e.progress,h=e.rtl,f=e.isIn,g=xY({},c,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+p+")");var m=H("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((n={})["Toastify__progress-bar--rtl"]=h,n)),v=SY(u)?u({rtl:h,type:s,defaultClassName:m}):H(m,u),y=((r={})[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]=d&&p<1?null:function(){f&&a()},r);return t.createElement("div",Object.assign({role:"progressbar",className:v,style:g},y))}FY.defaultProps={type:IY.DEFAULT,hide:!1};var UY=function(e){var n,r=PY(e),i=r.isRunning,o=r.preventExitTransition,a=r.toastRef,s=r.eventHandlers,l=e.closeButton,u=e.children,c=e.autoClose,d=e.onClick,p=e.type,h=e.hideProgressBar,f=e.closeToast,g=e.transition,m=e.position,v=e.className,y=e.style,x=e.bodyClassName,_=e.bodyStyle,b=e.progressClassName,w=e.progressStyle,S=e.updateId,C=e.role,T=e.progress,M=e.rtl,A=e.toastId,E=e.deleteToast,I=e.isIn,D=H("Toastify__toast","Toastify__toast--"+p,((n={})["Toastify__toast--rtl"]=M,n)),O=SY(v)?v({rtl:M,position:m,type:p,defaultClassName:D}):H(D,v),k=!!T;return t.createElement(g,{isIn:I,done:E,position:m,preventExitTransition:o,nodeRef:a},t.createElement("div",Object.assign({id:A,onClick:d,className:O},s,{style:y,ref:a}),t.createElement("div",Object.assign({},I&&{role:C},{className:SY(x)?x({type:p}):H("Toastify__toast-body",x),style:_}),u),function(e){if(e){var n={closeToast:f,type:p};return SY(e)?e(n):t.isValidElement(e)?t.cloneElement(e,n):void 0}}(l),(c||k)&&t.createElement(FY,Object.assign({},S&&!k?{key:"pb-"+S}:{},{rtl:M,delay:c,isRunning:i,isIn:I,closeToast:f,hide:h,type:p,style:w,className:b,controlledProgress:k,progress:T}))))},zY=function(e){var n=NY(e),r=n.getToastToRender,i=n.containerRef,o=n.isToastActive,a=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,n=H("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return SY(a)?a({position:e,rtl:l,defaultClassName:n}):H(n,CY(a))}return t.createElement("div",{ref:i,className:"Toastify",id:u},r((function(e,n){var r=0===n.length?xY({},s,{pointerEvents:"none"}):xY({},s);return t.createElement("div",{className:c(e),style:r,key:"container-"+e},n.map((function(e){var n=e.content,r=e.props;return t.createElement(UY,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?jY:r.closeButton}),n)})))})))};zY.defaultProps={position:EY.TOP_RIGHT,transition:DY({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:jY,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var HY,VY,WY,YY=new Map,GY=[],qY=!1;function QY(){return Math.random().toString(36).substr(2,9)}function ZY(e){return e&&(wY(e.toastId)||_Y(e.toastId))?e.toastId:QY()}function XY(e,n){return YY.size>0?OY.emit(0,e,n):(GY.push({content:e,options:n}),qY&&MY&&(qY=!1,VY=document.createElement("div"),document.body.appendChild(VY),g.render(t.createElement(zY,Object.assign({},WY)),VY))),n.toastId}function $Y(e,t){return xY({},t,{type:t&&t.type||e,toastId:ZY(t)})}var KY=function(e){return function(t,n){return XY(t,$Y(e,n))}},JY=function(e,t){return XY(e,$Y(IY.DEFAULT,t))};JY.success=KY(IY.SUCCESS),JY.info=KY(IY.INFO),JY.error=KY(IY.ERROR),JY.warning=KY(IY.WARNING),JY.dark=KY(IY.DARK),JY.warn=JY.warning,JY.dismiss=function(e){return OY.emit(1,e)},JY.clearWaitingQueue=function(e){return void 0===e&&(e={}),OY.emit(5,e)},JY.isActive=function(e){var t=!1;return YY.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},JY.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=YY.get(n||HY);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=xY({},r,t,{toastId:t.toastId||e,updateId:QY()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,XY(a,o)}}),0)},JY.done=function(e){JY.update(e,{progress:1})},JY.onChange=function(e){return SY(e)&&OY.on(4,e),function(){SY(e)&&OY.off(4,e)}},JY.configure=function(e){void 0===e&&(e={}),qY=!0,WY=e},JY.POSITION=EY,JY.TYPE=IY,OY.on(2,(function(e){HY=e.containerId||e,YY.set(HY,e),GY.forEach((function(e){OY.emit(0,e.content,e.options)})),GY=[]})).on(3,(function(e){YY.delete(e.containerId||e),0===YY.size&&OY.off(0).off(1).off(5),MY&&VY&&document.body.removeChild(VY)}));var eG=/\s/;var tG=/^\s+/;function nG(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&eG.test(e.charAt(t)););return t}(e)+1).replace(tG,""):e}var rG=/^[-+]0x[0-9a-f]+$/i,iG=/^0b[01]+$/i,oG=/^0o[0-7]+$/i,aG=parseInt;function sG(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Vi(e)&&"[object Symbol]"==Hi(e)}(e))return NaN;if(Di(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Di(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=nG(e);var n=iG.test(e);return n||oG.test(e)?aG(e.slice(2),n?2:8):rG.test(e)?NaN:+e}var lG=function(){return Ni.Date.now()},uG=Math.max,cG=Math.min;function dG(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function f(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=o}function g(){var e=lG();if(f(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?cG(n,o-(e-u)):n}(e))}function m(e){return s=void 0,p&&r?h(e):(r=i=void 0,a)}function v(){var e=lG(),n=f(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?h(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),h(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=sG(t)||0,Di(n)&&(c=!!n.leading,o=(d="maxWait"in n)?uG(sG(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?a:m(lG())},v}var pG,hG=r.makeStyles((function(e){return{itemsContainer:{padding:e.spacing(1,0)},item:{paddingLeft:e.spacing(2),"& label":{height:"36px"}},checkbox:{"& .yb-MuiSvgIcon-root":{width:"20px",height:"20px"}}}})),fG=function(n){var i;n.appName;var a=n.columns,s=n.hiddenColumns,l=n.onColumnVisibilityChange,u=n.close,c=hG(),d=JSON.parse(null!==(i=sessionStorage.getItem("visibleQueryFields"))&&void 0!==i?i:"[]"),p=a.reduce((function(e,t){var n;return e[t.name]=d.length>0?d.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),h=Vn({defaultValues:p}),f=h.control,g=h.handleSubmit,m=h.reset;t.useEffect((function(){m(p)}),[a,m]);var v=function(){u()};return e.jsx(o.YBModal,B({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:v,onSubmit:g((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;l(i,r),r&&t.push(i)})),sessionStorage.setItem("visibleQueryFields",JSON.stringify(t)),v()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,{children:e.jsx(r.Box,B({className:c.itemsContainer},{children:a.map((function(t){return s.includes(t.name)?null:e.jsx(r.Box,B({className:c.item},{children:e.jsx(oo,{name:t.name,label:t.label,control:f,dataTestId:t.name,className:c.checkbox})}),t.name)}))}))})}))},gG=function(n){var r=n.data,i=n.maxEPS,o=n.groupByOperation,a=t.useRef(null),s=t.useMemo((function(){var e=i<1?5:100,t=r.reduce((function(e,t){return e+t.eps}),0),n=Math.pow(t/i,.5)*e;return Math.max(n,10)+100}),[r,i]);return t.useEffect((function(){if(a.current){var e=tA(a.current),t=r.map((function(e){return o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType})).map((function(e,t){var n;return{name:e,type:"bar",stack:"total",label:{show:!1},data:[r[t].eps],itemStyle:{color:null!==(n=xi[e])&&void 0!==n?n:yi[t]}}})),n={animation:!1,grid:{left:0,right:50,top:20,bottom:40,containLabel:!1},tooltip:{trigger:"item",extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:9999;",formatter:function(e){var t=ba(e.color,e.seriesName),n=wa(Number(e.value).toFixed(3)),r='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(t).concat(n,"\n </div>");return'<div style="letter-spacing:0.5px;">'.concat(r,"</div>")},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400}},xAxis:{type:"value",show:!1,min:0,max:i},yAxis:{type:"category",data:[""],show:!1},series:t};e.setOption(n);var s=new ResizeObserver((function(){e.resize()}));return s.observe(a.current),function(){s.disconnect(),e.dispose()}}}),[r,o,s,i]),e.jsx("div",{className:"query-events-chart-container",ref:a,style:{height:"".concat(40,"px"),width:"".concat(s,"px"),minWidth:"".concat(s,"px"),maxWidth:"".concat(s,"px"),display:"flex",top:"12px"}})};function mG(){return mG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mG.apply(null,arguments)}const vG=e=>w.createElement("svg",mG({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),pG||(pG=w.createElement("g",{fill:"none",fillRule:"evenodd"},w.createElement("path",{d:"M0 0h24v24H0z"}),w.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 4a.5.5 0 0 1 .492.41l.008.09v4h4a.5.5 0 0 1 .09.992l-.09.008h-4v4a.5.5 0 0 1-.992.09l-.008-.09v-4h-4a.5.5 0 0 1-.09-.992l.09-.008h4v-4A.5.5 0 0 1 12 7Z"}))));var yG;function xG(){return xG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xG.apply(null,arguments)}const _G=e=>w.createElement("svg",xG({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),yG||(yG=w.createElement("g",{fill:"none",fillRule:"evenodd"},w.createElement("path",{d:"M0 0h24v24H0z"}),w.createElement("path",{fill:"#6D7C88",d:"M10 4a6 6 0 0 1 4.581 9.875l4.773 4.771a.5.5 0 0 1-.638.765l-.07-.057-4.771-4.773A6 6 0 1 1 10 4Zm0 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z"}))));var bG="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e",wG="databaseId",SG="eps",CG="events",TG="firstActive",MG="lastActive",AG="latencyAvg",EG="latencyP90",IG="latencyP99",DG="namespaceName",OG="query",kG="queryid",RG="queryType",NG="rowsAvg",LG="rps",BG="totalTime",PG="universeId",jG="totalEpsRatio",FG={SHOW_ALL:"All Queries",SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ACTIVITIES:"Background Tasks Only"},UG=function(i){var a,s,l,u,c,d,p,h,f,g=i.universeUuid,m=i.apiUrl,y=i.startTime,x=i.endTime,_=i.appName,b=i.groupByOperation,w=i.filteredLegends,S=i.getClusterDetails,C=i.onSelectedQuery,T=ft(),M=wi(),A=t.useState(null),E=A[0],I=A[1],D=t.useState(""),O=D[0],k=D[1],R=t.useState(""),N=R[0],L=R[1],P=t.useRef(dG((function(e){k(e),X(0)}),500)),j=t.useState([]),F=j[0],U=j[1],z=t.useState(!1),V=z[0],W=z[1],Y=t.useState(Hr[0]),G=Y[0],q=Y[1],Q=t.useState(0),Z=Q[0],X=Q[1],$=t.useState(0),K=$[0],J=$[1],ee=t.useState(wr),te=ee[0],ne=ee[1],re=t.useState([]),ie=re[0],oe=re[1],ae=t.useState([]),se=ae[0],le=ae[1],ue=t.useState("eps"),ce=ue[0],de=ue[1],pe=t.useState(null),he=pe[0],fe=pe[1],ge=t.useState(FG.SHOW_ALL),me=ge[0],ve=ge[1],ye=t.useState(1),xe=ye[0],_e=ye[1],be=t.useState(exports.SortDirection.DESC),we=be[0],Se=be[1],Ce=t.useRef(""),Te=S(),Me=Te.cluster,Ae=Te.region,Ee=Te.zone,Ie=Te.node,De=t.useMemo((function(){return JSON.stringify({cluster:Me,region:Ae,zone:Ee,node:Ie})}),[Me,Ae,Ee,Ie]),Oe=t.useMemo((function(){return JSON.stringify((w||[]).slice().sort())}),[w]),ke=t.useMemo((function(){return[exports.QUERY_KEY.fetchQueriesStatsPage,g,G,y,x,O,te,ce,we,he,b,De,Oe]}),[g,G,y,x,O,te,ce,we,he,b,De,Oe]),Re=n.useInfiniteQuery(ke,(function(e){var t=e.pageParam,n=void 0===t?0:t;return oH.fetchQueriesStatsPage(g,{currentTablePage:n,apiUrl:m,pageSize:G,startTime:y,endTime:x,searchInput:O,database:te,sortBy:ce,sortDirection:we,queryType:he,groupByOperation:b},S,w)}),{keepPreviousData:!0,getNextPageParam:function(e,t){var n;if(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.hasNext)return t.length},onSuccess:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f=e.pages.flatMap((function(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.entities)&&void 0!==n?n:[]}));"eps"===ce&&!1===(null===(r=null===(n=null===(t=null==e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.hasPrev)&&we===exports.SortDirection.DESC&&(null===(a=null===(o=null===(i=null==e?void 0:e.pages)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.entities)&&_e(null===(c=null===(u=null===(l=null===(s=null==e?void 0:e.pages)||void 0===s?void 0:s[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u.entities[0])||void 0===c?void 0:c.eps);var g=function(e){return null==e?void 0:e.map((function(e){var t,n,r,i,o,a;return{databaseId:null!==(t=e.databaseId)&&void 0!==t?t:"",eps:e.eps,events:e.events,firstActive:null!==(n=e.firstActive)&&void 0!==n?n:"",lastActive:null!==(r=e.lastActive)&&void 0!==r?r:"",latencyAvg:e.latencyAvg,latencyP90:e.latencyP90,latencyP99:e.latencyP99,namespaceName:e.namespaceName,query:e.query,queryId:null!==(i=e.queryId)&&void 0!==i?i:"",queryType:null!==(o=e.queryType)&&void 0!==o?o:"",rowsAvg:e.rowsAvg,rps:e.rps,totalEpsRatio:e.totalEpsRatio,totalTime:e.totalTime,universeId:null!==(a=e.universeId)&&void 0!==a?a:""}}))}(f);le(g),J(null!==(h=null===(p=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===p?void 0:p.totalCount)&&void 0!==h?h:0)}}),Ne=Re.isFetching,Le=Re.isError,Be=Re.error,Pe=Re.fetchNextPage,je=Re.hasNextPage,Fe=Re.isFetchingNextPage,Ue=Re.data,ze=n.useQuery([exports.QUERY_KEY.fetchQueriesDatabases,g],(function(){return oH.fetchQueriesDatabases(g,m)}),{onSuccess:function(e){oe(e)}}),He=ze.isLoading,Ve=ze.isError;t.useEffect((function(){var e,t,n;if(void 0!==je&&(null===(e=null==Ue?void 0:Ue.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==Ue?void 0:Ue.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;je&&!Fe&&Z===r&&Z>=0&&Pe()}}),[je,Pe,Z,Fe,null===(a=null==Ue?void 0:Ue.pages)||void 0===a?void 0:a.length]);t.useEffect((function(){}),[E]),t.useEffect((function(){Le&&le([])}),[Le]),t.useEffect((function(){var e=JSON.stringify(ke);Ce.current&&Ce.current!==e&&X(0),Ce.current=e}),[ke]),t.useEffect((function(){return function(){P.current.cancel()}}),[]),t.useEffect((function(){var t,n,i,a,s,l,u,c=sessionStorage.getItem("visibleQueryFields"),d=c?JSON.parse(c):null;U([{name:wG,label:"",options:{sort:!1,display:!1,filter:!1}},{name:jG,label:"Total Load",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Percentage of the system load",placement:"top",arrow:!0},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Total Load"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:SG,label:"AAS",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Active Sessions per Second",placement:"top",arrow:!0},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"AAS"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:CG,label:"Events",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,width:"140px",minWidth:"140px",maxWidth:"160px"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Active Session Events per Second",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Events"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(t){return qi(t)?e.jsx(gG,{data:t,maxEPS:xe,groupByOperation:b}):"-"}}},{name:OG,label:"Query",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"300px",maxWidth:"450px",minWidth:"300px"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Query Text",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Query"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Tooltip,B({title:t,placement:"top",arrow:!0},{children:e.jsx(r.Box,B({className:T.queryCellBox},{children:e.jsx(ht,{text:t,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:_===exports.AppName.YBM?T.queryCodeElement:T.queryCodeElementWeb,preClassName:_===exports.AppName.YBM?T.queryPreBlockYBM:T.queryPreBlockWeb,containerClassName:T.queryContainerCode},"TableHelperQueries-".concat(Z,"-").concat(i))}))}))}}},{name:DG,label:"Database",options:{sort:!0,display:null!==(t=null==d?void 0:d.includes(DG))&&void 0!==t&&t,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Database Name",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Database"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:TG,label:"First Active Time",options:{sort:!0,display:null!==(n=null==d?void 0:d.includes(TG))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"First Time that the query was active",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"First Active Time"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:MG,label:"Last Active Time",options:{sort:!0,display:null!==(i=null==d?void 0:d.includes(MG))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Last Time that the query was active",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Last Active Time"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:AG,label:"Avg Latency (ms)",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"The average latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsx(r.Box,B({className:M.headerBox},{children:e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Avg Latency (ms)"}))}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:EG,label:"P90 Latency (ms)",options:{sort:!0,display:null!==(a=null==d?void 0:d.includes(EG))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"The P90 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"P90 Latency (ms)"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:IG,label:"P99 Latency (ms)",options:{sort:!0,display:null!==(s=null==d?void 0:d.includes(IG))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"The P99 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"P99 Latency (ms)"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:RG,label:"Query Type",options:{sort:!1,display:null!==(l=null==d?void 0:d.includes(RG))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"10%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"SQL/CQL query or Background activity",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Query Type"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:BG,label:"Total Time (ms)",options:{sort:!0,display:null!==(u=null==d?void 0:d.includes(BG))&&void 0!==u&&u,setCellHeaderProps:function(){return{style:{width:"12%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Total time spent for query processing measured in ms",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Total Time (ms)"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:NG,label:"Avg Rows/Call",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Average rows returned",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"Avg Rows"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:LG,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:H(M.tableHeaderCell,_===exports.AppName.WEB&&M.tableBorder)}},customHeadRender:function(){return e.jsx(o.YBTooltip,B({title:"Calls per second",arrow:!0,placement:"top"},{children:e.jsxs(r.Box,B({className:M.headerBox},{children:[e.jsx(r.Typography,B({variant:"body2",className:M.headerText},{children:"RPS"})),e.jsx("img",{src:bG,alt:"info",className:M.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[se,xe,b]);var We=Ne||He,Ye=t.useMemo((function(){var e;return bi(Pe,"Rows per page:",null!==(e=null==se?void 0:se.length)&&void 0!==e?e:0,je)}),[Pe,null==se?void 0:se.length,je]),Ge=t.useMemo((function(){return{sorting:ce?[{id:ce,desc:we===exports.SortDirection.DESC}]:[],pagination:{pageIndex:Z,pageSize:G},isLoading:We,showProgressBars:We}}),[ce,we,Z,G,We]);return e.jsxs(e.Fragment,{children:[V&&e.jsx(fG,{appName:_,hiddenColumns:[wG,AG,NG,LG,SG,CG,kG,PG,OG],columns:F,onColumnVisibilityChange:function(e,t){U((function(n){return n.map((function(n){return n.name===e?B(B({},n),{options:B(B({},n.options),{display:t})}):n}))}))},close:function(){return W(!1)}}),e.jsxs(r.Box,B({mt:1,mb:2,className:M.dataBox},{children:[e.jsxs(r.Box,B({display:"flex",flexDirection:"column"},{children:[e.jsx(r.Box,B({mb:2},{children:e.jsx(r.Typography,B({variant:"h5"},{children:"Queries"}))})),e.jsxs(r.Box,B({className:M.filterContainer},{children:[e.jsxs(r.Box,B({className:M.filterLeftContainer},{children:[e.jsxs(o.YBSelect,B({label:"",value:te,dataTestId:"HistoricalQueryData-DatabaseSelect",className:M.ybOverrideMuiSelect,onChange:function(e){X(0),ne(e.target.value)},menuProps:{PaperProps:{style:{maxHeight:"300px"}}}},{children:[e.jsx(r.MenuItem,B({value:wr,"data-testid":"HistoricalQueryData-".concat(wr)},{children:e.jsx("span",{children:Ir.ALL_DATABASES})}),wr),ie.map((function(t){return e.jsx(r.MenuItem,B({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e.jsx("span",{children:t})}),t)}))]})),e.jsx(o.YBSelect,B({label:"",value:me,dataTestId:"HistoricalQueryData-QueryTypeSelect",className:M.ybOverrideMuiSelect,onChange:function(e){X(0),e.target.value===FG.SHOW_ALL&&fe(null),e.target.value===FG.SHOW_YSQL&&fe(exports.QueryType.SQL),e.target.value===FG.SHOW_YCQL&&fe(exports.QueryType.CQL),e.target.value===FG.SHOW_ACTIVITIES&&fe(exports.QueryType.BACKGROUND),ve(e.target.value)},menuProps:{PaperProps:{style:{maxHeight:"300px"}}}},{children:Object.entries(FG).map((function(t){var n=t[0],i=t[1];return e.jsx(r.MenuItem,B({value:i,"data-testid":"HistoricalQueryData-".concat(i)},{children:e.jsx("span",{children:i})}),n)}))})),e.jsx(o.YBInput,{dataTestId:"HistoricalQueryData-SearchInput",placeholder:"Filter Queries",className:M.ybSearchInput,onChange:function(e){var t=e.target.value;L(t),P.current(t)},value:N,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"},InputProps:{startAdornment:e.jsx(r.InputAdornment,B({position:"start"},{children:e.jsx(_G,{})})),endAdornment:!!N&&e.jsx(r.InputAdornment,B({position:"end"},{children:e.jsx(r.IconButton,B({size:"small",onClick:function(){P.current.cancel(),k(""),L(""),X(0)},"data-testid":"HistoricalQueryData-ClearButton"},{children:e.jsx(v.Clear,{fontSize:"small"})}))}))}})]})),e.jsx(o.YBButton,B({size:"medium",variant:_===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(vG,{style:{marginBottom:"2px"}}),onClick:function(){return W(!0)},dataTestId:"HistoricalQueryData-AddFieldsButton"},{children:"Add Columns"}))]}))]})),e.jsxs(r.Box,B({className:_===exports.AppName.YBM?M.overrideMuiTableContainer:M.overrideMuiTableContainerWeb},{children:[(Le||Ve)&&e.jsxs(r.Box,B({mt:3,className:M.recommendation},{children:[(_===exports.AppName.YBA||_===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(null===(l=null===(s=null==Be?void 0:Be.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error)?null===(c=null===(u=null==Be?void 0:Be.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error:_i.HISTORICAL_QUERY_DATA_FETCH_ERROR}),_===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(null===(p=null===(d=null==Be?void 0:Be.response)||void 0===d?void 0:d.data)||void 0===p?void 0:p.error)?null===(f=null===(h=null==Be?void 0:Be.response)||void 0===h?void 0:h.data)||void 0===f?void 0:f.error:_i.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),e.jsx(o.YBTable,{id:"HistoricalQueryData",className:M.overrideMuiTable,data:null!=se?se:[],columns:null==F?void 0:F.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:We,options:{sort:!0,filter:!0,count:K,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:G,rowsPerPage:G,autoResetPageIndex:!1,onChangePage:function(e){X(e)},onChangeRowsPerPage:function(e){q(e),X(0)},textLabels:{body:{noMatch:"There are no queries with the current ".concat(_===exports.AppName.YBM?"cluster":"universe")}},onRowClick:function(e,t){!function(e){var t=e.rowData;e.rowMeta;var n=e.appName,r=e.onClose,i=e.onSelectedQuery,o=t[0],a=t[10],s=t[16],l=t[11],u=l===exports.QueryType.SQL||l===exports.QueryType.BACKGROUND;n===exports.AppName.YBM?function(){r();var e=null,t=new URLSearchParams(window.location.search);t.set("type",l),t.set("queryId",a),t.set("universeId",s),u?(e={queryId:a,dbId:null==o?void 0:o.toString(),universeId:s,type:l},t.set("dbId",e.dbId)):e={queryId:a,universeId:s,type:l},null==i||i(a.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(t.toString()))}():n!==exports.AppName.WEB&&n!==exports.AppName.YBA||function(e,t,i){r();var o=window.location.pathname,s=new URLSearchParams(window.location.search);s.set("universeId",i),s.set("type",l),u&&s.set("dbId",t),n===exports.AppName.YBA&&s.set("queryId",a);var c=s.toString(),d="".concat(o,"/").concat(e).concat(c?"?".concat(c):"");window.open(d,"_blank")}(a,null==o?void 0:o.toString(),s)}({rowData:e,rowMeta:t,appName:_,onSelectedQuery:C,onClose:function(){return function(e){I(e)}(null)}})},rowsPerPageOptions:Hr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(ce?[{id:ce,desc:we===exports.SortDirection.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return de("eps"),Se(exports.SortDirection.DESC),void X(0);var n=t[0],r=n.id,i=n.desc?exports.SortDirection.DESC:exports.SortDirection.ASC;de(r),Se(i),X(0)},paginationDisplayMode:"custom",customFooter:Ye,manualSorting:!0,state:Ge}},"HistoricalQueryData")]}))]}))]})},zG=r.makeStyles((function(e){return{messageBox:{width:"100%",height:"228px",border:"1px dotted #CBDBFF",borderRadius:"8px",backgroundColor:"#F2F6FF",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},ashText:{color:"#4E5F6D",marginTop:e.spacing(2),marginBottom:e.spacing(2),marginLeft:e.spacing(1),marginRight:e.spacing(1),fontSize:"13px"},ashLink:{color:"#2B59C3",fontSize:"11.5px",textDecoration:"underline",fontStyle:"solid"}}})),HG=[{text:"Learn more.",link:"https://docs.yugabyte.com/preview/yugabyte-platform/manage-deployments/upgrade-software-install/"},{text:"Learn more.",link:"https://docs.yugabyte.com/preview/explore/observability/active-session-history/"}],VG=function(t){var n=t.isAshSupported,i=zG();return e.jsxs(r.Box,B({className:i.messageBox},{children:[e.jsx("img",{src:n?"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Arrow"}),e.jsx("span",B({className:i.ashText},{children:n?"The Cluster Load chart requires access to the Active Session History (ASH) view, which is not enabled on this cluster. To enable ASH for this cluster, contact Support.":"The Cluster Load chart requires YugabyteDB v2024.2 or later."})),e.jsxs(r.Box,B({display:"flex",flexDirection:"row"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Docs"}),e.jsx("a",B({className:i.ashLink,href:n?HG[1].link:HG[0].link,target:"_blank",rel:"noreferrer"},{children:n?HG[1].text:HG[0].text}))]}))]}))},WG="Cluster Load Overview",YG="Activity By Database";sI([OP,oj,oR,cL,RB,nP,JL,function(e){e.registerPainter("svg",hF)},XL]);var GG,qG=i.makeStyles((function(e){return{metricPanel:{position:"relative",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px 24px 20px 16px",backgroundColor:"#FFFFFF",height:"320px"},metricPanelYBM:{position:"relative",height:"320px",textOverflow:"ellipsis",whiteSpace:"nowrap"},groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .yb-MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .yb-MuiInput-root":{width:"150px",height:"32px"}},groupByContainer:{position:"absolute",top:"20px",right:"20px",display:"flex",flex:1,flexDirection:"row",alignItems:"center"},groupByText:{fontSize:"13px",fontFamily:"Inter, sans-serif",fontWeight:500,color:"#0B1117"},chartTypeSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderBarButton:{borderRadius:"8px 0px 0px 8px"},borderLineButton:{borderRadius:"0px 8px 8px 0px"},clusterLoadBoxYBM:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF",marginTop:e.spacing(2)}}})),QG=[{value:exports.ChartType.BAR,label:"Bar"},{value:exports.ChartType.LINE,label:"Line"}],ZG="Cpu",XG="IO",$G="DiskIO",KG=function(i){var a,s,l,u=i.startTime,c=i.endTime,d=i.appName,p=i.metricKey,h=i.shouldAbbreviateTraceName,f=i.groupByOperation,g=i.timezone,m=i.universeUuid,v=i.isAshEnabled,y=i.isAshSupported,x=i.apiUrl,_=i.dbWaitEventType,b=i.isDbClusterLoadView,w=void 0!==b&&b,S=i.onEChartsDateSelect,C=i.onSetGroupByOperation,T=i.onFilterBarData,M=i.getClusterDetails,A=qG(),E=wi(),I=t.useRef(null),D=t.useRef(null),O=t.useState([]),k=O[0],R=O[1],N=t.useState(exports.ChartType.BAR),L=N[0],P=N[1],j=t.useRef(k),F=t.useState(null),z=F[0],V=F[1],W=M(),Y=W.cluster,G=W.region,q=W.zone,Q=W.node,Z=W.numNodes,X=W.outlierType,$=QG.map((function(t){return{value:t.value,icon:e.jsx("img",{src:t.value===exports.ChartType.BAR?"data:image/svg+xml,%3csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.599976 6.43334V14.6M5.93331 0.600006V14.6M11.2666 6.43334V14.6M16.6 0.600006V14.6' stroke='%232B59C3' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.6 10.6L13.8724 4.62478C13.6553 4.39833 13.5468 4.28511 13.4159 4.22658C13.3003 4.17493 13.1729 4.15363 13.0464 4.16477C12.903 4.1774 12.7621 4.2489 12.4804 4.3919L7.7196 6.80811C7.43784 6.95111 7.29696 7.02261 7.15357 7.03524C7.027 7.04639 6.89966 7.02508 6.78409 6.97343C6.65315 6.91491 6.54462 6.80168 6.32755 6.57523L0.599976 0.600006' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Chart Type Icon"}),onClick:function(){var e;e=t.value,P(e)},buttonProps:{dataTestId:"PerfAdvisorClusterLoad-ChartTypeSelector-".concat(t.value)}}})),K=n.useMutation((function(e){return oH.fetchGraphs(m,e,x)}),{onSuccess:function(e){!qi(e)||V(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),J=null===(l=null===(s=null===(a=null==K?void 0:K.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,ee=function(){var e={universeUuid:[m]};w?(delete e.clusterUuid,delete e.regionCode,delete e.azCode,delete e.instanceName,_===wr.toUpperCase()?delete e.waitEventType:e.waitEventType="CPU"===_?[ZG]:[XG,$G]):(Y&&Y!==wr?e.clusterUuid=[Y]:delete e.clusterUuid,G&&G!==wr?e.regionCode=[G]:delete e.regionCode,q&&q!==wr?e.azCode=[q]:delete e.azCode,Q&&Q!==wr?e.instanceName=[Q]:delete e.instanceName);var t=function(t){return B(B({start:u,end:c,name:t,filters:e,settings:{aggregatedValueFunction:w?sr.SUM:sr.AVERAGE,returnAggregatedValue:!1,splitCount:w?Z:3,splitMode:w?X:ir.NONE,splitType:w?or.NAMESPACE:or.NONE}},t!==Dr||w?{}:{groupBy:[f]}),{stepSeconds:xa(u,c)})},n=[t(Dr)];w||(n.push(t(Or)),n.push(t(kr))),Zi(u)&&Zi(c)&&v&&K.mutate(n)};t.useEffect((function(){ee()}),[u,c,f,Y,G,q,Q,_,Z,X]),t.useEffect((function(){return ee(),function(){V(null)}}),[]);return t.useEffect((function(){j.current=k}),[k]),t.useEffect((function(){if(qi(z)&&D.current){I.current||(I.current=tA(D.current,null,{renderer:"svg"}));var e=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f,g,m=i.shouldAbbreviateTraceName;i.appName;var v=i.timezone,y=void 0===v?"":v,x=i.groupByOperation,_=null==e?void 0:e.flatMap((function(e){return e.data||[]}));_&&(null==_?void 0:_.length)>1&&!n&&(_=U(U([],_.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),_.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var b=[];if(!_||0===(null==_?void 0:_.length))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:n?t===wr.toUpperCase()?YG:"".concat(t," Activity By Database"):WG,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"},legend:{data:[]}},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};null==_||_.forEach((function(t,i){var o,a=n&&null!==(o=t.namespaceName)&&void 0!==o?o:t.name,s=null;if(a===Tr){var l=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(s=null==l?void 0:l.name)===kr?a=Er:s===Or&&(a=Mr)}var u=x===exports.WaitEventClassification.WAIT_EVENT?22:25,c=m&&(null==a?void 0:a.length)>u?"".concat(a.substring(0,u),"..."):a;if(a===Mr)b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:!1,tooltip:{show:!1},lineStyle:{color:"white",width:4,type:"solid"},silent:!0,symbol:"none",z:1}),b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:"black",width:2,type:"solid"},symbol:"circle",symbolSize:6,itemStyle:{color:"transparent"},emphasis:{itemStyle:{color:"black"},lineStyle:{width:2},symbolSize:8},z:2});else{var d={name:c,type:"scatter"===t.type||n&&r===exports.ChartType.LINE?"line":"bar",stack:n?r===exports.ChartType.BAR?"total":null:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:a===Er?"#888888":xi[a]||yi[i%yi.length],width:2,type:a===Er?"dashed":"solid"},itemStyle:{color:a===Er?"transparent":xi[a]||yi[i%yi.length]},symbolSize:6,symbol:n?"none":"circle",z:1,emphasis:{lineStyle:{color:a===Er?"#888888":xi[a]||yi[i%yi.length],width:2},itemStyle:{color:a===Er?xi[a]||yi[i%yi.length]:void 0},symbolSize:a===Er?8:void 0}};b.push(d)}}));var w=(null===(a=null===(o=null==b?void 0:b[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.length)||0,S=[];if(w)for(var C=0;C<w;C++){for(var T=0,M=0,A=b;M<A.length;M++){var E=A[M];"bar"===E.type&&(T+=parseFloat(null===(s=E.data[C])||void 0===s?void 0:s[1])||0)}S.push(T)}var I=Math.max.apply(Math,U([.1],S,!1)),D=0;b.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>D&&(D=t)}}));var O=Math.max(1,1.4*I,1.4*D),k=Math.ceil(O),R=null===(d=null===(c=null===(u=null===(l=null==e?void 0:e[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u[0])||void 0===c?void 0:c.x)||void 0===d?void 0:d[0],N=null===(g=null===(f=null===(h=null===(p=null==e?void 0:e[0])||void 0===p?void 0:p.data)||void 0===h?void 0:h[0])||void 0===f?void 0:f.x)||void 0===g?void 0:g.slice(-1)[0],L=N&&R?(new Date(N).getTime()-new Date(R).getTime())/864e5:0,B={title:{text:n?t===wr.toUpperCase()?YG:"".concat(t," Activity By Database"):WG,left:16,top:16,textStyle:{fontWeight:600,fontFamily:Ar,fontSize:15,color:"#0B1117"}},tooltip:{trigger:x===exports.WaitEventClassification.WAIT_EVENT?"item":"axis",axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:Ar,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",z:1,formatter:function(e){var t,n,r;if(Array.isArray(e)){var i=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",o=new Date(i),a=Sl(y?Cl(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0}),s=e.map((function(e){var t=Array.isArray(e.value)?e.value[1]:e.value,n=ba(e.color,e.seriesName),r=wa(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}i=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",o=new Date(i),a=Sl(y?Cl(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0});var l=Array.isArray(e.value)?e.value[1]:e.value,u=ba(e.color,e.seriesName),c=wa(l);return s='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(u).concat(c,"\n </div>"),'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}},legend:{type:"scroll",orient:"vertical",left:"1%",top:"18%",bottom:"10%",width:"250px",height:"220px",symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,itemWidth:16,itemHeight:16,textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:Ar,rich:{dashedLine:{backgroundColor:{image:'data:image/svg+xml;utf8,<svg width="24" height="6" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="3" x2="24" y2="3" stroke="%23888" stroke-width="2" stroke-dasharray="6,4" /></svg>'},width:24,height:6,padding:[0,4,0,0],lineHeight:14},thickLine:{backgroundColor:"black",width:24,height:0,borderWidth:1,borderColor:"black",borderType:"solid",padding:[2,4,0,0],lineHeight:14}}},data:b.filter((function(e){return e.showLegend})).map((function(e){return e.name===Er||e.name===Mr?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===Er?"{dashedLine|} # vCPU":e===Mr?"{thickLine|} Queries":e}},grid:{left:"270px",right:"2%",top:"22%",bottom:"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},formatter:function(e){var t=new Date(e);return Sl(y?Cl(t,y):t,L>1?"MMM d HH:mm":"HH:mm",{timeZone:y||void 0})}},axisLine:{lineStyle:{color:"#6D7C88"}}},yAxis:{type:"value",name:"Active Sessions",nameLocation:"middle",nameGap:50,nameTextStyle:{fontWeight:"bold",fontFamily:Ar,fontSize:13,color:"#0B1117",rotate:90},axisLine:{lineStyle:{color:"#6D7C88"}},axisLabel:{color:"#6D7C88",textStyle:{fontFamily:Ar,fontSize:11.5},precision:0},splitNumber:4,max:k},series:b,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return B}(z,_,w,L,{shouldAbbreviateTraceName:h,appName:d,timezone:g,metricKey:p,groupByOperation:f});I.current.setOption(e),n=!1,r=null,(t=I).current.getZr().on("mousedown",(function(e){var i,o,a=[e.offsetX,e.offsetY],s=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},a);r=null!==(o=null==s?void 0:s[0])&&void 0!==o?o:null,n=!0})),t.current.getZr().on("mouseup",(function(e){var i;if(n){var o=[e.offsetX,e.offsetY],a=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},o),s=null==a?void 0:a[0];if(null!==r&&null!==s&&Math.abs(s-r)>10){var l=Math.min(r,s),u=Math.max(r,s);S(l,u)}}n=!1})),w||function(e){e.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}}),e.current.on("legendselectchanged",(function(t){var n,r,i=t.name,o=U([],j.current,!0),a=null===(n=e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===j.current.length||j.current.length===s.length?[i]:j.current.includes(i)?j.current.filter((function(e){return e!==i})):U(U([],j.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),R(o),T(o)}))}(I)}var t,n,r;return function(){I.current&&(I.current.dispose(),I.current=null)}}),[z,K.isLoading,p,L]),t.useEffect((function(){var e=function(){I.current&&I.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),e.jsx(r.Box,B({mt:d===exports.AppName.WEB?2:0,className:H(d===exports.AppName.WEB?void 0:A.clusterLoadBoxYBM)},{children:e.jsxs(r.Box,{children:[K.isLoading&&e.jsx(r.Box,B({mt:2,className:E.loadingBox},{children:e.jsx(sH,{className:H(E.icon,E.inProgressIcon)})})),K.isError&&e.jsxs(r.Box,B({mt:3},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(J)?J:_i.CLUSTER_LOAD_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(J)?J:_i.CLUSTER_LOAD_FETCH_ERROR})]})),e.jsxs(r.Box,{children:[K.isSuccess&&e.jsxs(r.Box,B({id:"".concat(p,"-wrapper"),display:"flex",flexDirection:"row",className:H(d===exports.AppName.WEB?A.metricPanel:A.metricPanelYBM),onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e.jsx("div",{ref:D,id:p,style:{flexGrow:1,minWidth:0}}),!w&&e.jsxs("div",B({className:A.groupByContainer},{children:[e.jsxs("span",B({className:A.groupByText},{children:["Group By","   "]})),e.jsx(o.YBSelect,B({dataTestId:"PerfAdvisorClusterLoad-GroupBySelect",value:f,className:H(A.groupByOperationDropdown,A.overrideDefaultMuiSelect,A.overrideDefaultMuiFormControl)},{children:null==vr?void 0:vr.map((function(t,n){return e.jsx(r.MenuItem,B({value:t,onClick:function(e){C(t),e.stopPropagation()}},{children:mr[t]}),"".concat(t,"-").concat(n))}))}))]})),w&&e.jsx("div",B({className:A.groupByContainer},{children:e.jsx(o.YBButtonGroup,{divider:!0,value:L,buttons:$,dataTestId:"PerfAdvisorClusterLoad-ChartTypeSelector"})}))]})),!v&&e.jsx(r.Box,B({mt:2,mb:1.5},{children:e.jsx(VG,{isAshSupported:y})}))]})]})}))},JG=r.makeStyles((function(e){return{modal:{display:"flex",justifyContent:"flex-end"},paper:{width:"50vw",height:"100vh",backgroundColor:e.palette.background.paper,padding:e.spacing(2),overflowY:"auto",boxShadow:e.shadows[5],display:"flex",flexDirection:"column"},content:{flexGrow:1},footer:{paddingTop:e.spacing(2),borderTop:"1px solid #ccc",textAlign:"right"},search:{top:0,position:"sticky",padding:e.spacing(2,0),backgroundColor:e.palette.background.paper,zIndex:1},container:{border:"1px solid ".concat(e.palette.grey[200]),borderRadius:e.shape.borderRadius},itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},group:{"&:not(:first-child)":{borderTop:"1px solid ".concat(e.palette.grey[200])}},groupHeader:{height:44,padding:e.spacing(0,3),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:r.alpha(e.palette.grey[200],.25)},iconRotate:{transform:"rotate(180deg)"},item:{paddingLeft:e.spacing(3),"& label":{height:"34px",marginBottom:0}},searchInput:{"& .yb-MuiInputBase-root":{height:"42px"}},checkbox:{"& .yb-MuiSvgIcon-root":{width:"16px",height:"16px"}}}})),eq=function(n){var i=n.open,a=n.selectedTabIndex,s=n.metricMeasure,l=n.onClose,u=n.onSubmit,c=n.metricResources,d=JG(),p=s===exports.MetricMeasure.OUTLIER_TABLES,h=s===exports.MetricMeasure.OUTLIER_DB,f=p||h?p?li[a]:ui[a]:si[a],g=pi.reduce((function(e,t){return e[t.name]=t.name===f,e}),{}),m=t.useState(g),v=m[0],y=m[1],x=function(){var e=p||h?p?sessionStorage.getItem(mi):sessionStorage.getItem(vi):sessionStorage.getItem(gi);if(e)return JSON.parse(e);var t={};return c.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},_=t.useState(""),b=_[0],w=_[1],S=t.useState(x),C=S[0],T=S[1];t.useEffect((function(){T(x())}),[i]);var M=t.useMemo((function(){return c.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(b.toLowerCase())}));return 0===t.length?null:B(B({},e),{metrics:t})})).filter(Boolean)}),[c,b]),A=0===M.length;return e.jsx(o.YBModal,B({open:i,isSidePanel:!0,title:"Add and Remove Charts",onClose:l,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(p||h?p?mi:vi:gi,JSON.stringify(C)),u(C),l()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsxs(r.Box,{children:[e.jsx(r.Box,B({className:d.search},{children:e.jsx(o.YBInput,{fullWidth:!0,placeholder:"Search",value:b,InputProps:{startAdornment:e.jsx(r.InputAdornment,B({position:"end"},{children:e.jsx(_G,{})}))},onChange:function(e){w(e.target.value)},dataTestId:"MetricsSelectionSearch",className:d.searchInput})})),A?e.jsx(r.Box,B({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e.jsx(r.Typography,B({variant:"body2"},{children:"No results returned"}))})):e.jsx(r.Box,B({className:d.container},{children:M.map((function(t){if(!t.metrics.length)return null;var n=v[t.name]||!!b;return e.jsxs(r.Box,B({className:d.group},{children:[e.jsxs(r.Box,B({className:d.groupHeader,onClick:function(){return e=t.name,void y((function(t){var n;return B(B({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e.jsx(r.Box,B({display:"flex",alignItems:"center"},{children:e.jsx(r.Typography,B({variant:"body1"},{children:t.title}))})),e.jsx(R.default,{className:H(n&&d.iconRotate)})]})),e.jsx(r.Collapse,B({in:n},{children:e.jsx(r.Box,B({className:d.itemsContainer},{children:t.metrics.map((function(n){return e.jsx(r.Box,B({className:H(d.item)},{children:e.jsx(o.YBCheckbox,{name:"".concat(t.name,".").concat(n),label:fi[n]||n,dataTestId:"MetricsSelectionCheckbox-".concat(n),checked:!!C[n],onChange:function(){return e=n,void T((function(t){var n;return B(B({},t),((n={})[e]=!t[e],n))}));var e},className:d.checkbox})}),n)}))}))}))]}),t.name)}))}))]})}))},tq="metricsTab",nq=function(i){var a,s,l,u,c,d=i.appName,p=i.isMetricsDrawerOpen,h=i.apiUrl,f=i.timezone,g=i.metricMeasure,m=i.dateTimeRange,v=i.filterTrigger,y=i.urlParams,x=i.getClusterDetails,_=i.onEChartsDateSelect,b=i.handleFilterMetrics,w=i.openSelectionModal,S=i.closeSelectionModal,C=wi(),T=t.useRef([]),M=t.useState(null),A=M[0],E=M[1],I=t.useState(0),D=I[0],O=I[1],k=t.useState(!1),R=k[0],N=k[1],L=x(),P=L.universeUuid,j=L.cluster,F=L.region,U=L.zone,z=L.node,V=L.numNodes,W=L.outlierType;t.useEffect((function(){if(d===exports.AppName.YBA){var e=new URLSearchParams(window.location.search).get(tq),t=g===exports.MetricMeasure.OUTLIER_TABLES,n=g===exports.MetricMeasure.OUTLIER_DB,r=t||n?t?li:ui:si;O(r.includes(e)?r.indexOf(e):0),N(!0)}}),[]),t.useEffect((function(){var e=g===exports.MetricMeasure.OUTLIER_TABLES,t=g===exports.MetricMeasure.OUTLIER_DB,n=e?li:si;if(e||t)O(0),N(!0);else if(g&&d!==exports.AppName.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===_r.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),O(0),void N(!0)}var a=n.indexOf(i);if(-1!==a)O(a),N(!0);else{o=n[0];var s=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(s,"/").concat(o)),O(0),N(!0)}}}),[g]);var Y=n.useMutation({mutationKey:[exports.QUERY_KEY.fetchMetricsGraphs,P,m],mutationFn:function(e){return oH.fetchGraphs(P,e,h)},onSuccess:function(e){E(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),G=null===(l=null===(s=null===(a=null==Y?void 0:Y.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return t.useEffect((function(){var e;if(R){var t=ya(!1,!0,D,x(),null,B(B({},y),{type:null!==(e=y.type)&&void 0!==e?e:null}));t&&Y.mutate(t)}}),[g,null===(u=null==m?void 0:m.startDateTime)||void 0===u?void 0:u.getTime(),null===(c=null==m?void 0:m.endDateTime)||void 0===c?void 0:c.getTime(),D,F,R,j,U,z,W,V,v]),t.useEffect((function(){return Y.isSuccess&&A&&A.length>0&&T.current.length===A.length&&nA(T.current),function(){rA(T.current)}}),[Y.isSuccess,A]),e.jsxs(r.Box,B({mt:2,mb:2,mr:2,className:C.metricsBox},{children:[e.jsxs(r.Box,B({display:"flex",alignItems:"center",style:{borderBottom:"1px solid #E9EEF2"}},{children:[e.jsxs(o.YBTabs,B({value:D,onChange:function(e,t){if(t!==D){var n=g===exports.MetricMeasure.OUTLIER_TABLES,r=g===exports.MetricMeasure.OUTLIER_DB,i=(n||r?n?li:ui:si)[t],o=window.location.pathname;if(d!==exports.AppName.YBA){var a=o.split("/").slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(i))}else{var s=new URLSearchParams(window.location.search);s.set(tq,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString())),window.dispatchEvent(new Event("url-changed"))}O(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto",style:{flexGrow:1}},{children:[(g===exports.MetricMeasure.OVERALL||g===exports.MetricMeasure.OUTLIER)&&si.map((function(t,n){var r;return e.jsx(o.YBTab,{value:n,label:null===(r=null==pi?void 0:pi.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:C.causeTabButton},t)})),g===exports.MetricMeasure.OUTLIER_TABLES&&li.map((function(t,n){var r;return e.jsx(o.YBTab,{value:n,label:null===(r=null==ci?void 0:ci.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:C.causeTabButton},t)})),g===exports.MetricMeasure.OUTLIER_DB&&ui.map((function(t,n){var r;return e.jsx(o.YBTab,{value:n,label:null===(r=null==di?void 0:di.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:C.causeTabButton},t)}))]})),e.jsx(o.YBButton,B({variant:d===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(vG,{}),size:"medium",onClick:w,dataTestId:"GenericHeader-AddChartsButton"},{children:"Add and Remove Charts"}))]})),Y.isLoading&&e.jsx(r.Box,B({mt:2,className:C.loadingBox},{children:e.jsx(sH,{className:H(C.icon,C.inProgressIcon)})})),Y.isError&&e.jsxs(r.Box,B({mt:4},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(G)?G:_i.METRICS_GRAPHS_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(G)?G:_i.METRICS_GRAPHS_FETCH_ERROR})]})),Y.isSuccess&&e.jsx(r.Box,B({className:H(C.gridBox,C.gridBoxDouble)},{children:null==A?void 0:A.map((function(t,n){if(Zi(null==t?void 0:t.errorMessage))return e.jsx(r.Box,{});var i=ma(g,t,exports.GraphType.MULTI_SUPPORTING,!0,[],!0);return e.jsx(r.Box,B({style:{marginTop:"16px",marginRight:"16px",border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(r.Box,{children:e.jsx(MF,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:g,operations:g===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return function(e,t){T.current[t]=e}(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,dateTimeRange:m,groupByOperations:i.groupByOperations,appName:d,timezone:f,isHistoricalQueryView:!1,onEChartsDateSelect:_,showTitle:!0},"".concat(t.name,"-").concat(g))},"TopKMetricsView-".concat(n))}))}))})),p&&e.jsx(eq,{onSubmit:b,metricResources:g===exports.MetricMeasure.OUTLIER_TABLES||g===exports.MetricMeasure.OUTLIER_DB?g===exports.MetricMeasure.OUTLIER_TABLES?ci:di:pi,open:p,onClose:S,selectedTabIndex:D,metricMeasure:g})]}))},rq=S.default.memo((function(n){var i,o,a,s=n.universeUuid,l=n.appName,u=n.timezone,c=n.apiUrl,d=n.onEChartsDateSelect,p=n.getClusterDetails,h=t.useState(window.location.search),f=h[0],g=h[1];t.useEffect((function(){var e=function(){g(window.location.search)};return window.addEventListener("popstate",e),window.addEventListener("url-changed",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("url-changed",e)}}),[]);var m=t.useMemo((function(){var e=new URLSearchParams(f);return{startTime:e.get("startTime"),endTime:e.get("endTime"),duration:e.get("duration"),dbId:e.get("dbId"),queryId:void 0,userId:e.get("userId"),type:e.get("type"),universeId:s}}),[f,s]),v=t.useState(0),y=v[0],x=v[1],_=t.useState(!1),b=_[0],w=_[1];t.useEffect((function(){var e=sessionStorage.getItem(gi),t=sessionStorage.getItem(mi),n=sessionStorage.getItem(vi);if(!e){var r={};pi.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(gi,JSON.stringify(r))}if(!t){var i={};ci.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem(mi,JSON.stringify(i))}if(!n){var o={};di.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(vi,JSON.stringify(o))}}),[]);return e.jsx(r.Box,{children:e.jsx(nq,{apiUrl:c,isMetricsDrawerOpen:b,appName:l,timezone:u,metricMeasure:null===(i=p())||void 0===i?void 0:i.metricMeasure,dateTimeRange:{startDateTime:null===(o=p())||void 0===o?void 0:o.formattedStartDate,endDateTime:null===(a=p())||void 0===a?void 0:a.formattedEndDate},urlParams:m,filterTrigger:y,onEChartsDateSelect:d,openSelectionModal:function(){return w(!0)},closeSelectionModal:function(){return w(!1)},getClusterDetails:p,handleFilterMetrics:function(){x((function(e){return e+1}))}})})})),iq=[{value:"ALL",label:"All Event Types"},{value:"IO",label:"IO"},{value:"CPU",label:"CPU"}],oq=i.makeStyles((function(){return{input:{width:"60px",height:"32px"}}})),aq=function(n){var i,a=n.outlierType,s=n.numNodes,l=n.onChangeDbWaitEventType,u=n.onOutlierTypeSelected,c=n.onNumNodesChanged;oq();var d=t.useState(0),p=d[0],h=d[1],f=iq.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){l(e.value),h(t)},buttonProps:{dataTestId:"DbLoadHeader-DbSelector-".concat(e.value)}}}));return e.jsxs(r.Box,B({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e.jsx(Ii,{outlierType:a,metricOutlierSelectors:Lr,onOutlierTypeSelected:u,onNumNodesChanged:c,selectedNumNodes:s,showNumNodesInput:!1,showNumNodesSelector:!0}),e.jsx(r.Typography,B({variant:"body2",style:{marginRight:"16px",marginLeft:"8px"}},{children:"databases"})),e.jsxs(r.Box,B({display:"flex"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='1' height='16' viewBox='0 0 1 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='0.5' y1='2.18557e-08' x2='0.499999' y2='16' stroke='%23B7C3CB'/%3e%3c/svg%3e",alt:"Divider"}),e.jsx(o.YBLabel,B({style:{marginRight:"8px",marginLeft:"16px"}},{children:"group by"})),e.jsx(o.YBButtonGroup,{divider:!0,buttons:f,dataTestId:"DbLoadHeader-DbSelector",value:null===(i=iq[p])||void 0===i?void 0:i.value})]}))]}))},sq=(0,o.mui.styled)(o.YBTab)((function(e){var t=e.theme;return{display:"flex",flexDirection:"row",alignItems:"center",padding:t.spacing(.5,1),"& .yb-MuiTab-iconWrapper":{marginTop:t.spacing(.5)}}})),lq=r.makeStyles((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%"},tabButton:{width:"160px"},tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"0px 24px 4px 16px",backgroundColor:"#FFFFFF",marginTop:e.spacing(2)},expandAllButton:{fontSize:"13px",fontWeight:600},detectionButton:{marginRight:e.spacing(2),marginLeft:e.spacing(2)},noteText:{fontSize:"11.5px",fontWeight:600,fontStyle:"semibold",fontFamily:"Inter",letterSpacing:"0px"},warningText:{fontSize:"11.5px",fontWeight:400,fontStyle:"regular",fontFamily:"Inter",letterSpacing:"0px"},runDetectionButtonContainer:{gap:e.spacing(2),display:"flex",flexDirection:"row",alignItems:"center"}}})),uq=function(i){var a,s,l,u,c,d,p,h,f,g,v,y,x,_=i.startTime,b=i.endTime,w=i.universeUuid,S=i.appName,C=i.timezone,T=i.filterDuration,M=i.apiUrl,A=i.universeData,E=i.isAshEnabled,I=i.isAshSupported,D=i.onClickShowMoreAnomalies,O=i.onEChartsDateSelect,k=i.onSelectedIssue,R=i.onSelectedQuery,N=i.notifyTabChange,L=i.onStartDateChange,P=i.onEndDateChange,j=i.onRefresh,F=i.onSelectedFilterDuration,U=lq(),z=wi(),V=t.useState([]),W=V[0],Y=V[1],G=t.useState(null),q=G[0],Q=G[1],Z=t.useState((y=window.location.pathname,x=exports.InsightsTabs.CLUSTER_LOAD,y.includes("/".concat(_r.METRICS))&&(x=exports.InsightsTabs.METRICS),y.includes("/".concat(_r.INSIGHTS))&&(x=exports.InsightsTabs.INSIGHTS),y.includes("/".concat(_r.CLUSTER_LOAD))&&(x=exports.InsightsTabs.CLUSTER_LOAD),x)),X=Z[0],$=Z[1],K=t.useState(!1),J=K[0],ee=K[1],te=t.useState(Object.values(exports.InsightsTabs)),ne=te[0],re=te[1],ie=t.useState(vr[0]),oe=ie[0],ae=ie[1],se=t.useState(exports.ClusterLoadOverallTabs.QUERIES),le=se[0],ue=se[1],ce=t.useState(exports.ClusterLoadSubTabs.OVERALL_LOAD),de=ce[0],pe=ce[1],he=t.useState(Object.values(exports.ClusterLoadSubTabs)),fe=he[0],ge=he[1],me=t.useState(null);me[0];var ve=me[1],ye=t.useState(exports.AnomalyDetectionStatusText.EMPTY),xe=ye[0],_e=ye[1],be=t.useState(wr.toUpperCase()),we=be[0],Se=be[1],Ce=t.useState(br),Te=Ce[0],Me=Ce[1],Ae=t.useState(Sr),Ee=Ae[0],Ie=Ae[1],De=t.useState(!0),Oe=De[0],ke=De[1],Re=t.useState(wr),Ne=Re[0],Le=Re[1],Be=t.useState(wr),Pe=Be[0],je=Be[1],Fe=t.useState(wr),Ue=Fe[0],ze=Fe[1],He=t.useState(wr),Ve=He[0],We=He[1],Ye=t.useState(exports.MetricMeasure.OVERALL),Ge=Ye[0],qe=Ye[1],Qe=t.useState(ar.ALL),Ze=Qe[0],Xe=Qe[1],$e=t.useState(ir.TOP),Ke=$e[0],Je=$e[1],et=t.useState(3),tt=et[0],nt=et[1],rt=function(e){Y(e)},it=function(e,t){var n=Object.values(exports.InsightsTabs);return t||(n=n.filter((function(e){return e!==exports.InsightsTabs.METRICS}))),n},ot=function(e){ae(e)};n.useQuery(exports.QUERY_KEY.fetchAnomalyDetectionStatus,(function(){return oH.fetchAnomalyDetectionStatus(w,M)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||Xi(t))ve(null);else{var n=new Date(t),r=Al(n,Ml,C);ve(r)}_e(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:xe!==exports.AnomalyDetectionStatusText.SUCCESS});var at=n.useMutation((function(){return oH.scheduleAnomalyDetectionStatus(w,M)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||Xi(t))ve(null);else{var n=new Date(t),r=Al(n,Ml,C);ve(r)}_e(e.status)},onError:function(e){var t,n,r,i;JY.error(Zi(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)?null===(i=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.error:_i.ANOMALY_SCHEDULE_ERROR)}}),st=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroups,null==_?void 0:_.toISOString()],(function(){var e,t;return oH.fetchAnomalyGroups(w,null!==(e=null==_?void 0:_.toISOString())&&void 0!==e?e:null,null!==(t=null==b?void 0:b.toISOString())&&void 0!==t?t:null,X===exports.InsightsTabs.INSIGHTS?exports.AnomalyTypeFilter.INSIGHT:exports.AnomalyTypeFilter.PERF_ANOMALY,dt,M)}),{onSuccess:function(e){Q(e)}}),lt=null===(l=null===(s=null===(a=null==st?void 0:st.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;n.useQuery([exports.QUERY_KEY.fetchSpecificRuntimeConfigs],(function(){return oH.fetchSpecificRuntimeConfigs(Wr,[Yr.SHOW_QUERIES_VIEW,Yr.SHOW_TOPK_METRICS_VIEW,Yr.SHOW_DB_CLUSTER_LOAD_VIEW],M)}),{onSuccess:function(e){var t,n,r,i="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===Yr.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value),o=(null===(n=null==e?void 0:e.find((function(e){return e.path===Yr.SHOW_QUERIES_VIEW})))||void 0===n||n.value,"true"===(null===(r=null==e?void 0:e.find((function(e){return e.path===Yr.SHOW_DB_CLUSTER_LOAD_VIEW})))||void 0===r?void 0:r.value));re(it(0,!!i)),ge(Object.values(exports.ClusterLoadSubTabs).filter((function(e){return o?Object.values(exports.ClusterLoadSubTabs):e!==exports.ClusterLoadSubTabs.LOAD_BY_DATABASE})))},onError:function(){re(it(0,!1)),ge(Object.values(exports.ClusterLoadSubTabs).filter((function(e){return e!==exports.ClusterLoadSubTabs.LOAD_BY_DATABASE})))}}),t.useEffect((function(){xe===exports.AnomalyDetectionStatusText.SUCCESS&&st.refetch()}),[xe]),t.useEffect((function(){(X===exports.InsightsTabs.CLUSTER_LOAD&&le===exports.ClusterLoadOverallTabs.ANOMALIES||X===exports.InsightsTabs.INSIGHTS)&&st.refetch()}),[null==_?void 0:_.toISOString(),null==b?void 0:b.toISOString(),X,Ne,Pe,Ue,Ve]),t.useEffect((function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search),n=t.get("tab");if(e.includes("/".concat(_r.CLUSTER_LOAD))||n===_r.CLUSTER_LOAD)if($(exports.InsightsTabs.CLUSTER_LOAD),N(exports.InsightsTabs.CLUSTER_LOAD),S===exports.AppName.YBA)t.set("subTab",de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE?_r.CLUSTER_LOAD_DB:_r.OVERALL_LOAD),window.history.replaceState(null,"","".concat(e,"?").concat(t.toString()));else{if(e.includes("/".concat(_r.CLUSTER_LOAD_DB)))return void pe(exports.ClusterLoadSubTabs.LOAD_BY_DATABASE);pe(exports.ClusterLoadSubTabs.OVERALL_LOAD);var r=e.endsWith("/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.ANOMALIES));if(ue(r?exports.ClusterLoadOverallTabs.ANOMALIES:exports.ClusterLoadOverallTabs.QUERIES),e.endsWith("/".concat(_r.CLUSTER_LOAD))||e.endsWith("/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD))){var i=new URLSearchParams(window.location.search).toString(),o=e.replace(new RegExp("/".concat(_r.CLUSTER_LOAD,"(/").concat(_r.OVERALL_LOAD,")?$")),""),a="".concat(o,"/").concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.QUERIES).concat(i?"?".concat(i):"");window.history.replaceState(null,"",a)}}else if(e.includes("/".concat(_r.METRICS))||n===_r.METRICS)$(exports.InsightsTabs.METRICS),N(exports.InsightsTabs.METRICS);else if(e.includes("/".concat(_r.INSIGHTS))||n===_r.INSIGHTS)$(exports.InsightsTabs.INSIGHTS),N(exports.InsightsTabs.INSIGHTS);else if(S!==exports.AppName.YBA){i=new URLSearchParams(window.location.search).toString(),a="".concat(e,"/").concat(_r.QUERIES).concat(i?"?".concat(i):"");window.history.replaceState(null,"",a)}}),[]);var ut=function(e,t){t!==de&&pe(t)};t.useEffect((function(){if(X===exports.InsightsTabs.CLUSTER_LOAD)if(S===exports.AppName.YBA){var e=window.location.pathname;(t=new URLSearchParams(window.location.search)).set("subTab",de===exports.ClusterLoadSubTabs.OVERALL_LOAD?_r.OVERALL_LOAD:_r.CLUSTER_LOAD_DB),window.history.replaceState(null,"","".concat(e,"?").concat(t.toString()))}else{var t,n=window.location.pathname,r=(t=new URLSearchParams(window.location.search)).toString();n=n.replace(/\/(clusterLoad(\/(overallLoad|dbLoad)(\/(anomalies|queries))?)?)$/,"");var i="";de===exports.ClusterLoadSubTabs.OVERALL_LOAD?i=le===exports.ClusterLoadOverallTabs.ANOMALIES?"/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.ANOMALIES):"/".concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.QUERIES):de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&(i="/".concat(_r.CLUSTER_LOAD,"/").concat(_r.CLUSTER_LOAD_DB)),(n="".concat(n).concat(i).concat(r?"?".concat(r):""))!==window.location.pathname+(r?"?".concat(r):"")&&window.history.replaceState(null,"",n)}}),[le,de]);var ct=function(t){switch(t){case exports.InsightsTabs.METRICS:return e.jsx(r.Box,{mt:1});case exports.InsightsTabs.INSIGHTS:return e.jsx(r.Box,{mt:.5});case exports.InsightsTabs.CLUSTER_LOAD:return e.jsx(r.Box,B({ml:S===exports.AppName.WEB?4:0},{children:e.jsx(r.Box,B({display:"flex",alignItems:"center",className:U.tabsContainer,style:{borderBottom:"1px solid #E9EEF2"}},{children:e.jsx(o.YBTabs,B({value:de,onChange:ut},{children:fe.map((function(t,n){return e.jsx(sq,{"data-testid":"".concat(t,"ClusterLoadSubTab"),value:t,label:t},n)}))}))}))}));default:return null}},dt=function(){return{universeUuid:w,cluster:Ne,region:Pe,zone:Ue,node:Ve,metricMeasure:Ge,numNodes:tt,outlierType:Ke,formattedStartDate:_,formattedEndDate:b}},pt=function(e){Je(e)},ht=function(e){nt(e>10?10:e)},ft=X===exports.InsightsTabs.METRICS,gt=X!==exports.InsightsTabs.METRICS;return e.jsxs(r.Box,B({className:H(S===exports.AppName.WEB?U.tabBox:void 0)},{children:[S===exports.AppName.WEB&&e.jsx(r.Box,{children:e.jsxs(m.TabContext,B({value:X},{children:[e.jsx(r.Box,B({display:"flex",alignItems:"center",className:U.tabsContainer},{children:e.jsx(o.YBTabs,B({value:X,onChange:function(e,t){if(t!==X){$(t),N(t),pe(exports.ClusterLoadSubTabs.OVERALL_LOAD);var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();n=n.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),t===exports.InsightsTabs.METRICS?n="".concat(n,"/").concat(_r.METRICS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.INSIGHTS?n="".concat(n,"/").concat(_r.INSIGHTS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.CLUSTER_LOAD&&(n="".concat(n,"/").concat(_r.CLUSTER_LOAD,"/").concat(_r.OVERALL_LOAD,"/").concat(_r.QUERIES).concat(r?"?".concat(r):"")),window.history.pushState(null,"",n)}}},{children:ne.map((function(t,n){return e.jsx(o.YBTab,{"data-testid":"".concat(t,"Tab"),value:t,label:t,className:U.tabButton},n)}))}))})),e.jsx(m.TabPanel,B({className:z.tabPanelPrimary,value:exports.InsightsTabs.METRICS},{children:ct(exports.InsightsTabs.METRICS)})),e.jsx(m.TabPanel,B({className:z.tabPanelPrimary,value:exports.InsightsTabs.CLUSTER_LOAD},{children:ct(exports.InsightsTabs.CLUSTER_LOAD)}))]}))}),(S===exports.AppName.YBM||S===exports.AppName.YBA)&&e.jsx(e.Fragment,{children:ct(X)}),e.jsx(r.Box,B({mt:2},{children:e.jsx(kl,{appName:S,filterDuration:T,startDateTime:_,endDateTime:b,timezone:C,isDrilldownView:!1,isClusterLoadView:X===exports.InsightsTabs.CLUSTER_LOAD,isTopKMetricsView:X===exports.InsightsTabs.METRICS,onSelectedFilterDuration:F,metricMeasure:Ge,onStartDateChange:L,onEndDateChange:P,onRefresh:j})})),de!==exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&e.jsx(r.Box,B({mt:2,ml:S===exports.AppName.WEB&&X===exports.InsightsTabs.CLUSTER_LOAD?4:0},{children:e.jsx(Ta,{appName:S,universeData:A,clusterRegionItem:Te,zoneNodeItem:Ee,isPrimaryCluster:Oe,cluster:Ne,region:Pe,metricMeasure:Ge,outlierType:Ke,numNodes:tt,isDrilldownView:!1,anomalyData:null,queryType:Ze,showSplitSelector:ft,showQueryTypeSelector:gt,onZoneNodeSelected:function(e,t,n){n===Sr&&(Ie(Sr),ze(wr),We(wr)),(e||t)&&(Ie(n),e&&(ze(n),We("")),t&&(ze(""),We(n)))},onClusterRegionSelected:function(e,t,n,r){ke(r),n===br&&(Me(br),Le(wr),je(wr)),(e||t)&&(Me(n),e&&(Le(n),je("")),t&&(je(n),Le("")))},onOutlierTypeSelected:pt,onSplitTypeSelected:function(e){qe(e)},onNumNodesChanged:ht,onQueryTypeSelected:function(e){Xe(e)}})})),X===exports.InsightsTabs.METRICS&&e.jsx(rq,{universeUuid:w,appName:S,timezone:C,apiUrl:M,onEChartsDateSelect:O,getClusterDetails:dt}),X===exports.InsightsTabs.CLUSTER_LOAD&&de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&e.jsxs(r.Box,B({mt:2,ml:S===exports.AppName.WEB?4:0},{children:[de===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE&&e.jsx(aq,{outlierType:Ke,numNodes:tt,onOutlierTypeSelected:pt,onNumNodesChanged:ht,onChangeDbWaitEventType:function(e){Se(e)}}),e.jsx(KG,{dbWaitEventType:we,isDbClusterLoadView:!0,startTime:null!==(u=null==_?void 0:_.toISOString())&&void 0!==u?u:null,endTime:null!==(c=null==b?void 0:b.toISOString())&&void 0!==c?c:null,apiUrl:M,universeUuid:w,appName:S,metricKey:"cluster_load",groupByOperation:oe,shouldAbbreviateTraceName:!0,timezone:C,isAshEnabled:E,isAshSupported:I,onFilterBarData:rt,onSetGroupByOperation:ot,onEChartsDateSelect:O,getClusterDetails:dt})]})),X===exports.InsightsTabs.CLUSTER_LOAD&&de===exports.ClusterLoadSubTabs.OVERALL_LOAD&&e.jsxs(r.Box,B({ml:S===exports.AppName.WEB?4:0},{children:[e.jsx(KG,{dbWaitEventType:we,isDbClusterLoadView:!1,startTime:null!==(d=null==_?void 0:_.toISOString())&&void 0!==d?d:null,endTime:null!==(p=null==b?void 0:b.toISOString())&&void 0!==p?p:null,apiUrl:M,universeUuid:w,appName:S,metricKey:"cluster_load",groupByOperation:oe,shouldAbbreviateTraceName:!0,timezone:C,isAshEnabled:E,isAshSupported:I,onFilterBarData:rt,onSetGroupByOperation:ot,onEChartsDateSelect:O,getClusterDetails:dt}),e.jsx(r.Box,B({display:"flex",alignItems:"center",className:U.tabsContainer,mt:5},{children:e.jsxs(o.YBTabs,B({pill:!0,value:le,onChange:function(e,t){t!==le&&ue(t)}},{children:[e.jsx(sq,{icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.5 4.5C4.237 4.5 3.214 5.523 3.214 6.786V11.357L1 12.5L3.214 13.643V18.214C3.214 19.477 4.237 20.5 5.5 20.5' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M18.4995 4.47221C19.7625 4.47221 20.7855 5.49521 20.7855 6.75821V11.3292L22.9995 12.4722L20.7855 13.6152V18.1862C20.7855 19.4492 19.7625 20.4722 18.4995 20.4722' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3crect x='7' y='14.5' width='2' height='3' rx='0.5' fill='%230B1117'/%3e%3crect x='11' y='11.5' width='2' height='6' rx='0.5' fill='%230B1117'/%3e%3crect x='15' y='7.5' width='2' height='10' rx='0.5' fill='%230B1117'/%3e%3c/svg%3e",alt:"Queries Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadOverallTabs.QUERIES,label:exports.ClusterLoadOverallTabs.QUERIES}),e.jsx(sq,{icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='5.94943' cy='5.62132' r='2' transform='rotate(-135 5.94943 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='8.94943' cy='12.6213' r='2' transform='rotate(-135 8.94943 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='11.9494' cy='19.6213' r='2' transform='rotate(-135 11.9494 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='13.1916' cy='5.62132' r='2' transform='rotate(-135 13.1916 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='16.1916' cy='12.6213' r='2' transform='rotate(-135 16.1916 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='19.1916' cy='19.6213' r='2' transform='rotate(-135 19.1916 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='4.12131' cy='19.6213' r='2' transform='rotate(-135 4.12131 19.6213)' fill='%230B1117' stroke='%230B1117'/%3e%3c/svg%3e",alt:"Anomalies Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadOverallTabs.ANOMALIES,label:exports.ClusterLoadOverallTabs.ANOMALIES})]}))})),le===exports.ClusterLoadOverallTabs.QUERIES&&e.jsx(r.Box,{children:e.jsx(UG,{universeUuid:w,groupByOperation:oe,apiUrl:M,startTime:null!==(h=null==_?void 0:_.toISOString())&&void 0!==h?h:null,endTime:null!==(f=null==b?void 0:b.toISOString())&&void 0!==f?f:null,appName:S,filteredLegends:W,queryType:Ze,onSelectedQuery:R,getClusterDetails:dt})}),le===exports.ClusterLoadOverallTabs.ANOMALIES&&e.jsx(r.Box,B({className:z.noteTextContainer},{children:e.jsxs(r.Typography,B({variant:"body2",className:z.noteText},{children:[e.jsx(r.Typography,B({variant:"body2",className:H(z.noteText,z.noteTextBold)},{children:"Note!"})),"Only the time window filter applies to this view."]}))}))]})),(X===exports.InsightsTabs.INSIGHTS||X===exports.InsightsTabs.CLUSTER_LOAD&&de===exports.ClusterLoadSubTabs.OVERALL_LOAD&&le===exports.ClusterLoadOverallTabs.ANOMALIES)&&e.jsxs(r.Box,B({mt:3,className:z.dataBox,ml:S===exports.AppName.WEB&&X===exports.InsightsTabs.CLUSTER_LOAD?4:0},{children:[e.jsxs(r.Box,B({display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},{children:[e.jsx(r.Box,B({display:"flex",flexDirection:"column"},{children:e.jsx(r.Box,{children:e.jsx(r.Typography,B({variant:"h5"},{children:X===exports.InsightsTabs.INSIGHTS?"Insights":"Detected Anomalies"}))})})),e.jsxs(r.Box,B({className:U.runDetectionButtonContainer},{children:[e.jsx(o.YBButton,B({variant:S===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx("img",{src:J?"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Expand Icon"}),onClick:function(){ee(!J)},dataTestId:"expand-all-button"},{children:e.jsx("span",B({className:U.expandAllButton},{children:J?"Collapse All":"Expand All"}))})),e.jsx(o.YBButton,B({variant:"primary",size:"medium",dataTestId:"run-detection-button",onClick:function(){at.mutate()},disabled:xe===exports.AnomalyDetectionStatusText.SCHEDULED||xe===exports.AnomalyDetectionStatusText.IN_PROGRESS,showSpinner:xe===exports.AnomalyDetectionStatusText.SCHEDULED||xe===exports.AnomalyDetectionStatusText.IN_PROGRESS,startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",alt:"Detection Icon"})},{children:"Run Detection"}))]})),st.isLoading&&e.jsx(r.Box,B({mt:2,className:z.loadingBox},{children:e.jsx(sH,{className:H(z.icon,z.inProgressIcon)})})),st.isError&&e.jsxs(r.Box,B({mt:2},{children:[(S===exports.AppName.YBA||S===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(lt)?lt:_i.ANOMALIES_FETCH_ERROR}),S===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(lt)?lt:_i.ANOMALIES_FETCH_ERROR})]}))]})),st.isSuccess&&(Qi(null==q?void 0:q.groups)?e.jsx(uH,{name:"gant-chart-insights",sourceData:null!=q?q:[],expandAll:J,showMoreOptions:!0,onClickShowMoreAnomalies:D,startTime:null!==(g=null==_?void 0:_.toISOString())&&void 0!==g?g:null,endTime:null!==(v=null==b?void 0:b.toISOString())&&void 0!==v?v:null,onSelectedIssue:k,appName:S,currentTab:X,isInsightsTab:X===exports.InsightsTabs.INSIGHTS},"gant-chart-insights"):e.jsx(r.Box,B({mt:2},{children:"No Anomalies were detected"})))]}))]}))},cq=r.makeStyles((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),dq=function(i){var a,s,l,u,c,d=i.showMoreAnomalyCategory,p=i.selectedTab,h=i.startTime,f=i.endTime,g=i.apiUrl,m=i.universeUuid,y=i.appName,x=i.onClickShowMoreAnomalies,_=i.onSelectedIssue,b=cq(),w=wi(),S=t.useState(null),C=S[0],T=S[1],M=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsByType,h,f],(function(){return oH.fetchAnomalyGroupsByType(m,h,f,d,g)}),{onSuccess:function(e){T(e)}}),A=null===(l=null===(s=null===(a=null==M?void 0:M.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return e.jsxs(r.Box,B({className:b.tabBox},{children:[e.jsxs(r.Breadcrumbs,B({className:w.breadCrumb,separator:e.jsx(r.Typography,B({variant:"body2"},{children:"/"})),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e.jsx(r.Link,B({className:w.breadcrumbColor,component:LV,variant:"h5",onClick:function(){x(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e.jsx("span",B({className:w.breadCrumbText},{children:p===exports.InsightsTabs.CLUSTER_LOAD?"Anomalies":"Insights"}))})),e.jsx(r.Typography,B({variant:"h5"},{children:e.jsx("span",B({className:H(w.breadCrumbText,w.anomalyCategoryText)},{children:"".concat(null===(c=null===(u=null==C?void 0:C[0])||void 0===u?void 0:u.lastInstance)||void 0===c?void 0:c.title)||"".concat(Gr[d])}))}))]})),e.jsxs(r.Box,B({mt:3},{children:[M.isLoading&&e.jsx(r.Box,{children:e.jsx(sH,{className:H(w.icon,w.inProgressIcon)})}),M.isError&&e.jsxs(r.Box,B({mt:3},{children:[(y===exports.AppName.YBA||y===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(A)?A:_i.SHOW_MORE_ANOMALIES_FETCH_ERROR}),y===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(A)?A:_i.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),M.isSuccess&&(qi(C)?e.jsxs(r.Box,{children:[e.jsxs(r.Box,B({display:"flex",alignItems:"center",mb:2,style:{marginLeft:"12px"},onClick:function(){if(qi(C)){var e=null==C?void 0:C.map((function(e){var t;return null===(t=e.lastInstance)||void 0===t?void 0:t.entityDisplayName})).filter(Boolean).join("\n");navigator.clipboard.writeText(e)}}},{children:[e.jsx(v.FileCopy,{style:{cursor:"pointer",height:16,width:16}}),e.jsx(r.Typography,B({variant:"body2",style:{marginLeft:8,textDecoration:"underline",cursor:"pointer"}},{children:"Copy all entities"}))]})),e.jsx(uH,{name:"gant-chart-show-more-anomalies",sourceData:null!=C?C:[],showMoreOptions:!1,expandAll:!0,startTime:h,endTime:f,onSelectedIssue:_,appName:y,viewAllAnomalies:!0},"gant-chart-show-more-anomalies")]}):e.jsx(r.Box,{children:"No Anomalies were detected"}))]}))]}))},pq=i.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),hq=function(t){var i=t.data,a=t.open,s=t.apiUrl,l=t.onClose,u=t.onActionPerformed,c=pq(),d=n.useMutation((function(){return oH.deleteUniverseMetadata(i.id,s)}),{onSuccess:function(){JY.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),u(),l()},onError:function(e){var t,n,r;JY.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Not able to remove universe, please try again")}});return e.jsx(o.YBModal,B({open:a,onClose:l,title:"Remove Universe",onSubmit:function(){return j(void 0,void 0,void 0,(function(){return F(this,(function(e){return d.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(r.Box,B({mt:2},{children:e.jsx(r.Typography,B({variant:"body2"},{children:"Are you sure you want to remove the universe ".concat(i.id," from Perf Advisor service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(GG||(GG={}));var fq=i.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},tagGreen:{backgroundColor:"#CDEFE1"},tagRed:{backgroundColor:"#FDE2E2"},tagTextGreen:{color:"#097245"},tagTextRed:{color:"#8F0000"},statusText:{fontFamily:"Inter",fontStyle:"normal",fontSize:"13px"},statusBox:{display:"flex",flexDirection:"row",alignItems:"center",height:"24px",borderRadius:"6px",padding:"10px 6px",width:"fit-content"},flexColumn:{display:"flex",flexDirection:"row"},tooltip:{marginLeft:e.spacing(.5)}}})),gq=function(n){var i=n.metadata,a=n.apiUrl;n.customerUuid;var s=n.universeList,l=n.onActionPerformed,u=fq(),c=wi(),d=t.useState(!1),p=d[0],h=d[1],f=t.useState([]),g=f[0],m=f[1],v=t.useState(Hr[0]),y=v[0],x=v[1],_=t.useState(""),b=_[0],w=_[1],S=t.useState(0),C=S[0],T=S[1],M=t.useState(null),A=M[0],E=M[1],I=t.useState(i),D=I[0],O=I[1];return t.useEffect((function(){var e=i.map((function(e){var t,n=s.find((function(t){return e.id===t.universeUUID}));return e.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",e.lastSyncError=null==n?void 0:n.lastSyncError,e}));O(e)}),[s,i]),t.useEffect((function(){m([{name:"id",label:"Universe UUID",options:{sort:!0,display:!0}},{name:"name",label:"Universe Name",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:H(c.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=D[r],o=null==i?void 0:i.id;return e.jsx("a",B({href:"/universes/".concat(o,"/perfAdvisor?tab=").concat(_r.ANOMALIES)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:H(c.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"lastSyncError",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:H(c.tableHeaderCell)}},customBodyRender:function(t){return e.jsx(e.Fragment,{children:t?e.jsxs(r.Box,B({className:u.flexColumn},{children:[e.jsx(r.Box,B({className:H(u.tagRed,u.statusBox)},{children:e.jsx("span",B({className:H(u.tagTextRed,u.statusText)},{children:GG.INACTIVE}))})),e.jsx(r.Tooltip,B({title:t,arrow:!0,placement:"top",className:u.tooltip},{children:e.jsx("img",{src:bG,alt:"info"})}))]})):e.jsx(r.Box,B({className:H(u.tagGreen,u.statusBox)},{children:e.jsx("span",B({className:H(u.tagTextGreen,u.statusText)},{children:GG.ACTIVE}))}))})}}},{name:"",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:H(c.tableHeaderCell)}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx(o.YBButton,B({size:"medium",variant:"ghost",dataTestId:"UniverseListMetadata-unregisterButton",onClick:function(){return e=D[i],E(e),void h(!0);var e}},{children:"Unregister"}))})}}}])}),[D]),e.jsxs(r.Box,B({mt:2,className:u.overrideMuiTableContainer},{children:[qi(D)&&qi(g)&&e.jsx(r.Box,B({mt:2},{children:e.jsx(o.YBTable,{title:"Universe Metadata",className:c.overrideMuiTable,dataTestId:"UniverseListMetadata-Table",data:D,columns:g,options:{filter:!0,search:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:y,page:C,onChangePage:function(e){return T(e)},onChangeRowsPerPage:function(e){x(e),T(0)},rowsPerPageOptions:Hr,globalFilterFn:"includesString",state:{globalFilter:b,pagination:{pageIndex:C,pageSize:y}},onGlobalFilterChange:w}})})),p&&A&&e.jsx(hq,{onActionPerformed:l,open:p,onClose:function(){h(!1)},data:A,apiUrl:a})]}))},mq=i.makeStyles((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),vq=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),yq=function(t){var i=t.data,a=t.open,s=t.apiUrl,l=t.onClose,u=t.onActionPerformed,c=t.toast,d=vq(),p=n.useMutation((function(){return oH.deleteRuntimeConfig(Wr,null==i?void 0:i.path,s)}),{onSuccess:function(){c.success("Have reset runtime configuration key ".concat(i.path," successfully")),u(),l()},onError:function(e){var t,n,r;c.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot reset runtime configuration key, please try again")}});return e.jsx(o.YBModal,B({open:a,onClose:l,title:"Reset Runtime Configuration",onSubmit:function(){return j(void 0,void 0,void 0,(function(){return F(this,(function(e){return p.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:d.root,dividers:!0}},{children:e.jsx(r.Box,B({mt:2},{children:e.jsx(r.Typography,B({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(i.path," ?")}))}))}))},xq=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),_q=function(t){var i=t.data,a=t.open,s=t.apiUrl,l=t.onClose,u=t.onActionPerformed,c=t.toast,d=xq(),p=Vn({defaultValues:{configValue:(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL?"true"===i.value:i.value},mode:"onChange",reValidateMode:"onChange"}),h=p.control,f=p.handleSubmit,g=n.useMutation((function(e){return oH.updateRuntimeConfig(Wr,null==i?void 0:i.path,e.configValue?e.configValue.toString():i.value.toString(),s)}),{onSuccess:function(){c.success("Updated runtime configuration key ".concat(i.path," successfully")),u(),l()},onError:function(e){var t,n,r;c.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot update runtime configuration key, please try again")}}),m=f((function(e){var t={configValue:""};Object.assign(t,i),t.configValue=e.configValue,g.mutate(t)}));return e.jsx(o.YBModal,B({open:a,onClose:l,title:"Update Runtime Configuration",onSubmit:m,cancelLabel:"Cancel",submitLabel:"Update",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:d.root,dividers:!0}},{children:e.jsx(Wt,B({},p,{children:e.jsxs(r.Box,B({mt:2},{children:[e.jsx(o.YBLabel,{children:"Config Key "}),e.jsx(r.Typography,B({variant:"body2"},{children:i.path})),e.jsxs(r.Box,B({mt:1},{children:[e.jsx(o.YBLabel,{children:"Config Value "}),(null==i?void 0:i.type)!==exports.RuntimeConfigType.BOOL&&e.jsx(Zn,{style:{marginTop:"8px"},name:"configValue",control:h,fullWidth:!0,dataTestId:"UpdateRuntimeConfig-ConfigValue"}),(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL&&e.jsx(Ti,{name:"configValue",control:h,dataTestId:"UpdateRuntimeConfig-ConfigValue"})]}))]}))}))}))},bq=r.makeStyles((function(e){return{overrideMuiTableContainer:{"& .yb-MuiTableContainer-root":{width:"100% !important",minHeight:"fit-content",marginTop:"3px"}},overrideMuiTable:{textAlign:"center","& .yb-MuiTableCell-sizeSmall":{textAlign:"center"}},tooltip:{marginLeft:e.spacing(.5)},textColor:{color:"#303A78"},searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"}}}));exports.ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE="active_session_history_eps_client_node",exports.ACTIVE_SESSION_HISTORY_EPS_GLOBAL=Dr,exports.ACTIVE_SESSION_HISTORY_QUERY_EVENTS=Or,exports.ALL=wr,exports.ALL_REGIONS=br,exports.ALL_ZONES=Sr,exports.ANOMALY_CATEGORY_LIST=Vr,exports.ANOMALY_FILTER_DURATION_OPTIONS=$r,exports.ANOMALY_TAG=oi,exports.ANOMALY_TYPE_TO_NAME_MAP=Gr,exports.ASH=Cr,exports.ASH_GROUPBY_VALUES=zr,exports.Aggregation=sr,exports.BACKGROUND_QUERY_REQUEST_GRAPHS=Fr,exports.CATALOG_READ_REQUEST_GRAPH=Ur,exports.CATEGORY_HEADER_DATA_MAP=Jr,exports.COLORS=yi,exports.CORES=Tr,exports.CPU_CORES=Er,exports.CPU_COUNT=kr,exports.CQL_QUERY_REQUEST_GRAPHS=jr,exports.ClusterRegionSelector=io,exports.ConfigureUniverseMetadata=function(i){var a=i.apiUrl,s=i.customerUuid,l=i.appName,u=void 0===l?exports.AppName.WEB:l,c=mq(),d=wi(),p=t.useState([]),h=p[0],f=p[1],g=t.useState([]),m=g[0],v=g[1],y=n.useQueryClient(),x=n.useQuery(exports.QUERY_KEY.fetchUniverseMetadataList,(function(){return oH.fetchUniverseMetadataList(a,s)}),{onSuccess:function(e){f(e)}}),_=x.isIdle,b=x.isLoading,w=x.isError,S=x.refetch,C=n.useQuery(exports.QUERY_KEY.fetchUniverseListDetails,(function(){return oH.fetchUniverseListDetails(a)}),{onSuccess:function(e){v(e)}}),T=C.isIdle,M=C.isLoading,A=C.isError,E=C.refetch;if((w||A)&&e.jsx(mt,{customErrorMessage:"Unable to fetch ".concat(u===exports.AppName.YBM?"cluster":"universe"," details")}),b||M||_&&void 0===h||T&&void 0===m)return e.jsx(r.Box,B({mt:4,className:d.loadingBox},{children:e.jsx(sH,{className:H(d.icon,d.inProgressIcon)})}));var I=function(){j(void 0,void 0,void 0,(function(){return F(this,(function(e){switch(e.label){case 0:return y.invalidateQueries(exports.QUERY_KEY.fetchUniverseMetadataList),y.invalidateQueries(exports.QUERY_KEY.fetchUniverseListDetails),[4,S()];case 1:return e.sent(),[4,E()];case 2:return e.sent(),[2]}}))}))};return e.jsx(Jn,{body:e.jsxs(r.Box,B({ml:1,mr:1,mt:1,className:c.flexColumn},{children:[e.jsx(o.YBButton,B({variant:"secondary",size:"medium",onClick:function(){I()},className:c.refreshButton,dataTestId:"ConfigureUniverseMetadata-refreshButton"},{children:"Refresh"})),Zi(a)&&h.length>0?e.jsx(e.Fragment,{children:e.jsx(r.Box,B({mt:2},{children:e.jsx(gq,{apiUrl:a,customerUuid:s,metadata:h,universeList:m,onActionPerformed:I})}))}):e.jsx(r.Box,B({className:c.noUniverses},{children:Zi(a)?"Currently, there are no universes attached to Perf Advisor service":"Customer is not registered with Perf Advisor service. Please register and then enable Perf Advisor for universes."}))]}))})},exports.DB_CAPS_TAG_=ei,exports.DB_TAG=ni,exports.DEFAULT_ERROR_MESSAGES=_i,exports.DEFAULT_RECORDS_PER_PAGE=Hr,exports.ELLIPSIS="...",exports.GLOBAL_RUNTIME_CONFIG=Wr,exports.GROUP_BY_OPERATIONS=vr,exports.GroupEventsParam=rr,exports.IN_DEVELOPMENT_MODE=Yz,exports.MAX_OUTLIER_NUM_NODES=10,exports.METRICS_OUTLIER_DATABASES_STORAGE_KEY=vi,exports.METRICS_OUTLIER_TABLES_STORAGE_KEY=mi,exports.METRICS_SESSION_STORAGE_KEY=gi,exports.METRIC_DB_RESOURCES_WITH_GRAPHS=di,exports.METRIC_FONT=Ar,exports.METRIC_NAMES=fi,exports.METRIC_RESOURCES_WITH_GRAPHS=pi,exports.METRIC_TABLES_RESOURCES_WITH_GRAPHS=ci,exports.METRIC_TABS=si,exports.METRIC_TABS_DATABASES=ui,exports.METRIC_TABS_TABLES=li,exports.MIN_OUTLIER_NUM_NODES=3,exports.MORE=qr,exports.MetricConsts=Ir,exports.MetricOrigin={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},exports.MetricSplitSelector=Mi,exports.MetricsAnalysisEntry=function(i){var a,s,l,u=i.universeUuid,c=i.troubleshootUuid,d=i.appName,p=i.timezone,h=i.apiUrl,f=i.onSelectedIssue,g=i.onSelectedQuery,m=wi(),v=t.useState(null),y=v[0],x=v[1],_=t.useState(null),b=_[0],w=_[1],S=t.useState(null),C=S[0],T=S[1],M=t.useState(null),A=M[0],E=M[1],I=t.useState(null),D=I[0],O=I[1],k=new URLSearchParams(window.location.search),R=window.location.pathname,N=null;if(R.includes("/queries/")){var L=R.split("/"),P=L.indexOf("queries");N=L[P+1]||null}d!==exports.AppName.YBM&&d!==exports.AppName.YBA||(N=k.get("queryId"));var j=k.get("dbId"),F=k.get("userId"),z=Zi(N);t.useEffect((function(){localStorage.setItem("appName",d)}),[]);var V=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return oH.fetchUniverseById(u,h)})),W=null===(l=null===(s=null===(a=null==V?void 0:V.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,Y=n.useQuery([exports.QUERY_KEY.fetchAnomalies,u],(function(){return oH.fetchAnomaliesById(u,c,h)}),{onSuccess:function(e){x(e),w(function(e){var t,n=null==e?void 0:e.mainGraphs.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n})),r=null===(t=null==e?void 0:e.rcaGuidelines)||void 0===t?void 0:t.map((function(t){var n;return null===(n=t.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(t){var n;return null===(n=t.supportingGraphs)||void 0===n?void 0:n.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n}))}))})),i=null==r?void 0:r.flat(2),o=null==i?void 0:i.filter((function(e){return Qi(e)}));return U(U([],n,!0),o,!0)}(e)),T(function(e){var t,n;if(sa=0,!e)return[];var r=null===(t=null==e?void 0:e.mainGraphs)||void 0===t?void 0:t.length,i=null===(n=null==e?void 0:e.rcaGuidelines)||void 0===n?void 0:n.map((function(e,t){var n,i={cause:"",name:[],groupByControl:[],description:"",index:[],rcaRecommendation:"",title:void 0};return i.name=[],i.groupByControl=[],i.cause=e.possibleCause,i.description=e.possibleCauseDescription,null===(n=e.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(e){var t;return e.supportingGraphs?null===(t=e.supportingGraphs)||void 0===t?void 0:t.map((function(t){return i.name.push(t.name),i.rcaRecommendation=e.recommendation,1===r?i.index.push(fa()):r>1&&i.index.push(fa()+r-1),i.title=t.displayName,i.groupByControl.push(t.groupByControl),i})):i}))})),o=null==i?void 0:i.flat(2),a=new Set(o);return Array.from(a)}(e))},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!z&&Zi(c)}),G=Y.isLoading,q=Y.isError,Q=Y.isIdle,Z=n.useQuery([exports.QUERY_KEY.fetchQueries,u],(function(){return oH.fetchQueries(u,h,{dbId:j,userId:F,queryId:N})}),{onSuccess:function(e){E(e)},onError:function(e){E([]),console.error("Failed to fetch queries",e)}}),X=Z.isLoading,$=Z.isError,K=n.useQuery([exports.QUERY_KEY.fetchQueryStats,u],(function(){return oH.fetchQueryStats(u,{dbId:j,queryId:N},h)}),{onSuccess:function(e){O([e])},onError:function(e){O([]),console.error("Failed to fetch query stats",e)},enabled:z}),J=K.isLoading,ee=K.isError;return G||J||X?e.jsx(r.Box,B({mt:2,className:m.loadingBox},{children:e.jsx(sH,{className:H(m.icon,m.inProgressIcon)})})):q||ee||$||W||Q&&void 0===y?e.jsxs(r.Box,B({mt:3},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:q?_i.ANOMALIES_FETCH_ERROR:_i.QUERY_STATS_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:q?_i.ANOMALIES_FETCH_ERROR:_i.QUERY_STATS_FETCH_ERROR})]})):e.jsx(yY,B({appName:d},{children:e.jsx(r.Box,{children:A&&(null==V?void 0:V.data)&&e.jsx(mY,{apiUrl:h,troubleshootUuid:c,anomalyData:y,universeData:null==V?void 0:V.data,universeUuid:u,appName:d,timezone:p,isHistoricalQueryView:z,amomalyGraphRequestParams:b,formattedAnomalyRca:C,universeQueryData:A,universeQueryStatsData:D,queryIdParam:N,onSelectedIssue:f,onSelectedQuery:g})})}))},exports.NAME_COLOR_MAPPING=xi,exports.OutlierSelector=Ii,exports.PerfAdvisorAPI=oH,exports.PerfAdvisorEntry=function(i){var a,s,l,u,c,d,p,h,f,g,m=i.timezone,v=i.universeUuid,y=i.appName,x=i.apiUrl,_=i.onSelectedIssue,b=i.onSelectedQuery,w=wi(),S=new URLSearchParams(window.location.search),C=null==S?void 0:S.get("endTime"),T=C?new Date(C):new Date,M=new Date(T);(null==S?void 0:S.get("startTime"))?M=new Date(S.get("startTime")):M.setDate(M.getDate()-1);var A=null==S?void 0:S.get("duration"),E=t.useState(null!=A?A:$r[0].value),I=E[0],D=E[1],O=t.useState((function(){return Ca(I,T,M)})),k=O[0],R=O[1];t.useEffect((function(){localStorage.setItem("appName",y)}),[]);var N=t.useState(null),L=N[0],P=N[1],j=t.useState(exports.InsightsTabs.CLUSTER_LOAD),F=j[0],U=j[1],z=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return oH.fetchUniverseById(v,x)})),V=n.useQuery(exports.QUERY_KEY.getUniverseMetadata,(function(){return oH.getUniverseMetadata(v,x)})),W=null===(l=null===(s=null===(a=null==z?void 0:z.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error,Y=null===(d=null===(c=null===(u=null==V?void 0:V.error)||void 0===u?void 0:u.response)||void 0===c?void 0:c.data)||void 0===d?void 0:d.error,G=null===(p=null==z?void 0:z.data)||void 0===p?void 0:p.ashEnabled,q=null===(h=null==z?void 0:z.data)||void 0===h?void 0:h.ashSupported,Q=function(e){P(e)},Z=function(){if(I!==Xr.CUSTOM){var e=Sa(I,T),t=e.formattedStartDate,n=e.formattedEndDate;R({startDateTime:t,endDateTime:n})}};t.useEffect((function(){Z()}),[I]),t.useEffect((function(){A&&Zi(A)&&Z()}),[]);return e.jsx(yY,B({appName:y},{children:e.jsxs(r.Box,{children:[V.isLoading||z.isLoading&&e.jsx(r.Box,B({mt:2,className:w.loadingBox},{children:e.jsx(sH,{className:H(w.icon,w.inProgressIcon)})})),V.isError||z.isError&&e.jsxs(r.Box,B({mt:2},{children:[(y===exports.AppName.YBA||y===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:V.isError?Zi(Y)?Y:_i.UNIVERSE_PA_STATUS_ERROR:Zi(W)?W:_i.UNIVERSE_DETAILS_ERROR}),y===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:V.isError?Zi(Y)?Y:_i.UNIVERSE_PA_STATUS_ERROR:Zi(W)?W:_i.UNIVERSE_DETAILS_ERROR})]})),z.isSuccess&&e.jsx(e.Fragment,{children:e.jsxs(r.Box,B({className:H(y!=exports.AppName.WEB&&w.headerContainerYBM)},{children:[!L&&e.jsx(r.Box,{children:e.jsx(uq,{startTime:null==k?void 0:k.startDateTime,endTime:null==k?void 0:k.endDateTime,filterDuration:I,universeUuid:v,universeData:null==z?void 0:z.data,appName:y,timezone:m,isAshEnabled:!!G,isAshSupported:!!q,apiUrl:x,onClickShowMoreAnomalies:Q,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);D(Zr.CUSTOM),R({startDateTime:new Date(e),endDateTime:new Date(t)});var i=new URLSearchParams(window.location.search);i.set("startTime",n.toISOString()),i.set("endTime",r.toISOString()),i.set("duration",Zr.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:_,onSelectedQuery:b,notifyTabChange:function(e){U(e)},onStartDateChange:function(e){var t;if(e){R((function(t){return B(B({},t),{startDateTime:e})}));var n=new URLSearchParams(window.location.search);n.set("startTime",null===(t=null==k?void 0:k.startDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))}},onEndDateChange:function(e){var t;if(e){R((function(t){return B(B({},t),{endDateTime:e})}));var n=new URLSearchParams(window.location.search);n.set("endTime",null===(t=null==k?void 0:k.endDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))}},onRefresh:function(){R((function(e){return B(B({},e),{endDateTime:new Date})}))},onSelectedFilterDuration:function(e){var t,n,r,i;D(e);var o=new URLSearchParams(window.location.search);e===Zr.CUSTOM?(o.set("startTime",null!==(n=null===(t=null==k?void 0:k.startDateTime)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:""),o.set("endTime",null!==(i=null===(r=null==k?void 0:k.endDateTime)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"")):(o.delete("startTime"),o.delete("endTime")),o.set("duration",e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(o.toString()))}})}),Zi(L)&&e.jsx(dq,{onClickShowMoreAnomalies:Q,selectedTab:F,showMoreAnomalyCategory:L,startTime:null===(f=null==k?void 0:k.startDateTime)||void 0===f?void 0:f.toISOString(),endTime:null===(g=null==k?void 0:k.endDateTime)||void 0===g?void 0:g.toISOString(),universeUuid:v,appName:y,apiUrl:x,onSelectedIssue:_})]}))})]})}))},exports.QUERIES=Mr,exports.QUERY_DETAILS="QUERY DETAILS",exports.QUERY_TAG="QUERY",exports.QUERY_TYPE_TAG=ti,exports.QueryTypeMode=ar,exports.RCA_GANT_CHART=hi,exports.REACT_APP_API_URL=Gz,exports.REGION_TAG="Region",exports.REGION_ZONE_TAG=ai,exports.RUNTIME_CONFIG_KEYS=Yr,exports.RuntimeConfigs=function(i){var a,s,l=i.apiUrl,u=i.appName,c=i.toast,d=bq(),p=wi(),h=n.useQueryClient(),f=t.useState(""),g=f[0],m=f[1],v=t.useState([]),y=v[0],x=v[1],_=t.useState(Hr[0]),b=_[0],w=_[1],S=t.useState(0),C=S[0],T=S[1],M=t.useState(!1),A=M[0],E=M[1],I=t.useState(!1),D=I[0],O=I[1],k=t.useState(null),R=k[0],N=k[1],L=n.useQuery([exports.QUERY_KEY.fetchRuntimeConfigs],(function(){return oH.fetchRuntimeConfigs(Wr,l)}),{onSuccess:function(e){x(e)}}),P=L.error,U=L.isLoading,z=L.isError,H=L.isIdle,V=L.refetch,W=null===(s=null===(a=null==P?void 0:P.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,Y=function(){j(void 0,void 0,void 0,(function(){return F(this,(function(e){switch(e.label){case 0:return h.invalidateQueries(exports.QUERY_KEY.fetchRuntimeConfigs),[4,V()];case 1:return e.sent(),[2]}}))}))},G=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"20%"}}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsxs(r.Box,{children:[e.jsx("span",{children:y[i].path}),e.jsx(o.YBTooltip,B({title:y[i].description,placement:"top",arrow:!0},{children:e.jsx(r.Box,B({className:d.tooltip,display:"inline-block"},{children:e.jsx("img",{src:bG,alt:"info"})}))}))]})}}},{name:"description",label:"Config Description",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"30%"}}}}},{name:"value",label:"Config Value",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"10%"}}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx("span",B({className:y[i].overriden?d.textColor:""},{children:y[i].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"10%"}}},customBodyRender:function(t,n){var r=n.rowIndex;return e.jsxs(e.Fragment,{children:[e.jsx(o.YBButton,B({size:"medium",variant:"ghost",dataTestId:"RuntimeConfigs-UpdateRuntimeConfigButton",onClick:function(){return e=y[r],N(e),void E(!0);var e}},{children:"Update"})),e.jsx(o.YBButton,B({size:"medium",variant:"ghost",dataTestId:"RuntimeConfigs-ResetRuntimeConfigButton",onClick:function(){return e=y[r],N(e),void O(!0);var e}},{children:"Reset"}))]})}}}];return e.jsx(yY,B({appName:u},{children:e.jsxs(r.Box,B({mt:2,ml:4,mr:4,className:d.overrideMuiTableContainer},{children:[e.jsx(r.Typography,B({variant:"h4"},{children:"Global Runtime Configurations"})),(z||H&&null===y)&&e.jsxs(r.Box,B({className:p.recommendation},{children:[(u===exports.AppName.YBA||u===exports.AppName.WEB)&&e.jsx(mt,{customErrorMessage:Zi(W)?W:_i.RUNTIME_CONFIGS_ERROR}),u===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Zi(W)?W:_i.RUNTIME_CONFIGS_ERROR})]})),e.jsx(r.Box,B({display:"flex",alignSelf:"center",mt:2},{children:e.jsx(o.YBInput,{placeholder:"Search",className:d.searchBox,onChange:function(e){m(e.target.value),T(0)},value:g,dataTestId:"RuntimeConfigs-SearchInput"})})),e.jsx(r.Box,B({mt:2,mb:4,pb:2},{children:e.jsx(o.YBTable,{title:"Runtime Configuration Variables",className:d.overrideMuiTable,data:null!=y?y:[],columns:G,dataTestId:"RuntimeConfigs-Table",isLoading:U,options:{filter:!0,search:!0,selectableRowsOnClick:!1,rowHover:!0,tableLayout:"fixed",responsive:"standard",rowsPerPage:b,page:C,onChangePage:function(e){return T(e)},onChangeRowsPerPage:function(e){w(e),T(0)},rowsPerPageOptions:Hr,globalFilterFn:"includesString",state:{globalFilter:g,pagination:{pageIndex:C,pageSize:b},isLoading:U,showProgressBars:U},onGlobalFilterChange:m}})})),A&&R&&e.jsx(_q,{open:A,data:R,apiUrl:l,onActionPerformed:Y,onClose:function(){E(!1)},toast:c}),D&&R&&e.jsx(yq,{open:D,data:R,apiUrl:l,onActionPerformed:Y,onClose:function(){O(!1)},toast:c})]}))}))},exports.SQL_QUERY_REQUEST_GRAPHS=Pr,exports.SplitMode=ir,exports.SplitType=or,exports.TABLET_ID_TAG=ii,exports.TABLET_TAG="Tablet Id",exports.TABLE_REQUEST_GRAPHS=["table_scan_ops","table_tup_read_ops","table_write_ops"],exports.TABLE_TAG=ri,exports.TIME_FILTER_LABEL=Zr,exports.TIME_FILTER_VALUES=Xr,exports.TYPE="type",exports.URL_TAB_PATH=_r,exports.USER_TAG="User",exports.VIEW_MORE=Qr,exports.WAIT_EVENT_MAPPING=mr,exports.YBCheckboxField=oo,exports.YBCodeBlock=ht,exports.YBErrorIndicator=mt,exports.YBInfinitePagination=$n,exports.YBInputField=Zn,exports.YBPanelItem=Jn,exports.YBThemeWrapper=yY,exports.YBToggleField=Ti,exports.ZONE_TAG="Zone",exports.ZoneNodeSelector=no,exports.filterDurations=Kr,exports.getCustomFooterComponent=bi,exports.getRowCellComponent=function(t,n,r,i,o,a,s,l,u,c,d,p){return function(h,f){return e.jsx(Ci,{appName:t,currentTablePage:n,displayedRows:r,classes:i,showQuery:o,tableColumns:a,ignoredColumns:s,startTime:l,endTime:u,onSelectedQuery:p,expandedRowIndex:c,handleExpandedRowIndex:d,dataIndex:f,data:h})}},exports.isDefinedNotNull=Yi,exports.isEmptyArray=Gi,exports.isEmptyObject=function(e){return void 0===e||Di(e)&&0===Object.keys(e).length},exports.isEmptyString=Xi,exports.isNonEmptyArray=qi,exports.isNonEmptyObject=Qi,exports.isNonEmptyString=Zi,exports.isNullOrEmpty=function(e){return null==e||Di(e)&&0===Object.keys(e).length},exports.isValidObject=$i,exports.isYAxisGreaterThanThousand=Ki,exports.metricOutlierSelectors=Lr,exports.metricSplitSelectors=Rr,exports.otherSplitSelectors=Nr,exports.queryTypeSelectors=Br,exports.removeNullProperties=function(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]},exports.useCodeBlockStyles=ft;
11
11
  //# sourceMappingURL=index.js.map