@yugabytedb/perf-advisor-ui 1.0.91 → 1.0.93
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 +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/package.json +21 -11
- package/dist/cjs/index.css +0 -10
- package/dist/esm/index.css +0 -10
- package/dist/esm/index.js +0 -11
- package/dist/esm/index.js.map +0 -1
package/dist/esm/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useCallback as o,useEffect as a,Fragment as s,useState as l,useRef as u,useMemo as c,createElement as d,useLayoutEffect as h,useReducer as p,isValidElement as f,cloneElement as m}from"react";import{useMutation as v,useInfiniteQuery as g,useQuery as y,useQueryClient as _}from"react-query";import{makeStyles as b,Box as x,Grid as w,MenuItem as S,TableRow as T,TableCell as C,Typography as I,Divider as M,styled as E,InputAdornment as A,IconButton as D,alpha as O,Collapse as N,Accordion as R,AccordionSummary as L,AccordionDetails as P,Breadcrumbs as k,Link as B,Tooltip as F}from"@material-ui/core";import{YBInput as U,YBSelect as z,YBPagination as H,YBToggle as V,YBButtonGroup as W,YBCheckbox as Y,yba as j,YBThemeProvider as G,coreTheme as q,YBTooltip as Q,YBButton as Z,YBCodeBlock as X,YBBreadcrumb as $,mui as K,YBDatePicker as J,YBLabel as ee,YBTab as te,GenericFailure as ne,YBTabs as re,YBModal as ie,YBTable as oe,YBTag as ae,YBAutoComplete as se}from"@yugabyte-ui-library/core";import{makeStyles as le}from"@material-ui/core/styles";import ue from"http";import ce from"https";import de from"url";import he from"stream";import pe from"assert";import fe from"tty";import me from"util";import ve from"os";import ge from"zlib";import{Clear as ye,FileCopy as _e}from"@material-ui/icons";import{Timeline as be}from"vis-timeline/standalone";import"vis-timeline/styles/vis-timeline-graph2d.css?inline";import{TabContext as xe,TabPanel as we}from"@material-ui/lab";import Se from"@material-ui/icons/ExpandMore";import{render as Te}from"react-dom";var Ce=function(e,t){return Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ce(e,t)};function Ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ce(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Me=function(){return Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Me.apply(this,arguments)};function Ee(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Ae(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function De(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Oe(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function Ne(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ne(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Re(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ne(e))&&(r&&(r+=" "),r+=t);return r}"function"==typeof SuppressedError&&SuppressedError;var Le=le((function(e){var t;return{searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"},containerClassName:{width:"100%",maxWidth:"100%"},preClassName:{width:"100%",overflowX:"hidden"},codeClassName:{maxWidth:"100%",wordBreak:"break-word",overflowWrap:"anywhere"},refreshBtn:{marginRight:e.spacing(1)},codeBlock:{maxHeight:"85px",overflowY:"auto"},codeBlockSqlView:{maxHeight:"140px",overflowY:"auto"},tableHeaderCell:{position:"relative",borderBottom:"1px solid ".concat(e.palette.grey[300]),"&:first-of-type":{padding:e.spacing(.25,0,1,3),"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)")}},"&:last-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)"),right:e.spacing(2)}},"&:before":{content:'""',position:"absolute",right:0,bottom:0,height:"1px",width:"100%"}},rowTableCell:{},tableContainer:{padding:e.spacing(1,0)},tableRow:{cursor:"pointer","&:hover":{backgroundColor:"#F2F6FF"},'&:hover + tr[data-row-type="query-statement"]':{backgroundColor:"#F2F6FF"},'&:has(+ tr[data-row-type="query-statement"]:hover)':{backgroundColor:"#F2F6FF"}},queryTableRow:{cursor:"pointer","&:hover":{backgroundColor:"#F2F6FF"}},queryTableCell:{padding:e.spacing(1,1),borderBottom:"0px"},queryPreBlock:(t={cursor:"pointer",width:"340px",maxWidth:"340px",backgroundColor:"#F8FBFC !important",textAlign:"left"},t[e.breakpoints.up("lg")]={width:"440px",maxWidth:"440px"},t[e.breakpoints.up("xl")]={width:"540px",maxWidth:"540px"},t),queryPreBlockYBM:{display:"block",width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word",backgroundColor:"#F8FBFC !important",cursor:"pointer"},queryPreBlockWeb:{display:"block",width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word",backgroundColor:"#F8FBFC !important",cursor:"pointer"},queryPreBlockFull:{cursor:"pointer",maxWidth:"-webkit-fill-available",backgroundColor:"#F8FBFC !important",textAlign:"left"},queryCodeElement:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important")},queryCodeElementWeb:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block"},queryContainerCodeInTable:{width:"100%",display:"flex",flexDirection:"column",margin:"0 !important",marginBottom:"0 !important",borderRadius:e.shape.borderRadius,padding:"0px !important","& pre":{padding:"0 24px 0 6px !important",margin:"0 !important",border:"0px !important",backgroundColor:"".concat(e.palette.grey[50]," !important"),"& code":{padding:"0 !important",fontSize:"11.5px !important",lineHeight:"28px !important",margin:"0 16px 0 0 !important"},"& button":{top:"-2px !important"}}},queryContainerCodeInBreadcrumbs:{width:"100%",display:"flex",flexDirection:"column",margin:"0 !important",marginBottom:"0 !important",borderRadius:e.shape.borderRadius,padding:"0px !important","& pre":{margin:"0 !important",border:"0px !important",padding:"6px 24px 6px 16px !important",backgroundColor:"".concat(e.palette.grey[50]," !important"),"& code":{padding:"0 !important",margin:"0 16px 0 0 !important"},"& button":{top:"4px !important"}}},codeClassNameInTable:{fontSize:"11.5px !important"},preClassNameInTable:{fontSize:"11.5px !important"},defaultActions:{textAlign:"right"},overrideExpandBtn:{padding:e.spacing(0,2)},preQueryBlock:{backgroundColor:"#F7FAFC !important"},queryCellBox:{display:"flex",width:"100%",paddingRight:e.spacing(2)}}})),Pe=b({errorContainer:{textAlign:"center",fontSize:"16px",lineHeight:"2em"},sadFace:{width:"40px"},errorText:{fontSize:"13px",fontFamily:"Inter",fontWeight:400}}),ke=function(n){var r=n.type,i=n.uuid,o=n.customErrorMessage,a=Pe(),s=e("span",{}),l=e("span",{});return"universe"===r&&(s=e(x,{children:"Seems like universe with UUID ".concat(i," has issues or does not exist.")})),t(x,Me({className:a.errorContainer},{children:[e(x,{children:e("span",{children:"Aww Snap."})}),e(x,{children:s}),o&&e(x,{children:e("span",Me({className:a.errorText},{children:o}))}),e(x,{children:l})]}))},Be=e=>"checkbox"===e.type,Fe=e=>e instanceof Date,Ue=e=>null==e;const ze=e=>"object"==typeof e;var He=e=>!Ue(e)&&!Array.isArray(e)&&ze(e)&&!Fe(e),Ve=e=>He(e)&&e.target?Be(e.target)?e.target.checked:e.target.value:e,We=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Ye=e=>Array.isArray(e)?e.filter(Boolean):[],je=e=>void 0===e,Ge=(e,t,n)=>{if(!t||!He(e))return n;const r=Ye(t.split(/[,[\].]+?/)).reduce(((e,t)=>Ue(e)?e:e[t]),e);return je(r)||r===e?je(e[t])?n:e[t]:r};const qe="blur",Qe="focusout",Ze="change",Xe="onBlur",$e="onChange",Ke="onSubmit",Je="onTouched",et="all",tt="max",nt="min",rt="maxLength",it="minLength",ot="pattern",at="required",st="validate",lt=i.createContext(null),ut=()=>i.useContext(lt),ct=e=>{const{children:t,...n}=e;return i.createElement(lt.Provider,{value:n},t)};var dt=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==et&&(t._proxyFormState[i]=!r||et),n&&(n[i]=!0),e[i]}});return i},ht=e=>He(e)&&!Object.keys(e).length,pt=(e,t,n)=>{const{name:r,...i}=e;return ht(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||et)))},ft=e=>Array.isArray(e)?e:[e],mt=(e,t,n)=>n&&t?e===t:!e||!t||e===t||ft(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function vt(e){const t=i.useRef(e);t.current=e,i.useEffect((()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var gt=e=>"string"==typeof e,yt=(e,t,n,r)=>gt(e)?(r&&t.watch.add(e),Ge(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Ge(n,e)))):(r&&(t.watchAll=!0),n),_t="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function bt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(_t&&(e instanceof Blob||e instanceof FileList)||!n&&!He(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return He(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=bt(e[n]);else t=e}return t}function xt(e){const t=ut(),{name:n,control:r=t.control,shouldUnregister:o}=e,a=We(r._names.array,n),s=function(e){const t=ut(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:s}=e||{},l=i.useRef(r);l.current=r,vt({disabled:a,subject:n._subjects.watch,callback:e=>{if(mt(l.current,e.name,s)){const t=yt(l.current,n._names,e.values||n._formValues);c(je(t)?o:bt(t))}}});const[u,c]=i.useState(je(o)?n._getWatch(r):o);return i.useEffect((()=>n._removeUnmounted())),u}({control:r,name:n,defaultValue:Ge(r._formValues,n,Ge(r._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=ut(),{control:n=t.control,disabled:r,name:o,exact:a}=e||{},[s,l]=i.useState(n._formState),u=i.useRef(!0),c=i.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=i.useRef(o);return d.current=o,vt({disabled:r,callback:i.useCallback((e=>u.current&&mt(d.current,e.name,a)&&pt(e,c.current)&&l({...n._formState,...e})),[n,a]),subject:n._subjects.state}),i.useEffect((()=>{u.current=!0;const e=n._proxyFormState.isDirty&&n._getDirty();return e!==n._formState.isDirty&&n._subjects.state.next({isDirty:e}),n._updateValid(),()=>{u.current=!1}}),[n]),dt(s,n,c.current,!1)}({control:r,name:n}),u=i.useRef(r.register(n,{...e.rules,value:s}));return i.useEffect((()=>{const e=(e,t)=>{const n=Ge(r._fields,e);n&&(n._f.mount=t)};return e(n,!0),()=>{const t=r._options.shouldUnregister||o;(a?t&&!r._stateFlags.action:t)?r.unregister(n):e(n,!1)}}),[n,r,a,o]),{field:{name:n,value:s,onChange:i.useCallback((e=>u.current.onChange({target:{value:Ve(e),name:n},type:Ze})),[n]),onBlur:i.useCallback((()=>u.current.onBlur({target:{value:Ge(r._formValues,n),name:n},type:qe})),[n,r]),ref:e=>{const t=Ge(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ge(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ge(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ge(l.touchedFields,n)},error:{enumerable:!0,get:()=>Ge(l.errors,n)}})}}var wt=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},St=e=>/^\w*$/.test(e),Tt=e=>Ye(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ct(e,t,n){let r=-1;const i=St(t)?[t]:Tt(t),o=i.length,a=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==a){const n=e[t];o=He(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const It=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=Ge(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else He(r)&&It(r,t)}}};var Mt=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Et=(e,t,n)=>{const r=Ye(Ge(e,n));return Ct(r,"root",t[n]),Ct(e,n,r),e},At=e=>"boolean"==typeof e,Dt=e=>"file"===e.type,Ot=e=>"function"==typeof e,Nt=e=>gt(e)||i.isValidElement(e),Rt=e=>"radio"===e.type,Lt=e=>e instanceof RegExp;const Pt={value:!1,isValid:!1},kt={value:!0,isValid:!0};var Bt=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!je(e[0].attributes.value)?je(e[0].value)||""===e[0].value?kt:{value:e[0].value,isValid:!0}:kt:Pt}return Pt};const Ft={isValid:!1,value:null};var Ut=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Ft):Ft;function zt(e,t,n="validate"){if(Nt(e)||Array.isArray(e)&&e.every(Nt)||At(e)&&!e)return{type:n,message:Nt(e)?e:"",ref:t}}var Ht=e=>He(e)&&!Lt(e)?e:{value:e,message:""},Vt=async(e,t,n,r,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f;if(!v||g)return{};const y=a?a[0]:o,_=e=>{r&&y.reportValidity&&(y.setCustomValidity(At(e)?"":e||""),y.reportValidity())},b={},x=Rt(o),w=Be(o),S=x||w,T=(m||Dt(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,C=wt.bind(null,f,n,b),I=(e,t,n,r=rt,i=it)=>{const a=e?t:n;b[f]={type:e?r:i,message:a,ref:o,...C(e?r:i,a)}};if(i?!Array.isArray(t)||!t.length:s&&(!S&&(T||Ue(t))||At(t)&&!t||w&&!Bt(a).isValid||x&&!Ut(a).isValid)){const{value:e,message:t}=Nt(s)?{value:!!s,message:s}:Ht(s);if(e&&(b[f]={type:at,message:t,ref:y,...C(at,t)},!n))return _(t),b}if(!(T||Ue(c)&&Ue(d))){let e,r;const i=Ht(d),a=Ht(c);if(Ue(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,u="week"==o.type;gt(i.value)&&t&&(e=l?s(t)>s(i.value):u?t>i.value:n>new Date(i.value)),gt(a.value)&&t&&(r=l?s(t)<s(a.value):u?t<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||(t?+t:t);Ue(i.value)||(e=n>i.value),Ue(a.value)||(r=n<a.value)}if((e||r)&&(I(!!e,i.message,a.message,tt,nt),!n))return _(b[f].message),b}if((l||u)&&!T&&(gt(t)||i&&Array.isArray(t))){const e=Ht(l),r=Ht(u),i=!Ue(e.value)&&t.length>e.value,o=!Ue(r.value)&&t.length<r.value;if((i||o)&&(I(i,e.message,r.message),!n))return _(b[f].message),b}if(h&&!T&>(t)){const{value:e,message:r}=Ht(h);if(Lt(e)&&!t.match(e)&&(b[f]={type:ot,message:r,ref:o,...C(ot,r)},!n))return _(r),b}if(p)if(Ot(p)){const e=zt(await p(t),y);if(e&&(b[f]={...e,...C(st,e.message)},!n))return _(e.message),b}else if(He(p)){let e={};for(const r in p){if(!ht(e)&&!n)break;const i=zt(await p[r](t),y,r);i&&(e={...i,...C(r,i.message)},_(i.message),n&&(b[f]=e))}if(!ht(e)&&(b[f]={ref:y,...e},!n))return b}return _(!0),b},Wt=e=>({isOnSubmit:!e||e===Ke,isOnBlur:e===Xe,isOnChange:e===$e,isOnAll:e===et,isOnTouch:e===Je});function Yt(e){for(const t in e)if(!je(e[t]))return!1;return!0}function jt(e,t){const n=St(t)?[t]:Tt(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=je(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(o=e);++i<a.length;){const t=a[i];r=r?r[t]:e[t],s===i&&(He(r)&&ht(r)||Array.isArray(r)&&Yt(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function Gt(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var qt=e=>Ue(e)||!ze(e);function Qt(e,t){if(qt(e)||qt(t))return e===t;if(Fe(e)&&Fe(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Fe(n)&&Fe(e)||He(n)&&He(e)||Array.isArray(n)&&Array.isArray(e)?!Qt(n,e):n!==e)return!1}}return!0}var Zt=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Xt=e=>"select-multiple"===e.type,$t=e=>Zt(e)&&e.isConnected,Kt=e=>{for(const t in e)if(Ot(e[t]))return!0;return!1};function Jt(e,t={}){const n=Array.isArray(e);if(He(e)||n)for(const n in e)Array.isArray(e[n])||He(e[n])&&!Kt(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Jt(e[n],t[n])):Ue(e[n])||(t[n]=!0);return t}function en(e,t,n){const r=Array.isArray(e);if(He(e)||r)for(const r in e)Array.isArray(e[r])||He(e[r])&&!Kt(e[r])?je(t)||qt(n[r])?n[r]=Array.isArray(e[r])?Jt(e[r],[]):{...Jt(e[r])}:en(e[r],Ue(t)?{}:t[r],n[r]):Qt(e[r],t[r])?delete n[r]:n[r]=!0;return n}var tn=(e,t)=>en(e,t,Jt(t)),nn=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>je(e)?e:t?""===e?NaN:e?+e:e:n&>(e)?new Date(e):r?r(e):e;function rn(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Dt(t)?t.files:Rt(t)?Ut(e.refs).value:Xt(t)?[...t.selectedOptions].map((({value:e})=>e)):Be(t)?Bt(e.refs).value:nn(je(t.value)?e.ref.value:t.value,e)}var on=e=>je(e)?e:Lt(e)?e.source:He(e)?Lt(e.value)?e.value.source:e.value:e;function an(e,t,n){const r=Ge(e,n);if(r||St(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=Ge(t,r),a=Ge(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};i.pop()}return{name:n}}const sn={mode:Ke,reValidateMode:$e,shouldFocusError:!0};function ln(e={}){let t,n={...sn,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=bt(n.defaultValues)||{},a=n.shouldUnregister?{}:bt(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={watch:Gt(),array:Gt(),state:Gt()},h=Wt(n.mode),p=Wt(n.reValidateMode),f=n.criteriaMode===et,m=async()=>{if(c.isValid){const e=n.resolver?ht((await b()).errors):await x(i,!0);e!==r.isValid&&(r.isValid=e,d.state.next({isValid:e}))}},v=e=>c.isValidating&&e!==r.isValidating&&d.state.next({isValidating:e}),g=(e,t,n,r)=>{const l=Ge(i,e);if(l){const i=Ge(a,e,je(n)?Ge(o,e):n);je(i)||r&&r.defaultChecked||t?Ct(a,e,t?i:rn(l._f)):T(e,i),s.mount&&m()}},y=(e,t,n,i,a)=>{let s=!1,l=!1;const u={name:e};if((!n||i)&&(c.isDirty&&(l=r.isDirty,r.isDirty=u.isDirty=w(),s=l!==u.isDirty),c.dirtyFields)){l=Ge(r.dirtyFields,e);const n=Qt(Ge(o,e),t);n?jt(r.dirtyFields,e):Ct(r.dirtyFields,e,!0),u.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=Ge(r.touchedFields,e);t||(Ct(r.touchedFields,e,n),u.touchedFields=r.touchedFields,s=s||c.touchedFields&&t!==n)}return s&&a&&d.state.next(u),s?u:{}},_=(n,i,o,a)=>{const s=Ge(r.errors,n),l=c.isValid&&At(i)&&r.isValid!==i;var h;if(e.delayError&&o?(h=()=>((e,t)=>{Ct(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=window.setTimeout(h,e)},t(e.delayError)):(clearTimeout(u),t=null,o?Ct(r.errors,n,o):jt(r.errors,n)),(o?!Qt(s,o):s)||!ht(a)||l){const e={...a,...l&&At(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}v(!1)},b=async e=>await n.resolver(a,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Ge(t,n);e&&Ct(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),x=async(e,t,i={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=l.array.has(e.name),u=await Vt(s,Ge(a,e.name),f,n.shouldUseNativeValidation,o);if(u[e.name]&&(i.valid=!1,t))break;!t&&(Ge(u,e.name)?o?Et(r.errors,u,e.name):Ct(r.errors,e.name,u[e.name]):jt(r.errors,e.name))}o&&await x(o,t,i)}}return i.valid},w=(e,t)=>(e&&t&&Ct(a,e,t),!Qt(A(),o)),S=(e,t,n)=>yt(e,l,{...s.mount?a:je(t)?o:gt(e)?{[e]:t}:t},n),T=(e,t,n={})=>{const r=Ge(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Ct(a,e,nn(t,n)),o=_t&&Zt(n.ref)&&Ue(t)?"":t,Xt(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?Be(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):Dt(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&E(e)},C=(e,t,n)=>{for(const r in t){const o=t[r],a=`${e}.${r}`,s=Ge(i,a);!l.array.has(e)&&qt(o)&&(!s||s._f)||Fe(o)?T(a,o,n):C(a,o,n)}},I=(e,t,n={})=>{const s=Ge(i,e),u=l.array.has(e),h=bt(t);Ct(a,e,h),u?(d.array.next({name:e,values:a}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=tn(o,a),d.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:w(e,h)}))):!s||s._f||Ue(h)?T(e,h,n):C(e,h,n),Mt(e,l)&&d.state.next({}),d.watch.next({name:e})},M=async e=>{const o=e.target;let s=o.name;const u=Ge(i,s),g=()=>o.type?rn(u._f):Ve(e);if(u){let o,S;const T=g(),C=e.type===qe||e.type===Qe,I=!((w=u._f).mount&&(w.required||w.min||w.max||w.maxLength||w.minLength||w.pattern||w.validate)||n.resolver||Ge(r.errors,s)||u._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(C,Ge(r.touchedFields,s),r.isSubmitted,p,h),M=Mt(s,l,C);Ct(a,s,T),C?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const A=y(s,T,C,!1),D=!ht(A)||M;if(!C&&d.watch.next({name:s,type:e.type}),I)return c.isValid&&m(),D&&d.state.next({name:s,...M?{}:A});if(!C&&M&&d.state.next({}),v(!0),n.resolver){const{errors:e}=await b([s]),t=an(r.errors,i,s),n=an(e,i,t.name||s);o=n.error,s=n.name,S=ht(e)}else o=(await Vt(u,Ge(a,s),f,n.shouldUseNativeValidation))[s],o?S=!1:c.isValid&&(S=await x(i,!0));qt(T)&&g()!==T?v(!1):(u._f.deps&&E(u._f.deps),_(s,S,o,A))}var w},E=async(e,t={})=>{let o,a;const s=ft(e);if(v(!0),n.resolver){const t=await(async e=>{const{errors:t}=await b();if(e)for(const n of e){const e=Ge(t,n);e?Ct(r.errors,n,e):jt(r.errors,n)}else r.errors=t;return t})(je(e)?e:s);o=ht(t),a=e?!s.some((e=>Ge(t,e))):o}else e?(a=(await Promise.all(s.map((async e=>{const t=Ge(i,e);return await x(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&m()):a=o=await x(i);return d.state.next({...!gt(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&It(i,(e=>e&&Ge(r.errors,e)),e?s:l.mount),a},A=e=>{const t={...o,...s.mount?a:{}};return je(e)?t:gt(e)?Ge(t,e):e.map((e=>Ge(t,e)))},D=(e,t)=>({invalid:!!Ge((t||r).errors,e),isDirty:!!Ge((t||r).dirtyFields,e),isTouched:!!Ge((t||r).touchedFields,e),error:Ge((t||r).errors,e)}),O=(e,t={})=>{for(const s of e?ft(e):l.mount)l.mount.delete(s),l.array.delete(s),Ge(i,s)&&(t.keepValue||(jt(i,s),jt(a,s)),!t.keepError&&jt(r.errors,s),!t.keepDirty&&jt(r.dirtyFields,s),!t.keepTouched&&jt(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&jt(o,s));d.watch.next({}),d.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},N=(e,t={})=>{let r=Ge(i,e);const u=At(t.disabled);return Ct(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?u&&Ct(a,e,t.disabled?void 0:Ge(a,e,rn(r._f))):g(e,!0,t.value),{...u?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:on(t.min),max:on(t.max),minLength:on(t.minLength),maxLength:on(t.maxLength),pattern:on(t.pattern)}:{},name:e,onChange:M,onBlur:M,ref:a=>{if(a){N(e,t),r=Ge(i,e);const n=je(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>Rt(e)||Be(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;Ct(i,e,{_f:{...r._f,...s?{refs:[...l.filter($t),n,...Array.isArray(Ge(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else r=Ge(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!We(l.array,e)||!s.action)&&l.unMount.add(e)}}},R=()=>n.shouldFocusError&&It(i,(e=>e&&Ge(r.errors,e)),l.mount);return{control:{register:N,unregister:O,getFieldState:D,_executeSchema:b,_focusError:R,_getWatch:S,_getDirty:w,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=Ge(i,e);t&&(t._f.refs?t._f.refs.every((e=>!$t(e))):!$t(t._f.ref))&&O(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,h=!0)=>{if(l&&n){if(s.action=!0,h&&Array.isArray(Ge(i,e))){const t=n(Ge(i,e),l.argA,l.argB);u&&Ct(i,e,t)}if(h&&Array.isArray(Ge(r.errors,e))){const t=n(Ge(r.errors,e),l.argA,l.argB);u&&Ct(r.errors,e,t),((e,t)=>{!Ye(Ge(e,t)).length&&jt(e,t)})(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(Ge(r.touchedFields,e))){const t=n(Ge(r.touchedFields,e),l.argA,l.argB);u&&Ct(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=tn(o,a)),d.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ct(a,e,t)},_getFieldArray:t=>Ye(Ge(s.mount?a:o,t,e.shouldUnregister?Ge(o,t,[]):[])),_subjects:d,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:E,register:N,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let s=!0,l=bt(a);d.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await b();r.errors=e,l=t}else await x(i);ht(r.errors)?(d.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),R())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ht(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>Ot(e)?d.watch.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:I,getValues:A,reset:(t,n)=>((t,n={})=>{const u=t||o,h=bt(u),p=t&&!ht(t)?h:o;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)Ge(r.dirtyFields,e)?Ct(p,e,Ge(a,e)):I(e,Ge(p,e));else{if(_t&&je(t))for(const e of l.mount){const t=Ge(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Zt(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?n.keepDefaultValues?bt(o):{}:h,d.array.next({values:p}),d.watch.next({values:p})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!n.keepIsValid,s.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||Qt(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?tn(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(Ot(t)?t(a):t,n),resetField:(e,t={})=>{Ge(i,e)&&(je(t.defaultValue)?I(e,Ge(o,e)):(I(e,t.defaultValue),Ct(o,e,t.defaultValue)),t.keepTouched||jt(r.touchedFields,e),t.keepDirty||(jt(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Ge(o,e)):w()),t.keepError||(jt(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e?ft(e).forEach((e=>jt(r.errors,e))):r.errors={},d.state.next({errors:r.errors})},unregister:O,setError:(e,t,n)=>{const o=(Ge(i,e,{_f:{}})._f||{}).ref;Ct(r.errors,e,{...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=Ge(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}function un(e={}){const t=i.useRef(),[n,r]=i.useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});t.current||(t.current={...ln(e),formState:n});const o=t.current.control;return o._options=e,vt({subject:o._subjects.state,callback:i.useCallback((e=>{pt(e,o._proxyFormState,!0)&&(o._formState={...o._formState,...e},r({...o._formState}))}),[o])}),i.useEffect((()=>{o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),i.useEffect((()=>{n.submitCount&&o._focusError()}),[o,n.submitCount]),t.current.formState=dt(n,o),t.current}var cn,dn,hn,pn=function(t){var n,r,i=t.name,o=t.rules,a=t.defaultValue,s=t.control,l=t.shouldUnregister,u=Ee(t,["name","rules","defaultValue","control","shouldUnregister"]),c=xt({name:i,rules:o,defaultValue:a,control:s,shouldUnregister:l}),d=c.field,h=d.ref,p=Ee(d,["ref"]),f=c.fieldState;return e(U,Me({},p,u,{inputRef:h,error:!!f.error,helperText:null!==(r=null===(n=f.error)||void 0===n?void 0:n.message)&&void 0!==r?r:u.helperText}))},fn=b((function(e){return{root:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:e.spacing(1,3)},dropdownContainer:{display:"flex",alignItems:"center",maxWidth:160},dropdown:{width:"60px",height:"32px","& .yb-MuiInputBase-formControl":{border:"0px none"}},dropdownMenu:{"& .MuiMenu-list":{display:"flex",flexDirection:"column"}}}})),mn=function(n){var r=n.dataPrefetchFn,i=n.page,s=n.onPageChange,l=n.onPageSizeChange,u=n.hasMoreData,c=n.total,d=n.rowsPerPageOptions,h=void 0===d?[10,20,50]:d,p=n.rowsPerPage,f=n.showRecordsPerPage,m=n.recordsPerPageCaption,v=void 0===m?"":m,g=fn(),y=Math.ceil(c/(null!=p?p:h[0])),_=o((function(e){e===y&&u&&r(),s(e-1)}),[r,s,u,y]);return a((function(){0===i&&p===c&&u&&r()}),[]),t(x,Me({className:g.root},{children:[f&&t(w,Me({item:!0,xs:12,lg:4,className:g.dropdownContainer},{children:[v&&e(x,Me({mr:1,minWidth:"100px"},{children:v})),e(z,Me({value:p,onChange:function(e){l(e.target.value)},className:g.dropdown,dataTestId:"RowsPerPageSelect",menuProps:{className:g.dropdownMenu,anchorOrigin:{vertical:"top",horizontal:"left"}}},{children:h.map((function(t){return e(S,Me({value:t,"data-testid":"RowsPerPageSelectMenuItem-".concat(t)},{children:t}),t)}))}))]})),e(x,Me({ml:4},{children:e(H,{currentPage:i+1,pageSize:y,onPageSelect:_,hasMore:u,dataTestId:"TablePagination"})}))]}))},vn=b((function(e){return{header:{minHeight:"42px",marginBottom:"25px"},contentPanel:{margin:0},transparentBody:{padding:0,backgroundColor:"transparent",boxShadow:"none"},body:{position:"relative",boxShadow:"0 0.12em 2px rgba(colors.$YB_DARK_GRAY_2, 0.05), 0 0.5em 10px rgba(colors.$YB_DARK_GRAY_2, 0.07)",border:"none",backgroundColor:"#fff",padding:"20px 25px 25px 25px",borderRadius:"7px",margin:"20px 0 0 auto"}}})),gn=function(n){var r=n.noBackground,i=n.className,o=n.bodyClassName,a=n.children,s=n.body,l=n.header,u=n.title,c=vn(),d=Re(c.body,r&&c.transparentBody,o);return t(x,Me({className:i?c.contentPanel+i:"classes.contentPanel"},{children:[(l||u)&&t(x,Me({className:c.header},{children:[l," ",u]})),e(x,Me({className:"container"},{children:s&&t(x,Me({className:d},{children:[s,a]}))}))]}))};!function(e){e.ToBeAdded="ToBeAdded",e.Provisioned="Provisioned",e.SoftwareInstalled="SoftwareInstalled",e.UpgradeSoftware="UpgradeSoftware",e.UpdateGFlags="UpdateGFlags",e.Live="Live",e.Stopping="Stopping",e.Starting="Starting",e.Stopped="Stopped",e.Unreachable="Unreachable",e.ToBeRemoved="ToBeRemoved",e.Removing="Removing",e.Removed="Removed",e.Adding="Adding",e.BeingDecommissioned="BeingDecommissioned",e.Decommissioned="Decommissioned"}(dn||(dn={})),function(e){e.OVERALL="Overall",e.OUTLIER="Outlier",e.OUTLIER_TABLES="Outlier_Tables",e.OUTLIER_DB="Outlier_Databases"}(hn||(hn={}));var yn,_n,bn,xn,wn=((cn={})[hn.OVERALL]="Overall",cn[hn.OUTLIER]="nodes",cn[hn.OUTLIER_TABLES]="tables",cn[hn.OUTLIER_DB]="databases",cn);!function(e){e.SQL="SQL",e.APP="APP",e.NODE="NODE",e.INFRA="INFRA",e.DB="DB"}(yn||(yn={})),function(e){e.BACKGROUND_JOBS="BACKGROUND_JOBS"}(_n||(_n={})),function(e){e.SQL_QUERY_LATENCY_INCREASE="SQL_QUERY_LATENCY_INCREASE",e.HOT_NODE_CPU="HOT_NODE_CPU",e.HOT_NODE_YSQL_QUERIES="HOT_NODE_YSQL_QUERIES",e.SLOW_DISKS="SLOW_DISKS",e.HOT_TABLET="HOT_TABLET",e.LARGE_TABLET="LARGE_TABLET",e.UNUSED_INDEX="UNUSED_INDEX",e.REDUNDANT_INDEX="REDUNDANT_INDEX",e.RANGE_SHARDING="RANGE_SHARDING"}(bn||(bn={})),function(e){e.WAIT_EVENT_COMPONENT="waitEventComponent",e.WAIT_EVENT_CLASS="waitEventClass",e.WAIT_EVENT_TYPE="waitEventType",e.WAIT_EVENT="waitEvent",e.CLIENT_NODE_IP="clientNodeIp",e.QUERY_ID="queryId",e.TABLET_ID="tabletId",e.DB_ID="dbId"}(xn||(xn={}));var Sn,Tn,Cn,In={waitEventType:"TYPE",waitEvent:"EVENT"},Mn={NONE:"NONE",TOP:"TOP",BOTTOM:"BOTTOM"},En={NONE:"NONE",NODE:"NODE",TABLE:"TABLE",NAMESPACE:"NAMESPACE"},An={ALL:"All",SQL:"SQL",CQL:"CQL",BACKGROUND:"Background"},Dn={AVERAGE:"AVG",MAX:"MAX",MIN:"MIN",SUM:"SUM"};!function(e){e.YBA="YBA",e.YBM="YBM",e.YBD="YBD",e.WEB="WEB"}(Sn||(Sn={})),function(e){e.SQL="SQL",e.CQL="CQL",e.BACKGROUND="BACKGROUND"}(Tn||(Tn={})),function(e){e.SINGLE_SUPPORTING="SINGLE_SUPPORTING",e.MULTI_SUPPORTING="MULTI_SUPPORTING",e.MAIN_RCA="MAIN_RCA"}(Cn||(Cn={}));var On,Nn,Rn,Ln,Pn,kn,Bn,Fn,Un,zn,Hn,Vn,Wn,Yn={Type:"Wait Event Type",Class:"Wait Event Class",Event:"Wait Event",Query:"Query",waitEventType:"Wait Event Type",waitEvent:"Wait Event","Client IP":"Client IP"},jn=[xn.WAIT_EVENT_TYPE,xn.WAIT_EVENT];!function(e){e.ASC="ASC",e.DESC="DESC"}(On||(On={})),function(e){e.ANOMALY="Anomaly",e.QUERY="Query"}(Nn||(Nn={})),function(e){e.SQL="SQL",e.CQL="CQL",e.SYSTEM="SYSTEM"}(Rn||(Rn={})),function(e){e.SHOW_QUERY_STATS_TIMESTAMP="showStatsTimestamp",e.SHOW_CLEANUP_HISTORICAL_DATA="showCleanupHistoricalData"}(Ln||(Ln={})),function(e){e.EMPTY="EMPTY",e.SCHEDULED="SCHEDULED",e.IN_PROGRESS="IN_PROGRESS",e.SUCCESS="SUCCESS",e.FAILURE="FAILURE"}(Pn||(Pn={})),function(e){e.TEXT="TEXT",e.INT="INT",e.FLOAT="FLOAT",e.BOOL="BOOL",e.DURATION="DURATION"}(kn||(kn={})),function(e){e.RUNNING_BACKGROUND_JOBS="Running Background Jobs"}(Bn||(Bn={})),function(e){e.CLUSTER_LOAD="Cluster Load",e.INSIGHTS="Insights",e.METRICS="Metrics"}(Fn||(Fn={})),function(e){e.ANOMALIES="Anomalies",e.QUERIES="Queries"}(Un||(Un={})),function(e){e.TABLET_OVERVIEW="Tablet Overview"}(zn||(zn={})),function(e){e.QUERY_OVERVIEW="Query Overview"}(Hn||(Hn={})),function(e){e.PERFORMANCE_METRICS="Performance Metrics"}(Vn||(Vn={})),function(e){e.OVERALL_LOAD="Overall Load",e.LOAD_BY_DATABASE="Load by Database"}(Wn||(Wn={}));var Gn,qn,Qn={ANOMALIES:"anomalies",QUERIES:"queries",METRICS:"metricsNew",INSIGHTS:"insights",CLUSTER_LOAD:"clusterLoad",CLUSTER_LOAD_DB:"dbLoad",OVERALL_LOAD:"overallLoad"};!function(e){e.PERF_ANOMALY="PERF_ANOMALY",e.INSIGHT="INSIGHT"}(Gn||(Gn={})),function(e){e.LINE="line",e.BAR="bar"}(qn||(qn={}));var Zn={DB_ID:"databaseId",EPS:"eps",EVENTS:"events",FIRST_ACTIVE:"firstActive",LAST_ACTIVE:"lastActive",AVG_LATENCY:"latencyAvg",LATENCY_P90:"latencyP90",LATENCY_P99:"latencyP99",NAMESPACE_NAME:"namespaceName",QUERY:"query",QUERY_ID:"queryid",QUERY_TYPE:"queryType",ROWS_AVG:"rowsAvg",RPS:"rps",TOTAL_TIME:"totalTime",UNIVERSE_ID:"universeId",TOTAL_EPS_RATIO:"totalEpsRatio"},Xn={CPU:"Cpu",IO:"IO",DISK_IO:"DiskIO"},$n="All Regions and Clusters",Kn="All",Jn="All Zones and Nodes",er="ASH",tr="type",nr="Cores",rr="Queries",ir=3,or=10,ar="Inter",sr="# vCPU",lr={NODE_AVERAGE:"Selected Nodes Average",ALL:"all",ALL_DATABASES:"All Databases",TOP:"top",PRIMARY:"PRIMARY"},ur="active_session_history_eps_global",cr="active_session_history_query_events",dr="active_session_history_eps_client_node",hr="cpu_count",pr=[{value:hn.OVERALL,label:"Overall",text:"Overall"},{value:hn.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods",text:"nodes"},{value:hn.OUTLIER_TABLES,label:"Outlier Tables",text:"tables"},{value:hn.OUTLIER_DB,label:"Outlier Databases",text:"databases"}],fr=[{value:hn.OVERALL,label:"Overall"},{value:hn.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods",text:"nodes"}],mr=[{value:Mn.TOP,label:"Top"},{value:Mn.BOTTOM,label:"Bottom"}],vr=[{value:An.ALL,label:"All Queries"},{value:An.SQL,label:"SQL"},{value:An.CQL,label:"CQL"},{value:An.BACKGROUND,label:"Background"}],gr=["table_scan_ops","table_tup_read_ops","table_write_ops"],yr=["active_session_history_eps_client_node","query_latency","query_rps","query_rows_avg"],_r=["active_session_history_eps_global","cql_query_latency_avg","cql_query_rps"],br=["active_session_history_eps_client_node"],xr="ysql_connections_per_sec",wr=[10,20,30,40,50],Sr=[yn.SQL,yn.NODE,yn.DB,yn.APP,yn.INFRA],Tr="00000000-0000-0000-0000-000000000000",Cr={SHOW_CLEANUP_HISTORICAL_DATA:"pa.ui.show_cleanup_historical_data",SHOW_QUERIES_VIEW:"pa.ui.show_queries_view",SHOW_TOPK_METRICS_VIEW:"pa.ui.show_topk_metrics_view",SHOW_DB_CLUSTER_LOAD_VIEW:"pa.ui.show_db_cluster_load_view"},Ir={SQL_QUERY_LATENCY:"Query Latency Increase",SQL_QUERY_LOCK_CONTENTION:"Query Lock Contention",HOT_NODE_CPU:"High CPU Usage",HOT_NODE_DATA:"High data Usage",HOT_NODE_READS_WRITES:"Hot Node read/writes",HOT_NODE_YSQL_QUERIES:"High SQL count",HOT_NODE_CONNECTIONS:"High Node Connections",SQL_QUERY_EXCESSIVE_CATALOG_READS:"Excessive Catalog Reads",HOT_TABLET:"Hot Tablet",LARGE_TABLET:"Large Tablet",SLOW_DISKS:"Slow Disks",UNUSED_INDEX:"Unused Index",RANGE_SHARDING:"Range Sharding",SQL_QUERY_LATENCY_INCREASE:"Query Latency Increase",REDUNDANT_INDEX:"Redundant Index"},Mr="MORE",Er="...",Ar="View More",Dr={ONE_HOUR:"Last 1 hour",SIX_HOURS:"Last 6 hours",ONE_DAY:"Last 1 day",TWO_DAYS:"Last 2 days",SEVEN_DAYS:"Last 7 days",CUSTOM:"Custom"},Or={ONE_HOUR:"1h",SIX_HOURS:"6h",ONE_DAY:"1d",TWO_DAYS:"2d",SEVEN_DAYS:"7d",CUSTOM:"Custom"},Nr=[{label:Dr.ONE_HOUR,value:Or.ONE_HOUR},{label:Dr.SIX_HOURS,value:Or.SIX_HOURS},{label:Dr.ONE_DAY,value:Or.ONE_DAY},{label:Dr.TWO_DAYS,value:Or.TWO_DAYS},{label:Dr.SEVEN_DAYS,value:Or.SEVEN_DAYS},{label:Dr.CUSTOM,value:Or.CUSTOM}],Rr=[{label:Dr.CUSTOM,value:"Custom"}],Lr={SQL_QUERY_LATENCY_INCREASE:{title:"QUERY",data:{}},SQL_QUERY_LOCK_CONTENTION:{title:"QUERY",data:{}},SQL_QUERY_EXCESSIVE_CATALOG_READS:{title:"QUERY",data:{}},HOT_NODE_CPU:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_YSQL_QUERIES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_CONNECTIONS:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_TABLET:{title:"TABLE",data:{DB_NAME:"dbName",TABLET_ID:"tabletId"}},LARGE_TABLET:{title:"TABLE",data:{DB_NAME:"dbName",TABLET_ID:"tabletId"}},SLOW_DISKS:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},UNUSED_INDEX:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}},RANGE_SHARDING:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}},REDUNDANT_INDEX:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}}},Pr="QUERY DETAILS",kr="QUERY",Br="DATABASE",Fr="QUERY TYPE",Ur="DATABASE TYPE",zr="Database",Hr="User",Vr="TABLE",Wr="Tablet Id",Yr="TABLET ID",jr="ANOMALY",Gr="REGION/ZONE",qr="Region",Qr="Zone",Zr={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},Xr=["ysql_ops","ycql_ops","server","per_process","disk_io","tserver","master","master_advanced","lsmdb"],$r=["outlier_tables"],Kr=["outlier_databases"],Jr=[{title:"Outlier Tables",name:"outlier_tables",metrics:["table_read_latency","table_read_rps","table_write_latency","table_write_rps","table_log_latency","table_log_ops_second","table_log_bytes_written","table_write_lock_latency","table_seek_next_prev","table_ops_in_flight","table_write_rejections","table_memory_rejections","table_compaction","table_block_cache_hit_miss","table_rocksdb_blooms_checked_and_useful","table_mem_tracker_db_memtable","ysql_catalog_cache_misses"]}],ei=[{title:"Outlier Databases",name:"outlier_databases",metrics:["table_read_latency","table_read_rps","table_write_latency","table_write_rps","table_log_latency","table_log_ops_second","table_log_bytes_written","table_write_lock_latency","table_seek_next_prev","table_ops_in_flight","table_write_rejections","table_memory_rejections","table_compaction","table_block_cache_hit_miss","table_rocksdb_blooms_checked_and_useful","table_mem_tracker_db_memtable"]}],ti=[{title:"YSQL",name:"ysql_ops",metrics:["ysql_server_rpc_per_second","ysql_sql_latency","ysql_connections","ysql_connections_per_sec","ysql_server_advanced_rpc_per_second","ysql_sql_advanced_latency","ysql_catalog_cache_misses","ysql_conn_mgr_active_connections"]},{title:"YCQL",name:"ycql_ops",metrics:["cql_server_rpc_per_second","cql_sql_latency","cql_server_rpc_p99","cql_sql_latency_breakdown","cql_yb_local_vs_remote","cql_yb_latency","cql_reactor_latency","tserver_rpc_queue_size_cql","cql_response_sizes","cql_yb_transaction","cql_yb_rpc_connections"]},{title:"Resource",name:"server",metrics:["cpu_usage","memory_usage","disk_iops","disk_usage_percent","disk_used_size_total","disk_volume_usage_percent","disk_volume_used","disk_bytes_per_second_per_node","disk_io_time","disk_io_queue_depth","disk_io_read_latency","disk_io_write_latency","network_packets","network_bytes","network_errors","system_load_over_time","node_clock_skew"]},{title:"Per Process",name:"per_process",metrics:["process_user_cpu_seconds","process_system_cpu_seconds","process_virtual_memory","process_resident_memory","process_proportional_memory","process_io_read","process_io_write","process_open_files"]},{title:"Disk I/O",name:"disk_io",metrics:["disk_iops","disk_usage_percent","disk_used_size_total","disk_volume_usage_percent","disk_volume_used","disk_bytes_per_second_per_node","lsm_rocksdb_flush_size","lsm_rocksdb_compaction","lsm_rocksdb_compaction_time","tserver_log_bytes_read","tserver_log_bytes_written"]},{title:"Tablet Server",name:"tserver",metrics:["tserver_rpcs_per_sec_per_node","tserver_ops_latency","tserver_handler_latency","tserver_threads_running","tserver_threads_started","tserver_uptime_min","tserver_consensus_rpcs_per_sec","tserver_change_config","tserver_remote_bootstraps","tserver_consensus_rpcs_latency","tserver_change_config_latency","tserver_context_switches","tserver_spinlock_server","tserver_log_latency","tserver_log_bytes_written","tserver_log_bytes_read","tserver_log_ops_second","tserver_write_lock_latency","tserver_tc_malloc_stats","tserver_log_stats","tserver_cache_reader_num_ops","tserver_glog_info_messages","tserver_rpc_queue_size_tserver","tserver_cpu_util_secs","tserver_yb_rpc_connections","tserver_live_tablet_peers","raft_leader","tserver_max_follower_lag"]},{title:"Master Server",name:"master",metrics:["master_overall_rpc_rate","master_latency","master_uptime_min","master_get_tablet_location","master_tsservice_reads","master_tsservice_reads_latency","master_tsservice_writes","master_tsservice_writes_latency","master_ts_heartbeats","tserver_rpc_queue_size_master","master_consensus_update","master_consensus_update_latency","master_multiraft_consensus_update","master_multiraft_consensus_update_latency","master_table_ops","master_cpu_util_secs","master_yb_rpc_connections","master_leaderless_and_underreplicated_tablets","master_max_follower_lag","master_load_balancer_stats"]},{title:"Master Server Advanced",name:"master_advanced",metrics:["master_threads_running","master_log_latency","master_log_bytes_written","master_log_bytes_read","master_tc_malloc_stats","master_glog_info_messages","master_lsm_rocksdb_seek_next_prev","master_lsm_rocksdb_num_seeks_per_node","master_lsm_rocksdb_total_sst_per_node","master_lsm_rocksdb_avg_num_sst_per_node","master_lsm_rocksdb_block_cache_hit_miss","master_lsm_rocksdb_block_cache_usage","master_lsm_rocksdb_blooms_checked_and_useful","master_lsm_rocksdb_flush_size","master_lsm_rocksdb_compaction","master_lsm_rocksdb_compaction_numfiles","master_lsm_rocksdb_compaction_time"]},{title:"DocDB",name:"lsmdb",metrics:["lsm_rocksdb_seek_next_prev","lsm_rocksdb_total_sst_per_node","lsm_rocksdb_avg_num_sst_per_node","lsm_rocksdb_latencies_get","lsm_rocksdb_latencies_write","lsm_rocksdb_latencies_seek","lsm_rocksdb_latencies_mutex","lsm_rocksdb_block_cache_hit_miss","lsm_rocksdb_block_cache_usage","lsm_rocksdb_blooms_checked_and_useful","lsm_rocksdb_stalls","lsm_rocksdb_write_rejections","lsm_rocksdb_memory_rejections","lsm_rocksdb_flush_size","lsm_rocksdb_compaction","lsm_rocksdb_compaction_tasks","lsm_rocksdb_compaction_time","lsm_rocksdb_compaction_numfiles","lsm_rocksdb_mem_tracker_db_memtable","docdb_transaction","docdb_transaction_pool_cache","tablet_splitting_stats","automatic_split_manager_time"]}],ni="gant-chart-anomalies",ri={ysql_server_rpc_per_second:"Total SQL Ops / Sec",ysql_sql_latency:"SQL Ops & Latency",ysql_connections:"Total SQL Connections",ysql_connections_per_sec:"Total SQL Connections / Sec",ysql_server_advanced_rpc_per_second:"Total YSQL Advanced Ops / Sec",ysql_sql_advanced_latency:"YSQL Advanced Op Latency (Avg)",ysql_catalog_cache_misses:"Catalog Cache Miss Count",ysql_conn_mgr_active_connections:"Connection Pooling - Client Connections",cql_server_rpc_per_second:"Total YCQL Ops / Sec",cql_sql_latency:"YCQL Op Latency (Avg)",cql_server_rpc_p99:"YCQL Op Latency (P99)",cql_sql_latency_breakdown:'YCQL Latency Breakdown"',cql_yb_local_vs_remote:"YBClient Ops Local vs Remote",cql_yb_latency:"YBClient Latency",cql_reactor_latency:"Reactor Delays",tserver_rpc_queue_size_cql:"RPC Queue Size",response_sizes:"Response Size",cql_yb_transaction:"Transaction",cql_yb_rpc_connections:"Inbound RPC Connections Alive",cpu_usage:"CPU Usage",memory_usage:"Memory Usage",disk_iops:"Disk IOPS / Node",disk_usage_percent:"Data Disks Usage Percent",disk_used_size_total:"Data Disks Usage",disk_volume_usage_percent:"Disk Volume Usage Percent",disk_volume_used:"Disk Volume Usage",disk_bytes_per_second_per_node:"Disk Bytes / Node",disk_io_time:"Disk active IO time",disk_io_queue_depth:"Average I/O Queue Depth",disk_io_read_latency:"Disk Read Latency",disk_io_write_latency:"Disk Write Latency",network_packets:"Network Packets / Sec / Node",network_bytes:"Network Bytes / Sec / Node",network_errors:"Network Errors / Sec / Node",system_load_over_time:"System Load Over Time",node_clock_skew:"Clock Skew",process_user_cpu_seconds:"User CPU Seconds",process_system_cpu_seconds:"System CPU Seconds",process_virtual_memory:"Virtual Memory",process_resident_memory:"RSS Memory",process_proportional_memory:"PSS Memory",process_io_read:"IO Read",process_io_write:"IO Write",process_open_files:"Open Files",tserver_rpcs_per_sec_per_node:"Ops / Sec / Node",tserver_ops_latency:"Average Latency",tserver_handler_latency:"Reactor Delays",tserver_threads_running:"Threads Running",tserver_threads_started:'Threads Started"',tserver_uptime_min:"Uptime",tserver_consensus_rpcs_per_sec:"Consensus Ops / Sec",tserver_change_config:"Total Consensus Change Config",tserver_remote_bootstraps:'"Remote Bootstraps',tserver_consensus_rpcs_latency:"Consensus Rpc Latencies",tserver_change_config_latency:"Change Config Latency",tserver_context_switches:"Context Switches",tserver_spinlock_server:"SpinLock Time/Server",tserver_log_latency:"WAL Latency",tserver_log_bytes_written:"WAL Bytes Written / Sec / Node",tserver_log_bytes_read:"WAL Bytes Read / Sec / Node",tserver_log_ops_second:"WAL Ops / Sec / Node",tserver_write_lock_latency:"Write Lock Latency",tserver_tc_malloc_stats:"TCMalloc Stats",tserver_log_stats:"WAL Stats / Node",tserver_cache_reader_num_ops:'WAL Cache Num Ops / Node"',tserver_glog_info_messages:'Glog messages"',tserver_rpc_queue_size_tserver:"RPC Queue Size",tserver_cpu_util_secs:"CPU Util Secs / Sec",tserver_yb_rpc_connections:'Inbound RPC Connections Alive"',tserver_live_tablet_peers:"Live Tablet Peers",raft_leader:"Raft Leader",tserver_max_follower_lag:"Max Follower Lag (ms)",master_overall_rpc_rate:"Overall RPCs / sec",master_latency:"Average Latency",master_uptime_min:"Uptime",master_get_tablet_location:"GetTabletLocations / sec",master_tsservice_reads:"Master TSService Reads / sec",master_tsservice_reads_latency:"Master TS Read Latency",master_tsservice_writes:"Master TSService Writes / sec",master_tsservice_writes_latency:"Master TS Write Latency",master_ts_heartbeats:"TS Heartbeats / sec",tserver_rpc_queue_size_master:"RPC Queue Size",master_consensus_update:"UpdateConsensus / sec",master_consensus_update_latency:"UpdateConsensus Latency",master_multiraft_consensus_update:"MultiRaftUpdateConsensus / sec",master_multiraft_consensus_update_latency:"MultiRaftUpdateConsensus Latency",master_table_ops:"Create/Delete Table RPCs",master_cpu_util_secs:"CPU Util Secs / Sec",master_yb_rpc_connections:"Inbound RPC Connections Alive",master_leaderless_and_underreplicated_tablets:"Leaderless/Underreplicated Tablets",master_max_follower_lag:"Max Follower Lag (ms)",master_load_balancer_stats:"Master load balancer statistics",master_threads_running:"Threads Running",master_log_latency:"WAL Latency",master_log_bytes_written:"WAL Bytes Written / Sec / Node",master_log_bytes_read:"WAL Bytes Read / Sec / Node",master_tc_malloc_stats:"TCMalloc Stats",master_glog_info_messages:"Glog Messages",master_lsm_rocksdb_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec",master_lsm_rocksdb_num_seeks_per_node:"LSM-DB Seeks / Sec / Node",master_lsm_rocksdb_total_sst_per_node:"SSTable size",master_lsm_rocksdb_avg_num_sst_per_node:"Average SSTables",master_lsm_rocksdb_block_cache_hit_miss:"Cache Hit & Miss",master_lsm_rocksdb_block_cache_usage:"Block cache usage",master_lsm_rocksdb_blooms_checked_and_useful:'"LSM-DB Blooms usefulness',master_lsm_rocksdb_flush_size:"Flush write",master_lsm_rocksdb_compaction:"Compaction",master_lsm_rocksdb_compaction_numfiles:"Compaction num files",master_lsm_rocksdb_compaction_time:"Compaction time",lsm_rocksdb_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec / Node",lsm_rocksdb_total_sst_per_node:"SSTable size / Node",lsm_rocksdb_avg_num_sst_per_node:"Average SSTables / Node",lsm_rocksdb_latencies_get:"LSM-DB Get Latencies",lsm_rocksdb_latencies_write:"LSM-DB Write Latencies",lsm_rocksdb_latencies_seek:"LSM-DB Seek Latencies",lsm_rocksdb_latencies_mutex:"LSM-DB Mutex Wait / Sec / Node",lsm_rocksdb_block_cache_hit_miss:"Cache Hit & Miss",lsm_rocksdb_block_cache_usage:"Block cache usage",lsm_rocksdb_blooms_checked_and_useful:"LSM-DB Blooms usefulness",lsm_rocksdb_stalls:"Stalls",lsm_rocksdb_write_rejections:"Write Rejections",lsm_rocksdb_memory_rejections:"Memory Rejections",lsm_rocksdb_flush_size:"Flush write",lsm_rocksdb_compaction:"Compaction",lsm_rocksdb_compaction_tasks:"Compaction tasks",lsm_rocksdb_compaction_time:"Compaction time",lsm_rocksdb_compaction_numfiles:"Compaction num files",lsm_rocksdb_mem_tracker_db_memtable:"Memtable Size",docdb_transaction:"Transaction",docdb_transaction_pool_cache:"Transaction pool cache hits",tablet_splitting_stats:"Tablet Splitting Operations",automatic_split_manager_time:"Tablet Split Manager",table_read_latency:"Read Op Latency (Avg)",table_read_rps:"Read Ops / Sec",table_write_latency:"Write Op Latency (Avg)",table_write_rps:"Write Ops / Sec",table_log_latency:"WAL Latency",table_log_ops_second:"WAL Ops / Sec",table_log_bytes_written:"WAL Bytes Written / Sec",table_write_lock_latency:"Write Lock Latency",table_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec",table_ops_in_flight:"Operations Inflight",table_write_rejections:"Write Rejections",table_memory_rejections:"Memory Pressure Rejections",table_compaction:"Compaction",table_block_cache_hit_miss:"Cache Hit & Miss",table_rocksdb_blooms_checked_and_useful:"LSM-DB Blooms usefulness",table_mem_tracker_db_memtable:"Memtable Size"},ii="METRICS_NAMES",oi="METRICS_OUTLIER_TABLES_NAMES",ai="METRICS_OUTLIER_DATABASES_NAMES",si=["#8c564b","#4754DB","#2FB3FF","#BB42BC","#20A7C9","#e377c2","#7f7f7f","#bcbd22","#17becf"],li={Queries:"#0B1117",Cpu:"#56C188",DiskIO:"#E48B2C",WaitOnCondition:"#B7C3CB",RPCWait:"#966919",Network:"#966919",Client:"#8046EB",IO:"#3884FB",LWLock:"#DA1515",Lock:"#E34F6E",TServerWait:"#e377c2","# vCPU":"#888888",DB:"#7879F1",NODE:"#FFD383",SQL:"#BB42BC",APP:"#2FB3FF",INFRA:"#507CE1",BACKGROUND_JOBS:"#D7DEE4",TableRead:"#966919",CatalogRead:"#966919",IndexRead:"#966919",StorageFlush:"#966919",TableWrite:"#966919",CatalogWrite:"#966919",IndexWrite:"#966919",WaitingOnTServer:"#966919",QueryProcessing:"#56C188",yb_ash_metadata:"#DA1515",YBParallelScanEmpty:"#3884FB",CopyCommandStreamRead:"#3884FB",CopyCommandStreamWrite:"#3884FB",YbAshMain:"#0B1117",YbAshCircularBuffer:"#DA1515",ProcArray:"#DA1515",QueryDiagnosticsMain:"#0B1117",YbQueryDiagnostics:"#DA1515",YbQueryDiagnosticsCircularBuffer:"#DA1515",YBTxnConflictBackoff:"#B7C3CB",OnCpu_Passive:"#56C188",OnCpu_Active:"#56C188",Idle:"#B7C3CB",Rpc_Done:"#B7C3CB",RetryableRequests_SaveToDisk:"#E48B2C",MVCC_WaitForSafeTime:"#B7C3CB",LockedBatchEntry_Lock:"#E34F6E",BackfillIndex_WaitForAFreeSlot:"#B7C3CB",CreatingNewTablet:"#E48B2C",SaveRaftGroupMetadataToDisk:"#E48B2C",TransactionStatusCache_DoGetCommitData:"#966919",WaitForYSQLBackendsCatalogVersion:"#B7C3CB",WriteSysCatalogSnapshotToDisk:"#E48B2C",DumpRunningRpc_WaitOnReactor:"#B7C3CB",ConflictResolution_ResolveConficts:"#966919",ConflictResolution_WaitOnConflictingTxns:"#B7C3CB",WAL_Append:"#E48B2C",WAL_Sync:"#E48B2C",Raft_WaitingForReplication:"#966919",Raft_ApplyingEdits:"#56C188",ConsensusMeta_Flush:"#E48B2C",ReplicaState_TakeUpdateLock:"#B7C3CB",RocksDB_ReadBlockFromFile:"#E48B2C",RocksDB_OpenFile:"#E48B2C",RocksDB_WriteToFile:"#E48B2C",RocksDB_Flush:"#56C188",RocksDB_Compaction:"#56C188",RocksDB_PriorityThreadPoolTaskPaused:"#B7C3CB",RocksDB_CloseFile:"#E48B2C",RocksDB_RateLimiter:"#B7C3CB",RocksDB_WaitForSubcompaction:"#B7C3CB",RocksDB_NewIterator:"#E48B2C",YCQL_Parse:"#56C188",YCQL_Read:"#56C188",YCQL_Write:"#56C188",YCQL_Analyze:"#56C188",YCQL_Execute:"#56C188",YBClient_WaitingOnDocDB:"#966919",YBClient_LookingUpTablet:"#966919",EMPTY_EVENT:"#F0F4F7"},ui={WAIT_EVENT_TYPE_CHART_TOOLTIP:"The tablet wait event types in a horizontal bar chart",ACTIVE_SESSIONS_PER_SECOND_TOOLTIP:"The number of active sessions per second for the tablet",SST_SIZE_TOOLTIP:"The size of the SST files for the tablet",WAL_SIZE_TOOLTIP:"The size of the write ahead log for the tablet",PARTITION_TOOLTIP:"The partition range in which the tablet is located",SIZE_TOOLTIP:"Total size of the tablet which includes SST and WAL",TABLET_ID_TOOLTIP:"The ID of the tablet",DATABASE_TYPE_TOOLTIP:"The type of the database",LEADER_NODE_TOOLTIP:"Leader node of the tablet",FOLLOWER_NODES_TOOLTIP:"Follower nodes of the tablet",EPS_TOOLTIP:"Active sessions per second",TOTAL_EPS_RATIO_TABLET_TOOLTIP:"Percentage of the system load that the tablet contributes to",TOTAL_EPS_RATIO_QUERY_LEVEL_TABLET_TOOLTIP:"Percentage of the system load that the tablet contributes to the query",DATABASE_NAME_TOOLTIP:"The name of the database",SCHEMA_NAME_TOOLTIP:"The name of the schema",TABLE_NAME_TOOLTIP:"The name of the table",UNIVERSE_ID_TOOLTIP:"The ID of the universe",NODE_NAME_TOOLTIP:"The name of the node",NODE_REGION_ZONE_TOOLTIP:"The provider and Availability Zone to which the node belongs",CONNECTIONS_TOOLTIP:"The number of connections to the node",TOTAL_EPS_RATIO_NODE_TOOLTIP:"Percentage of the system load that the node contributes to",EPS_NODE_TOOLTIP:"Active sessions per second",EVENTS_NODE_TOOLTIP:"The node wait event types in a horizontal bar chart",RPS_NODE_TOOLTIP:"The number of RPCs per second to the node",TOTAL_EPS_RATIO_QUERY_TOOLTIP:"Percentage of the system load that the query contributes to",FIRST_ACTIVE_TIME_TOOLTIP:"The first active time that the query was executed",LAST_ACTIVE_TIME_TOOLTIP:"The last active time that the query was executed",AVG_LATENCY_TOOLTIP:"The average latency of the query in milliseconds",LATENCY_P90_TOOLTIP:"The 90th percentile latency of the query in milliseconds",LATENCY_P99_TOOLTIP:"The 99th percentile latency of the query in milliseconds",QUERY_TYPE_TOOLTIP:"The type of the query which can be SQL, CQL, or BACKGROUND",TOTAL_TIME_TOOLTIP:"The execution time of the query in milliseconds",ROWS_AVG_TOOLTIP:"The average number of rows returned per call of the query",RPS_TOOLTIP:"The number of calls per second to the query",ACTIVE_SESSIONS_PER_SECOND_QUERY_TOOLTIP:"The number of active sessions per second for the query",EVENTS_QUERY_TOOLTIP:"The wait event types for the query in a horizontal bar chart",QUERY_TEXT_TOOLTIP:"The text of the query"},ci={DB_ID:"",TOTAL_EPS_RATIO:"Total Load",EPS:"Avg Active Context",EVENTS:"Wait Event Types",FIRST_ACTIVE_TIME:"First Active Time",LAST_ACTIVE_TIME:"Last Active Time",AVG_LATENCY:"Avg Latency (ms)",LATENCY_P90:"P90 Latency (ms)",LATENCY_P99:"P99 Latency (ms)",NAMESPACE_NAME:"Database",QUERY:"Query",QUERY_ID:"Query ID",QUERY_TYPE:"Query Type",ROWS_AVG:"Avg Rows/Call",RPS:"Calls/Sec",TOTAL_TIME:"Total Time (ms)",UNIVERSE_ID:"Universe ID"},di="Add Columns",hi={UNIVERSE_PA_STATUS_ERROR:"Universe is not registered to TP, please register to view data",UNIVERSE_DETAILS_ERROR:"Failed to fetch anomalies list, please try again.",ANOMALIES_FETCH_ERROR:"Failed to retrieve anomalies, please try again.",SHOW_MORE_ANOMALIES_FETCH_ERROR:"Failed to retrieve additional anomalies, please try again.",ANOMALY_SCHEDULE_ERROR:"Failed to schedule anomaly detection, please try again.",RUNTIME_CONFIGS_ERROR:"Failed to fetch runtime configs, please try again.",RCA_GRAPHS_FETCH_ERROR:"Failed to fetch anomaly RCA graphs, please try again.",GANTCHART_FETCH_ERROR:"Failed to fetch anomaly Gantt chart, please try again.",QUERIES_GRAPHS_FETCH_ERROR:"Failed to fetch query supporting graphs, please try again.",METRICS_GRAPHS_FETCH_ERROR:"Failed to fetch metrics graphs, please try again.",HISTORICAL_QUERY_DATA_FETCH_ERROR:"Failed to fetch historical query data, please try again.",TABLETS_DATA_FETCH_ERROR:"Failed to fetch tablets data, please try again.",NODE_LOAD_DATA_FETCH_ERROR:"Failed to fetch node load data, please try again.",CLUSTER_LOAD_FETCH_ERROR:"Failed to fetch cluster load data, please try again.",QUERY_STATS_FETCH_ERROR:"Failed to fetch query stats, please try again.",DB_STATS_FETCH_ERROR:"Failed to fetch DB metadata, please try again."},pi="visibleQueryMetadataColumns",fi="visibleDbLoadMetadataColumns",mi="visibleTabletsMetadataColumns",vi="visibleTabletDrilldownMetadataColumns",gi="visibleNodeLoadMetadataColumns",yi="CPU",_i="IO",bi=function(t,n,r,i){if(0!==r){return function(r,o,a,s,l){return e(mn,{total:r,page:o,rowsPerPage:a,onPageSizeChange:s,dataPrefetchFn:t,rowsPerPageOptions:wr,showRecordsPerPage:!0,recordsPerPageCaption:e("span",{children:n}),onPageChange:l,hasMoreData:i})}}},xi=le((function(e){return{recommendation:{background:e.palette.common.white,border:"1px solid ".concat(e.palette.grey[300]),borderRadius:e.shape.borderRadius,padding:e.spacing(2,2.5),position:"relative",marginBottom:e.spacing(3)},disabled:{cursor:"not-allowed",color:"#999999"},tagGreen:{color:"#206263"},flexRow:{display:"flex",flexDirection:"row"},flexColumn:{display:"flex",flexDirection:"column"},inProgressIcon:{color:"#1A44A5"},icon:{height:"40px",width:"40px"},loadingBox:{display:"flex",justifyContent:"center"},tabGroup:{display:"flex",flexDirection:"column",gap:"16px",paddingLeft:"1px"},tabButton:{padding:"12px 16px",minWidth:"130px",height:"40px",boxSizing:"border-box",borderRadius:"8px"},selectedTab:{margin:"0 -1px",backgroundColor:"#F7F7F7",border:"1px solid #C8C8C8"},tabPanel:{padding:"32px"},noTabBorder:{borderBottom:"unset"},tabBox:{marginTop:e.spacing(3),border:"1px solid ".concat(e.palette.grey[300]),borderRadius:"8px"},metricsBox:{backgroundColor:"#FFFFFF",border:"1px solid ".concat(e.palette.grey[300]),borderRadius:"8px",padding:"0px 16px 16px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiMenu-list":{maxHeight:"400px"}},regularText:{fontWeight:400,fontSize:"13px"},detectionButton:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},floatRight:{float:"right"},restrictLines:{display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,maxHeight:"4.5em",lineHeight:"1.5em"},searchInput:{minWidth:"220px",maxWidth:"350px",marginLeft:e.spacing(2),flexGrow:1,marginRight:"auto",height:"36px"},selectBox:{width:"180px",height:"36px"},mainGraphBox:{border:"1px solid #D7DEE4",borderRadius:"8px",padding:e.spacing(2),paddingTop:0,display:"flex",margin:0,flexDirection:"column",backgroundColor:"#FFFFFF"},mainGraphMetadataBox:{display:"flex",width:"100%",justifyContent:"flex-start"},anomalyMetadataOneBox:{flexBasis:"70%",textAlign:"left",padding:"16px 16px 16px 0",display:"flex",flexDirection:"column"},anomalyMetadataTwoBox:{flexBasis:"40%",padding:e.spacing(2),textAlign:"left",display:"flex",flexDirection:"column"},headerTitle:{fontWeight:500,fontSize:"11.5px",fontFamily:"Inter",color:"#6D7C88"},metadataDetails:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#4E5F6D",marginTop:e.spacing(1),marginBottom:e.spacing(1)},regularMetadata:{fontWeight:400,fontSize:"13px",color:"#0B1117"},boxContainer:{border:"1px solid #E9EEF2",borderRadius:"8px"},headerMetadataBox:{padding:e.spacing(2),backgroundColor:"#F0F4F7",gap:"16px"},causesBox:{border:"1px solid #E9EEF2",backgroundColor:"#FFFFFF",borderRadius:"8px",padding:"8px 16px 16px 16px",margin:"16px 0px 8px 0px"},causeTabButton:{minWidth:"fit-content",marginRight:"8px !important",paddingLeft:"16px !important",paddingRight:"16px !important","& .yb-MuiTab-root":{maxWidth:"264px"}},causeTabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},causeText:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#000000"},descriptionText:{fontFamily:"Inter",fontSize:"13px",fontWeight:400,marginTop:e.spacing(1),marginBottom:e.spacing(1),marginLeft:e.spacing(1)},tag:{borderRadius:"4px",backgroundColor:"#E9EEF2",padding:"2px 6px 4px 6px",width:"fit-content"},tagName:{fontFamily:"Inter",fontSize:"11.5px",fontWeight:400,color:"#4E5F6D",borderRadius:"8px"},metadataName:{fontFamily:"Inter",fontSize:"13px",fontWeight:400},breadCrumb:{position:"relative","& .MuiSvgIcon-root":{fontSize:e.spacing(4)}},breadCrumbText:{fontWeight:600,fontStyle:"semibold",fontSize:"15px"},ybBreadcrumbWrapper:{"& .yb-MuiBreadcrumbs-li button, & .yb-MuiBreadcrumbs-li p, & .yb-MuiBreadcrumbs-li .yb-MuiTypography-root, & .yb-MuiBreadcrumbs-li .yb-MuiLink-root":{fontSize:"15px !important",fontWeight:"600 !important",lineHeight:"20px !important"},"& .yb-MuiBreadcrumbs-separator":{fontSize:"13px",fontWeight:"400",lineHeight:"16px"}},breadcrumbColor:{color:"#2B59C3"},breadcrumbDefaultColor:{color:"#0B1117"},anomalyCategoryText:{color:"#0B1117",fontWeight:600},dateTimePicker:{"& .MuiFormControl-root":{height:"32px !important"},height:"32px !important"},panelItemBody:{padding:0,backgroundColor:"transparent"},rcaGantChartBox:{width:"100%",padding:"16px 48px 16px 40px",marginLeft:"0px",borderRadius:"8px",border:"1px solid #D7DEE4"},tabPanelPrimary:{padding:"0px !important"},overrideMuiTableContainer:{marginTop:e.spacing(3),"& .yb-MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTableContainerWeb:{marginTop:e.spacing(3),"& .yb-MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTable:{marginTop:e.spacing(2),textAlign:"center","& .yb-MuiTableCell-sizeSmall":{textAlign:"center"},"& .yb-MuiSelect-select":{fontSize:"13px"}},tableBorder:{borderRight:"1px solid #ccc"},tableHeaderCell:{position:"relative","&:first-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)")}},"&:last-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)"),right:e.spacing(2)}},"&:before":{content:'""',position:"absolute",right:0,bottom:0,height:"1px",width:"100%"}},overrideMuiSelect:{width:"210px",height:"36px"},label:{fontFamily:"Inter, sans-serif",fontStyle:"normal",fontSize:"13px"},tooltip:{maxWidth:"400px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden",whiteSpace:"normal",padding:e.spacing(1)},gridBox:{display:"grid",gap:"16px",width:"100%",gridAutoFlow:"row"},gridBoxDouble:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},gridBoxSingle:{gridTemplateColumns:"repeat(1, minmax(0, 1fr))"},gridBoxThree:{gridTemplateColumns:"repeat(3, minmax(0, 1fr))"},dataBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF"},headerContainerYBM:{paddingLeft:e.spacing(2)},anomalyTypeTag:{height:"24px",backgroundColor:"#E8E9FE",borderRadius:"6px",padding:"4px 6px 4px 6px"},anomalyTypeText:{color:"#30307F",fontFamily:"Inter",fontSize:"11.5px",fontWeight:400,verticalAlign:"super"},stickyHeader:{position:"sticky",top:0,zIndex:1100,backgroundColor:"transparent"},stickyHeaderYBM:{backgroundColor:"transparent"},infoIcon:{color:"#97A5B0",marginBottom:"2px",marginLeft:e.spacing(.5)},filterContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},filterLeftContainer:{gap:e.spacing(1),display:"flex",flexDirection:"row",alignItems:"center"},ybOverrideMuiInput:{"& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiMenu-list":{maxHeight:"400px"}},ybOverrideMuiSelect:{width:"210px",height:"32px","& .yb-MuiFormControl-root":{height:"32px !important"}},ybSearchInput:{width:"338px",marginRight:"auto",height:"32px"},ybSelectBox:{width:"180px",height:"32px"},headerBox:{display:"flex",flexDirection:"row",alignItems:"center"},headerText:{fontWeight:600,fontSize:"11.5px"},noteTextContainer:{marginTop:e.spacing(1)},noteText:{display:"flex",flexDirection:"row",alignItems:"center",gap:e.spacing(.5),fontWeight:400,fontSize:"11.5px",color:"#4E5F6D"},noteTextBold:{fontWeight:600},ghantChartContainer:{backgroundColor:"#FFFFFF"},secondRow:{display:"flex",flexDirection:"row",margin:e.spacing(2,0),justifyContent:"flex-end"},ybTabs:{flex:1,flexGrow:1,"& .yb-MuiTabs-scroller":{boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[200]," !important")}},mainContainerBorder:{borderWidth:"1px 1px 0px 1px"},mainContainer:{backgroundColor:"#FFFFFF",border:"1px solid #E9EEF2",borderRadius:"8px",display:"flex",flexDirection:"column"},headerContainer:{padding:e.spacing(2),height:"64px",alignContent:"center"},loadFilterContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},metadataContainer:{padding:"0px 16px 16px 16px",display:"flex",flexDirection:"column"},tabletNodeLoadMetadataTableCell:{padding:"4px 10px"},queryLoadMetadataTableCell:{padding:"12px 10px"},dividerStyle:{marginRight:e.spacing(2)},metricSplitSelectorBox:{gap:e.spacing(2),marginTop:e.spacing(2)}}})),wi=function(e){var r=e.rowData,i=e.appName,o=e.onSelectedQuery,a=e.onClose;xi();var s=r.databaseId,l=r.queryId,u=r.universeId,c=r.queryType,d=c===Tn.SQL||c===Tn.BACKGROUND;return t(n,{children:[(i===Sn.YBM||i===Sn.YBA)&&function(){a();var e=null,t=new URLSearchParams(window.location.search);t.set("type",c),t.set("queryId",l),t.set("universeId",u),d?(e={queryId:l,dbId:null==s?void 0:s.toString(),universeId:u,type:c},t.set("dbId",e.dbId)):e={queryId:l,universeId:u,type:c},null==o||o(l.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"/").concat(l,"?").concat(t.toString()))}(),i===Sn.WEB&&function(e,t,n){a();var r=window.location.pathname,o=new URLSearchParams(window.location.search);o.set("universeId",n),o.set("type",c),d&&o.set("dbId",t),i===Sn.YBA&&o.set("queryId",l);var s=o.toString(),u="".concat(r,"/").concat(e).concat(s?"?".concat(s):"");window.open(u,"_blank")}(l,null==s?void 0:s.toString(),u)]})},Si=i.memo((function(n){var r=n.appName;n.currentTablePage;var i=n.displayedRows,o=n.classes,a=n.showQuery,l=n.tableColumns,u=n.ignoredColumns;n.startTime,n.endTime;var c=n.onSelectedQuery,d=n.expandedRowIndex,h=n.handleExpandedRowIndex,p=n.dataIndex,f=n.data,m=l.filter((function(e){return!u.includes(e.name)})).length>0;return t(s,{children:[e(T,Me({className:o.tableRow,onClick:function(e){h(d!==p?p:null)}},{children:m&&f.map((function(t,n){return void 0!==t?e(C,Me({className:a?o.rowTableCell:"",style:{overflow:"visible",position:"relative",paddingTop:8,paddingBottom:8}},{children:t}),"TableHelper-row-".concat(p,"-body-cell-").concat(n)):null}))}),"TableHelper-queries-row-".concat(String(f[0]))),d===p&&e(wi,{appName:r,rowData:i[p],onSelectedQuery:c,onClose:function(){return h(null)}})]})})),Ti=function(t,n,r,i,o,a,s,l,u,c,d,h){return function(p,f){return e(Si,{appName:t,currentTablePage:n,displayedRows:r,classes:i,showQuery:o,tableColumns:a,ignoredColumns:s,startTime:l,endTime:u,onSelectedQuery:h,expandedRowIndex:c,handleExpandedRowIndex:d,dataIndex:f,data:p})}},Ci=function(e){var t=e.rowData;e.rowMeta;var n=e.appName,r=e.onClose,i=e.onSelectedQuery,o=e.isDbQueryLoadMetadata,a=void 0!==o&&o,s=e.onNavigateToUrl,l=t[0],u=t[10],c=t[16],d=t[11],h=d===Tn.SQL||d===Tn.BACKGROUND;n===Sn.YBM||n===Sn.YBA?function(){r();var e=null,t=new URLSearchParams(window.location.search);t.set("type",d),t.set("queryId",u),t.set("universeId",c),h?(e={queryId:u,dbId:null==l?void 0:l.toString(),universeId:c,type:d},t.set("dbId",e.dbId)):e={queryId:u,universeId:c,type:d};var n="".concat(window.location.pathname,"/").concat(u,"?").concat(t.toString());a&&(n="".concat(window.location.pathname,"/queries/").concat(u,"?").concat(t.toString())),null==i||i(u.toString(),e),null==s||s(n)}():n===Sn.WEB&&function(e,t,i){r();var o=window.location.pathname,s=new URLSearchParams(window.location.search);s.set("universeId",i),s.set("type",d),h&&s.set("dbId",t),n===Sn.YBA&&s.set("queryId",u);var l=s.toString(),c="".concat(o,"/").concat(e).concat(l?"?".concat(l):"");a&&(c="".concat(o,"/queries/").concat(e).concat(l?"?".concat(l):"")),window.open(c,"_blank")}(u,null==l?void 0:l.toString(),c)},Ii=function(t){var n=t.name,r=t.rules,i=t.defaultValue,o=t.control,a=t.shouldUnregister,s=Ee(t,["name","rules","defaultValue","control","shouldUnregister"]),l=xt({name:n,rules:r,defaultValue:i,control:o,shouldUnregister:a}).field;l.ref;var u=l.value,c=Ee(l,["ref","value"]);return e(V,Me({},c,{inputProps:{"data-testid":"YBToggleField-".concat(n)}},s,{checked:!!u}))},Mi=function(t){var n,r,i,o,a,s,u,c,d,h,p,f=t.metricSplitSelectors,m=t.onSplitTypeSelected,v=t.anomalyData,g=0;(null===(r=null===(n=null==v?void 0:v.lastInstance)||void 0===n?void 0:n.defaultSettings)||void 0===r?void 0:r.splitMode)===Mn.NONE&&(null===(o=null===(i=null==v?void 0:v.lastInstance)||void 0===i?void 0:i.defaultSettings)||void 0===o?void 0:o.splitType)===En.NONE&&(g=0),(null===(s=null===(a=null==v?void 0:v.lastInstance)||void 0===a?void 0:a.defaultSettings)||void 0===s?void 0:s.splitMode)!==Mn.TOP&&(null===(c=null===(u=null==v?void 0:v.lastInstance)||void 0===u?void 0:u.defaultSettings)||void 0===c?void 0:c.splitMode)!==Mn.BOTTOM||(g=(null===(h=null===(d=null==v?void 0:v.lastInstance)||void 0===d?void 0:d.defaultSettings)||void 0===h?void 0:h.splitType)===En.NODE?1:2);var y=l(g),_=y[0],b=y[1],w=f.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){m(e.value),b(t)},buttonProps:{dataTestId:"MetricSplitSelector-MetricSplitButton-".concat(e.value)}}}));return e(x,Me({display:"flex",flexDirection:"row"},{children:e(W,{divider:!0,buttons:w,value:null===(p=f[_])||void 0===p?void 0:p.value,dataTestId:"MetricTypeSelector-MetricMeasureButton"})}))},Ei=[{value:3,label:"3"},{value:5,label:"5"},{value:10,label:"10"}],Ai=le((function(e){return{icon:{marginRight:e.spacing(1)},input:{width:"60px",height:"32px"},overrideMuiInput:{height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"}}}})),Di=function(n){var r,i=n.metricOutlierSelectors,o=n.selectedNumNodes,a=n.outlierType,s=n.onOutlierTypeSelected,u=n.onNumNodesChanged,c=n.metricMeasure,d=n.showNumNodesInput,h=void 0===d||d,p=n.showNumNodesSelector,f=void 0!==p&&p,m=Ai(),v=l(a===Mn.TOP?0:1),g=v[0],y=v[1],_=i.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){s(e.value),y(t)},buttonProps:{dataTestId:"OutlierSelector-OutlierButton-".concat(e.value)}}}));return t(x,Me({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e(x,{children:e(W,{divider:!0,buttons:_,dataTestId:"OutlierSelector-OutlierButton",value:null===(r=i[g])||void 0===r?void 0:r.value})}),h&&e(x,Me({ml:2},{children:e(U,{type:"number",className:m.input,inputProps:{min:1},dataTestId:"OutlierSelector-NumNodesInput",value:o,onChange:function(e){return u(e.target.value)},inputMode:"numeric"})})),f&&e(x,Me({ml:1,mr:1},{children:e(z,Me({style:{width:"80px"},className:m.overrideMuiInput,dataTestId:"OutlierSelector-NumNodesSelector",value:o,onChange:function(e){return u(e.target.value)}},{children:Ei.map((function(t){return e(S,Me({value:t.value},{children:t.label}),t.value)}))}))})),e(I,Me({variant:"body2",style:{marginRight:"8px"}},{children:wn[c]}))]}))};function Oi(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ni=Array.isArray,Ri="object"==typeof global&&global&&global.Object===Object&&global,Li="object"==typeof self&&self&&self.Object===Object&&self,Pi=Ri||Li||Function("return this")(),ki=Pi.Symbol,Bi=Object.prototype,Fi=Bi.hasOwnProperty,Ui=Bi.toString,zi=ki?ki.toStringTag:void 0;var Hi=Object.prototype.toString;var Vi=ki?ki.toStringTag:void 0;function Wi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Vi&&Vi in Object(e)?function(e){var t=Fi.call(e,zi),n=e[zi];try{e[zi]=void 0;var r=!0}catch(e){}var i=Ui.call(e);return r&&(t?e[zi]=n:delete e[zi]),i}(e):function(e){return Hi.call(e)}(e)}function Yi(e){return null!=e&&"object"==typeof e}function ji(e){return"string"==typeof e||!Ni(e)&&Yi(e)&&"[object String]"==Wi(e)}function Gi(e){return null!=e}function qi(e){return Ni(e)&&0===e.length}function Qi(e){return Ni(e)&&e.length>0}function Zi(e){return null==e||Oi(e)&&0===Object.keys(e).length}function Xi(e){return void 0===e||Oi(e)&&0===Object.keys(e).length}function $i(e){return Oi(e)&&Object.keys(e).length>0}function Ki(e){return ji(e)&&e.trim().length>0}function Ji(e){return ji(e)&&0===e.trim().length}var eo=Gi;function to(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]}function no(e){for(var t=0;t<e.length;t++)if(Qi(e[t].y))for(var n=0;n<e[t].y.length;n++)if(Number(e[t].y[n])>1e3)return!0;return!1}var ro="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='M13.0911 7.70567H3V4.60325C3 4.31623 2.82388 4 2.37381 4C1.92374 4 1.74762 4.31623 1.74762 4.60325V8.78291H13.0911L10.8545 11.0805C10.6362 11.2909 10.6362 11.6319 10.8545 11.8422C11.0729 12.0526 11.4269 12.0526 11.6452 11.8422L14.8362 8.62515C15.0546 8.41481 15.0546 8.07377 14.8362 7.86343L11.6452 4.60325C11.4269 4.39291 11.0729 4.39291 10.8545 4.60325C10.6362 4.81359 10.6362 5.15463 10.8545 5.36497L13.0911 7.70567Z' fill='%23232329' fill-opacity='0.4'/%3e%3c/svg%3e",io=le((function(e){return{selectBox:{minWidth:"300px"},menuItem:{marginTop:e.spacing(.5)},regularText:{color:e.palette.grey[600],marginTop:e.spacing(.5),marginBottom:e.spacing(.5)},overrideMuiInput:{height:"32px","& .MuiMenu-list":{maxHeight:"400px"},"& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiInputBase-root":{width:"300px",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px"}},icon:{marginRight:e.spacing(1)}}})),oo="All Zones and Nodes",ao=function(n){var r=n.selectedItem,i=n.primaryZoneToNodesMap,o=n.asyncZoneToNodesMap,a=n.onZoneNodeSelected,s=io();return e(z,Me({className:Re(s.selectBox,s.overrideMuiInput),dataTestId:"YBZoneNodeSelector-Zone",value:r},{children:function(n,r){var i=[];i.push(e(S,Me({value:oo,onClick:function(e){a(!1,!1,oo)}},{children:oo}),oo)),i.push(e(M,{},"divider-all-zones"));for(var o=n.values(),l=o.next(),u=function(){var n=l.value,r=n.zoneName,u=n.nodeNames;r&&i.push(e(S,Me({value:r,onClick:function(e){a(!0,!1,r)},className:s.menuItem},{children:r}),r)),Qi(u)&&u.forEach((function(n){i.push(t(S,Me({value:n,onClick:function(e){a(!1,!0,n)},className:s.regularText},{children:[e("img",{className:s.icon,src:ro,alt:"Indicator towards metric measure to use"}),n]}),"primary-".concat(r,"-").concat(n)))})),l=o.next()};$i(l.value);)u();if((null==r?void 0:r.size)>0){i.push(e(M,{},"divider-async-zones"));for(var c=r.values(),d=c.next(),h=function(){var n=d.value,r=n.zoneName,o=n.nodeNames;r&&i.push(e(S,Me({value:r,onClick:function(e){a(!0,!1,r)}},{children:r}),r)),Qi(o)&&o.forEach((function(n){i.push(t(S,Me({value:n,onClick:function(e){a(!1,!0,n)},className:s.regularText},{children:[e("img",{className:s.icon,src:ro,alt:"Indicator towards metric measure to use"}),n]}),"async-".concat(r,"-").concat(n)))})),d=c.next()};$i(d.value);)h()}return i}(i,o)}))},so=le((function(e){return{selectBox:{minWidth:"300px"},menuItem:{marginTop:e.spacing(.5)},regularText:{color:e.palette.grey[600],marginTop:e.spacing(.5),marginBottom:e.spacing(.5)},overrideMuiInput:{height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiInputBase-root":{minWidth:"300px",borderTopRightRadius:"0px",borderBottomRightRadius:"0px"}},icon:{marginRight:e.spacing(1)}}})),lo=function(n){var r=n.selectedItem,i=n.primaryClusterToRegionMap,o=n.asyncClusterToRegionMap,a=n.onClusterRegionSelected,s=so();return e(z,Me({className:Re(s.selectBox,s.overrideMuiInput),dataTestId:"cluster-region-select",value:r},{children:i.size>0&&function(n,r){var i=[];i.push(e(S,Me({value:$n,onClick:function(e){a(!1,!1,$n,!1)}},{children:$n}),$n)),i.push(e(M,{},"divider-all-regions"));var o=n.values().next().value,l=o.cluster,u=o.regions,c=o.uuid;if(Ki(l)&&i.push(e(S,Me({value:c,onClick:function(e){a(!0,!1,c,!0)},className:s.menuItem},{children:l}),c)),Qi(u)&&u.forEach((function(n){i.push(t(S,Me({value:n,onClick:function(e){a(!1,!0,n,!0)},className:s.regularText},{children:[e("img",{className:s.icon,src:ro,alt:"Indicator towards metric measure to use"}),n]}),"primary-".concat(c,"-").concat(n)))})),(null==r?void 0:r.size)>0){i.push(e(M,{},"divider-async-regions"));var d=r.values().next().value,h=d.cluster,p=d.regions,f=d.uuid;Ki(h)&&i.push(e(S,Me({value:f,onClick:function(e){a(!0,!1,f,!0)}},{children:h}),f)),Qi(p)&&p.forEach((function(n){i.push(t(S,Me({value:n,onClick:function(e){a(!1,!0,n,!0)},className:s.regularText},{children:[e("img",{className:s.icon,src:ro,alt:"Indicator towards metric measure to use"}),n]}),"async-".concat(f,"-").concat(n)))}))}return i}(i,o)}))},uo=function(t){var n=t.name,r=t.rules,i=t.defaultValue,o=t.control,a=t.shouldUnregister,s=Ee(t,["name","rules","defaultValue","control","shouldUnregister"]),l=xt({name:n,rules:r,defaultValue:i,control:o,shouldUnregister:a}).field;return e(Y,Me({name:l.name,inputRef:l.ref,checked:!!l.value,onBlur:l.onBlur,onChange:l.onChange},s))},co=j.ybaTheme,ho=function(t){var n=t.children,r=t.appName;return e(G,Me({theme:r===Sn.YBM?q:co},{children:n}))};function po(e){return po="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},po(e)}function fo(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function mo(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function vo(e){mo(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===po(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var go={};function yo(){return go}function _o(e){if(mo(1,arguments),!function(e){return mo(1,arguments),e instanceof Date||"object"===po(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=vo(e);return!isNaN(Number(t))}var bo={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function xo(e,t,n){mo(2,arguments);var r,i=function(e,t){return mo(2,arguments),vo(e).getTime()-vo(t).getTime()}(e,t)/36e5;return((r=null==n?void 0:n.roundingMethod)?bo[r]:bo.trunc)(i)}function wo(e,t){return mo(2,arguments),function(e,t){mo(2,arguments);var n=vo(e).getTime(),r=fo(t);return new Date(n+r)}(e,-fo(t))}function So(e){mo(1,arguments);var t=vo(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function To(e){mo(1,arguments);var t=vo(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=So(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=So(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Co(e){mo(1,arguments);var t=vo(e),n=So(t).getTime()-function(e){mo(1,arguments);var t=To(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),So(n)}(t).getTime();return Math.round(n/6048e5)+1}function Io(e,t){var n,r,i,o,a,s,l,u;mo(1,arguments);var c=yo(),d=fo(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=vo(e),p=h.getUTCDay(),f=(p<d?7:0)+p-d;return h.setUTCDate(h.getUTCDate()-f),h.setUTCHours(0,0,0,0),h}function Mo(e,t){var n,r,i,o,a,s,l,u;mo(1,arguments);var c=vo(e),d=c.getUTCFullYear(),h=yo(),p=fo(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:h.firstWeekContainsDate)&&void 0!==r?r:null===(l=h.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(d+1,0,p),f.setUTCHours(0,0,0,0);var m=Io(f,t),v=new Date(0);v.setUTCFullYear(d,0,p),v.setUTCHours(0,0,0,0);var g=Io(v,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=g.getTime()?d:d-1}function Eo(e,t){mo(1,arguments);var n=vo(e),r=Io(n,t).getTime()-function(e,t){var n,r,i,o,a,s,l,u;mo(1,arguments);var c=yo(),d=fo(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),h=Mo(e,t),p=new Date(0);return p.setUTCFullYear(h,0,d),p.setUTCHours(0,0,0,0),Io(p,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function Ao(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var Do={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Ao("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Ao(n+1,2)},d:function(e,t){return Ao(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Ao(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Ao(e.getUTCHours(),t.length)},m:function(e,t){return Ao(e.getUTCMinutes(),t.length)},s:function(e,t){return Ao(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Ao(Math.floor(r*Math.pow(10,n-3)),t.length)}},Oo="midnight",No="noon",Ro="morning",Lo="afternoon",Po="evening",ko="night",Bo={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Do.y(e,t)},Y:function(e,t,n,r){var i=Mo(e,r),o=i>0?i:1-i;return"YY"===t?Ao(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Ao(o,t.length)},R:function(e,t){return Ao(To(e),t.length)},u:function(e,t){return Ao(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ao(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ao(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Do.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Ao(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=Eo(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ao(i,t.length)},I:function(e,t,n){var r=Co(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ao(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Do.d(e,t)},D:function(e,t,n){var r=function(e){mo(1,arguments);var t=vo(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ao(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ao(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ao(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Ao(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?No:0===i?Oo:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?Po:i>=12?Lo:i>=4?Ro:ko,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Do.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Do.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ao(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ao(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Do.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Do.s(e,t)},S:function(e,t){return Do.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Uo(i);case"XXXX":case"XX":return zo(i);default:return zo(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return Uo(i);case"xxxx":case"xx":return zo(i);default:return zo(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Fo(i,":");default:return"GMT"+zo(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Fo(i,":");default:return"GMT"+zo(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return Ao(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return Ao((r._originalDate||e).getTime(),t.length)}};function Fo(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+Ao(o,2)}function Uo(e,t){return e%60==0?(e>0?"-":"+")+Ao(Math.abs(e)/60,2):zo(e,t)}function zo(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+Ao(Math.floor(i/60),2)+n+Ao(i%60,2)}var Ho=Bo,Vo=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Wo=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Yo={p:Wo,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return Vo(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Vo(i,t)).replace("{{time}}",Wo(o,t))}},jo=Yo,Go=["D","DD"],qo=["YY","YYYY"];function Qo(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Zo={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xo=function(e,t,n){var r,i=Zo[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ko={date:$o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:$o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Jo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ea=function(e,t,n,r){return Jo[e]};function ta(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var na={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ta({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ta({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ta({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ta({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ta({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function ra(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var ia,oa={ordinalNumber:(ia={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(ia.matchPattern);if(!n)return null;var r=n[0],i=e.match(ia.parsePattern);if(!i)return null;var o=ia.valueCallback?ia.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:ra({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ra({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ra({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ra({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ra({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},aa={code:"en-US",formatDistance:Xo,formatLong:Ko,formatRelative:ea,localize:na,match:oa,options:{weekStartsOn:0,firstWeekContainsDate:1}},sa=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,la=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ua=/^'([^]*?)'?$/,ca=/''/g,da=/[a-zA-Z]/;function ha(e,t,n){var r,i,o,a,s,l,u,c,d,h,p,f,m,v,g,y,_,b;mo(2,arguments);var x=String(t),w=yo(),S=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:w.locale)&&void 0!==r?r:aa,T=fo(null!==(o=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(u=n.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:w.firstWeekContainsDate)&&void 0!==a?a:null===(d=w.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=fo(null!==(p=null!==(f=null!==(m=null!==(v=null==n?void 0:n.weekStartsOn)&&void 0!==v?v:null==n||null===(g=n.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:w.weekStartsOn)&&void 0!==f?f:null===(_=w.locale)||void 0===_||null===(b=_.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var I=vo(e);if(!_o(I))throw new RangeError("Invalid time value");var M=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(I),E=wo(I,M),A={firstWeekContainsDate:T,weekStartsOn:C,locale:S,_originalDate:I};return x.match(la).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,jo[t])(e,S.formatLong):e})).join("").match(sa).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(ua);if(!t)return e;return t[1].replace(ca,"'")}(r);var o,a=Ho[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(o=r,-1===qo.indexOf(o))||Qo(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==Go.indexOf(e)}(r)||Qo(r,t,String(e)),a(E,r,S.localize,A);if(i.match(da))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}var pa=0,fa=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p,f,m;return{dbId:null===(r=null===(n=null===(t=null==e?void 0:e.mainGraphs[0])||void 0===t?void 0:t.filters)||void 0===n?void 0:n.dbId)||void 0===r?void 0:r[0],queryId:null===(a=null===(o=null===(i=null==e?void 0:e.mainGraphs[0])||void 0===i?void 0:i.filters)||void 0===o?void 0:o.queryId)||void 0===a?void 0:a[0],tabletId:null===(u=null===(l=null===(s=null==e?void 0:e.mainGraphs[0])||void 0===s?void 0:s.filters)||void 0===l?void 0:l.tabletId)||void 0===u?void 0:u[0],tableName:null===(h=null===(d=null===(c=null==e?void 0:e.mainGraphs[0])||void 0===c?void 0:c.filters)||void 0===d?void 0:d.tableName)||void 0===h?void 0:h[0],dbName:null===(m=null===(f=null===(p=null==e?void 0:e.mainGraphs[0])||void 0===p?void 0:p.filters)||void 0===f?void 0:f.dbName)||void 0===m?void 0:m[0]}},ma=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p,f,m,v,g,y,_,b;return{dbId:null===(i=null===(r=null===(n=null===(t=null==e?void 0:e.lastInstance)||void 0===t?void 0:t.mainGraphs[0])||void 0===n?void 0:n.filters)||void 0===r?void 0:r.dbId)||void 0===i?void 0:i[0],queryId:null===(l=null===(s=null===(a=null===(o=null==e?void 0:e.lastInstance)||void 0===o?void 0:o.mainGraphs[0])||void 0===a?void 0:a.filters)||void 0===s?void 0:s.queryId)||void 0===l?void 0:l[0],tabletId:null===(h=null===(d=null===(c=null===(u=null==e?void 0:e.lastInstance)||void 0===u?void 0:u.mainGraphs[0])||void 0===c?void 0:c.filters)||void 0===d?void 0:d.tabletId)||void 0===h?void 0:h[0],tableName:null===(v=null===(m=null===(f=null===(p=null==e?void 0:e.lastInstance)||void 0===p?void 0:p.mainGraphs[0])||void 0===f?void 0:f.filters)||void 0===m?void 0:m.tableName)||void 0===v?void 0:v[0],dbName:null===(b=null===(_=null===(y=null===(g=null==e?void 0:e.lastInstance)||void 0===g?void 0:g.mainGraphs[0])||void 0===y?void 0:y.filters)||void 0===_?void 0:_.dbName)||void 0===b?void 0:b[0]}},va=function(e){var t,n,r,i,o=new Map,a=new Map,s=new Map,l=new Map,u=new Map,c=null==e?void 0:e.universeDetails;if(c){var d=c.nodeDetailsSet,h=c.clusters,p=xa(h),f=function(e){if(Qi(e)){var t=e.filter((function(e){return"ASYNC"===e.clusterType}));if(1===t.length)return t[0]}return null}(h),m=null===(t=p.placementInfo.cloudList)||void 0===t?void 0:t[0].regionList,v=null===(i=null===(r=null===(n=null==f?void 0:f.placementInfo)||void 0===n?void 0:n.cloudList)||void 0===r?void 0:r[0])||void 0===i?void 0:i.regionList,g=p.uuid,y=null==f?void 0:f.uuid,_=m.map((function(e){return e.code})),b=null==v?void 0:v.map((function(e){return e.code}));o.set("Primary",{cluster:"Primary",regions:_,uuid:g}),f&&a.set("Async",{cluster:"Read Replica",regions:b,uuid:y});for(var x=0,w=d;x<w.length;x++){var S=w[x],T=S.cloudInfo,C=S.placementUuid,I=S.nodeName;u.set(I,{nodeName:I,ip:T.private_ip}),C===g?s.set(T.az,{zoneName:T.az,nodeNames:_a(d,T.az,g),isReadReplica:!1,regionName:T.region}):l.set(T.az,{zoneName:T.az,nodeNames:_a(d,T.az,y),isReadReplica:!0,regionName:T.region})}}return{primaryZoneMapping:s,asyncZoneMapping:l,primaryClusterMapping:o,asyncClusterMapping:a,nodeIPMapping:u}},ga=function(e){var t=new Map,n=new Map,r=new Map,i=new Map,o=null==e?void 0:e.data;if(o)for(var a=0,s=o;a<s.length;a++){var l=s[a],u=l.cloud_info,c=l.is_read_replica;c?n.set("Async",{cluster:"Read Replica",regions:ba(o,!0)}):t.set("Primary",{cluster:"Primary",regions:ba(o,!1)}),c?i.set(u.zone,{zoneName:u.zone,nodeNames:ya(o,u.zone,!0),isReadReplica:c,regionName:u.region}):r.set(u.zone,{zoneName:u.zone,nodeNames:ya(o,u.zone,!1),isReadReplica:c,regionName:u.region})}return{primaryZoneMapping:r,asyncZoneMapping:i,primaryClusterMapping:t,asyncClusterMapping:n}},ya=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i],s=a.name,l=a.cloud_info,u=a.is_read_replica;t===l.zone&&u===n&&r.push(s)}return r},_a=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i],s=a.nodeName,l=a.cloudInfo,u=a.placementUuid;t===l.az&&u===n&&r.push(s)}return r},ba=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r],a=o.cloud_info;o.is_read_replica!==t||n.includes(a.region)||n.push(a.region)}return n},xa=function(e){if(Qi(e)){var t=e.filter((function(e){return"PRIMARY"===e.clusterType}));if(1===t.length)return t[0]}return null};var wa=function(){return pa+=1},Sa=function(e,t,n){var r,i,o,a,s,l,u=new Set,c={},d=null===(o=null===(i=null===(r=e.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0],h=null;if(n){var p=t.filter((function(t,n){return n>0&&t.name===e.name}));if(p.length>=2){var f=p.find((function(t){var n,r,i;return t.name===e.name&&(null===(i=null===(r=null===(n=null==e?void 0:e.layout)||void 0===n?void 0:n.metadata)||void 0===r?void 0:r.currentGroupBy)||void 0===i?void 0:i[0])===xn.TABLET_ID}));if(f)return Array.from(u)}else h=t.find((function(t,n){return n>0&&t.name===e.name}))}else h=t.find((function(t,n){return n>0&&t.name===e.name}));return null===(l=null===(s=null===(a=e.layout)||void 0===a?void 0:a.metadata)||void 0===s?void 0:s.supportedGroupBy)||void 0===l||l.map((function(e){e.label===d&&(c=e),e.label!==xn.QUERY_ID&&u.add(e.name)})),u=Array.from(u),qi(null==h?void 0:h.groupBy)&&u.sort((function(e,t){return e===c.name?-1:t===c.name?1:0})),u},Ta=function(e,t,n,r,i,o){var a,s;void 0===o&&(o=!1);var l=new Set,u=new Set,c=e===hn.OUTLIER||e===hn.OUTLIER_TABLES||e===hn.OUTLIER_DB;return u=(null===(a=null==t?void 0:t.layout)||void 0===a?void 0:a.type)===er&&$i(t)&&c&&n===Cn.MULTI_SUPPORTING?r?Sa(t,i,o):Array.from(u):o?Sa(t,i,o):Array.from(u),c&&$i(t)?(t.data.forEach((function(e){l.add(e.name)})),l=Array.from(l)):(null===(s=null==t?void 0:t.layout)||void 0===s?void 0:s.type)===er&&$i(t)&&(l=r?Sa(t,i,o):Array.from(new Set)),{uniqueOperations:l,groupByOperations:u}},Ca=function(e,t){Ki(null==t?void 0:t.cluster)&&(null==t?void 0:t.cluster)!==Kn?e.clusterUuid=[null==t?void 0:t.cluster]:delete e.clusterUuid,Ki(null==t?void 0:t.region)&&(null==t?void 0:t.region)!==Kn?e.regionCode=[null==t?void 0:t.region]:delete e.regionCode,Ki(null==t?void 0:t.zone)&&(null==t?void 0:t.zone)!==Kn?e.azCode=[null==t?void 0:t.zone]:delete e.azCode,Ki(null==t?void 0:t.node)&&(null==t?void 0:t.node)!==Kn?e.instanceName=[null==t?void 0:t.node]:delete e.instanceName},Ia=function(e,t,n,r,i,o,a){var s,l,u,c,d=[];if(t){var h=r.metricMeasure===hn.OUTLIER_TABLES,p=r.metricMeasure===hn.OUTLIER_DB,f=h||p?h?$r[n]:Kr[n]:Xr[n],m=sessionStorage.getItem(h||p?h?oi:ai:ii),v=m?JSON.parse(m):{},g=h||p?h?null===(s=Jr.find((function(e){return e.name===f})))||void 0===s?void 0:s.metrics:null===(l=ei.find((function(e){return e.name===f})))||void 0===l?void 0:l.metrics:null===(u=ti.find((function(e){return e.name===f})))||void 0===u?void 0:u.metrics,y=null!==(c=null==g?void 0:g.filter((function(e){return v[e]})))&&void 0!==c?c:[];return null==y?void 0:y.map((function(e){var t={universeUuid:[null==r?void 0:r.universeUuid]};Ca(t,r);var n=En.NONE;return(null==r?void 0:r.metricMeasure)===hn.OUTLIER?n=En.NODE:(null==r?void 0:r.metricMeasure)===hn.OUTLIER_TABLES?n=En.TABLE:(null==r?void 0:r.metricMeasure)===hn.OUTLIER_DB&&(n=En.NAMESPACE),{start:null==r?void 0:r.formattedStartDate,end:null==r?void 0:r.formattedEndDate,name:e,filters:t,settings:{splitMode:(null==r?void 0:r.metricMeasure)===hn.OVERALL?Mn.NONE:null==r?void 0:r.outlierType,splitType:n,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)===hn.OUTLIER,aggregatedValueFunction:Dn.AVERAGE}}}))}if(!e)return null==i||i.map((function(e){var t=e.settings,n=e.filters;return e.start=null==r?void 0:r.formattedStartDate,e.end=null==r?void 0:r.formattedEndDate,Ca(n,r),t.returnAggregatedValue=(null==r?void 0:r.metricMeasure)!==hn.OVERALL,t.splitType=(null==r?void 0:r.metricMeasure)===hn.OVERALL?En.NONE:(null==r?void 0:r.metricMeasure)===hn.OUTLIER?En.NODE:En.TABLE,t.splitMode=(null==r?void 0:r.metricMeasure)===hn.OVERALL?Mn.NONE:null==r?void 0:r.outlierType,t.splitCount=null==r?void 0:r.numNodes,t})),i;if(e){var _=(null==o?void 0:o.type)===Tn.SQL||(null==o?void 0:o.type)===Tn.BACKGROUND,b=yr;(null==o?void 0:o.type)===Tn.CQL?b=_r:(null==o?void 0:o.type)===Tn.BACKGROUND&&(b=Oe([],br,!0),"5"!==o.queryId||b.includes(xr)||b.push(xr)),b.map((function(e){var t,n={start:null==r?void 0:r.formattedStartDate,end:null==r?void 0:r.formattedEndDate,name:e,filters:{universeUuid:[null!==(t=null==o?void 0:o.universeId)&&void 0!==t?t:""]},settings:{splitMode:(null==r?void 0:r.metricMeasure)===hn.OVERALL?Mn.NONE:null==r?void 0:r.outlierType,splitType:(null==r?void 0:r.metricMeasure)===hn.OVERALL?En.NONE:(null==r?void 0:r.metricMeasure)===hn.OUTLIER?En.NODE:En.TABLE,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)!==hn.OVERALL,aggregatedValueFunction:Dn.AVERAGE}};Ca(n.filters,r),a?(ma(a).dbId&&(n.filters.dbId=[ma(a).dbId]),ma(a).queryId&&(n.filters.queryId=[ma(a).queryId])):((null==o?void 0:o.type)===Tn.SQL&&(null==o?void 0:o.userId)&&(n.filters.userId=[o.userId]),(null==o?void 0:o.queryId)&&(n.filters.queryId=[o.queryId]),_&&(null==o?void 0:o.dbId)&&(n.filters.dbId=[o.dbId])),e.startsWith("active_session_history")&&(n.groupBy=[xn.WAIT_EVENT_TYPE]),d.push(n)}))}return d},Ma=function(e,t){var n=120;if(Ki(e)||Ki(t)){var r=new Date(e),i=xo(new Date(t),r);5===i?n=180:i>5&&i<=23?n=600:i>23&&i<=47?n=1e3:i>47&&i<=167?n=2200:i>=167&&(n=4200)}return n},Ea=function(e){if(!e.length)return[];e.sort((function(e,t){return new Date(e.startTime).getTime()-new Date(t.startTime).getTime()}));for(var t=[e[0]],n=1;n<e.length;n++){var r=t[t.length-1],i=e[n];new Date(r.endTime)>=new Date(i.startTime)?r.endTime=new Date(Math.max(new Date(r.endTime).getTime(),new Date(i.endTime).getTime())).toISOString():t.push(i)}return t},Aa=function(e,t){return'<span style="display:inline-flex; align-items:center;"><span style="\n display:inline-block;\n margin-right:9px; /* increased from 5px → +4px more space */\n border-radius:50%;\n width:10px;\n height:10px;\n background-color:'.concat(e,';\n "></span><span style="color:#4E5F6D;">').concat(t,"</span></span>")},Da=function(e){return'<span style="\n text-align:right;\n font-variant-numeric: tabular-nums; /* nicer alignment */\n white-space:nowrap;\n color:#4E5F6D;\n ">'.concat(e,"</span>")},Oa=function(e,t){var n=t,r=new Date;return e===Or.SEVEN_DAYS?r.setDate(r.getDate()-7):e===Or.TWO_DAYS?r.setDate(r.getDate()-2):e===Or.ONE_DAY?r.setDate(r.getDate()-1):e===Or.SIX_HOURS?r.setHours(r.getHours()-6):e===Or.ONE_HOUR&&r.setHours(r.getHours()-1),{formattedStartDate:r,formattedEndDate:n}},Na=function(e,t,n){if(e&&e!==Or.CUSTOM){var r=Oa(e,t);return{startDateTime:r.formattedStartDate,endDateTime:r.formattedEndDate}}return{startDateTime:n,endDateTime:t}},Ra=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:""}}))},La=function(e,t){return void 0===t&&(t=!1),null==e?void 0:e.map((function(e){var n,r,i,o,a,s,l,u,c,d,h,p,f,m,v,g,y,_,b,x,w;return t?{tabletId:null!==(n=e.tabletId)&&void 0!==n?n:"",sstSize:null!==(r=e.sstSize)&&void 0!==r?r:"",size:null!==(i=e.size)&&void 0!==i?i:"",walSize:null!==(o=e.walSize)&&void 0!==o?o:"",leaderNode:null!==(a=e.leaderNode)&&void 0!==a?a:"",followerNodes:null!==(s=e.followerNodes)&&void 0!==s?s:[],partition:null!==(l=e.partition)&&void 0!==l?l:"",eps:null!==(u=e.eps)&&void 0!==u?u:0,totalEpsRatio:null!==(c=e.totalEpsRatio)&&void 0!==c?c:0,databaseType:null!==(d=e.databaseType)&&void 0!==d?d:"",events:null!==(h=e.events)&&void 0!==h?h:[]}:{databaseName:null!==(p=e.databaseName)&&void 0!==p?p:"",databaseType:null!==(f=e.databaseType)&&void 0!==f?f:"",eps:null!==(m=e.eps)&&void 0!==m?m:0,events:null!==(v=e.events)&&void 0!==v?v:[],partition:null!==(g=e.partition)&&void 0!==g?g:"",schemaName:null!==(y=e.schemaName)&&void 0!==y?y:"",tableName:null!==(_=e.tableName)&&void 0!==_?_:"",tabletId:null!==(b=e.tabletId)&&void 0!==b?b:"",universeId:null!==(x=e.universeId)&&void 0!==x?x:"",totalEpsRatio:null!==(w=e.totalEpsRatio)&&void 0!==w?w:0}}))},Pa=function(e){if(Number.isInteger(e)){var t=e,n=["B","KB","MB","GB","TB","PB","EB"];if(t<=0)return t+" "+n[0];var r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(2))+" "+n[r]}return"-"},ka=function(e,t){var n=null!=e?e:"";return n.length>t?"".concat(n.substring(0,t),"..."):n},Ba=function(e,t,n){return e?e.length<=n?e:t===yn.APP||t===yn.NODE?"...".concat(e.slice(-n)):"".concat(e.substring(0,n),"..."):"-"},Fa=function(e,t,n,r){var i;if(i=r.currentTab===Fn.INSIGHTS?Fn.INSIGHTS:r.currentTab===Fn.CLUSTER_LOAD?n?r.clusterLoadOverallSubTab===Un.QUERIES?Un.QUERIES:Un.ANOMALIES:"Anomaly":Un.ANOMALIES,e&&r.currentTab!==Fn.INSIGHTS){if(t){var o=String(t),a=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase();return t===yn.DB?"Tablet ".concat(i):"".concat(a," ").concat(i)}return"Unknown ".concat(i)}return i},Ua=function(e){var t,n,r=e.anomalyData,i=e.entityDisplayName,o=e.queryText,a=e.maxLength,s=void 0===a?30:a;return(null===(t=null==r?void 0:r.lastInstance)||void 0===t?void 0:t.category)===yn.APP||(null===(n=null==r?void 0:r.lastInstance)||void 0===n?void 0:n.category)===yn.NODE?function(e,t){var n=null!=e?e:"";return n.length>t?"...".concat(n.substring(n.length-t+3)):n}(i,s):ka(r?i:o,s)},za=function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search).get("tab"),r=Fn.CLUSTER_LOAD,i=Wn.OVERALL_LOAD,o=Un.QUERIES;if(t.includes("/".concat(Qn.METRICS))||n===Qn.METRICS)r=Fn.METRICS;else if(t.includes("/".concat(Qn.INSIGHTS))||n===Qn.INSIGHTS)r=Fn.INSIGHTS;else if(t.includes("/".concat(Qn.CLUSTER_LOAD))||n===Qn.CLUSTER_LOAD){if(r=Fn.CLUSTER_LOAD,t.includes("/".concat(Qn.CLUSTER_LOAD_DB)))i=Wn.LOAD_BY_DATABASE;else i=Wn.OVERALL_LOAD,o=t.includes("/".concat(Qn.CLUSTER_LOAD,"/").concat(Qn.OVERALL_LOAD,"/").concat(Qn.ANOMALIES))?Un.ANOMALIES:Un.QUERIES}return{currentTab:r,clusterLoadSubTab:i,clusterLoadOverallSubTab:o}},Ha=function(e,t,n,r,i){void 0===i&&(i=!1);var o=function(e,t,n){var r=window.location.pathname,i=new URLSearchParams(window.location.search).toString();if(r=r.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),e===Fn.METRICS)r="".concat(r,"/").concat(Qn.METRICS);else if(e===Fn.INSIGHTS)r="".concat(r,"/").concat(Qn.INSIGHTS);else if(e===Fn.CLUSTER_LOAD)if(t===Wn.LOAD_BY_DATABASE)r="".concat(r,"/").concat(Qn.CLUSTER_LOAD,"/").concat(Qn.CLUSTER_LOAD_DB);else{var o=n===Un.QUERIES?Qn.QUERIES:Qn.ANOMALIES;r="".concat(r,"/").concat(Qn.CLUSTER_LOAD,"/").concat(Qn.OVERALL_LOAD,"/").concat(o)}return"".concat(r).concat(i?"?".concat(i):"")}(t,n,r),a=new URLSearchParams(window.location.search).toString();o!==window.location.pathname+(a?"?".concat(a):"")&&(i?window.history.pushState(null,"",o):window.history.replaceState(null,"",o))},Va=function(e,t){void 0===t&&(t=!1);var n=window.location.href,r=n.substring(0,n.lastIndexOf("/")),i=new URLSearchParams(window.location.search),o=i.get("duration"),a=i.get("startTime"),s=i.get("endTime"),l=i.get("dbId"),u=i.get("userId"),c=i.get("universeId"),d=i.get("type"),h=i.get("tab");i.get("queryId");var p=new URLSearchParams;Ki(o)&&p.append("duration",o),Ki(a)&&p.append("startTime",a),Ki(s)&&p.append("endTime",s),Ki(l)&&p.delete("dbId",l),Ki(u)&&p.delete("userId",u),Ki(c)&&p.delete("universeId",c),Ki(d)&&p.delete("type",d),e===Sn.YBA&&Ki(h)&&p.append("tab",h);var f=r;if(t&&(f=f.replace("/queries","")),f.includes("dbLoad/")){var m=f.lastIndexOf("/");if(-1!==m){var v=f.substring(0,m);v.endsWith("dbLoad")&&(f=v)}}return"".concat(f).concat(p.toString()?"?".concat(p.toString()):"")},Wa=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=new URL(window.location.href);if(e){["universeId","queryId","dbId","userId","type"].forEach((function(e){return r.searchParams.delete(e)}))}if(!t){var i=r.pathname;if(n){var o=i.indexOf("/".concat(Qn.ANOMALIES,"/"));-1!==o&&(r.pathname=i.substring(0,o+"/".concat(Qn.ANOMALIES).length))}else{var a=i.lastIndexOf("/");a>0&&(r.pathname=i.substring(0,a))}}return r},Ya=function(e,t,n,r){var i,o;if(e===Sn.YBM||e===Sn.YBA){null==n||n(null!==(o=null===(i=null==t?void 0:t.lastInstance)||void 0===i?void 0:i.uuid)&&void 0!==o?o:null);var a=function(){var e=new URL(window.location.href);["universeId","queryId","dbId","userId","type"].forEach((function(t){return e.searchParams.delete(t)}));var t=e.pathname;if(t.includes("/queries/")){var n=t.indexOf("/queries/");e.pathname=t.substring(0,n)}return e}();r?r(a.pathname+a.search):window.history.pushState({},"",a.toString())}else{var s=Va(e,!0);window.location.href=s}},ja=function(e,t,n,r,i,o){return void 0===o&&(o="query_drilldown_click"),[{timestamp:(new Date).valueOf(),category:"UI",type:"click",payload:{appName:e,cluster_id:i,key:t,source:o,start_time:n,end_time:r}}]},Ga="data:image/svg+xml,%3csvg width='13' height='14' viewBox='0 0 13 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.11094 3.11172V3.88945H1.94434C1.30004 3.88945 0.777735 4.41176 0.777735 5.05605V12.0557C0.777735 12.7 1.30004 13.2223 1.94434 13.2223H7.38848C8.03278 13.2223 8.55508 12.7 8.55508 12.0557V10.8891H9.33282V12.0557C9.33282 13.1295 8.46231 14 7.38848 14H1.94434C0.870509 14 0 13.1295 0 12.0557V5.05605C0 3.98223 0.870509 3.11172 1.94434 3.11172H3.11094ZM9.33333 0.778528H5.05579C4.4115 0.778528 3.88919 1.30083 3.88919 1.94513V8.94474C3.88919 9.58904 4.4115 10.1113 5.05579 10.1113H10.4999C11.1442 10.1113 11.6665 9.58904 11.6665 8.94474V3.11173H9.7222C9.50744 3.11173 9.33333 2.93763 9.33333 2.72286V0.778528ZM12.4436 2.74461V8.94473C12.4436 10.0186 11.5731 10.8891 10.4993 10.8891H5.05514C3.98132 10.8891 3.11081 10.0186 3.11081 8.94473V1.94512C3.11081 0.871289 3.98132 0.000779584 5.05514 0.000779584H9.69979C9.80303 -0.00576853 9.9105 0.0286532 9.99652 0.114676L12.3297 2.44788C12.4157 2.5339 12.4502 2.64137 12.4436 2.74461ZM10.1108 2.33401H11.1163L10.1108 1.32848V2.33401ZM5.83301 7.77813C5.61824 7.77813 5.44414 7.60403 5.44414 7.38926C5.44414 7.1745 5.61824 7.0004 5.83301 7.0004H7.38848C7.60324 7.0004 7.77734 7.1745 7.77734 7.38926C7.77734 7.60403 7.60324 7.77813 7.38848 7.77813H5.83301ZM5.83301 6.22267C5.61824 6.22267 5.44414 6.04857 5.44414 5.8338C5.44414 5.61904 5.61824 5.44494 5.83301 5.44494H9.72168C9.93645 5.44494 10.1105 5.61904 10.1105 5.8338C10.1105 6.04857 9.93645 6.22267 9.72168 6.22267H5.83301ZM5.83301 4.66718C5.61824 4.66718 5.44414 4.49308 5.44414 4.27832C5.44414 4.06355 5.61824 3.88945 5.83301 3.88945H9.72168C9.93645 3.88945 10.1105 4.06355 10.1105 4.27832C10.1105 4.49308 9.93645 4.66718 9.72168 4.66718H5.83301Z' fill='%232B59C3'/%3e%3c/svg%3e",qa=function(r){var i,o,a,s,u,c,d,h,p,f,m,v,g,y,_,b,w,S,T,C,I,M,E,A,D,O,N,R=r.universeData,L=r.anomalyData,P=r.isHistoricalQueryView,k=r.isDrilldownView,B=void 0===k||k,F=r.queryObject,U=r.showDetails,z=r.universeQueryStatsData,H=r.onShowDetails,V=xi(),W=Le(),Y=l(!1),j=Y[0],G=Y[1],q="HOT_TABLET"===(null===(i=null==L?void 0:L.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(o=null==L?void 0:L.lastInstance)||void 0===o?void 0:o.type),$=null===(a=null==L?void 0:L.lastInstance)||void 0===a?void 0:a.entityDisplayName,K=null===(s=null==L?void 0:L.lastInstance)||void 0===s?void 0:s.category,J=(K===yn.NODE||K===yn.APP)&&(null===(h=null===(d=null===(c=null===(u=null==R?void 0:R.universeDetails)||void 0===u?void 0:u.nodeDetailsSet)||void 0===c?void 0:c.find((function(e){return e.nodeName===$})))||void 0===d?void 0:d.cloudInfo)||void 0===h?void 0:h.region),ee=(K===yn.NODE||K===yn.APP)&&(null===(v=null===(m=null===(f=null===(p=null==R?void 0:R.universeDetails)||void 0===p?void 0:p.nodeDetailsSet)||void 0===f?void 0:f.find((function(e){return e.nodeName===$})))||void 0===m?void 0:m.cloudInfo)||void 0===v?void 0:v.az),te=function(e){null!==e.target.closest("button")&&e.stopPropagation()};return e(x,{children:B&&U&&e(x,Me({className:Re(V.headerMetadataBox,V.boxContainer,V.flexColumn),mt:3},{children:P?t(x,{children:[t(x,Me({className:V.flexRow,width:"100%"},{children:[t(x,Me({className:V.flexColumn,alignItems:"flex-start",flex:1},{children:[e(x,Me({className:V.headerTitle},{children:Br})),e(x,{children:null==F?void 0:F.namespaceName})]})),t(x,Me({className:V.flexColumn,alignItems:"flex-start",flex:1},{children:[e(x,Me({className:V.headerTitle},{children:Fr})),e(x,{children:null==F?void 0:F.queryType})]})),e(x,Me({className:V.flexColumn,alignItems:"flex-start",ml:"auto"},{children:e(Z,Me({size:"small",variant:"ghost",onClick:function(){return H(!1)},dataTestId:"BreadCrumbsAndMetadataHeader-HideDetails"},{children:e("span",Me({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))}))]})),e(x,Me({className:V.flexColumn,mt:2},{children:e(x,Me({onClick:te,width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"}},{children:e(X,{lang:"sql",showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!1,text:null!==(N=null==F?void 0:F.query)&&void 0!==N?N:"",containerClassName:W.queryContainerCodeInBreadcrumbs},"TableHelperQueries-query")}))}))]}):e(n,{children:L&&t(x,Me({className:V.flexColumn},{children:[t(x,Me({className:V.flexRow,width:"100%",justifyContent:"space-between"},{children:[t(x,Me({className:V.flexColumn},{children:[e(x,Me({className:V.headerTitle},{children:jr})),e(x,Me({className:V.anomalyTypeTag},{children:e("span",Me({className:V.anomalyTypeText},{children:Ir[null===(g=null==L?void 0:L.lastInstance)||void 0===g?void 0:g.type]}))}))]})),K!==yn.SQL&&t(x,Me({className:V.flexColumn},{children:[e(x,Me({className:V.headerTitle},{children:null===(_=Lr[null===(y=null==L?void 0:L.lastInstance)||void 0===y?void 0:y.type])||void 0===_?void 0:_.title})),t(x,{children:[e(Q,Me({title:$||"",placement:"top",arrow:!0},{children:e("span",Me({className:V.regularMetadata},{children:Ba($,K,K===yn.SQL?40:30)}))})),(K===yn.NODE||K===yn.APP)&&e(Q,Me({title:j?"Copied":"Copy",open:!!j||void 0},{children:e("img",{src:Ga,alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText($),G(!0),setTimeout((function(){return G(!1)}),2e3)}})}))]})]})),K===yn.SQL&&t(x,Me({className:V.flexColumn},{children:[e(x,Me({className:V.headerTitle},{children:Br})),e(x,{children:e("span",Me({className:V.regularMetadata},{children:null===(b=null==z?void 0:z[0])||void 0===b?void 0:b.namespaceName}))})]})),K===yn.SQL&&t(x,Me({className:V.flexColumn},{children:[e(x,Me({className:V.headerTitle},{children:Fr})),e(x,{children:e("span",Me({className:V.regularMetadata},{children:null===(w=null==z?void 0:z[0])||void 0===w?void 0:w.queryType}))})]})),K===yn.DB&&q&&t(x,Me({className:V.flexColumn},{children:[e(x,Me({className:V.headerTitle},{children:Br})),e(x,{children:e("span",Me({className:V.regularMetadata},{children:ma(L).dbName}))})]})),t(x,Me({className:V.flexColumn},{children:[e(x,Me({className:V.headerTitle},{children:K===yn.DB?void 0!==q?q?Yr:Vr:zr:K===yn.NODE||K===yn.APP?Gr:null})),e(x,{children:e("span",Me({className:V.regularMetadata},{children:K===yn.DB?q?null===(I=null===(C=null===(T=null===(S=null==L?void 0:L.lastInstance)||void 0===S?void 0:S.mainGraphs)||void 0===T?void 0:T[0].filters)||void 0===C?void 0:C.tabletId)||void 0===I?void 0:I[0]:null===(D=null===(A=null===(E=null===(M=null==L?void 0:L.lastInstance)||void 0===M?void 0:M.mainGraphs)||void 0===E?void 0:E[0].filters)||void 0===A?void 0:A.tableName)||void 0===D?void 0:D[0]:K===yn.NODE||K===yn.APP?e(n,{children:"".concat(null==J?void 0:J.toUpperCase()," (").concat(ee,")")}):null}))})]})),e(x,{children:e(Z,Me({size:"small",variant:"ghost",onClick:function(){return H(!1)},dataTestId:"BreadCrumbsAndMetadataHeader-HideDetails"},{children:e("span",Me({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))})]})),K===yn.SQL&&e(x,Me({mt:2},{children:e(x,Me({onClick:te,width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"}},{children:e(X,{lang:"sql",showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!1,text:null===(O=null==L?void 0:L.lastInstance)||void 0===O?void 0:O.entityDisplayName,containerClassName:W.queryContainerCodeInBreadcrumbs},"TableHelperQueries-query")}))}))]}))})}))})},Qa=function(n){var r,i,o=n.appName,a=n.anomalyData,s=n.showDetails,l=n.isDrilldownView,u=void 0===l||l,c=n.isHistoricalQueryView,d=n.showStandaloneAnomalies,h=n.queryObject,p=n.onSelectedQuery,f=n.onSelectedIssue,m=n.onShowDetails,v=n.onNavigateToUrl,g=xi(),y=za(),_=null===(r=null==a?void 0:a.lastInstance)||void 0===r?void 0:r.entityDisplayName,b=null===(i=null==a?void 0:a.lastInstance)||void 0===i?void 0:i.category,w=function(){!function(e,t,n,r,i,o){if(e===Sn.YBM||e===Sn.YBA)if(t){null==i||i(null);var a=Wa(!0,!1,n);o?o(a.pathname+a.search):window.history.pushState({},"",a.toString())}else null==r||r(null),a=Wa(!1),o?o(a.pathname+a.search):window.history.pushState({},"",a.toString());else{var s=Va(e);window.location.href=s}}(o,c,d,f,p,v)};return e(x,{children:t(x,Me({display:"flex",mb:3,mt:1},{children:[e(x,Me({className:g.ybBreadcrumbWrapper},{children:u&&e($,{size:"small",separator:"/",maxLabelWidth:600,items:function(){var e=function(){if(y.currentTab===Fn.CLUSTER_LOAD){var e=y.clusterLoadSubTab;if(o!==Sn.YBM&&o!==Sn.YBA||!$i(a)||(e=Un.ANOMALIES),y.clusterLoadSubTab===Wn.OVERALL_LOAD){var t=Fa(a,b,c,y);return"".concat(e," - ").concat(t)}return e}return y.currentTab}(),t=[{label:e,onClick:w}];if(y.currentTab===Fn.CLUSTER_LOAD)(a||h)&&((r=Ua({anomalyData:a,entityDisplayName:_,queryText:null==h?void 0:h.query}))&&t.push({label:r,onClick:function(){return a&&Ki(null==h?void 0:h.query)?void Ya(o,a,f,v):void 0}}),a&&Ki(null==h?void 0:h.query)&&t.push({label:ka(null==h?void 0:h.query,30)}));else if(a||h){var n=Fa(a,b,c,y),r=Ua({anomalyData:a,entityDisplayName:_,queryText:null==h?void 0:h.query});y.currentTab!==Fn.INSIGHTS&&t.push({label:n,onClick:w}),r&&t.push({label:r})}return t}(),dataTestId:"GenericHeader-Breadcrumb"})})),e(x,Me({ml:2,style:{marginTop:"-2px"}},{children:!s&&e(Z,Me({size:"small",variant:"secondary",onClick:function(){return m(!0)},dataTestId:"BreadCrumbsAndMetadataHeader-ShowDetails",startIcon:e("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"}))}))]}))})},Za="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",Xa=b((function(){return{groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .yb-MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .yb-MuiInput-root":{width:"150px",height:"32px"}}}})),$a=function(n){n.appName;var r=n.universeData,i=n.anomalyData,o=n.clusterRegionItem,s=n.zoneNodeItem,u=n.isPrimaryCluster,c=n.cluster,d=n.region,h=n.metricMeasure,p=n.outlierType,f=n.numNodes,m=n.isDrilldownView,v=void 0===m||m,g=n.onZoneNodeSelected,y=n.onClusterRegionSelected,_=n.onOutlierTypeSelected,b=n.onSplitTypeSelected;n.onQueryTypeSelected;var w=n.onNumNodesChanged,S=n.showMetricAggregator,T=void 0===S||S;n.showQueryTypeSelector;var C,I=n.showSplitSelector,M=void 0===I||I,E=(null==(C=r)?void 0:C.universeDetails)?va(C):ga(C),A=E.primaryZoneMapping,D=E.asyncZoneMapping,O=E.primaryClusterMapping,N=E.asyncClusterMapping,R=xi();Xa();var L=l(A),P=L[0],k=L[1],B=l(D),F=B[0],U=B[1];return a((function(){k(A)}),[]),a((function(){var e=new Map;if(d!==Kn||c!==Kn){var t=function(e,t,n,r){var i=Array.from(e).filter((function(e){return t?e[1].regionName===r:n?!e[1].isReadReplica:e[1].isReadReplica}));return i?new Map(i.map((function(e){return[null==e?void 0:e[0],e[1]]}))):new Map}(u?A:D,d!==Kn,u,d!==Kn?d:c);null!==d&&u?(k(t),U(e)):null===d||u?null!==c&&u?(k(t),U(e)):null===c||u||(k(e),U(t)):(k(e),U(t))}else k(A),U(D)}),[d,c]),t(x,Me({className:Re(R.flexColumn)},{children:[e(x,{children:t(x,Me({display:"flex",flexDirection:"row",alignItems:"center"},{children:[T&&e(x,{children:e(lo,{selectedItem:o,onClusterRegionSelected:y,primaryClusterToRegionMap:O,asyncClusterToRegionMap:N})}),T&&e(x,{children:e(ao,{selectedItem:s,onZoneNodeSelected:g,primaryZoneToNodesMap:P,asyncZoneToNodesMap:F})})]}))}),M&&t(x,Me({display:"flex",flexDirection:"row",className:R.metricSplitSelectorBox},{children:[e("img",{src:ro,alt:"Tree Icon"}),e(x,Me({display:"flex",flexDirection:"row"},{children:e(Mi,{onSplitTypeSelected:b,metricSplitSelectors:v?fr:pr,anomalyData:i})})),h!==hn.OVERALL&&t(x,Me({display:"flex",flexDirection:"row"},{children:[e("img",{alt:"Divider",src:Za,className:R.dividerStyle}),e(Di,{outlierType:p,metricOutlierSelectors:mr,onOutlierTypeSelected:_,onNumNodesChanged:w,selectedNumNodes:f,showNumNodesInput:!1,showNumNodesSelector:!0,metricMeasure:h})]}))]}))]}))};function Ka(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ja={exports:{}},es={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(es);var ts=es.exports,ns={exports:{}},rs={exports:{}},is={exports:{}};!function(e){function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(is);var os=is.exports,as={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default}(as,as.exports);var ss=as.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(1,arguments),e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===Object.prototype.toString.call(e)};var r=n(os),i=n(ss);e.exports=t.default}(rs,rs.exports);var ls=rs.exports,us={exports:{}};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))};var r=n(os),i=n(ss);e.exports=t.default}(us,us.exports);var cs=us.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(1,arguments),!(0,r.default)(e)&&"number"!=typeof e)return!1;var t=(0,i.default)(e);return!isNaN(Number(t))};var r=n(ls),i=n(cs),o=n(ss);e.exports=t.default}(ns,ns.exports);var ds=ns.exports,hs={exports:{}},ps={exports:{}},fs={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);if(isNaN(t))return t;return t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default}(fs,fs.exports);var ms=fs.exports,vs=Ka(ms);!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(e).getTime(),a=(0,r.default)(t);return new Date(n+a)};var r=n(ms),i=n(cs),o=n(ss);e.exports=t.default}(ps,ps.exports);var gs=ps.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(2,arguments);var n=(0,o.default)(t);return(0,r.default)(e,-n)};var r=n(gs),i=n(ss),o=n(ms);e.exports=t.default}(hs,hs.exports);var ys=hs.exports,_s={exports:{}},bs={exports:{}};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),s=n-a;return Math.floor(s/o)+1};var r=n(cs),i=n(ss),o=864e5;e.exports=t.default}(bs,bs.exports);var xs=bs.exports,ws={exports:{}},Ss={exports:{}};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t};var r=n(cs),i=n(ss);e.exports=t.default}(Ss,Ss.exports);var Ts=Ss.exports,Cs={exports:{}},Is={exports:{}};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,o.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,o.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var r=n(cs),i=n(ss),o=n(Ts);e.exports=t.default}(Is,Is.exports);var Ms=Is.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,r.default)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,i.default)(n)};var r=n(Ms),i=n(Ts),o=n(ss);e.exports=t.default}(Cs,Cs.exports);var Es=Cs.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,r.default)(e),n=(0,i.default)(t).getTime()-(0,o.default)(t).getTime();return Math.round(n/s)+1};var r=n(cs),i=n(Ts),o=n(Es),a=n(ss),s=6048e5;e.exports=t.default}(ws,ws.exports);var As=ws.exports,Ds={exports:{}},Os={exports:{}},Ns={};Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.getDefaultOptions=function(){return Rs},Ns.setDefaultOptions=function(e){Rs=e};var Rs={};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,s,l,u,c,d,h,p;(0,i.default)(1,arguments);var f=(0,a.getDefaultOptions)(),m=(0,o.default)(null!==(n=null!==(s=null!==(l=null!==(u=null==t?void 0:t.weekStartsOn)&&void 0!==u?u:null==t||null===(c=t.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==l?l:f.weekStartsOn)&&void 0!==s?s:null===(h=f.locale)||void 0===h||null===(p=h.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==n?n:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=(0,r.default)(e),g=v.getUTCDay(),y=(g<m?7:0)+g-m;return v.setUTCDate(v.getUTCDate()-y),v.setUTCHours(0,0,0,0),v};var r=n(cs),i=n(ss),o=n(ms),a=Ns;e.exports=t.default}(Os,Os.exports);var Ls=Os.exports,Ps={exports:{}},ks={exports:{}};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,h,p,f;(0,i.default)(1,arguments);var m=(0,r.default)(e),v=m.getUTCFullYear(),g=(0,s.getDefaultOptions)(),y=(0,a.default)(null!==(n=null!==(l=null!==(u=null!==(c=null==t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null==t||null===(d=t.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==u?u:g.firstWeekContainsDate)&&void 0!==l?l:null===(p=g.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(v+1,0,y),_.setUTCHours(0,0,0,0);var b=(0,o.default)(_,t),x=new Date(0);x.setUTCFullYear(v,0,y),x.setUTCHours(0,0,0,0);var w=(0,o.default)(x,t);return m.getTime()>=b.getTime()?v+1:m.getTime()>=w.getTime()?v:v-1};var r=n(cs),i=n(ss),o=n(Ls),a=n(ms),s=Ns;e.exports=t.default}(ks,ks.exports);var Bs=ks.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,h,p,f;(0,i.default)(1,arguments);var m=(0,s.getDefaultOptions)(),v=(0,a.default)(null!==(n=null!==(l=null!==(u=null!==(c=null==t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null==t||null===(d=t.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==u?u:m.firstWeekContainsDate)&&void 0!==l?l:null===(p=m.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1),g=(0,r.default)(e,t),y=new Date(0);return y.setUTCFullYear(g,0,v),y.setUTCHours(0,0,0,0),(0,o.default)(y,t)};var r=n(Bs),i=n(ss),o=n(Ls),a=n(ms),s=Ns;e.exports=t.default}(Ps,Ps.exports);var Fs=Ps.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,r.default)(e),l=(0,i.default)(n,t).getTime()-(0,o.default)(n,t).getTime();return Math.round(l/s)+1};var r=n(cs),i=n(Ls),o=n(Fs),a=n(ss),s=6048e5;e.exports=t.default}(Ds,Ds.exports);var Us=Ds.exports,zs={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e<0?"-":"",r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r},e.exports=t.default}(zs,zs.exports);var Hs=zs.exports,Vs={exports:{}};!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Hs),i={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,r.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,r.default)(n+1,2)},d:function(e,t){return(0,r.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return(0,r.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,r.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,r.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,r.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return(0,r.default)(o,t.length)}};t.default=i,e.exports=t.default}(Vs,Vs.exports);var Ws=Vs.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(xs),i=n(As),o=n(Ms),a=n(Us),s=n(Bs),l=n(Hs),u=n(Ws),c="midnight",d="noon",h="morning",p="afternoon",f="evening",m="night",v={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,r){var i=(0,s.default)(e,r),o=i>0?i:1-i;if("YY"===t){var a=o%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):(0,l.default)(o,t.length)},R:function(e,t){var n=(0,o.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return(0,l.default)(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return(0,l.default)(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return(0,l.default)(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=(0,a.default)(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},I:function(e,t,n){var r=(0,i.default)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):(0,l.default)(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var i=(0,r.default)(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):(0,l.default)(i,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return(0,l.default)(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return(0,l.default)(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return(0,l.default)(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?d:0===i?c:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?f:i>=12?p:i>=4?h:m,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,l.default)(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,l.default)(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return y(i);case"XXXX":case"XX":return _(i);default:return _(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return y(i);case"xxxx":case"xx":return _(i);default:return _(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+g(i,":");default:return"GMT"+_(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+g(i,":");default:return"GMT"+_(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return(0,l.default)(o,t.length)},T:function(e,t,n,r){var i=(r._originalDate||e).getTime();return(0,l.default)(i,t.length)}};function g(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+(0,l.default)(o,2)}function y(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):_(e,t)}function _(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+(0,l.default)(Math.floor(i/60),2)+n+(0,l.default)(i%60,2)}var b=v;t.default=b,e.exports=t.default}(_s,_s.exports);var Ys=_s.exports,js={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},i={p:r,P:function(e,t){var i,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",n(a,t)).replace("{{time}}",r(s,t))}},o=i;t.default=o,e.exports=t.default}(js,js.exports);var Gs=js.exports,qs={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()},e.exports=t.default}(qs,qs.exports);var Qs=qs.exports,Zs=Ka(Qs),Xs={};Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.isProtectedDayOfYearToken=function(e){return-1!==$s.indexOf(e)},Xs.isProtectedWeekYearToken=function(e){return-1!==Ks.indexOf(e)},Xs.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))};var $s=["D","DD"],Ks=["YY","YYYY"];var Js={exports:{}},el={exports:{}},tl={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(e,t,r){var i,o=n[e];return i="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};t.default=r,e.exports=t.default}(tl,tl.exports);var nl=tl.exports,rl={exports:{}},il={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}},e.exports=t.default}(il,il.exports);var ol=il.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ol),i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=i,e.exports=t.default}(rl,rl.exports);var al=rl.exports,sl={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(e,t,r,i){return n[e]};t.default=r,e.exports=t.default}(sl,sl.exports);var ll=sl.exports,ul={exports:{}},cl={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default}(cl,cl.exports);var dl=cl.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(dl),i={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};t.default=i,e.exports=t.default}(ul,ul.exports);var hl=ul.exports,pl={exports:{}},fl={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}},e.exports=t.default}(fl,fl.exports);var ml=fl.exports,vl={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(i.length)}}},e.exports=t.default}(vl,vl.exports);var gl=vl.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ml),i={ordinalNumber:(0,n(gl).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},o=i;t.default=o,e.exports=t.default}(pl,pl.exports);var yl=pl.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(nl),i=n(al),o=n(ll),a=n(hl),s=n(yl),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:o.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=l,e.exports=t.default}(el,el.exports);var _l=el.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(_l).default;t.default=r,e.exports=t.default}(Js,Js.exports);var bl=Js.exports;!function(e,t){var n=ts.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var _,b,x,w,S,T,C,I,M,E,A,D,O,N,R,L,P,k;(0,d.default)(2,arguments);var B=String(t),F=(0,h.getDefaultOptions)(),U=null!==(_=null!==(b=null==n?void 0:n.locale)&&void 0!==b?b:F.locale)&&void 0!==_?_:p.default,z=(0,c.default)(null!==(x=null!==(w=null!==(S=null!==(T=null==n?void 0:n.firstWeekContainsDate)&&void 0!==T?T:null==n||null===(C=n.locale)||void 0===C||null===(I=C.options)||void 0===I?void 0:I.firstWeekContainsDate)&&void 0!==S?S:F.firstWeekContainsDate)&&void 0!==w?w:null===(M=F.locale)||void 0===M||null===(E=M.options)||void 0===E?void 0:E.firstWeekContainsDate)&&void 0!==x?x:1);if(!(z>=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=(0,c.default)(null!==(A=null!==(D=null!==(O=null!==(N=null==n?void 0:n.weekStartsOn)&&void 0!==N?N:null==n||null===(R=n.locale)||void 0===R||null===(L=R.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==O?O:F.weekStartsOn)&&void 0!==D?D:null===(P=F.locale)||void 0===P||null===(k=P.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==A?A:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!U.localize)throw new RangeError("locale must contain localize property");if(!U.formatLong)throw new RangeError("locale must contain formatLong property");var V=(0,o.default)(e);if(!(0,r.default)(V))throw new RangeError("Invalid time value");var W=(0,l.default)(V),Y=(0,i.default)(V,W),j={firstWeekContainsDate:z,weekStartsOn:H,locale:U,_originalDate:V},G=B.match(m).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,s.default[t])(e,U.formatLong):e})).join("").match(f).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(v);if(!t)return e;return t[1].replace(g,"'")}(r);var o=a.default[i];if(o)return null!=n&&n.useAdditionalWeekYearTokens||!(0,u.isProtectedWeekYearToken)(r)||(0,u.throwProtectedError)(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!(0,u.isProtectedDayOfYearToken)(r)||(0,u.throwProtectedError)(r,t,String(e)),o(Y,r,U.localize,j);if(i.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("");return G};var r=n(ds),i=n(ys),o=n(cs),a=n(Ys),s=n(Gs),l=n(Qs),u=Xs,c=n(ms),d=n(ss),h=Ns,p=n(bl),f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,m=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v=/^'([^]*?)'?$/,g=/''/g,y=/[a-zA-Z]/;e.exports=t.default}(Ja,Ja.exports);var xl=Ka(Ja.exports);function wl(e,t,n){var r=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=n.length-1;r>=0;--r)if("timeZoneName"===n[r].type)return n[r].value}(r,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(r,t)}function Sl(e,t){var n=function(e){if(!Cl[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"06/25/2014 00:00:00"===t;Cl[e]=n?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Cl[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=Tl[n[i].type];o>=0&&(r[o]=parseInt(n[i].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(n,e)}var Tl={year:0,month:1,day:2,hour:3,minute:4,second:5};var Cl={};function Il(e,t,n,r,i,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,o,a),s}var Ml=36e5,El={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Al(e,t,n){var r,i,o;if(!e)return 0;if(r=El.timezoneZ.exec(e))return 0;if(r=El.timezoneHH.exec(e))return Ol(o=parseInt(r[1],10))?-o*Ml:NaN;if(r=El.timezoneHHMM.exec(e)){o=parseInt(r[2],10);var a=parseInt(r[3],10);return Ol(o,a)?(i=Math.abs(o)*Ml+6e4*a,"+"===r[1]?-i:i):NaN}if(function(e){if(Nl[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Nl[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return Il(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=Dl(s,e),u=n?l:function(e,t,n){var r=e.getTime(),i=r-t,o=Dl(new Date(i),n);if(t===o)return t;i-=o-t;var a=Dl(new Date(i),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function Dl(e,t){var n=Sl(e,t),r=Il(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),i=e.getTime(),o=i%1e3;return r-(i-=o>=0?o:1e3+o)}function Ol(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var Nl={};function Rl(e,t){var n=e?Al(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Ll(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function Pl(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+Ll(Math.floor(i/60),2)+n+Ll(Math.floor(i%60),2)}function kl(e,t){return e%60==0?(e>0?"-":"+")+Ll(Math.abs(e)/60,2):Pl(e,t)}var Bl={X:function(e,t,n,r){var i=Rl(r.timeZone,e);if(0===i)return"Z";switch(t){case"X":return kl(i);case"XXXX":case"XX":return Pl(i);default:return Pl(i,":")}},x:function(e,t,n,r){var i=Rl(r.timeZone,e);switch(t){case"x":return kl(i);case"xxxx":case"xx":return Pl(i);default:return Pl(i,":")}},O:function(e,t,n,r){var i=Rl(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+Ll(o,2)}(i,":");default:return"GMT"+Pl(i,":")}},z:function(e,t,n,r){switch(t){case"z":case"zz":case"zzz":return wl("short",e,r);default:return wl("long",e,r)}}},Fl=36e5,Ul=6e4,zl={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Hl(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},r=null==n.additionalDigits?2:vs(n.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i=function(e){var t,n={},r=zl.dateTimePattern.exec(e);r?(n.date=r[1],t=r[3]):(r=zl.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e);if(t){var i=zl.timeZone.exec(t);i?(n.time=t.replace(i[1],""),n.timeZone=i[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,r=zl.YYY[t],i=zl.YYYYY[t];if(n=zl.YYYY.exec(e)||i.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=zl.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(i.date,r),a=o.year,s=function(e,t){if(null===t)return null;var n,r,i,o;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=zl.MM.exec(e))return r=new Date(0),Gl(t,i=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(n=zl.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=jl(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(r.setUTCFullYear(t,0,a),r):new Date(NaN)}if(n=zl.MMDD.exec(e)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Gl(t,i,s)?(r.setUTCFullYear(t,i,s),r):new Date(NaN)}if(n=zl.Www.exec(e))return ql(t,o=parseInt(n[1],10)-1)?Vl(t,o):new Date(NaN);if(n=zl.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return ql(t,o,l)?Vl(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),c=0;if(i.time&&(c=function(e){var t,n,r;if(t=zl.HH.exec(e))return Ql(n=parseFloat(t[1].replace(",",".")))?n%24*Fl:NaN;if(t=zl.HHMM.exec(e))return Ql(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*Fl+r*Ul:NaN;if(t=zl.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Ql(n,r,i)?n%24*Fl+r*Ul+1e3*i:NaN}return null}(i.time),isNaN(c)))return new Date(NaN);if(i.timeZone||n.timeZone){if(l=Al(i.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=Zs(new Date(u+c)),l=Zs(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function Vl(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Wl=[31,28,31,30,31,30,31,31,30,31,30,31],Yl=[31,29,31,30,31,30,31,31,30,31,30,31];function jl(e){return e%400==0||e%4==0&&e%100!=0}function Gl(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=jl(e);if(r&&n>Yl[t])return!1;if(!r&&n>Wl[t])return!1}return!0}function ql(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function Ql(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var Zl=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Xl(e,t,n){var r=String(t),i=n||{},o=r.match(Zl);if(o){var a=Hl(i.originalDate||e,i);r=o.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],o=e.replace(t,"'"+Bl[t[0]](a,t,null,i)+"'");return r?o.substring(0,n-1)+o.substring(n+1):o}),r)}return xl(e,r,i)}function $l(e,t,n){var r=Hl(e,n),i=Al(t,r,!0),o=new Date(r.getTime()-i),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}var Kl="MMM-DD-yyyy HH:mm:ss [UTC]XXX",Jl="yyyy-MM-dd'T'HH:mm",eu=function(e,t,n){return void 0===t&&(t=Kl),ha(n?$l(new Date(e),n):new Date(e),t)},tu=K.Box,nu=K.MenuItem,ru=K.Typography,iu="dd/MM/yyyy, hh:mm a",ou=function(r){var i=r.appName,o=r.filterDuration,s=r.startDateTime,u=r.endDateTime,c=r.timezone,d=r.isDrilldownView,h=void 0===d||d,p=r.isTopKMetricsView,f=void 0!==p&&p;r.isClusterLoadView;var m=r.showStandaloneAnomalies,v=r.onSelectedFilterDuration,g=r.metricMeasure,y=r.currentTab,_=r.clusterLoadSubTab,b=r.onStartDateChange,x=r.onEndDateChange,w=r.onRefresh,S=xi(),T=l(""),C=T[0],I=T[1],M=l(eu(u,Jl,c)),E=M[0],A=M[1],D=l(eu(s,Jl,c)),O=D[0],N=D[1];a((function(){new Date(s)<new Date(u)?(I(""),A(eu(u,Jl,c)),N(eu(s,Jl,c))):I("Start Date is greater than end date")}),[s,u]),a((function(){i===Sn.YBM&&f&&o!==Or.ONE_HOUR&&o!==Or.SIX_HOURS&&g===hn.OUTLIER_TABLES&&v(Or.ONE_HOUR)}),[g]);return e(tu,{children:t(tu,Me({display:"flex",flexDirection:"row",alignItems:"center",mt:h?2:0},{children:[i===Sn.YBM&&y&&(y===Fn.CLUSTER_LOAD||y===Fn.METRICS||y===Fn.INSIGHTS)&&e(ru,Me({variant:"h5"},{children:e("span",Me({className:Re(S.breadCrumbText)},{children:function(e){if(i===Sn.YBM||i===Sn.YBA){if(e===Fn.METRICS)return"Advanced Metrics";if(e===Fn.CLUSTER_LOAD&&m)return Un.ANOMALIES}return e===Fn.CLUSTER_LOAD&&_?_:e}(y)}))})),t(tu,Me({display:"flex",ml:"auto",alignItems:"flex-end"},{children:[o===Or.CUSTOM&&t(n,{children:[e(tu,Me({mt:.5,mr:2},{children:e(J,{className:S.dateTimePicker,format:iu,value:O,onChange:b,calendar:{showTimeSelector:!0},validation:{maxDate:E}})})),e(tu,Me({mt:.5,mr:2},{children:e(J,{className:S.dateTimePicker,format:iu,value:E,defaultDateTimeValue:E,onChange:x,errorMsg:C,calendar:{showTimeSelector:!0},validation:{minDate:O}})}))]}),e(z,Me({className:Re(S.ybSelectBox,S.ybOverrideMuiInput),dataTestId:"GenericHeaderTimeFilterSelect",value:o},{children:Nr.map((function(t){return e(nu,Me({value:t.value,onClick:function(){v(t.value)},className:Re(S.regularText),disabled:i===Sn.YBM&&f&&t.value!==Or.ONE_HOUR&&t.value!==Or.SIX_HOURS&&g===hn.OUTLIER_TABLES},{children:t.label}),"duration-".concat(t.label))}))})),y!==Fn.METRICS&&e(Z,Me({style:{marginLeft:"8px"},variant:"secondary",dataTestId:"GenericHeader-RefreshButton",startIcon:e("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%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.5199 19.5097C14.5199 19.841 14.2513 20.1097 13.9199 20.1097H9.99993C7.43733 20.1097 5.35993 18.0323 5.35993 15.4697V5.93966L3.41993 7.84966C3.18035 8.04677 2.83002 8.02873 2.61196 7.80807C2.39389 7.5874 2.38 7.23688 2.57993 6.99966L5.51993 4.06966C5.63251 3.95669 5.78544 3.89319 5.94493 3.89319C6.10442 3.89319 6.25735 3.95669 6.36993 4.06966L9.29993 6.99966C9.53465 7.23438 9.53465 7.61494 9.29993 7.84966C9.06521 8.08438 8.68465 8.08438 8.44993 7.84966L6.53993 5.93966V15.4797C6.54257 16.3937 6.90891 17.2692 7.55808 17.9127C8.20725 18.5563 9.08585 18.915 9.99993 18.9097H13.9499C14.2695 18.9257 14.5203 19.1897 14.5199 19.5097ZM20.9949 15.9732C20.8354 15.9732 20.6825 16.0367 20.5699 16.1497L18.6499 18.0697V8.52966C18.6499 7.29732 18.1597 6.1156 17.2874 5.24514C16.415 4.37469 15.2323 3.887 13.9999 3.88966H10.0799C9.74856 3.88966 9.47993 4.15829 9.47993 4.48966C9.47993 4.82103 9.74856 5.08966 10.0799 5.08966H13.9999C15.8998 5.08966 17.4399 6.6298 17.4399 8.52966V18.0697L15.5199 16.1497C15.3681 15.9978 15.1468 15.9385 14.9394 15.9941C14.732 16.0497 14.5699 16.2117 14.5144 16.4191C14.4588 16.6265 14.5181 16.8478 14.6699 16.9997L17.6099 19.9397C17.7225 20.0526 17.8754 20.1161 18.0349 20.1161C18.1944 20.1161 18.3473 20.0526 18.4599 19.9397L21.4199 16.9997C21.5329 16.8871 21.5964 16.7341 21.5964 16.5747C21.5964 16.4152 21.5329 16.2622 21.4199 16.1497C21.3073 16.0367 21.1544 15.9732 20.9949 15.9732Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Refresh Icon"}),size:"medium",onClick:function(){return w()}},{children:"Refresh"}))]}))]}))})},au=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},su=new function(){this.browser=new au,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(su.wxa=!0,su.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?su.worker=!0:"undefined"==typeof navigator?(su.node=!0,su.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),o=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,su);var lu=su,uu="sans-serif",cu="12px "+uu;var du,hu,pu=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),fu={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!du){var n=fu.createCanvas();du=n&&n.getContext("2d")}if(du)return hu!==t&&(hu=du.font=t||cu),du.measureText(e);e=e||"";var r=/(\d+)px/.exec(t=t||cu),i=r&&+r[1]||12,o=0;if(t.indexOf("mono")>=0)o=i*e.length;else for(var a=0;a<e.length;a++){var s=pu[e[a]];o+=null==s?i:s*i}return{width:o}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},mu=Fu(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),vu=Fu(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),gu=Object.prototype.toString,yu=Array.prototype,_u=yu.forEach,bu=yu.filter,xu=yu.slice,wu=yu.map,Su=function(){}.constructor,Tu=Su?Su.prototype:null,Cu="__proto__",Iu=2311;function Mu(){return Iu++}function Eu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function Au(e){if(null==e||"object"!=typeof e)return e;var t=e,n=gu.call(e);if("[object Array]"===n){if(!uc(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=Au(e[r])}}else if(vu[n]){if(!uc(e)){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!mu[n]&&!uc(e)&&!$u(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==Cu&&(t[a]=Au(e[a]));return t}function Du(e,t,n){if(!Qu(t)||!Qu(e))return n?Au(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Cu){var i=e[r],o=t[r];!Qu(o)||!Qu(i)||Wu(o)||Wu(i)||$u(o)||$u(i)||Zu(o)||Zu(i)||uc(o)||uc(i)?!n&&r in e||(e[r]=Au(t[r])):Du(i,o,n)}return e}function Ou(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Cu&&(e[n]=t[n]);return e}function Nu(e,t,n){for(var r=zu(t),i=0;i<r.length;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function Ru(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Lu(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else Nu(e,t,n)}function Pu(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function ku(e,t,n){if(e&&t)if(e.forEach&&e.forEach===_u)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function Bu(e,t,n){if(!e)return[];if(!t)return rc(e);if(e.map&&e.map===wu)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function Fu(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function Uu(e,t,n){if(!e)return[];if(!t)return rc(e);if(e.filter&&e.filter===bu)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function zu(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var Hu=Tu&&Yu(Tu.bind)?Tu.call.bind(Tu.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(xu.call(arguments)))}};function Vu(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(xu.call(arguments)))}}function Wu(e){return Array.isArray?Array.isArray(e):"[object Array]"===gu.call(e)}function Yu(e){return"function"==typeof e}function ju(e){return"string"==typeof e}function Gu(e){return"[object String]"===gu.call(e)}function qu(e){return"number"==typeof e}function Qu(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Zu(e){return!!mu[gu.call(e)]}function Xu(e){return!!vu[gu.call(e)]}function $u(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function Ku(e){return null!=e.colorStops}function Ju(e){return e!=e}function ec(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function tc(e,t){return null!=e?e:t}function nc(e,t,n){return null!=e?e:null!=t?t:n}function rc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return xu.apply(e,t)}function ic(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function oc(e,t){if(!e)throw new Error(t)}function ac(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var sc="__ec_primitive__";function lc(e){e[sc]=!0}function uc(e){return e[sc]}var cc=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return zu(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),dc="function"==typeof Map;var hc=function(){function e(t){var n=Wu(t);this.data=dc?new Map:new cc;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&ku(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach((function(n,r){e.call(t,n,r)}))},e.prototype.keys=function(){var e=this.data.keys();return dc?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function pc(e){return new hc(e)}function fc(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&Ou(n,t),n}function mc(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function vc(e,t){return e.hasOwnProperty(t)}function gc(){}var yc=180/Math.PI;function _c(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function bc(e){return[e[0],e[1]]}function xc(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function wc(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Sc(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Tc(e,t){var n=function(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Cc(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Ic=Cc;var Mc=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function Ec(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Ac(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Dc(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Oc=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},Nc=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Oc(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,t.drift(i,o,e),this.handler.dispatchToElement(new Oc(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Oc(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new Oc(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Oc(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Oc(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Rc=Nc,Lc=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(e,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),Pc=Lc,kc=Math.log(2);function Bc(e,t,n,r,i,o){var a=r+"-"+i,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/kc);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,h=0,p=0;h<s;h++){var f=1<<h;f&i||(d+=(p%2?-1:1)*e[n][h]*Bc(e,t-1,c,u,i|f,o),p++)}return o[a]=d,d}function Fc(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Bc(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Bc(n,7,0===a?1:0,1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var Uc="___zrEVENTSAVED",zc=[];function Hc(e,t,n,r,i){if(t.getBoundingClientRect&&lu.domSupported&&!Vc(t)){var o=t[Uc]||(t[Uc]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),s=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&o&&h===o[d]&&p===o[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=a,t[r]=n?Fc(s,a):Fc(a,s))}(a,o,i);if(s)return s(e,n,r),!0}return!1}function Vc(e){return"CANVAS"===e.nodeName.toUpperCase()}var Wc=/([&<>"'])/g,Yc={"&":"&","<":"<",">":">",'"':""","'":"'"};function jc(e){return null==e?"":(e+"").replace(Wc,(function(e,t){return Yc[t]}))}var Gc=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qc=[],Qc=lu.browser.firefox&&+lu.browser.version.split(".")[0]<39;function Zc(e,t,n,r){return n=n||{},r?Xc(e,t,n):Qc&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Xc(e,t,n),n}function Xc(e,t,n){if(lu.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Vc(e)){var o=e.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(Hc(qc,e,r,i))return n.zrX=qc[0],void(n.zrY=qc[1])}n.zrX=n.zrY=0}function $c(e){return e||window.event}function Kc(e,t,n){if(null!=(t=$c(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&Zc(e,i,t,n)}else{Zc(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Gc.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Jc(e,t,n,r){e.addEventListener(t,n,r)}function ed(e,t,n,r){e.removeEventListener(t,n,r)}var td=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function nd(e){return 2===e.which||3===e.which}var rd=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],l=Zc(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in od)if(od.hasOwnProperty(t)){var n=od[t](this._track,e);if(n)return n}},e}();function id(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var od={pinch:function(e,t){var n=e.length;if(n){var r,i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var a=id(i)/id(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function ad(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function sd(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function ld(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function ud(e,t,n){var r=t[0],i=t[2],o=t[4],a=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=r*c+a*u,e[1]=-r*u+a*c,e[2]=i*c+s*u,e[3]=-i*u+c*s,e[4]=c*o+u*l,e[5]=c*l-u*o,e}function cd(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*r;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*i)*l,e[5]=(o*i-n*s)*l,e):null}var dd=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),hd=dd,pd=Math.min,fd=Math.max,md=new hd,vd=new hd,gd=new hd,yd=new hd,_d=new hd,bd=new hd,xd=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=pd(e.x,this.x),n=pd(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=fd(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=fd(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=[1,0,0,1,0,0];return ld(i,i,[-t.x,-t.y]),function(e,t,n){var r=n[0],i=n[1];e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i}(i,i,[n,r]),ld(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(o<l||u<i||s<c||d<a);if(n){var p=1/0,f=0,m=Math.abs(o-l),v=Math.abs(u-i),g=Math.abs(s-c),y=Math.abs(d-a),_=Math.min(m,v),b=Math.min(g,y);o<l||u<i?_>f&&(f=_,m<v?hd.set(bd,-m,0):hd.set(bd,v,0)):_<p&&(p=_,m<v?hd.set(_d,m,0):hd.set(_d,-v,0)),s<c||d<a?b>f&&(f=b,g<y?hd.set(bd,0,-g):hd.set(bd,0,y)):_<p&&(p=_,g<y?hd.set(_d,0,g):hd.set(_d,0,-y))}return n&&hd.copy(n,h?_d:bd),h},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}md.x=gd.x=n.x,md.y=yd.y=n.y,vd.x=yd.x=n.x+n.width,vd.y=gd.y=n.y+n.height,md.transform(r),yd.transform(r),vd.transform(r),gd.transform(r),t.x=pd(md.x,vd.x,gd.x,yd.x),t.y=pd(md.y,vd.y,gd.y,yd.y);var l=fd(md.x,vd.x,gd.x,yd.x),u=fd(md.y,vd.y,gd.y,yd.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),wd=xd,Sd="silent";function Td(){td(this.event)}var Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Ie(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Pc),Id=function(e,t){this.x=e,this.y=t},Md=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ed=new wd(0,0,0,0),Ad=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a._hovered=new Id(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new Cd,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Rc(a),a}return Ie(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(ku(Md,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Nd(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new Id(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Id(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,o=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Td}}(t,e,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(t,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,o),e.trigger&&e.trigger(t,o)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Id(e,t);if(Od(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new wd(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(Ed.copy(c.getBoundingRect()),c.transform&&Ed.applyTransform(c.transform),Ed.intersect(l)&&o.push(c))}if(o.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<h;f+=d){if(Od(o,i,e+p*Math.cos(f),t+p*Math.sin(f),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new rd);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new Id;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(Pc);function Dd(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(i=!0)}var s=r.__hostTarget;r=s||r.parent}return!i||Sd}return!1}function Od(e,t,n,r,i){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=Dd(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==Sd)){t.target=a;break}}}function Nd(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}ku(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){Ad.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=Nd(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Ic(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var Rd=Ad;function Ld(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Pd(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,l=r;s<l;)i(a,e[o=s+l>>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function kd(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){for(s=r-i;l<s&&o(e,t[n+i+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&o(e,t[n+i-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function Bd(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])<0){for(s=i+1;l<s&&o(e,t[n+i-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(e,t[n+i+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])<0?l=c:a=c+1}return l}function Fd(e,t){var n,r,i=7,o=0;e.length;var a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var h=Bd(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=kd(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,o,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=o,d=n;if(e[d++]=e[c++],0==--s){for(l=0;l<r;l++)e[d+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=a[u])}var h,p,f,m=i;for(;;){h=0,p=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],p++,h=0,0==--s){f=!0;break}}else if(e[d++]=a[u++],h++,p=0,1==--r){f=!0;break}}while((h|p)<m);if(f)break;do{if(0!==(h=Bd(e[c],a,u,r,0,t))){for(l=0;l<h;l++)e[d+l]=a[u+l];if(d+=h,u+=h,(r-=h)<=1){f=!0;break}}if(e[d++]=e[c++],0==--s){f=!0;break}if(0!==(p=kd(a[u],e,c,s,0,t))){for(l=0;l<p;l++)e[d+l]=e[c+l];if(d+=p,c+=p,0===(s-=p)){f=!0;break}}if(e[d++]=a[u++],1==--r){f=!0;break}m--}while(h>=7||p>=7);if(f)break;m<0&&(m=0),m+=2}if((i=m)<1&&(i=1),1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=a[u+l]}}(l,u,c,d):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+r-1,c=s-1,d=o+s-1,h=0,p=0;if(e[d--]=e[u--],0==--r){for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l];return}if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];return void(e[d]=a[c])}var f=i;for(;;){var m=0,v=0,g=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],m++,v=0,0==--r){g=!0;break}}else if(e[d--]=a[c--],v++,m=0,1==--s){g=!0;break}}while((m|v)<f);if(g)break;do{if(0!==(m=r-Bd(a[c],e,n,r,r-1,t))){for(r-=m,p=(d-=m)+1,h=(u-=m)+1,l=m-1;l>=0;l--)e[p+l]=e[h+l];if(0===r){g=!0;break}}if(e[d--]=a[c--],1==--s){g=!0;break}if(0!==(v=s-kd(e[u],a,0,s,s-1,t))){for(s-=v,p=(d-=v)+1,h=(c-=v)+1,l=0;l<v;l++)e[p+l]=a[h+l];if(s<=1){g=!0;break}}if(e[d--]=e[u--],0==--r){g=!0;break}f--}while(m>=7||v>=7);if(g)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l]}}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}function Ud(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var o=0;if(i<32)Pd(e,n,r,n+(o=Ld(e,n,r,t)),t);else{var a=Fd(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=Ld(e,n,r,t))<s){var l=i;l>s&&(l=s),Pd(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var zd=!1;function Hd(){zd||(zd=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Vd(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Wd=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Vd}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Ud(n,Vd)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=1),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(Hd(),u.z=0),isNaN(u.z2)&&(Hd(),u.z2=0),isNaN(u.zlevel)&&(Hd(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=Ru(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Yd=Wd,jd=lu.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Gd={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Gd.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*Gd.bounceIn(2*e):.5*Gd.bounceOut(2*e-1)+.5}},qd=Gd,Qd=Math.pow,Zd=Math.sqrt,Xd=1e-8,$d=1e-4,Kd=Zd(3),Jd=1/3,eh=_c(),th=_c(),nh=_c();function rh(e){return e>-1e-8&&e<Xd}function ih(e){return e>Xd||e<-1e-8}function oh(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function ah(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function sh(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(rh(c)&&rh(d)){if(rh(s))o[0]=0;else(T=-l/s)>=0&&T<=1&&(o[p++]=T)}else{var f=d*d-4*c*h;if(rh(f)){var m=d/c,v=-m/2;(T=-s/a+m)>=0&&T<=1&&(o[p++]=T),v>=0&&v<=1&&(o[p++]=v)}else if(f>0){var g=Zd(f),y=c*s+1.5*a*(-d+g),_=c*s+1.5*a*(-d-g);(T=(-s-((y=y<0?-Qd(-y,Jd):Qd(y,Jd))+(_=_<0?-Qd(-_,Jd):Qd(_,Jd))))/(3*a))>=0&&T<=1&&(o[p++]=T)}else{var b=(2*c*s-3*a*d)/(2*Zd(c*c*c)),x=Math.acos(b)/3,w=Zd(c),S=Math.cos(x),T=(-s-2*w*S)/(3*a),C=(v=(-s+w*(S+Kd*Math.sin(x)))/(3*a),(-s+w*(S-Kd*Math.sin(x)))/(3*a));T>=0&&T<=1&&(o[p++]=T),v>=0&&v<=1&&(o[p++]=v),C>=0&&C<=1&&(o[p++]=C)}}return p}function lh(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(rh(a)){if(ih(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(rh(u))i[0]=-o/(2*a);else if(u>0){var c,d=Zd(u),h=(-o-d)/(2*a);(c=(-o+d)/(2*a))>=0&&c<=1&&(i[l++]=c),h>=0&&h<=1&&(i[l++]=h)}}return l}function uh(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,d=(c-u)*i+u;o[0]=e,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=r}function ch(e,t,n,r,i,o,a,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,m=oh(e,n,i,a,f),v=oh(t,r,o,s,f),g=m-u,y=v-c;d+=Math.sqrt(g*g+y*y),u=m,c=v}return d}function dh(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function hh(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function ph(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function fh(e,t,n,r,i){var o=(t-e)*r+e,a=(n-t)*r+t,s=(a-o)*r+o;i[0]=e,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function mh(e,t,n,r,i,o,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=dh(e,n,i,h),f=dh(t,r,o,h),m=p-s,v=f-l;u+=Math.sqrt(m*m+v*v),s=p,l=f}return u}var vh=/cubic-bezier\(([0-9,\.e ]+)\)/;function gh(e){var t=e&&vh.exec(e);if(t){var n=t[1].split(","),r=+ac(n[0]),i=+ac(n[1]),o=+ac(n[2]),a=+ac(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:sh(0,r,o,1,e,s)&&oh(0,i,a,1,s[0])}}}var yh=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||gc,this.ondestroy=e.ondestroy||gc,this.onrestart=e.onrestart||gc,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Yu(e)?e:qd[e]||gh(e)},e}(),_h=function(e){this.value=e},bh=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new _h(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),xh=function(){function e(e){this._list=new bh,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new _h(t),a.key=e,n.insertEntry(a),r[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),wh=xh,Sh={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Th(e){return(e=Math.round(e))<0?0:e>255?255:e}function Ch(e){return e<0?0:e>1?1:e}function Ih(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Th(parseFloat(t)/100*255):Th(parseInt(t,10))}function Mh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Ch(parseFloat(t)/100):Ch(parseFloat(t))}function Eh(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Ah(e,t,n){return e+(t-e)*n}function Dh(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Oh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Nh=new wh(20),Rh=null;function Lh(e,t){Rh&&Oh(Rh,t),Rh=Nh.put(e,Rh||t.slice())}function Ph(e,t){if(e){t=t||[];var n=Nh.get(e);if(n)return Oh(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Sh)return Oh(t,Sh[r]),Lh(e,t),t;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(Dh(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),Lh(e,t),t):void Dh(t,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(Dh(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),Lh(e,t),t):void Dh(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Dh(t,+u[0],+u[1],+u[2],1):Dh(t,0,0,0,1);c=Mh(u.pop());case"rgb":return u.length>=3?(Dh(t,Ih(u[0]),Ih(u[1]),Ih(u[2]),3===u.length?c:Mh(u[3])),Lh(e,t),t):void Dh(t,0,0,0,1);case"hsla":return 4!==u.length?void Dh(t,0,0,0,1):(u[3]=Mh(u[3]),kh(u,t),Lh(e,t),t);case"hsl":return 3!==u.length?void Dh(t,0,0,0,1):(kh(u,t),Lh(e,t),t);default:return}}Dh(t,0,0,0,1)}}function kh(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Mh(e[1]),i=Mh(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return Dh(t=t||[],Th(255*Eh(a,o,n+1/3)),Th(255*Eh(a,o,n)),Th(255*Eh(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Bh(e,t){var n=Ph(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return zh(n,4===n.length?"rgba":"rgb")}}function Fh(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=t[i],s=t[o],l=r-i;return n[0]=Th(Ah(a[0],s[0],l)),n[1]=Th(Ah(a[1],s[1],l)),n[2]=Th(Ah(a[2],s[2],l)),n[3]=Ch(Ah(a[3],s[3],l)),n}}function Uh(e,t,n,r){var i,o=Ph(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,h=((s-o)/6+l/2)/l;r===s?t=h-d:i===s?t=1/3+c-h:o===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(o),null!=t&&(o[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=Mh(n)),null!=r&&(o[2]=Mh(r)),zh(kh(o),"rgba")}function zh(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function Hh(e,t){var n=Ph(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Vh=Math.round;function Wh(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=Ph(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var Yh=1e-4;function jh(e){return e<Yh&&e>-1e-4}function Gh(e){return Vh(1e3*e)/1e3}function qh(e){return Vh(1e4*e)/1e4}var Qh={left:"start",right:"end",center:"middle",middle:"middle"};function Zh(e){return e&&!!e.image}function Xh(e){return Zh(e)||function(e){return e&&!!e.svgElement}(e)}function $h(e){return"linear"===e.type}function Kh(e){return"radial"===e.type}function Jh(e){return e&&("linear"===e.type||"radial"===e.type)}function ep(e){return"url(#"+e+")"}function tp(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function np(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*yc,i=tc(e.scaleX,1),o=tc(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===i&&1===o||l.push("scale("+i+","+o+")"),(a||s)&&l.push("skew("+Vh(a*yc)+"deg, "+Vh(s*yc)+"deg)"),l.join(" ")}var rp=lu.hasGlobalWindow&&Yu(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!=typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return null},ip=Array.prototype.slice;function op(e,t,n){return(t-e)*n+e}function ap(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=op(t[o],n[o],r);return e}function sp(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function lp(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function up(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}function cp(e,t,n){var r=e,i=t;if(r.push&&i.push){var o=r.length,a=i.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===n?i[s]:ip.call(i[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=i[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=i[s][u])}}function dp(e){if(Pu(e)){var t=e.length;if(Pu(e[0])){for(var n=[],r=0;r<t;r++)n.push(ip.call(e[r]));return n}return ip.call(e)}return e}function hp(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function pp(e){return 4===e||5===e}function fp(e){return 1===e||2===e}var mp=[0,0,0,0],vp=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=t;if(Pu(t)){var l=function(e){return Pu(e&&e[0])?2:1}(t);a=l,(1===l&&!qu(t[0])||2===l&&!qu(t[0][0]))&&(o=!0)}else if(qu(t)&&!Ju(t))a=0;else if(ju(t))if(isNaN(+t)){var u=Ph(t);u&&(s=u,a=3)}else a=0;else if(Ku(t)){var c=Ou({},s);c.colorStops=Bu(t.colorStops,(function(e){return{offset:e.offset,color:Ph(e.color)}})),$h(t)?a=4:Kh(t)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Yu(n)?n:qd[n]||gh(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=fp(r),l=pp(r),u=0;u<i;u++){var c=n[u],d=c.value,h=o.value;c.percent=c.time/e,a||(s&&u!==i-1?cp(d,h,r):l&&up(d.colorStops,h.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var p=n[0].value;for(u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-p:3===r?n[u].additiveValue=sp([],n[u].value,p,-1):fp(r)&&(n[u].additiveValue=1===r?sp([],n[u].value,p,-1):lp([],n[u].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,h=this._lastFr,p=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;n<u&&!(l[n].percent>t);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-r.percent,m=0===f?1:p((t-r.percent)/f,1);i.easingFunc&&(m=i.easingFunc(m));var v=o?this._additiveValue:d?mp:e[c];if(!fp(s)&&!d||v||(v=this._additiveValue=[]),this.discrete)e[c]=m<1?r.rawValue:i.rawValue;else if(fp(s))1===s?ap(v,r[a],i[a],m):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=op(t[a][s],n[a][s],r)}}(v,r[a],i[a],m);else if(pp(s)){var g=r[a],y=i[a],_=4===s;e[c]={type:_?"linear":"radial",x:op(g.x,y.x,m),y:op(g.y,y.y,m),colorStops:Bu(g.colorStops,(function(e,t){var n=y.colorStops[t];return{offset:op(e.offset,n.offset,m),color:hp(ap([],e.color,n.color,m))}})),global:y.global},_?(e[c].x2=op(g.x2,y.x2,m),e[c].y2=op(g.y2,y.y2,m)):e[c].r=op(g.r,y.r,m)}else if(d)ap(v,r[a],i[a],m),o||(e[c]=hp(v));else{var b=op(r[a],i[a],m);o?this._additiveValue=b:e[c]=b}o&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(Ph(e[n],mp),sp(mp,mp,r,1),e[n]=hp(mp)):1===t?sp(e[n],e[n],r,1):2===t&&lp(e[n],e[n],r,1)},e}(),gp=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?Eu("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,zu(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new vp(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=hp(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,dp(l),r),this._trackKeys.push(a)}s.addKeyframe(e,dp(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new yh({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return Bu(this._trackKeys,(function(t){return e._tracks[t]}))},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];if(o&&!o.isFinished()){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[i]=dp(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||zu(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),yp=gp;function _p(){return(new Date).getTime()}var bp,xp,wp,Sp=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Ie(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=_p()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,jd((function t(){e._running&&(jd(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=_p(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=_p(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=_p()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new yp(e,t.loop);return this.addAnimator(n),n},t}(Pc),Tp=Sp,Cp=lu.domSupported,Ip=(xp={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},wp=Bu(bp=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],(function(e){var t=e.replace("mouse","pointer");return xp.hasOwnProperty(t)?t:e})),{mouse:bp,touch:["touchstart","touchend","touchmove"],pointer:wp}),Mp=["mousemove","mouseup"],Ep=["pointermove","pointerup"],Ap=!1;function Dp(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Op(e){e&&(e.zrByTouch=!0)}function Np(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Rp=function(e,t){this.stopPropagation=gc,this.stopImmediatePropagation=gc,this.preventDefault=gc,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},Lp={mousedown:function(e){e=Kc(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Kc(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Kc(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Np(this,(e=Kc(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Ap=!0,e=Kc(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Ap||(e=Kc(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Op(e=Kc(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Lp.mousemove.call(this,e),Lp.mousedown.call(this,e)},touchmove:function(e){Op(e=Kc(this.dom,e)),this.handler.processGesture(e,"change"),Lp.mousemove.call(this,e)},touchend:function(e){Op(e=Kc(this.dom,e)),this.handler.processGesture(e,"end"),Lp.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Lp.click.call(this,e)},pointerdown:function(e){Lp.mousedown.call(this,e)},pointermove:function(e){Dp(e)||Lp.mousemove.call(this,e)},pointerup:function(e){Lp.mouseup.call(this,e)},pointerout:function(e){Dp(e)||Lp.mouseout.call(this,e)}};ku(["click","dblclick","contextmenu"],(function(e){Lp[e]=function(t){t=Kc(this.dom,t),this.trigger(e,t)}}));var Pp={pointermove:function(e){Dp(e)||Pp.mousemove.call(this,e)},pointerup:function(e){Pp.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function kp(e,t){var n=t.domHandlers;lu.pointerEventsSupported?ku(Ip.pointer,(function(r){Fp(t,r,(function(t){n[r].call(e,t)}))})):(lu.touchEventsSupported&&ku(Ip.touch,(function(r){Fp(t,r,(function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),ku(Ip.mouse,(function(r){Fp(t,r,(function(i){i=$c(i),t.touching||n[r].call(e,i)}))})))}function Bp(e,t){function n(n){Fp(t,n,(function(r){r=$c(r),Np(e,r.target)||(r=function(e,t){return Kc(e.dom,new Rp(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}lu.pointerEventsSupported?ku(Ep,n):lu.touchEventsSupported||ku(Mp,n)}function Fp(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Jc(e.domTarget,t,n,r)}function Up(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&ed(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var zp=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},Hp=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new zp(t,Lp),Cp&&(r._globalHandlerScope=new zp(document,Pp)),kp(r,r._localHandlerScope),r}return Ie(t,e),t.prototype.dispose=function(){Up(this._localHandlerScope),Cp&&Up(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Cp&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Bp(this,t):Up(t)}},t}(Pc),Vp=1;lu.hasGlobalWindow&&(Vp=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Wp=Vp,Yp="#333",jp="#ccc",Gp=ad,qp=5e-5;function Qp(e){return e>qp||e<-5e-5}var Zp=[],Xp=[],$p=[1,0,0,1,0,0],Kp=Math.abs,Jp=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Qp(this.rotation)||Qp(this.x)||Qp(this.y)||Qp(this.scaleX-1)||Qp(this.scaleY-1)||Qp(this.skewX)||Qp(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):Gp(n),e&&(t?sd(n,e,n):function(e,t){e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5]}(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Gp(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Zp);var n=Zp[0]<0?-1:1,r=Zp[1]<0?-1:1,i=((Zp[0]-n)*t+n)/Zp[0]||0,o=((Zp[1]-r)*t+r)/Zp[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],cd(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(sd(Xp,e.invTransform,t),t=Xp);var n=this.originX,r=this.originY;(n||r)&&($p[4]=n,$p[5]=r,sd(Xp,t,$p),Xp[4]-=n,Xp[5]-=r,t=Xp),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Ec(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Ec(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Kp(e[0]-1)>1e-10&&Kp(e[3]-1)>1e-10?Math.sqrt(Kp(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){tf(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var p=n+a,f=r+s;t[4]=-p*i-d*f*o,t[5]=-f*o-h*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=d*o,l&&ud(t,t,l),t[4]+=n+u,t[5]+=r+c,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),ef=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function tf(e,t){for(var n=0;n<ef.length;n++){var r=ef[n];e[r]=t[r]}}var nf={};function rf(e,t){var n=nf[t=t||cu];n||(n=nf[t]=new wh(500));var r=n.get(e);return null==r&&(r=fu.measureText(e,t).width,n.put(e,r)),r}function of(e,t,n,r){var i=rf(e,t),o=uf(t),a=sf(0,i,n),s=lf(0,o,r);return new wd(a,s,i,o)}function af(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return of(i[0],t,n,r);for(var o=new wd(0,0,0,0),a=0;a<i.length;a++){var s=of(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function sf(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function lf(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function uf(e){return rf("国",e)}function cf(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function df(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=cf(r[0],n.width),u+=cf(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=i,u+=s,c="right",d="middle";break;case"right":l+=i+a,u+=s,d="middle";break;case"top":l+=a/2,u-=i,c="center",d="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=a-i,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,d="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var hf="__zr_normal__",pf=ef.concat(["ignore"]),ff=Fu(ef,(function(e,t){return e[t]=!0,e}),{ignore:!1}),mf={},vf=new wd(0,0,0,0),gf=function(){function e(e){this.id=Mu(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(t),null!=n.position){var u=vf;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(mf,n,u):df(mf,n,u),i.x=mf.x,i.y=mf.y,o=mf.align,a=mf.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=cf(c[0],u.width),h=cf(c[1],u.height)),l=!0,i.originX=-i.x+d+(r?0:u.x),i.originY=-i.y+h+(r?0:u.y)}}null!=n.rotation&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],l||(i.originX=-p[0],i.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,g=void 0,y=void 0;f&&this.canBeInsideText()?(v=n.insideFill,g=n.insideStroke,null!=v&&"auto"!==v||(v=this.getInsideTextFill()),null!=g&&"auto"!==g||(g=this.getInsideTextStroke(v),y=!0)):(v=n.outsideFill,g=n.outsideStroke,null!=v&&"auto"!==v||(v=this.getOutsideFill()),null!=g&&"auto"!==g||(g=this.getOutsideStroke(v),y=!0)),(v=v||"#000")===m.fill&&g===m.stroke&&y===m.autoStroke&&o===m.align&&a===m.verticalAlign||(s=!0,m.fill=v,m.stroke=g,m.autoStroke=y,m.align=o,m.verticalAlign=a,t.setDefaultTextStyle(m)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?jp:Yp},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Ph(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,zh(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},Ou(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(Qu(e))for(var n=zu(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==hf)){var o=r.targetName,a=o?t[o]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,pf)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(hf,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===hf;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(Ru(o,e)>=0)||!t&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||i){i||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}Eu("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a)for(var s=0;s<o;s++)if(e[s]!==i[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[o-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,m=this._textGuide;f&&f.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=Ru(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Ru(r,e),o=Ru(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];Ou(n,i),i.textConfig&&Ou(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,o){var a=!(t&&r);t&&t.textConfig?(this.textConfig=Ou({},r?this.textConfig:n.textConfig),Ou(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<pf.length;u++){var c=pf[u],d=i&&ff[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var h=this.animators[u],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Jp,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Ou(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this,i=new yp(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during((function(){r.updateDuringAnimation(t)})).done((function(){var t=r.animators,n=Ru(t,e);n>=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){yf(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){yf(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=yf(this,t,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,r,i){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||o(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}})}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function yf(e,t,n,r,i){var o=[];xf(e,"",e,t,n=n||{},r,o,i);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(e,t){n.during(t)}));for(var h=0;h<o.length;h++){var p=o[h];c&&p.done(c),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function _f(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function bf(e,t,n){if(Pu(t[n]))if(Pu(e[n])||(e[n]=[]),Xu(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),_f(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(Pu(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?_f(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else _f(o,i,a);o.length=i.length}else e[n]=t[n]}function xf(e,t,n,r,i,o,a,s){for(var l=zu(r),u=i.duration,c=i.delay,d=i.additive,h=i.setToFinal,p=!Qu(o),f=e.animators,m=[],v=0;v<l.length;v++){var g=l[v],y=r[g];if(null!=y&&null!=n[g]&&(p||o[g]))if(!Qu(y)||Pu(y)||Ku(y))m.push(g);else{if(t){s||(n[g]=y,e.updateDuringAnimation(t));continue}xf(e,g,n[g],y,i,o&&o[g],a,s)}else s||(n[g]=y,e.updateDuringAnimation(t),m.push(g))}var _=m.length;if(!d&&_)for(var b=0;b<f.length;b++){if((w=f[b]).targetName===t)if(w.stopTracks(m)){var x=Ru(f,w);f.splice(x,1)}}if(i.force||(m=Uu(m,(function(e){return t=r[e],i=n[e],!(t===i||Pu(t)&&Pu(i)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,i));var t,i})),_=m.length),_>0||i.force&&!a.length){var w,S=void 0,T=void 0,C=void 0;if(s){T={},h&&(S={});for(b=0;b<_;b++){T[g=m[b]]=n[g],h?S[g]=r[g]:n[g]=r[g]}}else if(h){C={};for(b=0;b<_;b++){C[g=m[b]]=dp(n[g]),bf(n,r,g)}}(w=new yp(n,!1,!1,d?Uu(f,(function(e){return e.targetName===t})):null)).targetName=t,i.scope&&(w.scope=i.scope),h&&S&&w.whenWithKeys(0,S,m),C&&w.whenWithKeys(0,C,m),w.whenWithKeys(null==u?500:u,s?T:r,m).delay(c||0),e.addAnimator(w,t),a.push(w)}}Lu(gf,Pc),Lu(gf,Jp);var wf=gf,Sf=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return Ie(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Ru(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Ru(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new wd(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(wd.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(wf);Sf.prototype.type="group";var Tf=Sf,Cf={},If={};
|
|
2
|
-
/*!
|
|
3
|
-
* ZRender, a high performance 2d drawing library.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013, Baidu Inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
*
|
|
8
|
-
* LICENSE
|
|
9
|
-
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
10
|
-
*/var Mf=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 Yd,o=n.renderer||"canvas";Cf[o]||(o=zu(Cf)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new Cf[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=lu.node||lu.worker||s?null:new Hp(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?lu.touchEventsSupported:!!c)&&(l=tc(n.pointerSize,44)),this.handler=new Rd(i,a,u,a.root,l),this.animation=new Tp({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 Hh(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Hh(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=_p();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=_p();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 Tf&&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 If[e]},e}();function Ef(e,t){var n=new Mf(Mu(),e,t);return If[n.id]=n,n}var Af=1e-4;function Df(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 Of(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 ju(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Nf(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Rf(e){return e.sort((function(e,t){return e-t})),e}function Lf(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 Pf(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 kf(e,t){var n=Math.max(Lf(e),Lf(t)),r=e+t;return n>20?r:Nf(r,n)}function Bf(e){var t=2*Math.PI;return(e%t+t)%t}function Ff(e){return e>-1e-4&&e<Af}var Uf=/^(?:(\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 zf(e){if(e instanceof Date)return e;if(ju(e)){var t=Uf.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 Vf(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 Wf(e){var t=parseFloat(e);return t==e&&(0!==t||!ju(e)||e.indexOf("x")<=0)?t:NaN}function Yf(){return Math.round(9*Math.random())}function jf(e,t){return 0===t?e:jf(t,e%t)}function Gf(e,t){return null==e?t:null==t?e:e*t/jf(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function qf(e){throw new Error(e)}function Qf(e,t,n){return(t-e)*n+e}var Zf="series\0",Xf="\0_ec_\0";function $f(e){return e instanceof Array?e:null==e?[]:[e]}function Kf(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 Jf=["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 em(e){return!Qu(e)||Wu(e)||e instanceof Date?e:e.value}function tm(e){return Qu(e)&&!(e instanceof Array)}function nm(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=pc();ku(t,(function(e,n){Qu(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||sm(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){ku(r,(function(i,o){if(i&&null!=i.id){var a=im(i.id),s=n.get(a);if(null!=s){var l=e[s];oc(!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){ku(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)&&!sm(n)&&!sm(o)&&rm("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){ku(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||sm(r.existing)||r.existing&&null!=t.id&&!rm("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){ku(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=pc(),ku(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),ku(s,(function(e){var t=e.newOption;oc(!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={})})),ku(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(Qu(r)){if(i.name=null!=r.name?im(r.name):n?n.name:Zf+t,n)i.id=im(n.id);else if(null!=r.id)i.id=im(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 rm(e,t,n){var r=om(t[e],null),i=om(n[e],null);return null!=r&&null!=i&&r===i}function im(e){return om(e,"")}function om(e,t){return null==e?t:ju(e)?e:qu(e)||Gu(e)?e+"":t}function am(e){var t=e.name;return!(!t||!t.indexOf(Zf))}function sm(e){return e&&null!=e.id&&0===im(e.id).indexOf(Xf)}function lm(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Wu(t.dataIndex)?Bu(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Wu(t.name)?Bu(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function um(){var e="__ec_inner_"+cm++;return function(t){return t[e]||(t[e]={})}}var cm=Yf();function dm(e,t,n){var r=hm(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=mm(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 hm(e,t){var n;if(ju(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=pc(),o={},a=!1;return ku(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&&Ru(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 pm={useDefault:!0,enableAll:!1,enableNone:!1},fm={useDefault:!1,enableAll:!0,enableNone:!0};function mm(e,t,n,r){r=r||pm;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?(oc(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(oc(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 vm(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var gm="___EC__COMPONENT__CONTAINER___",ym="___EC__EXTENDED_CLASS___";function _m(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function bm(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return Yu(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return Ie(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)),Ou(t.prototype,e),t[ym]=!0,t.extend=this.extend,t.superCall=Sm,t.superApply=Tm,t.superClass=r,t}}function xm(e,t){e.extend=t.extend}var wm=Math.round(10*Math.random());function Sm(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 Tm(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Cm(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){oc(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=_m(r);if(i.sub){if(i.sub!==gm){var o=function(e){var n=t[e.main];n&&n[gm]||((n=t[e.main]={})[gm]=!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[gm]&&(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=_m(e),r=[],i=t[n.main];return i&&i[gm]?ku(i,(function(e,t){t!==gm&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=_m(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return ku(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=_m(e),r=t[n.main];return r&&r[gm]}}function Im(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&&Ru(r,s)>=0||i&&Ru(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var Mm=Im([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Em=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Mm(this,e,t)},e}(),Am=new wh(50);function Dm(e){if("string"==typeof e){var t=Am.get(e);return t&&t.image}return e}function Om(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=Am.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!Rm(t=o.image)&&o.pending.push(a):((t=fu.loadImage(e,Nm,Nm)).__zrImageSrc=e,Am.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function Nm(){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 Rm(e){return e&&e.width&&e.height}var Lm=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Pm(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=km(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=Bm(o[a],i);return o.join("\n")}function km(e,t,n,r){var i=Ou({},r=r||{});i.font=t,n=tc(n,"..."),i.maxIterations=tc(r.maxIterations,2);var o=i.minChar=tc(r.minChar,0);i.cnCharWidth=rf("国",t);var a=i.ascCharWidth=rf("a",t);i.placeholder=tc(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=rf(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 Bm(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=rf(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?Fm(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=rf(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function Fm(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 Um=function(){},zm=function(e){this.tokens=[],e&&(this.tokens=e)},Hm=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Vm(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 h=l.padding,p=h?h[1]+h[3]:0;if(null!=l.width&&"auto"!==l.width){var f=cf(l.width,r.width)+p;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var m=jm(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=m.accumWidth+p,a=m.linesWidths,o=m.lines}}else o=t.split("\n");for(var v=0;v<o.length;v++){var g=o[v],y=new Um;if(y.styleName=i,y.text=g,y.isLineHolder=!g&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[v]:rf(g,c),v||d)u.push(new zm([y]));else{var _=(u[u.length-1]||(u[0]=new zm)).tokens,b=_.length;1===b&&_[0].isLineHolder?_[0]=y:(g||!b||s)&&_.push(y)}}}var Wm=Fu(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function Ym(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)||!!Wm[e]}function jm(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var h=e.charAt(d);if("\n"!==h){var p=rf(h,t),f=!r&&!Ym(h);(o.length?c+p>n:i+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=h,s="",c=u+=p):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=h,c=p)):f?(o.push(l),a.push(u),l=h,u=p):(o.push(h),a.push(p)):(c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h))}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 Gm="__zr_style_"+Math.round(10*Math.random()),qm={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Qm={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};qm[Gm]=!0;var Zm=["z","z2","invisible"],Xm=["invisible"],$m=function(e){function t(t){return e.call(this,t)||this}var n;return Ie(t,e),t.prototype._init=function(t){for(var n=zu(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){Km.copy(e.getBoundingRect()),e.transform&&Km.applyTransform(e.transform);return Jm.width=t,Jm.height=n,!Km.intersect(Jm)}(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 wd(0,0,0,0)),t?wd.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 wd(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:Ou(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 fc(qm,e)},t.prototype.useStyle=function(e){e[Gm]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Gm]},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,Zm)},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=zu(u),d=0;d<c.length;d++){(p=c[d])in s&&(s[p]=s[p],this.style[p]=u[p])}var h=zu(s);for(d=0;d<h.length;d++){var p=h[d];this.style[p]=this.style[p]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Xm:Zm;for(d=0;d<f.length;d++){p=f[d];n&&null!=n[p]?this[p]=n[p]:l&&null!=r[p]&&(this[p]=r[p])}},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 Ou(e,t),e},t.prototype.getAnimationStyleProps=function(){return Qm},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}(wf),Km=new wd(0,0,0,0),Jm=new wd(0,0,0,0);var ev=$m,tv=Math.min,nv=Math.max,rv=Math.sin,iv=Math.cos,ov=2*Math.PI,av=_c(),sv=_c(),lv=_c();function uv(e,t,n,r,i,o){i[0]=tv(e,n),i[1]=tv(t,r),o[0]=nv(e,n),o[1]=nv(t,r)}var cv=[],dv=[];function hv(e,t,n,r,i,o,a,s,l,u){var c=lh,d=oh,h=c(e,n,i,a,cv);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var f=d(e,n,i,a,cv[p]);l[0]=tv(f,l[0]),u[0]=nv(f,u[0])}h=c(t,r,o,s,dv);for(p=0;p<h;p++){var m=d(t,r,o,s,dv[p]);l[1]=tv(m,l[1]),u[1]=nv(m,u[1])}l[0]=tv(e,l[0]),u[0]=nv(e,u[0]),l[0]=tv(a,l[0]),u[0]=nv(a,u[0]),l[1]=tv(t,l[1]),u[1]=nv(t,u[1]),l[1]=tv(s,l[1]),u[1]=nv(s,u[1])}function pv(e,t,n,r,i,o,a,s){var l=ph,u=dh,c=nv(tv(l(e,n,i),1),0),d=nv(tv(l(t,r,o),1),0),h=u(e,n,i,c),p=u(t,r,o,d);a[0]=tv(e,i,h),a[1]=tv(t,o,p),s[0]=nv(e,i,h),s[1]=nv(t,o,p)}function fv(e,t,n,r,i,o,a,s,l){var u=Ac,c=Dc,d=Math.abs(i-o);if(d%ov<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(av[0]=iv(i)*n+e,av[1]=rv(i)*r+t,sv[0]=iv(o)*n+e,sv[1]=rv(o)*r+t,u(s,av,sv),c(l,av,sv),(i%=ov)<0&&(i+=ov),(o%=ov)<0&&(o+=ov),i>o&&!a?o+=ov:i<o&&a&&(i+=ov),a){var h=o;o=i,i=h}for(var p=0;p<o;p+=Math.PI/2)p>i&&(lv[0]=iv(p)*n+e,lv[1]=rv(p)*r+t,u(s,lv,s),c(l,lv,l))}var mv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},vv=[],gv=[],yv=[],_v=[],bv=[],xv=[],wv=Math.min,Sv=Math.max,Tv=Math.cos,Cv=Math.sin,Iv=Math.abs,Mv=Math.PI,Ev=2*Mv,Av="undefined"!=typeof Float32Array,Dv=[];function Ov(e){return Math.round(e/Mv*1e8)/1e8%2*Mv}var Nv=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=Iv(n/Wp/e)||0,this._uy=Iv(n/Wp/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(mv.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=Iv(e-this._xi),r=Iv(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(mv.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(mv.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(mv.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(),Dv[0]=r,Dv[1]=i,function(e,t){var n=Ov(e[0]);n<0&&(n+=Ev);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ev?i=n+Ev:t&&n-i>=Ev?i=n-Ev:!t&&n>i?i=n+(Ev-Ov(n-i)):t&&n<i&&(i=n-(Ev-Ov(i-n))),e[0]=n,e[1]=i}(Dv,o),r=Dv[0];var a=(i=Dv[1])-r;return this.addData(mv.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=Tv(i)*n+e,this._yi=Cv(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(mv.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(mv.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||!Av||(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();Av&&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,Av&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){yv[0]=yv[1]=bv[0]=bv[1]=Number.MAX_VALUE,_v[0]=_v[1]=xv[0]=xv[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 mv.M:n=i=t[e++],r=o=t[e++],bv[0]=i,bv[1]=o,xv[0]=i,xv[1]=o;break;case mv.L:uv(n,r,t[e],t[e+1],bv,xv),n=t[e++],r=t[e++];break;case mv.C:hv(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],bv,xv),n=t[e++],r=t[e++];break;case mv.Q:pv(n,r,t[e++],t[e++],t[e],t[e+1],bv,xv),n=t[e++],r=t[e++];break;case mv.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],h=t[e++],p=t[e++]+h;e+=1;var f=!t[e++];s&&(i=Tv(h)*c+l,o=Cv(h)*d+u),fv(l,u,c,d,h,p,f,bv,xv),n=Tv(p)*c+l,r=Cv(p)*d+u;break;case mv.R:uv(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],bv,xv);break;case mv.Z:n=i,r=o}Ac(yv,yv,bv),Dc(_v,_v,xv)}return 0===e&&(yv[0]=yv[1]=_v[0]=_v[1]=0),new wd(yv[0],yv[1],_v[0]-yv[0],_v[1]-yv[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 h=e[d++],p=1===d;p&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(h){case mv.M:i=a=e[d++],o=s=e[d++];break;case mv.L:var m=e[d++],v=(_=e[d++])-o;(Iv(A=m-i)>n||Iv(v)>r||d===t-1)&&(f=Math.sqrt(A*A+v*v),i=m,o=_);break;case mv.C:var g=e[d++],y=e[d++],_=(m=e[d++],e[d++]),b=e[d++],x=e[d++];f=ch(i,o,g,y,m,_,b,x,10),i=b,o=x;break;case mv.Q:f=mh(i,o,g=e[d++],y=e[d++],m=e[d++],_=e[d++],10),i=m,o=_;break;case mv.A:var w=e[d++],S=e[d++],T=e[d++],C=e[d++],I=e[d++],M=e[d++],E=M+I;d+=1,e[d++],p&&(a=Tv(I)*T+w,s=Cv(I)*C+S),f=Sv(T,C)*wv(Ev,Math.abs(M)),i=Tv(E)*T+w,o=Cv(E)*C+S;break;case mv.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case mv.Z:var A=a-i;v=s-o;f=Math.sqrt(A*A+v*v),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,h=this.data,p=this._ux,f=this._uy,m=this._len,v=t<1,g=0,y=0,_=0;if(!v||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var b=0;b<m;){var x=h[b++],w=1===b;switch(w&&(n=i=h[b],r=o=h[b+1]),x!==mv.L&&_>0&&(e.lineTo(c,d),_=0),x){case mv.M:n=i=h[b++],r=o=h[b++],e.moveTo(i,o);break;case mv.L:a=h[b++],s=h[b++];var S=Iv(a-i),T=Iv(s-o);if(S>p||T>f){if(v){if(g+(Q=l[y++])>u){var C=(u-g)/Q;e.lineTo(i*(1-C)+a*C,o*(1-C)+s*C);break e}g+=Q}e.lineTo(a,s),i=a,o=s,_=0}else{var I=S*S+T*T;I>_&&(c=a,d=s,_=I)}break;case mv.C:var M=h[b++],E=h[b++],A=h[b++],D=h[b++],O=h[b++],N=h[b++];if(v){if(g+(Q=l[y++])>u){uh(i,M,A,O,C=(u-g)/Q,vv),uh(o,E,D,N,C,gv),e.bezierCurveTo(vv[1],gv[1],vv[2],gv[2],vv[3],gv[3]);break e}g+=Q}e.bezierCurveTo(M,E,A,D,O,N),i=O,o=N;break;case mv.Q:M=h[b++],E=h[b++],A=h[b++],D=h[b++];if(v){if(g+(Q=l[y++])>u){fh(i,M,A,C=(u-g)/Q,vv),fh(o,E,D,C,gv),e.quadraticCurveTo(vv[1],gv[1],vv[2],gv[2]);break e}g+=Q}e.quadraticCurveTo(M,E,A,D),i=A,o=D;break;case mv.A:var R=h[b++],L=h[b++],P=h[b++],k=h[b++],B=h[b++],F=h[b++],U=h[b++],z=!h[b++],H=P>k?P:k,V=Iv(P-k)>.001,W=B+F,Y=!1;if(v)g+(Q=l[y++])>u&&(W=B+F*(u-g)/Q,Y=!0),g+=Q;if(V&&e.ellipse?e.ellipse(R,L,P,k,U,B,W,z):e.arc(R,L,H,B,W,z),Y)break e;w&&(n=Tv(B)*P+R,r=Cv(B)*k+L),i=Tv(W)*P+R,o=Cv(W)*k+L;break;case mv.R:n=i=h[b],r=o=h[b+1],a=h[b++],s=h[b++];var j=h[b++],G=h[b++];if(v){if(g+(Q=l[y++])>u){var q=u-g;e.moveTo(a,s),e.lineTo(a+wv(q,j),s),(q-=j)>0&&e.lineTo(a+j,s+wv(q,G)),(q-=G)>0&&e.lineTo(a+Sv(j-q,0),s+G),(q-=j)>0&&e.lineTo(a,s+Sv(G-q,0));break e}g+=Q}e.rect(a,s,j,G);break;case mv.Z:if(v){var Q;if(g+(Q=l[y++])>u){C=(u-g)/Q;e.lineTo(i*(1-C)+n*C,o*(1-C)+r*C);break e}g+=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=mv,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),Rv=Nv;function Lv(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 Pv(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 h=function(e,t,n,r,i,o,a,s,l,u,c){var d,h,p,f,m,v=.005,g=1/0;eh[0]=l,eh[1]=u;for(var y=0;y<1;y+=.05)th[0]=oh(e,n,i,a,y),th[1]=oh(t,r,o,s,y),(f=Mc(eh,th))<g&&(d=y,g=f);g=1/0;for(var _=0;_<32&&!(v<$d);_++)h=d-v,p=d+v,th[0]=oh(e,n,i,a,h),th[1]=oh(t,r,o,s,h),f=Mc(th,eh),h>=0&&f<g?(d=h,g=f):(nh[0]=oh(e,n,i,a,p),nh[1]=oh(t,r,o,s,p),m=Mc(nh,eh),p<=1&&m<g?(d=p,g=m):v*=.5);return c&&(c[0]=oh(e,n,i,a,d),c[1]=oh(t,r,o,s,d)),Zd(g)}(e,t,n,r,i,o,a,s,u,c,null);return h<=d/2}function kv(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;eh[0]=a,eh[1]=s;for(var h=0;h<1;h+=.05)th[0]=dh(e,n,i,h),th[1]=dh(t,r,o,h),(v=Mc(eh,th))<d&&(u=h,d=v);d=1/0;for(var p=0;p<32&&!(c<$d);p++){var f=u-c,m=u+c;th[0]=dh(e,n,i,f),th[1]=dh(t,r,o,f);var v=Mc(th,eh);if(f>=0&&v<d)u=f,d=v;else{nh[0]=dh(e,n,i,m),nh[1]=dh(t,r,o,m);var g=Mc(nh,eh);m<=1&&g<d?(u=m,d=g):c*=.5}}return l&&(l[0]=dh(e,n,i,u),l[1]=dh(t,r,o,u)),Zd(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var Bv=2*Math.PI;function Fv(e){return(e%=Bv)<0&&(e+=Bv),e}var Uv=2*Math.PI;function zv(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)%Uv<1e-4)return!0;if(o){var d=r;r=Fv(i),i=Fv(d)}else r=Fv(r),i=Fv(i);r>i&&(i+=Uv);var h=Math.atan2(l,s);return h<0&&(h+=Uv),h>=r&&h<=i||h+Uv>=r&&h+Uv<=i}function Hv(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 Vv=Rv.CMD,Wv=2*Math.PI;var Yv=[-1,-1,-1],jv=[-1,-1];function Gv(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=sh(t,r,o,s,u,Yv);if(0===d)return 0;for(var h=0,p=-1,f=void 0,m=void 0,v=0;v<d;v++){var g=Yv[v],y=0===g||1===g?.5:1;oh(e,n,i,a,g)<l||(p<0&&(p=lh(t,r,o,s,jv),jv[1]<jv[0]&&p>1&&(c=void 0,c=jv[0],jv[0]=jv[1],jv[1]=c),f=oh(t,r,o,s,jv[0]),p>1&&(m=oh(t,r,o,s,jv[1]))),2===p?g<jv[0]?h+=f<t?y:-y:g<jv[1]?h+=m<f?y:-y:h+=s<m?y:-y:g<jv[0]?h+=f<t?y:-y:h+=s<f?y:-y)}return h}function qv(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(rh(o))ih(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(rh(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=Zd(u),h=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),h>=0&&h<=1&&(i[l++]=h)}}return l}(t,r,o,s,Yv);if(0===l)return 0;var u=ph(t,r,o);if(u>=0&&u<=1){for(var c=0,d=dh(t,r,o,u),h=0;h<l;h++){var p=0===Yv[h]||1===Yv[h]?.5:1;dh(e,n,i,Yv[h])<a||(Yv[h]<u?c+=d<t?p:-p:c+=o<d?p:-p)}return c}p=0===Yv[0]||1===Yv[0]?.5:1;return dh(e,n,i,Yv[0])<a?0:o<t?p:-p}function Qv(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Yv[0]=-l,Yv[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=Wv-1e-4){r=0,i=Wv;var c=o?1:-1;return a>=Yv[0]+e&&a<=Yv[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Wv,i+=Wv);for(var h=0,p=0;p<2;p++){var f=Yv[p];if(f+e>a){var m=Math.atan2(s,f);c=o?1:-1;m<0&&(m=Wv+m),(m>=r&&m<=i||m+Wv>=r&&m+Wv<=i)&&(m>Math.PI/2&&m<1.5*Math.PI&&(c=-c),h+=c)}}return h}function Zv(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,h=0,p=0,f=0,m=0,v=0;v<c;){var g=u[v++],y=1===v;switch(g===Vv.M&&v>1&&(n||(d+=Hv(h,p,f,m,r,i))),y&&(f=h=u[v],m=p=u[v+1]),g){case Vv.M:h=f=u[v++],p=m=u[v++];break;case Vv.L:if(n){if(Lv(h,p,u[v],u[v+1],t,r,i))return!0}else d+=Hv(h,p,u[v],u[v+1],r,i)||0;h=u[v++],p=u[v++];break;case Vv.C:if(n){if(Pv(h,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],t,r,i))return!0}else d+=Gv(h,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],r,i)||0;h=u[v++],p=u[v++];break;case Vv.Q:if(n){if(kv(h,p,u[v++],u[v++],u[v],u[v+1],t,r,i))return!0}else d+=qv(h,p,u[v++],u[v++],u[v],u[v+1],r,i)||0;h=u[v++],p=u[v++];break;case Vv.A:var _=u[v++],b=u[v++],x=u[v++],w=u[v++],S=u[v++],T=u[v++];v+=1;var C=!!(1-u[v++]);o=Math.cos(S)*x+_,a=Math.sin(S)*w+b,y?(f=o,m=a):d+=Hv(h,p,o,a,r,i);var I=(r-_)*w/x+_;if(n){if(zv(_,b,w,S,S+T,C,t,I,i))return!0}else d+=Qv(_,b,w,S,S+T,C,I,i);h=Math.cos(S+T)*x+_,p=Math.sin(S+T)*w+b;break;case Vv.R:if(f=h=u[v++],m=p=u[v++],o=f+u[v++],a=m+u[v++],n){if(Lv(f,m,o,m,t,r,i)||Lv(o,m,o,a,t,r,i)||Lv(o,a,f,a,t,r,i)||Lv(f,a,f,m,t,r,i))return!0}else d+=Hv(o,m,o,a,r,i),d+=Hv(f,a,f,m,r,i);break;case Vv.Z:if(n){if(Lv(h,p,f,m,t,r,i))return!0}else d+=Hv(h,p,f,m,r,i);h=f,p=m}}return n||(s=p,l=m,Math.abs(s-l)<1e-4)||(d+=Hv(h,p,f,m,r,i)||0),0!==d}var Xv=Nu({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},qm),$v={style:Nu({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Qm.style)},Kv=ef.concat(["invisible","culling","z","z2","zlevel","parent"]),Jv=function(e){function t(t){return e.call(this,t)||this}var n;return Ie(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<Kv.length;++s)i[Kv[s]]=this[Kv[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=zu(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?Ou(this.style,a):this.useStyle(a):"shape"===o?Ou(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(ju(e)){var t=Hh(e,0);return t>.5?Yp:t>.2?"#eee":jp}if(e)return jp}return Yp},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(ju(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Hh(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 Rv(!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 Zv(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return Zv(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:Ou(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return fc(Xv,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=Ou({},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=Ou({},r.shape),Ou(s,n.shape)):(s=Ou({},i?this.shape:r.shape),Ou(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=Ou({},this.shape);for(var u={},c=zu(s),d=0;d<c.length;d++){var h=c[d];"object"==typeof s[h]?this.shape[h]=s[h]:u[h]=s[h]}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 $v},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 Ie(n,t),n.prototype.getDefaultStyle=function(){return Au(e.style)},n.prototype.getDefaultShape=function(){return Au(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}(ev),eg=Jv,tg=Nu({strokeFirst:!0,font:cu,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Xv),ng=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(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 fc(tg,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=af(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}(ev);ng.prototype.type="tspan";var rg=ng,ig=Nu({x:0,y:0},qm),og={style:Nu({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Qm.style)};var ag=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.createStyle=function(e){return fc(ig,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,i=(r=t.image)&&"string"!=typeof r&&r.width&&r.height?t.image:this.__image;if(!i)return 0;var o="width"===e?"height":"width",a=t[o];return null==a?i[e]:i[e]/i[o]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return og},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new wd(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(ev);ag.prototype.type="image";var sg=ag;var lg=Math.round;function ug(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?(lg(2*r)===lg(2*i)&&(e.x1=e.x2=dg(r,s,!0)),lg(2*o)===lg(2*a)&&(e.y1=e.y2=dg(o,s,!0)),e):e}}function cg(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=dg(r,s,!0),e.y=dg(i,s,!0),e.width=Math.max(dg(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(dg(i+a,s,!1)-e.y,0===a?0:1),e):e}}function dg(e,t,n){if(!t)return e;var r=lg(2*e);return(r+lg(t))%2==0?r/2:(r+(n?1:-1))/2}var hg=function(){this.x=0,this.y=0,this.width=0,this.height=0},pg={},fg=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultShape=function(){return new hg},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=cg(pg,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}(eg);fg.prototype.type="rect";var mg=fg,vg={fill:"#000"},gg={style:Nu({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},Qm.style)},yg=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=vg,n.attr(t),n}return Ie(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,Cg(e=this.style),ku(e.rich,Cg),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 wd(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||vg},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return Ou(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=zu(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},Ou(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return gg},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||cu,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=uf(o),l=tc(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,h=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?jm(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,p=tc(t.height,h);if(h>p&&c){var f=Math.floor(p/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var m=km(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v=0;v<n.length;v++)n[v]=Bm(n[v],m);var g=p,y=0;for(v=0;v<n.length;v++)y=Math.max(rf(n[v],o),y);null==d&&(d=y);var _=y;return i&&(g+=i[0]+i[2],_+=i[1]+i[3],d+=i[1]+i[3]),u&&(_=d),{lines:n,height:p,outerWidth:_,outerHeight:g,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:h,width:d}}(Ag(e),e),i=Dg(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,h=e.x||0,p=e.y||0,f=e.align||d.align||"left",m=e.verticalAlign||d.verticalAlign||"top",v=h,g=lf(p,r.contentHeight,m);if(i||n){var y=sf(h,s,f),_=lf(p,a,m);i&&this._renderBackground(e,e,y,_,s,a)}g+=c/2,n&&(v=Eg(h,f,n),"top"===m?g+=n[0]:"bottom"===m&&(g-=n[2]));for(var b=0,x=!1,w=(Mg("fill"in e?e.fill:(x=!0,d.fill))),S=(Ig("stroke"in e?e.stroke:o||d.autoStroke&&!x?null:(b=2,d.stroke))),T=e.textShadowBlur>0,C=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),I=r.calculatedLineHeight,M=0;M<u.length;M++){var E=this._getOrCreateChild(rg),A=E.createStyle();E.useStyle(A),A.text=u[M],A.x=v,A.y=g,f&&(A.textAlign=f),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,T&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=S,A.fill=w,S&&(A.lineWidth=e.lineWidth||b,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,Sg(A,e),g+=c,C&&E.setBoundingRect(new wd(sf(A.x,e.width,A.textAlign),lf(A.y,I,A.textBaseline),l,I))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new Hm;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=Lm.lastIndex=0;null!=(r=Lm.exec(e));){var u=r.index;u>l&&Vm(n,e.substring(l,u),t,s),Vm(n,r[2],t,s,r[1]),l=Lm.lastIndex}l<e.length&&Vm(n,e.substring(l,e.length),t,s);var c=[],d=0,h=0,p=t.padding,f="truncate"===a,m="truncate"===t.lineOverflow;function v(e,t,n){e.width=t,e.lineHeight=n,d+=n,h=Math.max(h,t)}e:for(var g=0;g<n.lines.length;g++){for(var y=n.lines[g],_=0,b=0,x=0;x<y.tokens.length;x++){var w=(N=y.tokens[x]).styleName&&t.rich[N.styleName]||{},S=N.textPadding=w.padding,T=S?S[1]+S[3]:0,C=N.font=w.font||t.font;N.contentHeight=uf(C);var I=tc(w.height,N.contentHeight);if(N.innerHeight=I,S&&(I+=S[0]+S[2]),N.height=I,N.lineHeight=nc(w.lineHeight,t.lineHeight,I),N.align=w&&w.align||t.align,N.verticalAlign=w&&w.verticalAlign||"middle",m&&null!=o&&d+N.lineHeight>o){x>0?(y.tokens=y.tokens.slice(0,x),v(y,b,_),n.lines=n.lines.slice(0,g+1)):n.lines=n.lines.slice(0,g);break e}var M=w.width,E=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))N.percentWidth=M,c.push(N),N.contentWidth=rf(N.text,C);else{if(E){var A=w.backgroundColor,D=A&&A.image;D&&Rm(D=Dm(D))&&(N.width=Math.max(N.width,D.width*I/D.height))}var O=f&&null!=i?i-b:null;null!=O&&O<N.width?!E||O<T?(N.text="",N.width=N.contentWidth=0):(N.text=Pm(N.text,O-T,C,t.ellipsis,{minChar:t.truncateMinChar}),N.width=N.contentWidth=rf(N.text,C)):N.contentWidth=rf(N.text,C)}N.width+=T,b+=N.width,w&&(_=Math.max(_,N.lineHeight))}v(y,b,_)}for(n.outerWidth=n.width=tc(i,h),n.outerHeight=n.height=tc(o,d),n.contentHeight=d,n.contentWidth=h,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]),g=0;g<c.length;g++){var N,R=(N=c[g]).percentWidth;N.width=parseInt(R,10)/100*n.width}return n}(Ag(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=sf(a,r,u),h=lf(s,i,c),p=d,f=h;o&&(p+=o[3],f+=o[0]);var m=p+n;Dg(e)&&this._renderBackground(e,e,d,h,r,i);for(var v=!!e.backgroundColor,g=0;g<t.lines.length;g++){for(var y=t.lines[g],_=y.tokens,b=_.length,x=y.lineHeight,w=y.width,S=0,T=p,C=m,I=b-1,M=void 0;S<b&&(!(M=_[S]).align||"left"===M.align);)this._placeToken(M,e,x,f,T,"left",v),w-=M.width,T+=M.width,S++;for(;I>=0&&"right"===(M=_[I]).align;)this._placeToken(M,e,x,f,C,"right",v),w-=M.width,C-=M.width,I--;for(T+=(n-(T-p)-(m-C)-w)/2;S<=I;)M=_[S],this._placeToken(M,e,x,f,T+M.width/2,"center",v),T+=M.width,S++;f+=x}},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&&Dg(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=Eg(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(rg),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,m=!1,v=0,g=Mg("fill"in s?s.fill:"fill"in t?t.fill:(m=!0,f.fill)),y=Ig("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!m?null:(v=2,f.stroke)),_=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=u,_&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=e.font||cu,p.opacity=nc(s.opacity,t.opacity,1),Sg(p,s),y&&(p.lineWidth=nc(s.lineWidth,t.lineWidth,v),p.lineDash=tc(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),g&&(p.fill=g);var b=e.contentWidth,x=e.contentHeight;h.setBoundingRect(new wd(sf(p.x,b,p.textAlign),lf(p.y,x,p.textBaseline),b,x))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,m=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(mg)).useStyle(a.createStyle()),a.style.fill=null;var v=a.shape;v.x=n,v.y=r,v.width=i,v.height=o,v.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=tc(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(sg)).onload=function(){m.dirtyStyle()};var g=s.style;g.image=u.image,g.x=n,g.y=r,g.width=i,g.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=tc(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=nc(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Tg(e)&&(t=[e.fontStyle,e.fontWeight,wg(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&ac(t)||e.textFont||e.font},t}(ev),_g={left:!0,right:1,center:1},bg={top:1,bottom:1,middle:1},xg=["fontStyle","fontWeight","fontSize","fontFamily"];function wg(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function Sg(e,t){for(var n=0;n<xg.length;n++){var r=xg[n],i=t[r];null!=i&&(e[r]=i)}}function Tg(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function Cg(e){if(e){e.font=yg.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||_g[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||bg[n]?n:"top",e.padding&&(e.padding=ic(e.padding))}}function Ig(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Mg(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Eg(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function Ag(e){var t=e.text;return null!=t&&(t+=""),t}function Dg(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Og=yg,Ng=um(),Rg=1,Lg={},Pg=um(),kg=um(),Bg=["emphasis","blur","select"],Fg=["normal","emphasis","blur","select"],Ug="highlight",zg="downplay",Hg="select",Vg="unselect",Wg="toggleSelect";function Yg(e){return null!=e&&"none"!==e}var jg=new wh(100);function Gg(e){if(ju(e)){var t=jg.get(e);return t||(t=Bh(e,-.1),jg.put(e,t)),t}if(Ku(e)){var n=Ou({},e);return n.colorStops=Bu(e.colorStops,(function(e){return{offset:e.offset,color:Bh(e.color,-.1)}})),n}return e}function qg(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Qg(e){qg(e,"emphasis",2)}function Zg(e){2===e.hoverState&&qg(e,"normal",0)}function Xg(e){qg(e,"blur",1)}function $g(e){1===e.hoverState&&qg(e,"normal",0)}function Kg(e){e.selected=!0}function Jg(e){e.selected=!1}function ey(e,t,n){t(e,n)}function ty(e,t,n){ey(e,t,n),e.isGroup&&e.traverse((function(e){ey(e,t,n)}))}function ny(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 ry(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&Ru(n,"select")>=0,o=!1;if(e instanceof eg){var a=Pg(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(Yg(s)||Yg(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=Ou({},r),(u=Ou({},u)).fill=s):!Yg(u.fill)&&Yg(s)?(o=!0,r=Ou({},r),(u=Ou({},u)).fill=Gg(s)):!Yg(u.stroke)&&Yg(l)&&(o||(r=Ou({},r),u=Ou({},u)),u.stroke=Gg(l)),r.style=u}}if(r&&null==r.z2){o||(r=Ou({},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=Ru(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=Ou({},n),a=Ou({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=Ou({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function iy(e){e.stateProxy=ry;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=ry),n&&(n.stateProxy=ry)}function oy(e,t){!hy(e,t)&&!e.__highByOuter&&ty(e,Qg)}function ay(e,t){!hy(e,t)&&!e.__highByOuter&&ty(e,Zg)}function sy(e,t){e.__highByOuter|=1<<(t||0),ty(e,Qg)}function ly(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&ty(e,Zg)}function uy(e){ty(e,$g)}function cy(e){ty(e,Kg)}function dy(e){ty(e,Jg)}function hy(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function py(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=kg(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){$g(e)})),a&&n.push(i)),o.isBlured=!1})),ku(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function fy(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&&uy(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||Xg(e)})),Pu(t))o(e.getData(),t);else if(Qu(t))for(var c=zu(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),kg(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 my(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){kg(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){Xg(e)}))}}}function vy(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"===Ng(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function gy(e){ku(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?cy(t):dy(t)}))}))}function yy(e){var t=[];return e.eachSeries((function(e){ku(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 _y(e,t,n){Ty(e,!0),ty(e,iy),function(e,t,n){var r=Ng(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function by(e,t,n,r){r?function(e){Ty(e,!1)}(e):_y(e,t,n)}var xy=["emphasis","blur","select"],wy={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Sy(e,t,n,r){n=n||"itemStyle";for(var i=0;i<xy.length;i++){var o=xy[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[wy[n]]()}}function Ty(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 Cy(e){return!(!e||!e.__highDownDispatcher)}function Iy(e){var t=e.type;return t===Hg||t===Vg||t===Wg}function My(e){var t=e.type;return t===Ug||t===zg}var Ey=Rv.CMD,Ay=[[],[],[]],Dy=Math.sqrt,Oy=Math.atan2;var Ny=Math.sqrt,Ry=Math.sin,Ly=Math.cos,Py=Math.PI;function ky(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function By(e,t){return(e[0]*t[0]+e[1]*t[1])/(ky(e)*ky(t))}function Fy(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(By(e,t))}function Uy(e,t,n,r,i,o,a,s,l,u,c){var d=l*(Py/180),h=Ly(d)*(e-n)/2+Ry(d)*(t-r)/2,p=-1*Ry(d)*(e-n)/2+Ly(d)*(t-r)/2,f=h*h/(a*a)+p*p/(s*s);f>1&&(a*=Ny(f),s*=Ny(f));var m=(i===o?-1:1)*Ny((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,v=m*a*p/s,g=m*-s*h/a,y=(e+n)/2+Ly(d)*v-Ry(d)*g,_=(t+r)/2+Ry(d)*v+Ly(d)*g,b=Fy([1,0],[(h-v)/a,(p-g)/s]),x=[(h-v)/a,(p-g)/s],w=[(-1*h-v)/a,(-1*p-g)/s],S=Fy(x,w);if(By(x,w)<=-1&&(S=Py),By(x,w)>=1&&(S=0),S<0){var T=Math.round(S/Py*1e6)/1e6;S=2*Py+T%2*Py}c.addData(u,y,_,a,s,b,S,d,o)}var zy=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Hy=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Vy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.applyTransform=function(e){},t}(eg);function Wy(e){return null!=e.setData}function Yy(e,t){var n=function(e){var t=new Rv;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=Rv.CMD,l=e.match(zy);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,p=c.match(Hy)||[],f=p.length,m=0;m<f;m++)p[m]=parseFloat(p[m]);for(var v=0;v<f;){var g=void 0,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0,S=void 0,T=r,C=i,I=void 0,M=void 0;switch(d){case"l":r+=p[v++],i+=p[v++],h=s.L,t.addData(h,r,i);break;case"L":r=p[v++],i=p[v++],h=s.L,t.addData(h,r,i);break;case"m":r+=p[v++],i+=p[v++],h=s.M,t.addData(h,r,i),o=r,a=i,d="l";break;case"M":r=p[v++],i=p[v++],h=s.M,t.addData(h,r,i),o=r,a=i,d="L";break;case"h":r+=p[v++],h=s.L,t.addData(h,r,i);break;case"H":r=p[v++],h=s.L,t.addData(h,r,i);break;case"v":i+=p[v++],h=s.L,t.addData(h,r,i);break;case"V":i=p[v++],h=s.L,t.addData(h,r,i);break;case"C":h=s.C,t.addData(h,p[v++],p[v++],p[v++],p[v++],p[v++],p[v++]),r=p[v-2],i=p[v-1];break;case"c":h=s.C,t.addData(h,p[v++]+r,p[v++]+i,p[v++]+r,p[v++]+i,p[v++]+r,p[v++]+i),r+=p[v-2],i+=p[v-1];break;case"S":g=r,y=i,I=t.len(),M=t.data,n===s.C&&(g+=r-M[I-4],y+=i-M[I-3]),h=s.C,T=p[v++],C=p[v++],r=p[v++],i=p[v++],t.addData(h,g,y,T,C,r,i);break;case"s":g=r,y=i,I=t.len(),M=t.data,n===s.C&&(g+=r-M[I-4],y+=i-M[I-3]),h=s.C,T=r+p[v++],C=i+p[v++],r+=p[v++],i+=p[v++],t.addData(h,g,y,T,C,r,i);break;case"Q":T=p[v++],C=p[v++],r=p[v++],i=p[v++],h=s.Q,t.addData(h,T,C,r,i);break;case"q":T=p[v++]+r,C=p[v++]+i,r+=p[v++],i+=p[v++],h=s.Q,t.addData(h,T,C,r,i);break;case"T":g=r,y=i,I=t.len(),M=t.data,n===s.Q&&(g+=r-M[I-4],y+=i-M[I-3]),r=p[v++],i=p[v++],h=s.Q,t.addData(h,g,y,r,i);break;case"t":g=r,y=i,I=t.len(),M=t.data,n===s.Q&&(g+=r-M[I-4],y+=i-M[I-3]),r+=p[v++],i+=p[v++],h=s.Q,t.addData(h,g,y,r,i);break;case"A":_=p[v++],b=p[v++],x=p[v++],w=p[v++],S=p[v++],Uy(T=r,C=i,r=p[v++],i=p[v++],w,S,_,b,x,h=s.A,t);break;case"a":_=p[v++],b=p[v++],x=p[v++],w=p[v++],S=p[v++],Uy(T=r,C=i,r+=p[v++],i+=p[v++],w,S,_,b,x,h=s.A,t)}}"z"!==d&&"Z"!==d||(h=s.Z,t.addData(h),r=o,i=a),n=h}return t.toStatic(),t}(e),r=Ou({},t);return r.buildPath=function(e){if(Wy(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=Ey.M,d=Ey.C,h=Ey.L,p=Ey.R,f=Ey.A,m=Ey.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case h:r=1;break;case d:r=3;break;case m:r=2;break;case f:var v=t[4],g=t[5],y=Dy(t[0]*t[0]+t[1]*t[1]),_=Dy(t[2]*t[2]+t[3]*t[3]),b=Oy(-t[1]/_,t[0]/y);l[i]*=y,l[i++]+=v,l[i]*=_,l[i++]+=g,l[i++]*=y,l[i++]*=_,l[i++]+=b,l[i++]+=b,o=i+=2;break;case p:s[0]=l[i++],s[1]=l[i++],Ec(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],Ec(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var x=Ay[a];x[0]=l[i++],x[1]=l[i++],Ec(x,x,t),l[o++]=x[0],l[o++]=x[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var jy=function(){this.cx=0,this.cy=0,this.r=0},Gy=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultShape=function(){return new jy},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}(eg);Gy.prototype.type="circle";var qy=Gy,Qy=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Zy=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultShape=function(){return new Qy},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}(eg);Zy.prototype.type="ellipse";var Xy=Zy,$y=Math.PI,Ky=2*$y,Jy=Math.sin,e_=Math.cos,t_=Math.acos,n_=Math.atan2,r_=Math.abs,i_=Math.sqrt,o_=Math.max,a_=Math.min,s_=1e-4;function l_(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/i_(s*s+l*l),c=u*l,d=-u*s,h=e+c,p=t+d,f=n+c,m=r+d,v=(h+f)/2,g=(p+m)/2,y=f-h,_=m-p,b=y*y+_*_,x=i-o,w=h*m-f*p,S=(_<0?-1:1)*i_(o_(0,x*x*b-w*w)),T=(w*_-y*S)/b,C=(-w*y-_*S)/b,I=(w*_+y*S)/b,M=(-w*y+_*S)/b,E=T-v,A=C-g,D=I-v,O=M-g;return E*E+A*A>D*D+O*O&&(T=I,C=M),{cx:T,cy:C,x0:-c,y0:-d,x1:T*(i/x-1),y1:C*(i/x-1)}}function u_(e,t){var n,r=o_(t.r,0),i=o_(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,h=r_(l-s),p=h>Ky&&h%Ky;if(p>s_&&(h=p),r>s_)if(h>Ky-s_)e.moveTo(u+r*e_(s),c+r*Jy(s)),e.arc(u,c,r,s,l,!d),i>s_&&(e.moveTo(u+i*e_(l),c+i*Jy(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,m=void 0,v=void 0,g=void 0,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0,S=void 0,T=void 0,C=void 0,I=void 0,M=void 0,E=void 0,A=void 0,D=r*e_(s),O=r*Jy(s),N=i*e_(l),R=i*Jy(l),L=h>s_;if(L){var P=t.cornerRadius;P&&(n=function(e){var t;if(Wu(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}(P),f=n[0],m=n[1],v=n[2],g=n[3]);var k=r_(r-i)/2;if(y=a_(k,v),_=a_(k,g),b=a_(k,f),x=a_(k,m),T=w=o_(y,_),C=S=o_(b,x),(w>s_||S>s_)&&(I=r*e_(l),M=r*Jy(l),E=i*e_(s),A=i*Jy(s),h<$y)){var B=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,h=d*l-c*u;if(!(h*h<s_))return[e+(h=(c*(t-o)-d*(e-i))/h)*l,t+h*u]}(D,O,E,A,I,M,N,R);if(B){var F=D-B[0],U=O-B[1],z=I-B[0],H=M-B[1],V=1/Jy(t_((F*z+U*H)/(i_(F*F+U*U)*i_(z*z+H*H)))/2),W=i_(B[0]*B[0]+B[1]*B[1]);T=a_(w,(r-W)/(V+1)),C=a_(S,(i-W)/(V-1))}}}if(L)if(T>s_){var Y=a_(v,T),j=a_(g,T),G=l_(E,A,D,O,r,Y,d),q=l_(I,M,N,R,r,j,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),T<w&&Y===j?e.arc(u+G.cx,c+G.cy,T,n_(G.y0,G.x0),n_(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,n_(G.y0,G.x0),n_(G.y1,G.x1),!d),e.arc(u,c,r,n_(G.cy+G.y1,G.cx+G.x1),n_(q.cy+q.y1,q.cx+q.x1),!d),j>0&&e.arc(u+q.cx,c+q.cy,j,n_(q.y1,q.x1),n_(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>s_&&L)if(C>s_){Y=a_(f,C),G=l_(N,R,I,M,i,-(j=a_(m,C)),d),q=l_(D,O,E,A,i,-Y,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),C<S&&Y===j?e.arc(u+G.cx,c+G.cy,C,n_(G.y0,G.x0),n_(q.y0,q.x0),!d):(j>0&&e.arc(u+G.cx,c+G.cy,j,n_(G.y0,G.x0),n_(G.y1,G.x1),!d),e.arc(u,c,i,n_(G.cy+G.y1,G.cx+G.x1),n_(q.cy+q.y1,q.cx+q.x1),d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,n_(q.y1,q.x1),n_(q.y0,q.x0),!d))}else e.lineTo(u+N,c+R),e.arc(u,c,i,l,s,d);else e.lineTo(u+N,c+R)}else e.moveTo(u,c);e.closePath()}}}var c_=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},d_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultShape=function(){return new c_},t.prototype.buildPath=function(e,t){u_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(eg);d_.prototype.type="sector";var h_=d_,p_=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},f_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultShape=function(){return new p_},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}(eg);f_.prototype.type="ring";var m_=f_;function v_(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 h=0,p=e.length;h<p;h++)Ac(a,a,e[h]),Dc(s,s,e[h]);Ac(a,a,r[0]),Dc(s,s,r[1])}for(h=0,p=e.length;h<p;h++){var f=e[h];if(n)i=e[h?h-1:p-1],o=e[(h+1)%p];else{if(0===h||h===p-1){l.push(bc(e[h]));continue}i=e[h-1],o=e[h+1]}wc(u,o,i),Sc(u,u,t);var m=Cc(f,i),v=Cc(f,o),g=m+v;0!==g&&(m/=g,v/=g),Sc(c,u,-m),Sc(d,u,v);var y=xc([],f,c),_=xc([],f,d);r&&(Dc(y,y,a),Ac(y,y,s),Dc(_,_,a),Ac(_,_,s)),l.push(y),l.push(_)}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 g_=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},y_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultShape=function(){return new g_},t.prototype.buildPath=function(e,t){v_(e,t,!0)},t}(eg);y_.prototype.type="polygon";var __=y_,b_=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},x_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new b_},t.prototype.buildPath=function(e,t){v_(e,t,!1)},t}(eg);x_.prototype.type="polyline";var w_=x_,S_={},T_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},C_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new T_},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=ug(S_,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}(eg);C_.prototype.type="line";var I_=C_,M_=[],E_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function A_(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?ah:oh)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ah:oh)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?hh:dh)(e.x1,e.cpx1,e.x2,t),(n?hh:dh)(e.y1,e.cpy1,e.y2,t)]}var D_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new E_},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&&(fh(n,a,i,c,M_),a=M_[1],i=M_[2],fh(r,s,o,c,M_),s=M_[1],o=M_[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(uh(n,a,l,i,c,M_),a=M_[1],l=M_[2],i=M_[3],uh(r,s,u,o,c,M_),s=M_[1],u=M_[2],o=M_[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return A_(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=A_(this.shape,e,!0);return Tc(t,t)},t}(eg);D_.prototype.type="bezier-curve";var O_=D_,N_=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},R_=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new N_},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}(eg);R_.prototype.type="arc";var L_=R_,P_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return Ie(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),eg.prototype.getBoundingRect.call(this)},t}(eg),k_=P_,B_=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),F_=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 Ie(t,e),t}(B_),U_=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 Ie(t,e),t}(B_),z_=[0,0],H_=[0,0],V_=new hd,W_=new hd,Y_=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new hd;for(n=0;n<2;n++)this._axes[n]=new hd;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);hd.sub(r[0],n[1],n[0]),hd.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 V_.set(1/0,1/0),W_.set(0,0),!this._intersectCheckOneSide(this,e,V_,W_,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,V_,W_,r,-1)&&(n=!1,r)||r||hd.copy(t,n?V_:W_),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,z_),this._getProjMinMaxOnAxis(s,t._corners,H_),z_[1]<H_[0]||z_[0]>H_[1]){if(a=!1,i)return a;var u=Math.abs(H_[0]-z_[1]),c=Math.abs(z_[0]-H_[1]);Math.min(u,c)>r.len()&&(u<c?hd.scale(r,l,-u*o):hd.scale(r,l,c*o))}else if(n){u=Math.abs(H_[0]-z_[1]),c=Math.abs(z_[0]-H_[1]);Math.min(u,c)<n.len()&&(u<c?hd.scale(n,l,u*o):hd.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}(),j_=Y_,G_=[],q_=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 Ie(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 wd(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(G_)),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}(ev),Q_=um();function Z_(e,t,n,r,i,o,a){var s,l=!1;Yu(i)?(a=o,o=i,i=null):Qu(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=tc(r.duration,200),u=tc(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)),Yu(c)&&(c=c(n,i)),Yu(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 X_(e,t,n,r,i,o){Z_("update",e,t,n,r,i,o)}function $_(e,t,n,r,i,o){Z_("enter",e,t,n,r,i,o)}function K_(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 J_(e,t,n,r,i,o){K_(e)||Z_("leave",e,t,n,r,i,o)}function eb(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),J_(e,{style:{opacity:0}},t,n,r)}function tb(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||eb(e,t,n,r)})):eb(e,t,n,r)}function nb(e){Q_(e).oldStyle=e.style}var rb=Math.max,ib=Math.min,ob={};var ab=function(e,t){var n=Yy(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 Ie(t,e),t}(Vy)};function sb(e,t){ob[e]=t}function lb(e,t,n,r){var i=function(e,t){return new Vy(Yy(e,t))}(e,t);return n&&("center"===r&&(n=cb(n,i.getBoundingRect())),hb(i,n)),i}function ub(e,t,n){var r=new sg({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(cb(t,i))}}});return r}function cb(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 db=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 eg(t);return a.createPathProxy(),a.buildPath=function(e){if(Wy(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function hb(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pb(e,t){return ug(e,e,{lineWidth:t}),e}var fb=dg;function mb(e,t){for(var n=ad([]);e&&e!==t;)sd(n,e.getLocalTransform(),n),e=e.parent;return n}function vb(e,t,n){return t&&!Pu(t)&&(t=Jp.getLocalTransform(t)),n&&(t=cd([],t)),Ec([],e,t)}function gb(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=vb(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function yb(e){return!e.isGroup}function _b(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){yb(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(yb(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),X_(e,r,n,Ng(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=Ou({},e.shape)),t}}function bb(e,t){return Bu(e,(function(e){var n=e[0];n=rb(n,t.x),n=ib(n,t.x+t.width);var r=e[1];return r=rb(r,t.y),[n,r=ib(r,t.y+t.height)]}))}function xb(e,t,n){var r=Ou({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),Nu(i,n),new sg(r)):lb(e.replace("path://",""),r,n,"center")}function wb(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(Sb(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function Sb(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,h=s-o,p=Tb(d,h,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-i,m=t-o,v=Tb(f,m,u,c)/p;if(v<0||v>1)return!1;var g=Tb(f,m,d,h)/p;return!(g<0||g>1)}function Tb(e,t,n,r){return e*r-n*t}function Cb(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=ju(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&&ku(zu(l),(function(e){vc(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=Ng(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:Nu({content:r,formatterParams:s},i)}}function Ib(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Mb(e,t){if(e)if(Wu(e))for(var n=0;n<e.length;n++)Ib(e[n],t);else Ib(e,t)}sb("circle",qy),sb("ellipse",Xy),sb("sector",h_),sb("ring",m_),sb("polygon",__),sb("polyline",w_),sb("rect",mg),sb("line",I_),sb("bezierCurve",O_),sb("arc",L_);var Eb=Object.freeze({__proto__:null,updateProps:X_,initProps:$_,removeElement:J_,removeElementWithFadeOut:tb,isElementRemoved:K_,extendShape:function(e){return eg.extend(e)},extendPath:function(e,t){return ab(e,t)},registerShape:sb,getShapeClass:function(e){if(ob.hasOwnProperty(e))return ob[e]},makePath:lb,makeImage:ub,mergePath:db,resizePath:hb,subPixelOptimizeLine:pb,subPixelOptimizeRect:function(e){return cg(e.shape,e.shape,e.style),e},subPixelOptimize:fb,getTransform:mb,applyTransform:vb,transformDirection:gb,groupTransition:_b,clipPointsByRect:bb,clipRectByRect:function(e,t){var n=rb(e.x,t.x),r=ib(e.x+e.width,t.x+t.width),i=rb(e.y,t.y),o=ib(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:xb,linePolygonIntersect:wb,lineLineIntersect:Sb,setTooltipConfig:Cb,traverseElements:Mb,Group:Tf,Image:sg,Text:Og,Circle:qy,Ellipse:Xy,Sector:h_,Ring:m_,Polygon:__,Polyline:w_,Rect:mg,Line:I_,BezierCurve:O_,Arc:L_,IncrementalDisplayable:q_,CompoundPath:k_,LinearGradient:F_,RadialGradient:U_,BoundingRect:wd,OrientedBoundingRect:j_,Point:hd,Path:eg}),Ab={};function Db(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=Yu(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<Bg.length;u++){var c=Bg[u],d=t[c];l[c]=tc(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function Ob(e,t,n,r){n=n||Ab;for(var i=e instanceof Og,o=!1,a=0;a<Fg.length;a++){if((h=t[Fg[a]])&&h.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new Og,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=Db(n,t),u=t.normal,c=!!u.getShallow("show"),d=Rb(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(Lb(u,n,!1));for(a=0;a<Bg.length;a++){var h,p=Bg[a];if(h=t[p]){var f=s.ensureState(p),m=!!tc(h.getShallow("show"),c);if(m!==c&&(f.ignore=!m),f.style=Rb(h,r&&r[p],n,!0,!i),f.style.text=l[p],!i)e.ensureState(p).textConfig=Lb(h,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&&(Ub(s).setLabelText=function(e){var r=Db(n,t,e);!function(e,t){for(var n=0;n<Bg.length;n++){var r=Bg[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 Nb(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<Bg.length;r++){var i=Bg[r];n[i]=e.getModel([i,t])}return n}function Rb(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||Ab;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||Ab).rich;if(n){t=t||{};for(var r=zu(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]);Fb(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var h=t.get("minMargin");null!=h&&(e.margin=h);Fb(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&Ou(o,t),o}function Lb(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=tc(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 Pb=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],kb=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Bb=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Fb(e,t,n,r,i,o,a,s){n=!i&&n||Ab;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=tc(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 h=tc(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=tc(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=tc(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 m=0;m<Pb.length;m++){var v=Pb[m];null!=(y=tc(t.getShallow(v),n[v]))&&(e[v]=y)}for(m=0;m<kb.length;m++){v=kb[m];null!=(y=t.getShallow(v))&&(e[v]=y)}if(null==e.verticalAlign){var g=t.getShallow("baseline");null!=g&&(e.verticalAlign=g)}if(!a||!r.disableBox){for(m=0;m<Bb.length;m++){var y;v=Bb[m];null!=(y=t.getShallow(v))&&(e[v]=y)}var _=t.getShallow("borderType");null!=_&&(e.borderDash=_),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var Ub=um();var zb,Hb,Vb=["textStyle","color"],Wb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Yb=new Og,jb=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Vb):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"),ac([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<Wb.length;n++)t[Wb[n]]=this.getShallow(Wb[n]);return Yb.useStyle(t),Yb.update(),Yb.getBoundingRect()},e}(),Gb=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qb=Im(Gb),Qb=function(){function e(){}return e.prototype.getLineStyle=function(e){return qb(this,e)},e}(),Zb=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Xb=Im(Zb),$b=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Xb(this,e,t)},e}(),Kb=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){Du(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)(Au(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(!lu.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}();bm(Kb),zb=Kb,Hb=["__\0is_clz",wm++].join("_"),zb.prototype[Hb]=!0,zb.isInstance=function(e){return!(!e||!e[Hb])},Lu(Kb,Qb),Lu(Kb,$b),Lu(Kb,Em),Lu(Kb,jb);var Jb=Kb,ex=Math.round(10*Math.random());function tx(e){return[e||"",ex++].join("_")}function nx(e,t){return Du(Du({},e,!0),t,!0)}var rx="ZH",ix="EN",ox=ix,ax={},sx={},lx=lu.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(rx)>-1?rx:ox;function ux(e,t){e=e.toUpperCase(),sx[e]=new Jb(t),ax[e]=t}ux(ix,{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:". "}}}}),ux(rx,{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 cx=1e3,dx=6e4,hx=36e5,px=864e5,fx=31536e6,mx={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}"},vx="{yyyy}-{MM}-{dd}",gx={year:"{yyyy}",month:"{yyyy}-{MM}",day:vx,hour:vx+" "+mx.hour,minute:vx+" "+mx.minute,second:vx+" "+mx.second,millisecond:mx.none},yx=["year","month","day","hour","minute","second","millisecond"],_x=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function bx(e,t){return"0000".substr(0,t-(e+="").length)+e}function xx(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 Sx(e){return e===xx(e)}function Tx(e,t,n,r){var i=zf(e),o=i[Mx(n)](),a=i[Ex(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[Ax(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[Dx(n)](),d=(c-1)%12+1,h=i[Ox(n)](),p=i[Nx(n)](),f=i[Rx(n)](),m=r instanceof Jb?r:function(e){return sx[e]}(r||lx)||sx[ox],v=m.getModel("time"),g=v.get("month"),y=v.get("monthAbbr"),_=v.get("dayOfWeek"),b=v.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,bx(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,g[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,bx(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,bx(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,bx(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,bx(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,bx(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,bx(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,bx(f,3)).replace(/{S}/g,f+"")}function Cx(e,t){var n=zf(e),r=n[Ex(t)]()+1,i=n[Ax(t)](),o=n[Dx(t)](),a=n[Ox(t)](),s=n[Nx(t)](),l=0===n[Rx(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,h=d&&1===i;return h&&1===r?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Ix(e,t,n){var r=qu(e)?zf(e):e;switch(t=t||Cx(e,n)){case"year":return r[Mx(n)]();case"half-year":return r[Ex(n)]()>=6?1:0;case"quarter":return Math.floor((r[Ex(n)]()+1)/4);case"month":return r[Ex(n)]();case"day":return r[Ax(n)]();case"half-day":return r[Dx(n)]()/24;case"hour":return r[Dx(n)]();case"minute":return r[Ox(n)]();case"second":return r[Nx(n)]();case"millisecond":return r[Rx(n)]()}}function Mx(e){return e?"getUTCFullYear":"getFullYear"}function Ex(e){return e?"getUTCMonth":"getMonth"}function Ax(e){return e?"getUTCDate":"getDate"}function Dx(e){return e?"getUTCHours":"getHours"}function Ox(e){return e?"getUTCMinutes":"getMinutes"}function Nx(e){return e?"getUTCSeconds":"getSeconds"}function Rx(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Lx(e){return e?"setUTCFullYear":"setFullYear"}function Px(e){return e?"setUTCMonth":"setMonth"}function kx(e){return e?"setUTCDate":"setDate"}function Bx(e){return e?"setUTCHours":"setHours"}function Fx(e){return e?"setUTCMinutes":"setMinutes"}function Ux(e){return e?"setUTCSeconds":"setSeconds"}function zx(e){return e?"setUTCMilliseconds":"setMilliseconds"}function Hx(e){if(isNaN(Wf(e)))return ju(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Vx(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 Wx=ic;function Yx(e,t,n){function r(e){return e&&ac(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?zf(e):e;if(!isNaN(+s))return Tx(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Gu(e)?r(e):qu(e)&&i(e)?e+"":"-";var l=Wf(e);return i(l)?Hx(l):Gu(e)?r(e):"boolean"==typeof e?e+"":"-"}var jx=["a","b","c","d","e","f","g"],Gx=function(e,t){return"{"+e+(null==t?"":t)+"}"};function qx(e,t,n){Wu(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=jx[o];e=e.replace(Gx(a),Gx(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(Gx(jx[l],s),n?jc(u):u)}return e}function Qx(e,t){return t=t||"transparent",ju(e)?e:Qu(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Zx(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Xx=ku,$x=["left","right","top","bottom","width","height"],Kx=[["width","left","right"],["height","top","bottom"]];function Jx(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,h=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var m=h.width+(f?-f.x+h.x:0);(c=o+m)>r||l.newline?(o=0,c=m,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var v=h.height+(f?-f.y+h.y:0);(d=a+v)>i||l.newline?(o+=s+n,a=0,d=v,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var ew=Jx;function tw(e,t,n){n=Wx(n||0);var r=t.width,i=t.height,o=Of(e.left,r),a=Of(e.top,i),s=Of(e.right,r),l=Of(e.bottom,i),u=Of(e.width,r),c=Of(e.height,i),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-o),isNaN(c)&&(c=i-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=r-s-u-h),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-h}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-h-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new wd(o+n[3],a+n[0],u,c);return f.margin=n,f}function nw(e){var t=e.layoutMode||e.constructor.layoutMode;return Qu(t)?t:t?{type:t}:null}function rw(e,t,n){var r=n&&n.ignoreSize;!Wu(r)&&(r=[r,r]);var i=a(Kx[0],0),o=a(Kx[1],1);function a(n,i){var o={},a=0,u={},c=0;if(Xx(n,(function(t){u[t]=e[t]})),Xx(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 h=n[d];if(!s(o,h)&&s(e,h)){o[h]=e[h];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){Xx(e,(function(e){t[e]=n[e]}))}u(Kx[0],e,i),u(Kx[1],e,o)}function iw(e){return function(e,t){return t&&e&&Xx($x,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}Vu(Jx,"vertical"),Vu(Jx,"horizontal");var ow=um(),aw=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=tx("ec_cpt_model"),i}return Ie(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=nw(this),r=n?iw(e):{};Du(e,t.getTheme().get(this.mainType)),Du(e,this.getDefaultOption()),n&&rw(e,r,n)},t.prototype.mergeOption=function(e,t){Du(this.option,e,!0);var n=nw(this);n&&rw(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[ym])}(e))return e.defaultOption;var t=ow(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=Du(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return mm(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}(Jb);xm(aw,Jb),Cm(aw),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=_m(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=_m(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(aw),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 ku(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return ku(e,(function(e){Ru(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),ku(s,(function(e){Ru(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);Ru(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(ku(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),ku(d.successor,h?f:p)}ku(u,(function(){throw new Error("")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(aw,(function(e){var t=[];ku(aw.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=Bu(t,(function(e){return _m(e).main})),"dataset"!==e&&Ru(t,"dataset")<=0&&t.unshift("dataset");return t}));var sw=aw,lw="";"undefined"!=typeof navigator&&(lw=navigator.platform||"");var uw="rgba(0, 0, 0, 0.2)",cw={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:uw,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:uw,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:uw,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:uw,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:uw,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:uw,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:lw.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},dw=pc(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),hw="original",pw="arrayRows",fw="objectRows",mw="keyedColumns",vw="typedArray",gw="unknown",yw="column",_w="row",bw=1,xw=2,ww=3,Sw=um();function Tw(e,t,n){var r={},i=Cw(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=Sw(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;ku(e=e.slice(),(function(t,n){var i=Qu(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(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 ku(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=h.valueWayDim;p(r[n],a,i),p(l,a,i),h.valueWayDim+=i}else if(o===t)p(r[n],0,i),p(s,0,i);else{a=h.categoryWayDim;p(r[n],a,i),p(l,a,i),h.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function Cw(e){if(!e.get("data",!0))return mm(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},pm).models[0]}function Iw(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Xu(e))return ww;if(r){var c=r[o];Qu(c)?(s=c.name,l=c.type):ju(c)&&(s=c)}if(null!=l)return"ordinal"===l?bw:ww;if(t===pw){var d=e;if(n===_w){for(var h=d[o],p=0;p<(h||[]).length&&p<u;p++)if(null!=(a=_(h[i+p])))return a}else for(p=0;p<d.length&&p<u;p++){var f=d[i+p];if(f&&null!=(a=_(f[o])))return a}}else if(t===fw){var m=e;if(!s)return ww;for(p=0;p<m.length&&p<u;p++){if((g=m[p])&&null!=(a=_(g[s])))return a}}else if(t===mw){if(!s)return ww;if(!(h=e[s])||Xu(h))return ww;for(p=0;p<h.length&&p<u;p++)if(null!=(a=_(h[p])))return a}else if(t===hw){var v=e;for(p=0;p<v.length&&p<u;p++){var g,y=em(g=v[p]);if(!Wu(y))return ww;if(null!=(a=_(y[o])))return a}}function _(e){var t=ju(e);return null!=e&&isFinite(e)&&""!==e?t?xw:ww:t&&"-"!==e?bw:void 0}return ww}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var Mw=pc();var Ew=um();um();var Aw,Dw,Ow,Nw=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=$f(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,Ew,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,Ew)},e}();var Rw="\0_ec_inner",Lw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new Jb(r),this._locale=new Jb(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=Bw(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Bw(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)):Ow(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&&ku(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=pc(),s=t&&t.replaceMergeMainTypeMap;Sw(this).datasetMap=pc(),ku(e,(function(e,t){null!=e&&(sw.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?Au(e):Du(n[t],e,!0))})),s&&s.each((function(e,t){sw.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),sw.topologicalTravel(o,sw.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=Mw.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,$f(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=nm(a,o,l);(function(e,t,n){ku(e,(function(e){var r=e.newOption;Qu(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,sw),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],h=[],p=0;ku(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=sw.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=Ou({componentIndex:n},e.keyInfo);Ou(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),h.push(r),p++):(d.push(void 0),h.push(void 0))}),this),n[t]=d,r.set(t,h),i.set(t,p),"series"===t&&Aw(this)}),this),this._seriesIndices||Aw(this)},t.prototype.getOption=function(){var e=Au(this.option);return ku(e,(function(t,n){if(sw.hasClass(n)){for(var r=$f(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!sm(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[Rw],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=[],ku($f(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?Pw("id",i,a):null!=o?Pw("name",o,a):Uu(a,(function(e){return!!e})),kw(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):Uu(this._componentsMap.get(s),(function(e){return!!e}));return o=kw(u,e),e.filter?Uu(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Yu(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=ju(e)?r.get(e):Qu(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=om(e,null);return Uu(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 Uu(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return Uu(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){Dw(this),ku(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){ku(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){Dw(this),ku(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 ku(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return Dw(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){Dw(this);var n=[];ku(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=pc(n)},t.prototype.restoreData=function(e){Aw(this);var t=this._componentsMap,n=[];t.each((function(e,t){sw.hasClass(t)&&n.push(t)})),sw.topologicalTravel(n,sw.getAllClassMainTypes(),(function(n){ku(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=(Aw=function(e){var t=e._seriesIndices=[];ku(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=pc(t)},Dw=function(e){},void(Ow=function(e,t){e.option={},e.option[Rw]=1,e._componentsMap=pc({series:[]}),e._componentsCount=pc();var n=t.aria;Qu(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;ku(t,(function(t,r){"colorLayer"===r&&n||sw.hasClass(r)||("object"==typeof t?e[r]=e[r]?Du(e[r],t,!1):Au(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),Du(t,cw,!1),e._mergeOption(t,null)})),t}(Jb);function Pw(e,t,n){if(Wu(t)){var r=pc();return ku(t,(function(e){null!=e&&(null!=om(e,null)&&r.set(e,!0))})),Uu(n,(function(t){return t&&r.get(t[e])}))}var i=om(t,null);return Uu(n,(function(t){return t&&null!=i&&t[e]===i}))}function kw(e,t){return t.hasOwnProperty("subType")?Uu(e,(function(e){return e&&e.subType===t.subType})):e}function Bw(e){var t=pc();return e&&ku($f(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}Lu(Lw,Nw);var Fw=Lw,Uw=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],zw=function(e){ku(Uw,(function(t){this[t]=Hu(e[t],e)}),this)},Hw={},Vw=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];ku(Hw,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){ku(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){Hw[e]=t},e.get=function(e){return Hw[e]},e}(),Ww=Vw,Yw=/^(min|max)?(.+)$/,jw=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(ku($f(e.series),(function(e){e&&e.data&&Xu(e.data)&&lc(e.data)})),ku($f(e.dataset),(function(e){e&&e.source&&Xu(e.source)&&lc(e.source)}))),e=Au(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&&Wu(u)&&ku(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function h(e){ku(t,(function(t){t(e,n)}))}return h(i),ku(l,(function(e){return h(e)})),ku(o,(function(e){return h(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=[],Au(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=Au(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++)Gw(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=Bu(s,(function(e){return Au(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function Gw(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return ku(e,(function(e,t){var n=t.match(Yw);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 qw=jw,Qw=ku,Zw=Qu,Xw=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function $w(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=Xw.length;n<r;n++){var i=Xw[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?Du(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?Du(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function Kw(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,Nu(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 Jw(e){Kw(e,"itemStyle"),Kw(e,"lineStyle"),Kw(e,"areaStyle"),Kw(e,"label"),Kw(e,"labelLine"),Kw(e,"upperLabel"),Kw(e,"edgeLabel")}function eS(e,t){var n=Zw(e)&&e[t],r=Zw(n)&&n.textStyle;if(r)for(var i=0,o=Jf.length;i<o;i++){var a=Jf[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function tS(e){e&&(Jw(e),eS(e,"label"),e.emphasis&&eS(e.emphasis,"label"))}function nS(e){return Wu(e)?e:e?[e]:[]}function rS(e){return(Wu(e)?e[0]:e)||{}}function iS(e,t){Qw(nS(e.series),(function(e){Zw(e)&&function(e){if(Zw(e)){$w(e),Jw(e),eS(e,"label"),eS(e,"upperLabel"),eS(e,"edgeLabel"),e.emphasis&&(eS(e.emphasis,"label"),eS(e.emphasis,"upperLabel"),eS(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&($w(t),tS(t));var n=e.markLine;n&&($w(n),tS(n));var r=e.markArea;r&&tS(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Xu(o))for(var a=0;a<o.length;a++)tS(o[a]);ku(e.categories,(function(e){Jw(e)}))}if(i&&!Xu(i))for(a=0;a<i.length;a++)tS(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)tS(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)Wu(l[a])?(tS(l[a][0]),tS(l[a][1])):tS(l[a])}"gauge"===e.type?(eS(e,"axisLabel"),eS(e,"title"),eS(e,"detail")):"treemap"===e.type?(Kw(e.breadcrumb,"itemStyle"),ku(e.levels,(function(e){Jw(e)}))):"tree"===e.type&&Jw(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Qw(n,(function(t){Qw(nS(e[t]),(function(e){e&&(eS(e,"axisLabel"),eS(e.axisPointer,"label"))}))})),Qw(nS(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;eS(t,"axisLabel"),eS(t&&t.axisPointer,"label")})),Qw(nS(e.calendar),(function(e){Kw(e,"itemStyle"),eS(e,"dayLabel"),eS(e,"monthLabel"),eS(e,"yearLabel")})),Qw(nS(e.radar),(function(e){eS(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)})),Qw(nS(e.geo),(function(e){Zw(e)&&(tS(e),Qw(nS(e.regions),(function(e){tS(e)})))})),Qw(nS(e.timeline),(function(e){tS(e),Kw(e,"label"),Kw(e,"itemStyle"),Kw(e,"controlStyle",!0);var t=e.data;Wu(t)&&ku(t,(function(e){Qu(e)&&(Kw(e,"label"),Kw(e,"itemStyle"))}))})),Qw(nS(e.toolbox),(function(e){Kw(e,"iconStyle"),Qw(e.feature,(function(e){Kw(e,"iconStyle")}))})),eS(rS(e.axisPointer),"label"),eS(rS(e.tooltip).axisPointer,"label")}function oS(e){e&&ku(aS,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var aS=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],sS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],lS=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function uS(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<lS.length;n++){var r=lS[n][1],i=lS[n][0];null!=t[r]&&(t[i]=t[r])}}function cS(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function dS(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function hS(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&hS(e[n].children,t)}function pS(e,t){iS(e,t),e.series=$f(e.series),ku(e.series,(function(e){if(Qu(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),cS(e.label),(i=e.data)&&!Xu(i))for(var n=0;n<i.length;n++)cS(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(uS(e),uS(e.backgroundStyle),uS(e.emphasis),(i=e.data)&&!Xu(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(uS(i[n]),uS(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)),dS(e),hS(e.data,dS)}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&&Nu(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),oS(e)}})),e.dataRange&&(e.visualMap=e.dataRange),ku(sS,(function(t){var n=e[t];n&&(Wu(n)||(n=[n]),ku(n,(function(e){oS(e)})))}))}function fS(e){ku(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,h,p=a.get(t.stackedDimension,c);if(isNaN(p))return i;s?h=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,m=n-1;m>=0;m--){var v=e[m];if(s||(h=v.data.rawIndexOf(v.stackedByDimension,d)),h>=0){var g=v.data.getByRawIndex(v.stackResultDimension,h);if("all"===l||"positive"===l&&g>0||"negative"===l&&g<0||"samesign"===l&&p>=0&&g>0||"samesign"===l&&p<=0&&g<0){p=kf(p,g),f=g;break}}}return r[0]=p,r[1]=f,r}))}))}var mS,vS,gS,yS,_S,bS=function(e){this.data=e.data||(e.sourceFormat===mw?{}:[]),this.sourceFormat=e.sourceFormat||gw,this.seriesLayoutBy=e.seriesLayoutBy||yw,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&&Iw(this,n)===bw&&(r.type="ordinal")}};function xS(e){return e instanceof bS}function wS(e,t,n){n=n||TS(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:CS(i),startIndex:a,dimensionsDetectedCount:o};if(t===pw){var s=e;"auto"===r||null==r?IS((function(e){null!=e&&"-"!==e&&(ju(e)?null==a&&(a=1):a=0)}),n,s,10):a=qu(r)?r:r?1:0,i||1!==a||(i=[],IS((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===_w?s.length:s[0]?s[0].length:null}else if(t===fw)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return zu(t)}(e));else if(t===mw)i||(i=[],ku(e,(function(e,t){i.push(t)})));else if(t===hw){var l=em(e[0]);o=Wu(l)&&l.length||1}return{startIndex:a,dimensionsDefine:CS(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new bS({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Au(t)})}function SS(e){return new bS({data:e,sourceFormat:Xu(e)?vw:hw})}function TS(e){var t=gw;if(Xu(e))t=vw;else if(Wu(e)){0===e.length&&(t=pw);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(Wu(i)){t=pw;break}if(Qu(i)){t=fw;break}}}}else if(Qu(e))for(var o in e)if(vc(e,o)&&Pu(e[o])){t=mw;break}return t}function CS(e){if(e){var t=pc();return Bu(e,(function(e,n){var r={name:(e=Qu(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 IS(e,t,n,r){if(t===_w)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 MS(e){var t=e.sourceFormat;return t===fw||t===mw}var ES=function(){function e(e,t){var n=xS(e)?e:SS(e);this._source=n;var r=this._data=n.data;n.sourceFormat===vw&&(this._offset=0,this._dimSize=t,this._data=r),_S(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;_S=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(Ou(e,yS[FS(a,s)]),a===vw)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=OS(a,s);e.getItem=Hu(c,null,i,l,u);var d=LS(a,s);e.count=Hu(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],h=0;h<c;h++){var p=i[h*o+a];d[e+h]=p,p<l&&(l=p),p>u&&(u=p)}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={})[pw+"_"+yw]={pure:!0,appendData:i},e[pw+"_"+_w]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[fw]={pure:!0,appendData:i},e[mw]={pure:!0,appendData:function(e){var t=this._data;ku(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[hw]={appendData:i},e[vw]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},yS=e}(),e}(),AS=function(e,t,n,r){return e[r]},DS=((mS={})[pw+"_"+yw]=function(e,t,n,r){return e[r+t]},mS[pw+"_"+_w]=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},mS[fw]=AS,mS[mw]=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},mS[hw]=AS,mS);function OS(e,t){return DS[FS(e,t)]}var NS=function(e,t,n){return e.length},RS=((vS={})[pw+"_"+yw]=function(e,t,n){return Math.max(0,e.length-t)},vS[pw+"_"+_w]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},vS[fw]=NS,vS[mw]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},vS[hw]=NS,vS);function LS(e,t){return RS[FS(e,t)]}var PS=function(e,t,n){return e[t]},kS=((gS={})[pw]=PS,gS[fw]=function(e,t,n){return e[n]},gS[mw]=PS,gS[hw]=function(e,t,n){var r=em(e);return r instanceof Array?r[t]:r},gS[vw]=PS,gS);function BS(e){return kS[e]}function FS(e,t){return e===pw?e+"_"+t:e}function US(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 BS(o)(r,a,s)}var l=r;return o===hw&&(l=em(r)),l}}}var zS=/\{@(.+?)\}/g,HS=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,h=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:h?h.fullDimensions:null,encode:h?h.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&&Wu(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Yu(i)?(s.status=t,s.dimensionIndex=r,i(s)):ju(i)?qx(i,s).replace(zS,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=US(a,e,i);if(o&&Wu(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 US(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function VS(e){var t,n;return Qu(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function WS(e){return new YS(e)}var YS=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 h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||h<p)){var f=this._progress;if(Wu(f))for(var m=0;m<f.length;m++)this._doProgress(f[m],h,p,l,u);else this._doProgress(f,h,p,l,u)}this._dueIndex=p;var v=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=v}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){jS.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:jS.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),Wu(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}(),jS=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 GS(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||qu(e)||null==e||"-"===e||(e=+zf(e)),null==e||""===e?NaN:+e)}pc({number:function(e){return parseFloat(e)},time:function(e){return+zf(e)},trim:function(e){return ju(e)?ac(e):e}});var qS=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=qu(e)?e:Wf(e),r=qu(t)?t:Wf(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=ju(e),s=ju(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),QS=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 GS(e,t)},e}();function ZS(e){if(!tT(e.sourceFormat)){qf("")}return e.data}function XS(e){var t=e.sourceFormat,n=e.data;if(!tT(t)){qf("")}if(t===pw){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===fw){for(r=[],i=0,o=n.length;i<o;i++)r.push(Ou({},n[i]));return r}}function $S(e,t,n){if(null!=n)return qu(n)||!isNaN(n)&&!vc(t,n)?e[n]:vc(t,n)?t[n]:void 0}function KS(e){return Au(e)}var JS=pc();function eT(e,t,n,r){t.length||qf(""),Qu(e)||qf("");var i=e.type,o=JS.get(i);o||qf("");var a=Bu(t,(function(e){return function(e,t){var n=new QS,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==yw&&qf("");var a=[],s={},l=e.dimensionsDefine;if(l)ku(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(vc(s,n)&&qf(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=OS(i,yw);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=Hu(ZS,null,e)),n.cloneRawData=Hu(XS,null,e);var d=LS(i,yw);n.count=Hu(d,null,r,o,a);var h=BS(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return p(n,t)};var p=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?h(e,t,n.name):void 0}};return n.getDimensionInfo=Hu($S,null,a,s),n.cloneAllDimensionInfo=Hu(KS,null,a),n}(e,o)}));return Bu($f(o.transform({upstream:a[0],upstreamList:a,config:Au(e.config)})),(function(e,n){var r;Qu(e)||qf(""),e.data||qf(""),tT(TS(e.data))||qf("");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:yw,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:yw,sourceHeader:0,dimensions:e.dimensions};return wS(e.data,r,null)}))}function tT(e){return e===pw||e===fw}var nT,rT="undefined",iT=typeof Uint32Array===rT?Array:Uint32Array,oT=typeof Uint16Array===rT?Array:Uint16Array,aT=typeof Int32Array===rT?Array:Int32Array,sT=typeof Float64Array===rT?Array:Float64Array,lT={float:sT,int:aT,ordinal:Array,number:Array,time:sT};function uT(e){return e>65535?iT:oT}function cT(e,t,n,r,i){var o=lT[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 dT=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=pc()}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=nT[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],MS(r),this._dimensions=Bu(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 lT[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++){cT(n,l,(p=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,h=0;h<i;h++){var p=r[h],f=nT.arrayRows.call(this,e[d]||u,p.property,d,h);n[h][c]=f;var m=o[h];f<m[0]&&(m[0]=f),f>m[1]&&(m[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=Bu(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),cT(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],h=e;h<t;h++){d=r.getItem(h,d);for(var p=0;p<a;p++){var f=i[p],m=this._dimValueGetter(d,l[p],h,p);f[h]=m;var v=s[p];m<v[0]&&(v[0]=m),m>v[1]&&(v[1]=m)}}!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=uT(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(uT(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,h=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][h],c)}else{for(var p=0;p<a;p++)o[p]=u[e[p]][h];o[p]=c,d=t.apply(null,o)}d&&(i[s++]=h)}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=zu(e),i=r.length;if(!i)return this;var o=t.count(),a=new(uT(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,h=!1;if(!t._indices){var p=0;if(1===i){for(var f=d[r[0]],m=0;m<n;m++){((_=f[m])>=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}h=!0}else if(2===i){f=d[r[0]];var v=d[r[1]],g=e[r[1]][0],y=e[r[1]][1];for(m=0;m<n;m++){var _=f[m],b=v[m];(_>=u&&_<=c||isNaN(_))&&(b>=g&&b<=y||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===i)for(m=0;m<o;m++){var x=t.getRawIndex(m);((_=d[r[0]][x])>=u&&_<=c||isNaN(_))&&(a[s++]=x)}else for(m=0;m<o;m++){for(var w=!0,S=(x=t.getRawIndex(m),0);S<i;S++){var T=r[S];((_=d[T][x])<e[T][0]||_>e[T][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(m))}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),h=0;h<o;h++)s[h]=r[t[h]][d];s[o]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(i[0]=p,p=i);for(u=0;u<p.length;u++){var f=t[u],m=p[u],v=l[f],g=r[f];g&&(g[d]=m),m<v[0]&&(v[0]=m),m>v[1]&&(v[1]=m)}}}},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(uT(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;h<s-1;h+=u){for(var p=Math.min(h+u,s-1),f=Math.min(h+2*u,s),m=(f+p)/2,v=0,g=p;g<f;g++){var y=a[C=this.getRawIndex(g)];isNaN(y)||(v+=y)}v/=f-p;var _=h,b=Math.min(h+u,s),x=h-1,w=a[c];n=-1,i=_;var S=-1,T=0;for(g=_;g<b;g++){var C;y=a[C=this.getRawIndex(g)];isNaN(y)?(T++,S<0&&(S=C)):(r=Math.abs((x-m)*(y-w)-(x-g)*(v-w)))>n&&(n=r,i=C)}T>0&&T<b-_&&(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(uT(this._rawCount))(Math.ceil(u/s)),h=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,a.length=s);for(var f=0;f<s;f++){var m=this.getRawIndex(p+f);a[f]=l[m]}var v=n(a),g=this.getRawIndex(Math.min(p+r(a,v)||0,u-1));l[g]=v,v<c[0]&&(c[0]=v),v>c[1]&&(c[1]=v),d[h++]=g}return i._count=h,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&&Fu(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=Au(this._extent),e._rawExtent=Au(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 GS(e[r],this._dimensions[r])}nT={arrayRows:e,objectRows:function(e,t,n,r){return GS(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return GS(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),hT=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(pT(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=Xu(a=o.get("data",!0))?vw:hw,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=tc(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=tc(c.sourceHeader,d.sourceHeader),f=tc(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[wS(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var m=n;if(i){var v=this._applyTransform(r);e=v.sourceList,t=v.upstreamSignList}else{e=[wS(m.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&&fT("")}var o,a=[],s=[];return ku(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||fT(""),a.push(t),s.push(e._getVersionSign())})),r?t=function(e,t){var n=$f(e),r=n.length;r||qf("");for(var i=0,o=r;i<o;i++)t=eT(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,a,n.componentIndex):null!=i&&(t=[(o=a[0],new bS({data:o.data,sourceFormat:o.sourceFormat,seriesLayoutBy:o.seriesLayoutBy,dimensionsDefine:Au(o.dimensionsDefine),startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:s}},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];pT(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new dT).initData(new ES(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(pT(e)){var t=Cw(e);return t?[t.getSourceManager()]:[]}return Bu(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?mm(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},pm).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(pT(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 pT(e){return"series"===e.mainType}function fT(e){throw new Error(e)}var mT="line-height:1";function vT(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:"+jc(r+"")+"px;color:"+jc(n)+";font-weight:"+jc(i+""),valueStyle:"font-size:"+jc(a+"")+"px;color:"+jc(o)+";font-weight:"+jc(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var gT=[0,10,20,30],yT=["","\n","\n\n","\n\n\n"];function _T(e,t){return t.type=e,t}function bT(e){return"section"===e.type}function xT(e){return bT(e)?ST:TT}function wT(e){if(bT(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return ku(e.blocks,(function(e){var n=wT(e);n>=t&&(t=n+ +(r&&(!n||bT(e)&&!e.noHeader)))})),t}return 0}function ST(e,t,n,r){var i,o=t.noHeader,a=(i=wT(t),{html:gT[i],richText:yT[i]}),s=[],l=t.blocks||[];oc(!l||Wu(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(vc(c,u)){var d=new qS(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}ku(l,(function(n,i){var o=t.valueFormatter,l=xT(n)(o?Ou(Ou({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var h="richText"===e.renderMode?s.join(a.richText):IT(s.join(""),o?n:a.html);if(o)return h;var p=Yx(t.header,"ordinal",e.useUTC),f=vT(r,e.renderMode).nameStyle;return"richText"===e.renderMode?MT(e,p,f)+a.richText+h:IT('<div style="'+f+";"+mT+';">'+jc(p)+"</div>"+h,n)}function TT(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 Bu(e=Wu(e)?e:[e],(function(e,t){return Yx(e,Wu(p)?p[t]:p,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),h=o?"":Yx(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value),m=!s||!o,v=!s&&o,g=vT(r,i),y=g.nameStyle,_=g.valueStyle;return"richText"===i?(s?"":d)+(o?"":MT(e,h,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(Wu(t)?t.join(" "):t,o)}(e,f,m,v,_)):IT((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+jc(e)+"</span>"}(h,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=Wu(e)?e:[e],'<span style="'+o+";"+r+'">'+Bu(e,(function(e){return jc(e)})).join(" ")+"</span>"}(f,m,v,_)),n)}}function CT(e,t,n,r,i,o){if(e)return xT(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function IT(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+mT+';">'+e+'<div style="clear:both"></div></div>'}function MT(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ET(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var AT=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Yf()}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=ju(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:'+jc(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+jc(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 ju(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Wu(t)?ku(t,(function(e){return Ou(n,e)})):Ou(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function DT(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),h=Wu(d),p=function(e,t){return Qx(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||h&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=Fu(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(_T("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?ku(r,(function(e){c(US(o,n,e),e)})):ku(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var m=l.getDimensionInfo(u[0]);i=t=US(l,a,u[0]),n=m.type}else i=t=h?d[0]:d;var v=am(o),g=v&&o.name||"",y=l.getName(a),_=s?g:y;return _T("section",{header:g,noHeader:s||!v,sortParam:i,blocks:[_T("nameValue",{markerType:"item",markerColor:p,name:_,noName:!ac(_),value:t,valueType:n})].concat(r||[])})}var OT=um();function NT(e,t){return e.getName(t)||e.getId(t)}var RT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return Ie(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=WS({count:PT,reset:kT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(OT(this).sourceManager=new hT(this)).prepareSource();var r=this.getInitialData(e,n);FT(r,this),this.dataTask.context.data=r,OT(this).dataBeforeProcessed=r,LT(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=nw(this),r=n?iw(e):{},i=this.subType;sw.hasClass(i)&&(i+="Series"),Du(e,t.getTheme().get(this.subType)),Du(e,this.getDefaultOption()),Kf(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&rw(e,r,n)},t.prototype.mergeOption=function(e,t){e=Du(this.option,e,!0),this.fillDataTextStyle(e.data);var n=nw(this);n&&rw(this.option,e,n);var r=OT(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);FT(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,OT(this).dataBeforeProcessed=i,LT(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Xu(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Kf(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=zT(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return OT(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=zT(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}OT(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return pc(e)},t.prototype.getSourceManager=function(){return OT(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return OT(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 DT({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(lu.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=Nw.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=NT(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=zu(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[NT(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){Qu(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=NT(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=NT(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 sw.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}(sw);function LT(e){var t=e.name;am(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return ku(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function PT(e){return e.model.getRawData().count()}function kT(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),BT}function BT(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function FT(e,t){ku(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,Vu(UT,t))}))}function UT(e,t){var n=zT(e);return n&&n.setOutputEnd((t||this).count()),t}function zT(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}}Lu(RT,HS),Lu(RT,Nw),xm(RT,sw);var HT=RT,VT=function(){function e(){this.group=new Tf,this.uid=tx("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}();bm(VT),Cm(VT);var WT=VT;function YT(){var e=um();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 jT=um(),GT=YT(),qT=function(){function e(){this.group=new Tf,this.uid=tx("viewChart"),this.renderTask=WS({plan:XT,reset:$T}),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&&ZT(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&ZT(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){Mb(this.group,e)},e.markUpdateMethod=function(e,t){jT(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function QT(e,t,n){e&&Cy(e)&&("emphasis"===t?sy:ly)(e,n)}function ZT(e,t,n){var r=lm(e,t),i=t&&null!=t.highlightKey?function(e){var t=Lg[e];return null==t&&Rg<=32&&(t=Lg[e]=Rg++),t}(t.highlightKey):null;null!=r?ku($f(r),(function(t){QT(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){QT(e,n,i)}))}function XT(e){return GT(e.model)}function $T(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&jT(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),KT[l]}bm(qT),Cm(qT);var KT={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)}}},JT=qT,eC="\0__throttleOriginMethod",tC="\0__throttleRate",nC="\0__throttleType";function rC(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 h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];r=(new Date).getTime(),o=this,a=e;var p=s||t,f=s||n;s=null,i=r-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(d,p):i>=0?d():c=setTimeout(d,-i),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function iC(e,t,n,r){var i=e[t];if(i){var o=i[eC]||i,a=i[nC];if(i[tC]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=rC(o,n,"debounce"===r))[eC]=o,i[nC]=r,i[tC]=n}return i}}function oC(e,t){var n=e[t];n&&n[eC]&&(n.clear&&n.clear(),e[t]=n[eC])}var aC=um(),sC={itemStyle:Im(Zb,!0),lineStyle:Im(Gb,!0)},lC={lineStyle:"stroke",itemStyle:"fill"};function uC(e,t){var n=e.visualStyleMapper||sC[t];return n||(console.warn("Unknown style type '"+t+"'."),sC.itemStyle)}function cC(e,t){var n=e.visualDrawType||lC[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var dC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=uC(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=cC(e,r),l=o[s],u=Yu(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||Yu(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||Yu(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=Ou({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},hC=new Jb,pC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=uC(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){hC.option=n[r];var a=i(hC);Ou(e.ensureUniqueItemVisual(t,"style"),a),hC.option.decal&&(e.setItemVisual(t,"decal",hC.option.decal),hC.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},fC={performRawSeries:!0,overallReset:function(e){var t=pc();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)),aC(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=aC(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=cC(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)}}))}}))}},mC=Math.PI;var vC=function(){function e(e,t,n,r){this._stageTaskMap=pc(),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=pc();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;ku(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});oc(!(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))}ku(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,h=c.agentStubMap;h.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,r.block);h.each((function(e){e.perform(p)})),c.perform(p)&&(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=pc(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||WS({plan:xC,reset:wC,count:CC}));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||WS({reset:gC});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=pc(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,WS({reset:yC,onDirty:bC})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}oc(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):(c=!1,ku(n.getSeries(),h)),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 Yu(e)&&(e={overallReset:e,seriesType:IC(e)}),e.uid=tx("stageHandler"),t&&(e.visualType=t),e},e}();function gC(e){e.overallReset(e.ecModel,e.api,e.payload)}function yC(e){return e.overallProgress&&_C}function _C(){this.agent.dirty(),this.getDownstream().dirty()}function bC(){this.agent&&this.agent.dirty()}function xC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function wC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$f(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Bu(t,(function(e,t){return TC(t)})):SC}var SC=TC(0);function TC(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 CC(e){return e.data.count()}function IC(e){MC=null;try{e(EC,AC)}catch(e){}return MC}var MC,EC={},AC={};function DC(e,t){for(var n in t.prototype)e[n]=gc}DC(EC,Fw),DC(AC,zw),EC.eachSeriesByType=EC.eachRawSeriesByType=function(e){MC=e},EC.eachComponent=function(e){"series"===e.mainType&&e.subType&&(MC=e.subType)};var OC=vC,NC=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],RC={color:NC,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],NC]},LC="#B9B8CE",PC="#100C2A",kC=function(){return{axisLine:{lineStyle:{color:LC}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},BC=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],FC={darkMode:!0,color:BC,backgroundColor:PC,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:LC}},textStyle:{color:LC},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:LC}},dataZoom:{borderColor:"#71708A",textStyle:{color:LC},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:LC}},timeline:{lineStyle:{color:LC},label:{color:LC},controlStyle:{color:LC,borderColor:LC}},calendar:{itemStyle:{color:PC},dayLabel:{color:LC},monthLabel:{color:LC},yearLabel:{color:LC}},timeAxis:kC(),logAxis:kC(),valueAxis:kC(),categoryAxis:kC(),line:{symbol:"circle"},graph:{color:BC},gauge:{title:{color:LC},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:LC},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};FC.categoryAxis.splitLine.show=!1;var UC=FC,zC=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(ju(e)){var i=_m(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};ku(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}(),HC=["symbol","symbolSize","symbolRotate","symbolOffset"],VC=HC.concat(["symbolKeepAspect"]),WC={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<HC.length;a++){var s=HC[a],l=e.get(s);Yu(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(Ou({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=zu(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}}}}},YC={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<VC.length;r++){var i=VC[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function jC(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 GC(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=lm(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:Wu(u)?l.getName(u[0]):l.getName(u),selected:ju(r)?r:Ou({},r)})}}))}function qC(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var QC=Math.round(9*Math.random()),ZC="function"==typeof Object.defineProperty,XC=function(){function e(){this._id="__ec_inner_"+QC++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return ZC?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}(),$C=XC,KC=eg.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()}}),JC=eg.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()}}),eI=eg.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),h=Math.cos(u),p=.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*p,l+s+h*p,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*p,l+s+h*p,n-c,l+s),e.closePath()}}),tI=eg.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()}}),nI={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}},rI={};ku({line:I_,rect:mg,roundRect:mg,square:mg,circle:qy,diamond:JC,pin:eI,arrow:tI,triangle:KC},(function(e,t){rI[t]=new e}));var iI=eg.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=df(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=rI[r];i||(i=rI[r="rect"]),nI[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function oI(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 aI(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://")?ub(e.slice(8),new wd(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?lb(e.slice(7),{},new wd(t,n,r,i),a?"center":"cover"):new iI({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=oI,o&&s.setColor(o),s}function sI(e,t){if(null!=e)return Wu(e)||(e=[e,e]),[Of(e[0],t[0])||0,Of(tc(e[1],e[0]),t[1])||0]}function lI(e){return isFinite(e)}function uI(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=lI(a)?a:.5,s=lI(s)?s:.5,l=l>=0&&lI(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=lI(r)?r:0,i=lI(i)?i:1,o=lI(o)?o:0,a=lI(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 cI(e){return parseInt(e,10)}function dI(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]||cI(s[r])||cI(e.style[r]))-(cI(s[o])||0)-(cI(s[a])||0)|0}function hI(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]:qu(t)?[t]:Wu(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=Bu(i,(function(e){return e/a})),o/=a)}return[i,o]}var pI=new Rv(!0);function fI(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function mI(e){return"string"==typeof e&&"none"!==e}function vI(e){var t=e.fill;return null!=t&&"none"!==t}function gI(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 yI(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 _I(e,t,n){var r=Om(t.image,t.__image,n);if(Rm(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)*yc),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var bI=["shadowBlur","shadowOffsetX","shadowOffsetY"],xI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function wI(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){CI(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?qm.opacity:a}(r||t.blend!==n.blend)&&(o||(CI(e,i),o=!0),e.globalCompositeOperation=t.blend||qm.blend);for(var s=0;s<bI.length;s++){var l=bI[s];(r||t[l]!==n[l])&&(o||(CI(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(CI(e,i),o=!0),e.shadowColor=t.shadowColor||qm.shadowColor),o}function SI(e,t,n,r,i){var o=II(t,i.inHover),a=r?null:n&&II(n,i.inHover)||{};if(o===a)return!1;var s=wI(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(CI(e,i),s=!0),mI(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(CI(e,i),s=!0),mI(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(CI(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||(CI(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<xI.length;u++){var c=xI[u],d=c[0];(r||o[d]!==a[d])&&(s||(CI(e,i),s=!0),e[d]=o[d]||c[1])}return s}function TI(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 CI(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function II(e,t){return t&&e.__hoverStyle||e.style}function MI(e,t){EI(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function EI(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&&(CI(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(CI(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(),TI(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,h=t instanceof eg&&t.autoBatch&&function(e){var t=vI(e),n=fI(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)?(CI(e,n),TI(e,t)):h||CI(e,n);var p=II(t,n.inHover);t instanceof eg?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),SI(e,t,u,l,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=fI(n),a=vI(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||pI,d=t.__dirty;if(!r){var h=n.fill,p=n.stroke,f=a&&!!h.colorStops,m=o&&!!p.colorStops,v=a&&!!h.image,g=o&&!!p.image,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0;(f||m)&&(w=t.getBoundingRect()),f&&(y=d?uI(e,h,w):t.__canvasFillGradient,t.__canvasFillGradient=y),m&&(_=d?uI(e,p,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),v&&(b=d||!t.__canvasFillPattern?_I(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=b),g&&(x=d||!t.__canvasStrokePattern?_I(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),f?e.fillStyle=y:v&&(b?e.fillStyle=b:a=!1),m?e.strokeStyle=_:g&&(x?e.strokeStyle=x:o=!1)}var S,T,C=t.getGlobalScale();c.setScale(C[0],C[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=hI(t))[0],T=i[1]);var I=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),I=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),I&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=T),r||(n.strokeFirst?(o&&yI(e,n),a&&gI(e,n)):(a&&gI(e,n),o&&yI(e,n))),S&&e.setLineDash([])}(e,t,p,h),h&&(n.batchFill=p.fill||"",n.batchStroke=p.stroke||"")):t instanceof rg?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),SI(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||cu,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=hI(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(fI(n)&&e.strokeText(i,n.x,n.y),vI(n)&&e.fillText(i,n.x,n.y)):(vI(n)&&e.fillText(i,n.x,n.y),fI(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,p)):t instanceof sg?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){wI(e,II(t,i.inHover),n&&II(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=Om(n.image,t.__image,t,t.onload);if(r&&Rm(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),h=s-(c=n.sy);e.drawImage(r,u,c,d,h,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,p)):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(),EI(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(),EI(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)),h&&r&&CI(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var AI=new $C,DI=new wh(100),OI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function NI(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&AI.delete(e);var o=AI.get(e);if(o)return o;var a=Nu(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<OI.length;++l){var u=a[OI[l]];if(null!=u&&!Wu(u)&&!ju(u)&&!qu(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=DI.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,h=LI(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(qu(e)){var t=Math.ceil(e);return[t,t]}var n=Bu(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=RI(a.symbol),m=(b=h,Bu(b,(function(e){return PI(e)}))),v=PI(p),g=!i&&fu.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},_=function(){for(var e=1,t=0,n=m.length;t<n;++t)e=Gf(e,m[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=Gf(r,f[t].length);e*=r;var i=v*m.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var b;g&&(g.width=_.width*n,g.height=_.height*n,d=g.getContext("2d"));(function(){d&&(d.clearRect(0,0,g.width,g.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;var o=-v,s=0,l=0,u=0;for(;o<_.height;){if(s%2==0){for(var c=l/2%f.length,m=0,b=0,x=0;m<2*_.width;){var w=0;for(t=0;t<h[u].length;++t)w+=h[u][t];if(w<=0)break;if(b%2==0){var S=.5*(1-a.symbolSize),T=m+h[u][b]*S,C=o+p[s]*S,I=h[u][b]*a.symbolSize,M=p[s]*a.symbolSize,E=x/2%f[c].length;A(T,C,I,M,f[c][E])}m+=h[u][b],++x,++b===h[u].length&&(b=0)}++u===h.length&&(u=0)}o+=p[s],++l,++s===p.length&&(s=0)}function A(e,t,o,s,l){var u=i?1:n,c=aI(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var h=r.painter.renderOneToVNode(c);h&&y.children.push(h)}else MI(d,c)}})(),s&&DI.put(t,g||y);e.image=g,e.svgElement=y,e.svgWidth=_.width,e.svgHeight=_.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,AI.set(e,s),e.dirty=!1,s}function RI(e){if(!e||0===e.length)return[["rect"]];if(ju(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!ju(e[n])){t=!1;break}if(t)return RI([e]);var r=[];for(n=0;n<e.length;++n)ju(e[n])?r.push([e[n]]):r.push(e[n]);return r}function LI(e){if(!e||0===e.length)return[[0,0]];if(qu(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!qu(e[n])){t=!1;break}if(t)return LI([e]);var r=[];for(n=0;n<e.length;++n)if(qu(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=Bu(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function PI(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var kI=new Pc,BI={};var FI=2e3,UI=4500,zI={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:FI,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:UI,ARIA:6e3,DECAL:7e3}},HI="__flagInMainProcess",VI="__pendingUpdate",WI="__needsUpdateStatus",YI=/^[a-zA-Z0-9_]+$/,jI="__connectUpdateStatus";function GI(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return QI(this,e,t);this.id}}function qI(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return QI(this,e,t)}}function QI(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Pc.prototype[t].apply(e,n)}var ZI,XI,$I,KI,JI,eM,tM,nM,rM,iM,oM,aM,sM,lM,uM,cM,dM,hM,pM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t}(Pc),fM=pM.prototype;fM.on=qI("on"),fM.off=qI("off");var mM=function(e){function t(t,n,r){var i=e.call(this,new zC)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},ju(n)&&(n=SM[n]),i._dom=t;var o=i._zr=Ef(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:tc(r.useDirtyRect,!1),useCoarsePointer:tc(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=rC(Hu(o.flush,o),17),(n=Au(n))&&pS(n,!0),i._theme=n,i._locale=function(e){if(ju(e)){var t=ax[e.toUpperCase()]||{};return e===rx||e===ix?Au(t):Du(Au(t),Au(ax[ox]),!1)}return Du(Au(e),Au(ax[ox]),!1)}(r.locale||lx),i._coordSysMgr=new Ww;var a=i._api=uM(i);function s(e,t){return e.__prio-t.__prio}return Ud(wM,s),Ud(bM,s),i._scheduler=new OC(i,a,bM,wM),i._messageCenter=new pM,i._initEvents(),i.resize=Hu(i.resize,i),o.animation.on("frame",i._onframe,i),iM(o,i),oM(o,i),lc(i),i}return Ie(t,e),t.prototype._onframe=function(){if(!this._disposed){hM(this);var e=this._scheduler;if(this[VI]){var t=this[VI].silent;this[HI]=!0;try{ZI(this),KI.update.call(this,null,this[VI].updateParams)}catch(e){throw this[HI]=!1,this[VI]=null,e}this._zr.flush(),this[HI]=!1,this[VI]=null,nM.call(this,t),rM.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),eM(this,r),e.performVisualTasks(r),lM(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[HI])if(this._disposed)this.id;else{var r,i,o;if(Qu(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[HI]=!0,!this._model||t){var a=new qw(this._api),s=this._theme,l=this._model=new Fw;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},xM);var u={seriesTransition:o,optionChanged:!0};if(n)this[VI]={silent:r,updateParams:u},this[HI]=!1,this.getZr().wakeUp();else{try{ZI(this),KI.update.call(this,null,u)}catch(e){throw this[VI]=null,this[HI]=!1,e}this._ssr||this._zr.flush(),this[VI]=null,this[HI]=!1,nM.call(this,r),rM.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||lu.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(lu.svgSupported){var e=this._zr;return ku(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;ku(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 ku(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(IM[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();ku(CM,(function(o,d){if(o.group===n){var h=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(Au(e)),p=o.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=i(p.right,l),u=i(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}}));var h=(l*=d)-(a*=d),p=(u*=d)-(s*=d),f=fu.createCanvas(),m=Ef(f,{renderer:t?"svg":"canvas"});if(m.resize({width:h,height:p}),t){var v="";return ku(c,(function(e){var t=e.left-a,n=e.top-s;v+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new mg({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),ku(c,(function(e){var t=new sg({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return JI(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return JI(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return ku(dm(this._model,e),(function(e,r){r.indexOf("Models")>=0&&ku(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=dm(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?jC(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;ku(gM,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&qC(o,(function(e){var t=Ng(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=Ou({},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)})),ku(_M,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),ku(["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?(GC("map","selectchanged",t,r,e),GC("pie","selectchanged",t,r,e)):"select"===e.fromAction?(GC("map","selected",t,r,e),GC("pie","selected",t,r,e)):"unselect"===e.fromAction&&(GC("map","unselected",t,r,e),GC("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()&&vm(this.getDom(),AM,"");var e=this,t=e._api,n=e._model;ku(e._componentsViews,(function(e){e.dispose(n,t)})),ku(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 CM[e.id]}},t.prototype.resize=function(e){if(!this[HI])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[VI]&&(null==r&&(r=this[VI].silent),n=!0,this[VI]=null),this[HI]=!0;try{n&&ZI(this),KI.update.call(this,{type:"resize",animation:Ou({duration:0},e&&e.animation)})}catch(e){throw this[HI]=!1,e}this[HI]=!1,nM.call(this,r),rM.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(Qu(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),TM[e]){var n=TM[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=Ou({},e);return t.type=_M[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(Qu(t)||(t={silent:!!t}),yM[e.type]&&this._model)if(this[HI])this._pendingActions.push(e);else{var n=t.silent;tM.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&lu.browser.weChat&&this._throttledZrFlush(),nM.call(this,n),rM.call(this,n)}},t.prototype.updateLabelLayout=function(){kI.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(!K_(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(K_(e))return;if(e instanceof eg&&function(e){var t=Pg(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)}}))}ZI=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),XI(e,!0),XI(e,!1),t.plan()},XI=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=_m(e.type);(c=new(t?WT.getClass(d.main,d.sub):JT.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)}},$I=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=pc(),ku($f(u),(function(e){var t=om(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(My(n))if(t instanceof HT)n.type!==Ug||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=lm(i,t);o=(Wu(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=Ng(a);fy(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&fy(r,c,d,n)}}}(t,n,e._api);else{var r=vy(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===Ug&&i&&!n.notBlur&&my(t.mainType,t.componentIndex,e._api),o&&ku(o,(function(e){n.type===Ug?sy(e):ly(e)}))}else Iy(n)&&t instanceof HT&&(!function(e,t){if(Iy(t)){var n=t.dataType,r=lm(e.getData(n),t);Wu(r)||(r=[r]),e[t.type===Wg?"toggleSelect":t.type===Hg?"select":"unselect"](r,n)}}(t,n,e._api),gy(t),dM(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else ku([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},KI={prepareAndUpdate:function(e){ZI(this),KI.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),eM(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),aM(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),kI.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=pc();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}),lM(this,r,i,t,{},a),kI.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),JT.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),aM(this,n,this._api,t,{}),kI.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()})),JT.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)})),kI.trigger("afterupdate",r,this._api))},updateLayout:function(e){KI.update.call(this,e)}},JI=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=dm(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},eM=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},tM=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=yM[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&_m(l[0]);this[HI]=!0;var d=[e],h=!1;e.batch&&(h=!0,d=Bu(e.batch,(function(t){return(t=Nu(Ou({},t),e)).batch=null,t})));var p,f=[],m=Iy(e),v=My(e);if(v&&py(this._api),ku(d,(function(t){if((p=(p=a.action(t,n._model,n._api))||Ou({},t)).type=s.event||p.type,f.push(p),v){var r=hm(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";$I(n,u,t,o),dM(n)}else m?($I(n,u,t,"series"),dM(n)):c&&$I(n,u,t,c.main,c.sub)})),"none"!==u&&!v&&!m&&!c)try{this[VI]?(ZI(this),KI.update.call(this,e),this[VI]=null):KI[u].call(this,e)}catch(e){throw this[HI]=!1,e}if(p=h?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[HI]=!1,!t){var g=this._messageCenter;if(g.trigger(p.type,p),m){var y={type:"selectchanged",escapeConnect:o,selected:yy(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};g.trigger(y.type,y)}}},nM=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();tM.call(this,n,e)}},rM=function(e){!e&&this.trigger("updated")},iM=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[VI]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},oM=function(e,t){e.on("mouseover",(function(e){var n=qC(e.target,Cy);n&&(!function(e,t,n){var r=Ng(e),i=vy(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&my(r.componentMainType,r.componentIndex,n),ku(o,(function(e){return oy(e,t)}))):(fy(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&my(r.componentMainType,r.componentIndex,n),oy(e,t))}(n,e,t._api),dM(t))})).on("mouseout",(function(e){var n=qC(e.target,Cy);n&&(!function(e,t,n){py(n);var r=Ng(e),i=vy(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?ku(i,(function(e){return ay(e,t)})):ay(e,t)}(n,e,t._api),dM(t))})).on("click",(function(e){var n=qC(e.target,(function(e){return null!=Ng(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=Ng(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},aM=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);Ud(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),ku(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),sM(e,t,n,r,i),ku(e._chartsViews,(function(e){e.__alive=!1})),lM(e,t,n,r,i),ku(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},sM=function(e,t,r,a,s,l){ku(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},lM=function(e,t,r,a,s,l){var u=e._scheduler;s=Ou(s||{},{updatedSeries:t.getSeries()}),kI.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),gy(t)})),u.unfinished=c||u.unfinished,kI.trigger("series:layoutlabels",t,r,s),kI.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")&&!lu.node&&!lu.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),kI.trigger("series:afterupdate",t,r,s)},dM=function(e){e[WI]=!0,e.getZr().wakeUp()},hM=function(e){e[WI]&&(e.getZr().storage.traverse((function(e){K_(e)||t(e)})),e[WI]=!1)},uM=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Ie(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){sy(t,n),dM(e)},n.prototype.leaveEmphasis=function(t,n){ly(t,n),dM(e)},n.prototype.enterBlur=function(t){!function(e){ty(e,Xg)}(t),dM(e)},n.prototype.leaveBlur=function(t){uy(t),dM(e)},n.prototype.enterSelect=function(t){cy(t),dM(e)},n.prototype.leaveSelect=function(t){dy(t),dM(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}(zw))(e)},cM=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][jI]=t}}ku(_M,(function(n,r){e._messageCenter.on(r,(function(n){if(IM[e.group]&&0!==e[jI]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];ku(CM,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),ku(i,(function(e){1!==e[jI]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(Pc),vM=mM.prototype;vM.on=GI("on"),vM.off=GI("off"),vM.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 gM=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var yM={},_M={},bM=[],xM=[],wM=[],SM={},TM={},CM={},IM={},MM=+new Date-0,EM=+new Date-0,AM="_echarts_instance_";function DM(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return CM[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,AM)]}(e);if(i)return i}var o=new mM(e,t,n);return o.id="ec_"+MM++,CM[o.id]=o,r&&vm(e,AM,o.id),cM(o),kI.trigger("afterinit",o),o}function OM(e){if(Wu(e)){var t=e;e=null,ku(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+EM++,ku(t,(function(t){t.group=e}))}return IM[e]=!0,e}function NM(e){IM[e]=!1}function RM(e,t){SM[e]=t}function LM(e){Ru(xM,e)<0&&xM.push(e)}function PM(e,t){zM(bM,e,t,2e3)}function kM(e,t){kI.on(e,t)}function BM(e,t,n){Yu(t)&&(n=t,t="");var r=Qu(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,_M[t]||(oc(YI.test(r)&&YI.test(t)),yM[r]||(yM[r]={action:n,actionInfo:e}),_M[t]=r)}function FM(e,t){zM(wM,e,t,3e3,"visual")}var UM=[];function zM(e,t,n,r,i){if((Yu(t)||Qu(t))&&(n=t,t=r),!(Ru(UM,n)>=0)){UM.push(n);var o=OC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function HM(e,t){TM[e]=t}var VM=function(e){var t=(e=Au(e)).type;t||qf("");var n=t.split(":");2!==n.length&&qf("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,JS.set(t,e)};function WM(e){return null==e?0:e.length||1}function YM(e){return e}FM(FI,dC),FM(UI,pC),FM(UI,fC),FM(FI,WC),FM(UI,YC),FM(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=NI(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=NI(i,t)}}))})),LM(pS),PM(900,(function(e){var t=pc();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(fS)})),HM("default",(function(e,t){Nu(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 Tf,r=new mg({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new Og({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 mg({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new L_({shape:{startAngle:-mC/2,endAngle:-mC/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*mC/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*mC/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})),BM({type:Ug,event:Ug,update:Ug},gc),BM({type:zg,event:zg,update:zg},gc),BM({type:Hg,event:Hg,update:Hg},gc),BM({type:Vg,event:Vg,update:Vg},gc),BM({type:Wg,event:Wg,update:Wg},gc),RM("light",RC),RM("dark",UC);var jM=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||YM,this._newKeyGetter=r||YM,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=WM(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=WM(l),d=WM(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 h=0;h<c;h++)this._remove&&this._remove(l[h]);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=WM(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=WM(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),GM=jM,qM=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 QM(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var ZM=function(e){this.otherDims={},null!=e&&Ou(this,e)},XM=um(),$M={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},KM=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=tE(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return tc(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=MS(this.source),n=!nE(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+=$M[l]||"f",u&&(r+=u.uid),r+="$"}var h=this.source;return{dimensions:i,hash:[h.seriesLayoutBy,h.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 JM(e){return e instanceof KM}function eE(e){for(var t=pc(),n=0;n<(e||[]).length;n++){var r=e[n],i=Qu(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function tE(e){var t=XM(e);return t.dimNameMap||(t.dimNameMap=eE(e.dimensionsDefine))}function nE(e){return e>30}var rE,iE,oE,aE,sE,lE,uE,cE=Qu,dE=Bu,hE="undefined"==typeof Int32Array?Array:Int32Array,pE=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],fE=["_approximateExtent"],mE=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;JM(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=ju(c)?new ZM({name:c}):c instanceof ZM?c:new ZM(c),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};o.push(h),i[h]=d,null!=l[h]&&(s=!0),d.createInvertedIndices&&(a[h]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.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=pc();ku(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(qu(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 dT&&(r=e),!r){var o=this.dimensions,a=xS(e)||Pu(e)?new ES(e,o.length):e;r=new dT;var s=dE(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=pc(),o=[],a=[],s={};ku(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;QM(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),QM(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}dw.each((function(e,t){var n=QM(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=Bu(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 qM(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&&uE(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!==vw&&!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===hw&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&tm(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=om(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=om(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)uE(this,a);rE(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){cE(e)?Ou(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=oE(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 iE(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 Wu(e)?r.getValues(dE(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){Yu(e)&&(n=t,t=e,e=[]);var r=n||this,i=dE(aE(e),this._getStoreDimIndex,this);this._store.each(i,r?Hu(t,r):t)},e.prototype.filterSelf=function(e,t,n){Yu(e)&&(n=t,t=e,e=[]);var r=n||this,i=dE(aE(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Hu(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return ku(zu(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){Yu(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=dE(aE(e),this._getStoreDimIndex,this),a=lE(this);return a._store=this._store.map(o,i?Hu(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=dE(aE(e),this._getStoreDimIndex,this);this._store.modify(o,i?Hu(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=lE(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=lE(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 Jb(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new GM(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return iE(e,t)}),(function(e){return iE(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||{},cE(e)?Ou(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&&(Wu(i=this.getVisual(t))?i=i.slice():cE(i)&&(i=Ou({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,cE(t)?Ou(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){cE(e)?Ou(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?Ou(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=Ng(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=Ng(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){ku(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:dE(this.dimensions,this._getDimInfo,this),this.hostModel)),sE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Yu(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(rc(arguments)))})},e.internalField=(rE=function(e){var t=e._invertedIndicesMap;ku(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new hE(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}}))},oE=function(e,t,n){return om(e._getCategory(t,n),null)},iE=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=oE(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},aE=function(e){return Wu(e)||(e=null!=e?[e]:[]),e},lE=function(t){var n=new e(t._schema?t._schema:dE(t.dimensions,t._getDimInfo,t),t.hostModel);return sE(n,t),n},sE=function(e,t){ku(pE.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,ku(fE,(function(n){e[n]=Au(t[n])})),e._calculationInfo=Ou({},t._calculationInfo)},void(uE=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=oE(e,i,t)),null==s&&null!=o&&(r[t]=s=oE(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}(),vE=mE;function gE(e,t){xS(e)||(e=SS(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=pc(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return ku(t,(function(e){var t;Qu(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&nE(a),l=r===e.dimensionsDefine,u=l?tE(e):eE(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=pc(c),h=new aT(a),p=0;p<h.length;p++)h[p]=-1;function f(e){var t=h[e];if(t<0){var n=r[e],i=Qu(n)?n:{name:n},a=new ZM,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 h[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(p=0;p<a;p++)f(p);d.each((function(e,t){var n=$f(e).slice();if(1===n.length&&!ju(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);ku(n,(function(e,n){var i=ju(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,v(f(i),t,n))}))}}));var m=0;function v(e,t,n){null!=dw.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}ku(n,(function(e){var t,n,r,i;if(ju(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=Ou({},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=$f(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;m<a&&null!=f(m).coordDim;)m++;m<a&&s.push(m++)}ku(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),v(Nu(a,i),t,o),null==a.name&&n){var s=n[o];!Qu(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&Nu(a.otherDims,r)}))}}));var g=t.generateCoord,y=t.generateCoordCount,_=null!=y;y=g?y||1:0;var b=g||"value";function x(e){null==e.name&&(e.name=e.coordDim)}if(s)ku(o,(function(e){x(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=yE(b,i,_),S.coordDimIndex=0,(!g||y<=0)&&(S.isExtraCoord=!0),y--),x(S),null!=S.type||Iw(e,w)!==bw&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=pc(),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 KM({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function yE(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 _E=function(e){this.coordSysDims=[],this.axisMap=pc(),this.categoryAxisMap=pc(),this.coordSysName=e};var bE={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",pm).models[0],o=e.getReferringComponents("yAxis",pm).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),xE(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),xE(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",pm).models[0];t.coordSysDims=["single"],n.set("single",i),xE(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",pm).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),xE(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),xE(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();ku(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),xE(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function xE(e){return"category"===e.get("type")}function wE(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!JM(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,h=!(!e||!e.get("stack"));if(ku(r,(function(e,t){ju(e)&&(r[t]=e={name:e}),h&&!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 p=u.coordDim,f=u.type,m=0;ku(r,(function(e){e.coordDim===p&&m++}));var v={name:c,coordDim:p,coordDimIndex:m,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},g={name:d,coordDim:d,coordDimIndex:m+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(v.storeDimIndex=o.ensureCalculationDimension(d,f),g.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(v),i.appendCalculationDimension(g)):(r.push(v),r.push(g))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function SE(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function TE(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=SS(e)):o=(r=i.getSource()).sourceFormat===hw;var a=function(e){var t=e.get("coordinateSystem"),n=new _E(t),r=bE[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=Ww.get(r);return t&&t.coordSysDims&&(n=Bu(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=Yu(l)?l:l?Vu(Tw,s,t):null,c=gE(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&ku(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),h=o?null:i.getSharedDataStore(c),p=wE(t,{schema:c,store:h}),f=new vE(c,t);f.setCalculationInfo(p);var m=null!=d&&function(e){if(e.sourceFormat===hw){return!Wu(em(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:h,null,m),f}var CE=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}();Cm(CE);var IE=CE,ME=0,EE=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ME}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&Bu(r,AE);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(!ju(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=pc(this.categories))},e}();function AE(e){return Qu(e)&&null!=e.value?e.value:e+""}var DE=EE;function OE(e){return"interval"===e.type||"log"===e.type}function NE(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=Vf(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=LE(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),PE(e,0,t),PE(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[Nf(Math.ceil(e[0]/a)*a,s),Nf(Math.floor(e[1]/a)*a,s)],e),i}function RE(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,Nf(n*t)}function LE(e){return Lf(e)+2}function PE(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function kE(e,t){return e>=t[0]&&e<=t[1]}function BE(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function FE(e,t){return e*(t[1]-t[0])+t[0]}var UE=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new DE({})),Wu(r)&&(r=new DE({categories:Bu(r,(function(e){return Qu(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return Ie(t,e),t.prototype.parse=function(e){return null==e?NaN:ju(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return kE(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return BE(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(FE(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}(IE);IE.registerClass(UE);var zE=UE,HE=Nf,VE=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 Ie(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return kE(e,this._extent)},t.prototype.normalize=function(e){return BE(e,this._extent)},t.prototype.scale=function(e){return FE(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=LE(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:HE(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=HE(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:HE(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=HE(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=Lf(e.value)||0:"auto"===n&&(n=this._intervalPrecision),Hx(HE(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=NE(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]=HE(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=HE(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(IE);IE.registerClass(VE);var WE=VE,YE="undefined"!=typeof Float32Array,jE=YE?Float32Array:Array;function GE(e){return Wu(e)?YE?new Float32Array(e):e:new jE(e)}function qE(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function QE(e){return e.dim+e.index}function ZE(e,t){var n=[];return t.eachSeriesByType(e,(function(e){KE(e)&&n.push(e)})),n}function XE(e){var t=function(e){var t={};ku(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 ku(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 h=Of(e.get("barWidth"),r),p=Of(e.get("barMaxWidth"),r),f=Of(e.get("barMinWidth")||(JE(e)?.5:1),r),m=e.get("barGap"),v=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:m,barCategoryGap:v,axisKey:QE(i),stackId:qE(e)})})),function(e){var t={};ku(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 h=e.barCategoryGap;null!=h&&(o.categoryGap=h)}));var n={};return ku(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=zu(r).length;o=Math.max(35-4*a,15)+"%"}var s=Of(o,i),l=Of(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),ku(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 h,p=0;ku(r,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;ku(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 $E(e,t){var n=ZE(e,t),r=XE(n);ku(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=qE(e),o=r[QE(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function KE(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function JE(e){return e.pipelineContext&&e.pipelineContext.large}var eA=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return Ie(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return Tx(e.value,gx[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(xx(this._minLevelUnit))]||gx.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(ju(n))o=n;else if(Yu(n))o=n(e.value,t,{level:e.level});else{var a=Ou({},mx);if(e.level>0)for(var s=0;s<yx.length;++s)a[yx[s]]="{primary|"+a[yx[s]]+"}";var l=n?!1===n.inherit?n:Nu(n,a):a,u=Cx(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=_x.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Wu(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 Tx(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=_x,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=zf(t),o=zf(n),a=function(e){return Ix(i,e,r)===Ix(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")},h=function(){return d()&&a("second")},p=function(){return h()&&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 h();case"millisecond":return p()}}(xx(e),r[0],r[1],n)){l&&(i=[{value:sA(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 h=void 0,p=void 0,f=void 0,m=!1;switch(e){case"year":h=Math.max(1,Math.round(t/px/365)),p=Mx(n),f=Lx(n);break;case"half-year":case"quarter":case"month":h=rA(t),p=Ex(n),f=Px(n);break;case"week":case"half-week":case"day":h=nA(t),p=Ax(n),f=kx(n),m=!0;break;case"half-day":case"quarter-day":case"hour":h=iA(t),p=Dx(n),f=Bx(n);break;case"minute":h=oA(t,!0),p=Ox(n),f=Fx(n);break;case"second":h=oA(t,!1),p=Nx(n),f=Ux(n);break;case"millisecond":h=aA(t),p=Rx(n),f=zx(n)}s(h,c,d,p,f,m,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-h})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,h=0,p=0;p<o.length&&a++<i;++p){var f=xx(o[p]);if(Sx(o[p]))if(l(o[p],u[u.length-1]||[],c),f!==(o[p+1]?xx(o[p+1]):null)){if(c.length){h=d,c.sort((function(e,t){return e.value-t.value}));for(var m=[],v=0;v<c.length;++v){var g=c[v].value;0!==v&&c[v-1].value===g||(m.push(c[v]),g>=r[0]&&g<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&h>y/1.5)break;if(u.push(m),d>y||e===o[p])break}c=[]}}var _=Uu(Bu(u,(function(e){return Uu(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(p=0;p<_.length;++p)for(var w=_[p],S=0;S<w.length;++S)b.push({value:w[S].value,level:x-p});b.sort((function(e,t){return e.value-t.value}));var T=[];for(p=0;p<b.length;++p)0!==p&&b[p].value===b[p-1].value||T.push(b[p]);return T}(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]-=px,t[1]+=px),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]-px}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=tA.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}(tA,this._approxInterval,0,o),o-1);this._interval=tA[a][1],this._minLevelUnit=tA[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return qu(e)?e:+zf(e)},t.prototype.contain=function(e){return kE(this.parse(e),this._extent)},t.prototype.normalize=function(e){return BE(this.parse(e),this._extent)},t.prototype.scale=function(e){return FE(e,this._extent)},t.type="time",t}(WE),tA=[["second",cx],["minute",dx],["hour",hx],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",fx/2],["year",fx]];function nA(e,t){return(e/=px)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function rA(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function iA(e){return(e/=hx)>12?12:e>6?6:e>3.5?4:e>2?2:1}function oA(e,t){return(e/=t?dx:cx)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function aA(e){return Vf(e,!0)}function sA(e,t,n){var r=new Date(e);switch(xx(t)){case"year":case"month":r[Px(n)](0);case"day":r[kx(n)](1);case"hour":r[Bx(n)](0);case"minute":r[Fx(n)](0);case"second":r[Ux(n)](0),r[zx(n)](0)}return r.getTime()}IE.registerClass(eA);var lA=eA,uA=IE.prototype,cA=WE.prototype,dA=Nf,hA=Math.floor,pA=Math.ceil,fA=Math.pow,mA=Math.log,vA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new WE,t._interval=0,t}return Ie(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return Bu(cA.getTicks.call(this,e),(function(e){var t=e.value,i=Nf(fA(this.base,t));return i=t===n[0]&&this._fixMin?yA(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?yA(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=mA(this.base);e=mA(Math.max(0,e))/n,t=mA(Math.max(0,t))/n,cA.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=uA.getExtent.call(this);t[0]=fA(e,t[0]),t[1]=fA(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=yA(t[0],n[0])),this._fixMax&&(t[1]=yA(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=mA(e[0])/mA(t),e[1]=mA(e[1])/mA(t),uA.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=[Nf(pA(t[0]/i)*i),Nf(hA(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){cA.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 kE(e=mA(e)/mA(this.base),this._extent)},t.prototype.normalize=function(e){return BE(e=mA(e)/mA(this.base),this._extent)},t.prototype.scale=function(e){return e=FE(e,this._extent),fA(this.base,e)},t.type="log",t}(IE),gA=vA.prototype;function yA(e,t){return dA(e,Lf(t))}gA.getMinorTicks=cA.getMinorTicks,gA.getLabel=cA.getLabel,IE.registerClass(vA);var _A=vA,bA=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);Yu(i)?this._modelMinNum=TA(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=TA(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(Yu(o)?this._modelMaxNum=TA(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=TA(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=Wu(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[cf(s[0],1),cf(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=Ju(a)||Ju(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[wA[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[xA[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),xA={min:"_determinedMin",max:"_determinedMax"},wA={min:"_dataMin",max:"_dataMax"};function SA(e,t,n){var r=e.rawExtentInfo;return r||(r=new bA(e,t,n),e.rawExtentInfo=r,r)}function TA(e,t){return null==t?null:Ju(t)?NaN:e.parse(t)}function CA(e,t){var n=e.type,r=SA(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=ZE("bar",a),l=!1;if(ku(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=XE(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[QE(t)];return null!=r&&null!=n?r[qE(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;ku(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;ku(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 IA(e,t){var n=t,r=CA(e,n),i=r.extent,o=n.get("splitNumber");e instanceof _A&&(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 MA(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)}):ju(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):Yu(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(EA(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function EA(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function AA(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 wd(e.x,e.y,o,a)}function DA(e){var t=e.get("interval");return null==t?"auto":t}function OA(e){return"category"===e.type&&0===DA(e.getLabelModel())}function NA(e,t){var n={};return ku(e.mapDimensionsAll(t),(function(t){n[function(e,t){return SE(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),zu(n)}var RA=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),LA=[],PA={registerPreprocessor:LM,registerProcessor:PM,registerPostInit:function(e){kM("afterinit",e)},registerPostUpdate:function(e){kM("afterupdate",e)},registerUpdateLifecycle:kM,registerAction:BM,registerCoordinateSystem:function(e,t){Ww.register(e,t)},registerLayout:function(e,t){zM(wM,e,t,1e3,"layout")},registerVisual:FM,registerTransform:VM,registerLoading:HM,registerMap:function(e,t,n){var r=function(e){return BI[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){BI[e]=t},PRIORITY:zI,ComponentModel:sw,ComponentView:WT,SeriesModel:HT,ChartView:JT,registerComponentModel:function(e){sw.registerClass(e)},registerComponentView:function(e){WT.registerClass(e)},registerSeriesModel:function(e){HT.registerClass(e)},registerChartView:function(e){JT.registerClass(e)},registerSubTypeDefaulter:function(e,t){sw.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){Cf[e]=t}(e,t)}};function kA(e){Wu(e)?ku(e,(function(e){kA(e)})):Ru(LA,e)>=0||(LA.push(e),Yu(e)&&(e={install:e}),e.install(PA))}function BA(e,t){return Math.abs(e-t)<1e-8}function FA(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+=Hv(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return BA(i[0],s[0])&&BA(i[1],s[1])||(r+=Hv(i[0],i[1],s[0],s[1],t,n)),0!==r}var UA=um();function zA(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=VA(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=MA(e);return{labels:Bu(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function HA(e,t){return"category"===e.type?function(e,t){var n,r,i=WA(e,"ticks"),o=DA(t),a=YA(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Yu(o))n=qA(e,o,!0);else if("auto"===o){var s=VA(e,e.getLabelModel());r=s.labelCategoryInterval,n=Bu(s.labels,(function(e){return e.tickValue}))}else n=GA(e,r=o,!0);return jA(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:Bu(e.scale.getTicks(),(function(e){return e.value}))}}function VA(e,t){var n,r,i=WA(e,"labels"),o=DA(t),a=YA(i,o);return a||(Yu(o)?n=qA(e,o):(r="auto"===o?function(e){var t=UA(e).autoInterval;return null!=t?t:UA(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=GA(e,r)),jA(i,o,{labels:n,labelCategoryInterval:r}))}function WA(e,t){return UA(e)[t]||(UA(e)[t]=[])}function YA(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function jA(e,t,n){return e.push({key:t,value:n}),n}function GA(e,t,n){var r=MA(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=OA(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==o[0]&&m(o[0]);for(var f=u;f<=o[1];f+=l)m(f);function m(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return p&&f-l!==o[1]&&m(o[1]),s}function qA(e,t,n){var r=e.scale,i=MA(e),o=[];return ku(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 QA=[0,1],ZA=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 Pf(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&&XA(n=n.slice(),r.count()),Df(e,QA,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&XA(n=n.slice(),r.count());var i=Df(e,n,QA,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=Bu(HA(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;ku(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=Nf(e),t=Nf(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),Bu(this.scale.getMinorTicks(e),(function(e){return Bu(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return zA(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=MA(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)),h=0,p=0;l<=o[1];l+=s){var f,m,v=af(n({value:l}),t.font,"center","top");f=1.3*v.width,m=1.3*v.height,h=Math.max(h,f,7),p=Math.max(p,m,7)}var g=h/c,y=p/d;isNaN(g)&&(g=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(g,y))),b=UA(e.model),x=e.getExtent(),w=b.lastAutoInterval,S=b.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&b.axisExtent0===x[0]&&b.axisExtent1===x[1]?_=w:(b.lastTickCount=a,b.lastAutoInterval=_,b.axisExtent0=x[0],b.axisExtent1=x[1]),_}(this)},e}();function XA(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var $A=ZA;function KA(e,t){return e===t||e!=e&&t!=t}function JA(e,t){for(var n=e.length;n--;)if(KA(e[n][0],t))return n;return-1}var eD=Array.prototype.splice;function tD(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])}}tD.prototype.clear=function(){this.__data__=[],this.size=0},tD.prototype.delete=function(e){var t=this.__data__,n=JA(t,e);return!(n<0)&&(n==t.length-1?t.pop():eD.call(t,n,1),--this.size,!0)},tD.prototype.get=function(e){var t=this.__data__,n=JA(t,e);return n<0?void 0:t[n][1]},tD.prototype.has=function(e){return JA(this.__data__,e)>-1},tD.prototype.set=function(e,t){var n=this.__data__,r=JA(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function nD(e){if(!Oi(e))return!1;var t=Wi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var rD,iD=Pi["__core-js_shared__"],oD=(rD=/[^.]+$/.exec(iD&&iD.keys&&iD.keys.IE_PROTO||""))?"Symbol(src)_1."+rD:"";var aD=Function.prototype.toString;function sD(e){if(null!=e){try{return aD.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var lD=/^\[object .+?Constructor\]$/,uD=Function.prototype,cD=Object.prototype,dD=uD.toString,hD=cD.hasOwnProperty,pD=RegExp("^"+dD.call(hD).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fD(e){return!(!Oi(e)||(t=e,oD&&oD in t))&&(nD(e)?pD:lD).test(sD(e));var t}function mD(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return fD(n)?n:void 0}var vD=mD(Pi,"Map"),gD=mD(Object,"create");var yD=Object.prototype.hasOwnProperty;var _D=Object.prototype.hasOwnProperty;function bD(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 xD(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 wD(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])}}bD.prototype.clear=function(){this.__data__=gD?gD(null):{},this.size=0},bD.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},bD.prototype.get=function(e){var t=this.__data__;if(gD){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return yD.call(t,e)?t[e]:void 0},bD.prototype.has=function(e){var t=this.__data__;return gD?void 0!==t[e]:_D.call(t,e)},bD.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gD&&void 0===t?"__lodash_hash_undefined__":t,this},wD.prototype.clear=function(){this.size=0,this.__data__={hash:new bD,map:new(vD||tD),string:new bD}},wD.prototype.delete=function(e){var t=xD(this,e).delete(e);return this.size-=t?1:0,t},wD.prototype.get=function(e){return xD(this,e).get(e)},wD.prototype.has=function(e){return xD(this,e).has(e)},wD.prototype.set=function(e,t){var n=xD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function SD(e){var t=this.__data__=new tD(e);this.size=t.size}SD.prototype.clear=function(){this.__data__=new tD,this.size=0},SD.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},SD.prototype.get=function(e){return this.__data__.get(e)},SD.prototype.has=function(e){return this.__data__.has(e)},SD.prototype.set=function(e,t){var n=this.__data__;if(n instanceof tD){var r=n.__data__;if(!vD||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new wD(r)}return n.set(e,t),this.size=n.size,this};var TD=function(){try{var e=mD(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function CD(e,t,n){"__proto__"==t&&TD?TD(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ID=Object.prototype.hasOwnProperty;function MD(e,t,n){var r=e[t];ID.call(e,t)&&KA(r,n)&&(void 0!==n||t in e)||CD(e,t,n)}function ED(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?CD(n,s,l):MD(n,s,l)}return n}function AD(e){return Yi(e)&&"[object Arguments]"==Wi(e)}var DD=Object.prototype,OD=DD.hasOwnProperty,ND=DD.propertyIsEnumerable,RD=AD(function(){return arguments}())?AD:function(e){return Yi(e)&&OD.call(e,"callee")&&!ND.call(e,"callee")};var LD="object"==typeof exports&&exports&&!exports.nodeType&&exports,PD=LD&&"object"==typeof module&&module&&!module.nodeType&&module,kD=PD&&PD.exports===LD?Pi.Buffer:void 0,BD=(kD?kD.isBuffer:void 0)||function(){return!1},FD=/^(?:0|[1-9]\d*)$/;function UD(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&FD.test(e))&&e>-1&&e%1==0&&e<t}function zD(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var HD={};function VD(e){return function(t){return e(t)}}HD["[object Float32Array]"]=HD["[object Float64Array]"]=HD["[object Int8Array]"]=HD["[object Int16Array]"]=HD["[object Int32Array]"]=HD["[object Uint8Array]"]=HD["[object Uint8ClampedArray]"]=HD["[object Uint16Array]"]=HD["[object Uint32Array]"]=!0,HD["[object Arguments]"]=HD["[object Array]"]=HD["[object ArrayBuffer]"]=HD["[object Boolean]"]=HD["[object DataView]"]=HD["[object Date]"]=HD["[object Error]"]=HD["[object Function]"]=HD["[object Map]"]=HD["[object Number]"]=HD["[object Object]"]=HD["[object RegExp]"]=HD["[object Set]"]=HD["[object String]"]=HD["[object WeakMap]"]=!1;var WD="object"==typeof exports&&exports&&!exports.nodeType&&exports,YD=WD&&"object"==typeof module&&module&&!module.nodeType&&module,jD=YD&&YD.exports===WD&&Ri.process,GD=function(){try{var e=YD&&YD.require&&YD.require("util").types;return e||jD&&jD.binding&&jD.binding("util")}catch(e){}}(),qD=GD&&GD.isTypedArray,QD=qD?VD(qD):function(e){return Yi(e)&&zD(e.length)&&!!HD[Wi(e)]},ZD=Object.prototype.hasOwnProperty;function XD(e,t){var n=Ni(e),r=!n&&RD(e),i=!n&&!r&&BD(e),o=!n&&!r&&!i&&QD(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&&!ZD.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||UD(u,l))||s.push(u);return s}var $D=Object.prototype;function KD(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$D)}function JD(e,t){return function(n){return e(t(n))}}var eO=JD(Object.keys,Object),tO=Object.prototype.hasOwnProperty;function nO(e){return null!=e&&zD(e.length)&&!nD(e)}function rO(e){return nO(e)?XD(e):function(e){if(!KD(e))return eO(e);var t=[];for(var n in Object(e))tO.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var iO=Object.prototype.hasOwnProperty;function oO(e){if(!Oi(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=KD(e),n=[];for(var r in e)("constructor"!=r||!t&&iO.call(e,r))&&n.push(r);return n}function aO(e){return nO(e)?XD(e,!0):oO(e)}var sO="object"==typeof exports&&exports&&!exports.nodeType&&exports,lO=sO&&"object"==typeof module&&module&&!module.nodeType&&module,uO=lO&&lO.exports===sO?Pi.Buffer:void 0,cO=uO?uO.allocUnsafe:void 0;function dO(){return[]}var hO=Object.prototype.propertyIsEnumerable,pO=Object.getOwnPropertySymbols,fO=pO?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}(pO(e),(function(t){return hO.call(e,t)})))}:dO,mO=fO;function vO(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var gO=JD(Object.getPrototypeOf,Object),yO=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)vO(t,mO(e)),e=gO(e);return t}:dO;function _O(e,t,n){var r=t(e);return Ni(e)?r:vO(r,n(e))}function bO(e){return _O(e,rO,mO)}function xO(e){return _O(e,aO,yO)}var wO=mD(Pi,"DataView"),SO=mD(Pi,"Promise"),TO=mD(Pi,"Set"),CO=mD(Pi,"WeakMap"),IO="[object Map]",MO="[object Promise]",EO="[object Set]",AO="[object WeakMap]",DO="[object DataView]",OO=sD(wO),NO=sD(vD),RO=sD(SO),LO=sD(TO),PO=sD(CO),kO=Wi;(wO&&kO(new wO(new ArrayBuffer(1)))!=DO||vD&&kO(new vD)!=IO||SO&&kO(SO.resolve())!=MO||TO&&kO(new TO)!=EO||CO&&kO(new CO)!=AO)&&(kO=function(e){var t=Wi(e),n="[object Object]"==t?e.constructor:void 0,r=n?sD(n):"";if(r)switch(r){case OO:return DO;case NO:return IO;case RO:return MO;case LO:return EO;case PO:return AO}return t});var BO=kO,FO=Object.prototype.hasOwnProperty;var UO=Pi.Uint8Array;function zO(e){var t=new e.constructor(e.byteLength);return new UO(t).set(new UO(e)),t}var HO=/\w*$/;var VO=ki?ki.prototype:void 0,WO=VO?VO.valueOf:void 0;function YO(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return zO(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?zO(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?zO(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,HO.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,WO?Object(WO.call(r)):{}}}var jO=Object.create,GO=function(){function e(){}return function(t){if(!Oi(t))return{};if(jO)return jO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),qO=GO;var QO=GD&&GD.isMap,ZO=QO?VD(QO):function(e){return Yi(e)&&"[object Map]"==BO(e)};var XO=GD&&GD.isSet,$O=XO?VD(XO):function(e){return Yi(e)&&"[object Set]"==BO(e)},KO="[object Arguments]",JO="[object Function]",eN="[object Object]",tN={};function nN(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(!Oi(e))return e;var c=Ni(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&FO.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=BO(e),h=d==JO||"[object GeneratorFunction]"==d;if(BD(e))return function(e,t){if(t)return e.slice();var n=e.length,r=cO?cO(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==eN||d==KO||h&&!i){if(a=l||h?{}:function(e){return"function"!=typeof e.constructor||KD(e)?{}:qO(gO(e))}(e),!s)return l?function(e,t){return ED(e,yO(e),t)}(e,function(e,t){return e&&ED(t,aO(t),e)}(a,e)):function(e,t){return ED(e,mO(e),t)}(e,function(e,t){return e&&ED(t,rO(t),e)}(a,e))}else{if(!tN[d])return i?e:{};a=YO(e,d,s)}}o||(o=new SD);var p=o.get(e);if(p)return p;o.set(e,a),$O(e)?e.forEach((function(r){a.add(nN(r,t,n,r,e,o))})):ZO(e)&&e.forEach((function(r,i){a.set(i,nN(r,t,n,i,e,o))}));var f=c?void 0:(u?l?xO:bO:l?aO:rO)(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]),MD(a,i,nN(r,t,n,i,e,o))})),a}tN[KO]=tN["[object Array]"]=tN["[object ArrayBuffer]"]=tN["[object DataView]"]=tN["[object Boolean]"]=tN["[object Date]"]=tN["[object Float32Array]"]=tN["[object Float64Array]"]=tN["[object Int8Array]"]=tN["[object Int16Array]"]=tN["[object Int32Array]"]=tN["[object Map]"]=tN["[object Number]"]=tN[eN]=tN["[object RegExp]"]=tN["[object Set]"]=tN["[object String]"]=tN["[object Symbol]"]=tN["[object Uint8Array]"]=tN["[object Uint8ClampedArray]"]=tN["[object Uint16Array]"]=tN["[object Uint32Array]"]=!0,tN["[object Error]"]=tN[JO]=tN["[object WeakMap]"]=!1;var rN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(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}(sw),iN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",pm).models[0]},t.type="cartesian2dAxis",t}(sw);Lu(iN,RA);var oN={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)"]}}},aN=Du({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},oN),sN=Du({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}}},oN),lN={category:aN,value:sN,time:Du({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},sN),log:Nu({logBase:10},sN)},uN={value:1,category:1,time:1,log:1};function cN(e,t,n,r){ku(uN,(function(i,o){var a=Du(Du({},lN[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 Ie(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=nw(this),r=n?iw(e):{};Du(e,t.getTheme().get(o+"Axis")),Du(e,this.getDefaultOption()),e.type=dN(e),n&&rw(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=DE.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",dN)}function dN(e){return e.type||(e.data?"category":"value")}var hN=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 Bu(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Uu(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}(),pN=["x","y"];function fN(e){return"interval"===e.type||"time"===e.type}var mN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=pN,t}return Ie(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(fN(e)&&fN(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,h=this._transform=[l,0,0,u,c,d];this._invTransform=cd([],h)}}},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 wd(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 Ec(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 Ec(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 wd(n,r,i,o)},t}(hN),vN=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 Ie(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}($A),gN=vN;function yN(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],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var m=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(m,f[1]),f[0])}o.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[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[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),ec(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var v=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-v:v,o.z2=1,o}function _N(e){return"cartesian2d"===e.get("coordinateSystem")}function bN(e){var t={xAxisModel:null,yAxisModel:null};return ku(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,pm).models[0];t[r]=o})),t}var xN=Math.log;var wN=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=pN,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=zu(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;OE(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(IA(l,s),OE(l)&&(t=a))}i.length&&(t||IA((t=i.pop()).scale,t.model),ku(i,(function(e){!function(e,t,n){var r=WE.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=CA(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=xN(e.base);u=[xN(u[0])/h,xN(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=r.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=r.getInterval.call(e),m=u[0],v=u[1];if(c&&d)f=(v-m)/a;else if(c)for(v=u[0]+f*a;v<u[1]&&isFinite(v)&&isFinite(u[1]);)f=RE(f),v=u[0]+f*a;else if(d)for(m=u[1]-f*a;m>u[0]&&isFinite(m)&&isFinite(u[0]);)f=RE(f),m=u[1]-f*a;else{e.getTicks().length-1>a&&(f=RE(f));var g=f*a;(m=Nf((v=Math.ceil(u[1]/f)*f)-g))<0&&u[0]>=0?(m=0,v=Nf(g)):v>0&&u[1]<=0&&(v=0,m=-Nf(g))}var y=(i[0].value-o[0].value)/s,_=(i[a].value-o[a].value)/s;r.setExtent.call(e,m+f*y,v+f*_),r.setInterval.call(e,f),(y||_)&&r.setNiceExtent.call(e,m+f,v-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};ku(n.x,(function(e){TN(n,"y",e,i)})),ku(n.y,(function(e){TN(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=tw(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){ku(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&&(ku(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 zE?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=MA(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),h=AA(s.getTextRect(d),s.get("rotate")||0);a?a.union(h):a=h}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()),ku(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]}Qu(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",pm).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",pm).models[0],a=e.gridModel,s=this._coordsList;if(r)Ru(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(SN(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 gN(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new zE({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new lA({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(IE.getClass(t)||WE)}}(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,ku(a.x,(function(t,n){ku(a.y,(function(i,o){var a="x"+n+"y"+o,s=new mN(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){ku(NA(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}ku(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(_N(e)){var r=bN(e),i=r.xAxisModel,o=r.yAxisModel;if(!SN(i,t)||!SN(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 ku(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);Ru(t,i)<0&&t.push(i),Ru(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(_N(e)){var t=bN(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=pN,e}();function SN(e,t){return e.getCoordSysModel()===t}function TN(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)CN(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&CN(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function CN(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 IN=wN,MN=Math.PI,EN=function(){function e(e,t){this.group=new Tf,this.opt=t,this.axisModel=e,Nu(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Tf({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!AN[e]},e.prototype.add=function(e){AN[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=Bf(t-e);return Ff(o)?(i=n>0?"top":"bottom",r="center"):Ff(o-MN)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<MN?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}(),AN={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&&(Ec(s,s,a),Ec(l,l,a));var c=Ou({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new I_({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});pb(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);ju(h)&&(h=[h,h]),(ju(p)||qu(p))&&(p=[p,p]);var f=sI(t.get(["axisLine","symbolOffset"])||0,p),m=p[0],v=p[1];ku([{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"!==h[r]&&null!=h[r]){var i=aI(h[r],-m/2,-v/2,m,v,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=RN(i.getTicksCoords(),t.transform,l,Nu(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=ec(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=(ec(r.labelRotate,a.get("rotate"))||0)*MN/180,c=EN.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),h=[],p=EN.isLabelSilent(n),f=n.get("triggerEvent");return ku(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,m=o.formattedLabel,v=o.rawLabel,g=a;if(d&&d[u]){var y=d[u];Qu(y)&&y.textStyle&&(g=new Jb(y.textStyle,a,n.ecModel))}var _=g.getTextColor()||n.get(["axisLine","lineStyle","color"]),b=i.dataToCoord(u),x=new Og({x:b,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:p,z2:10+(o.level||0),style:Rb(g,{text:m,align:g.getShallow("align",!0)||c.textAlign,verticalAlign:g.getShallow("verticalAlign",!0)||g.getShallow("baseline",!0)||c.textVerticalAlign,fill:Yu(_)?_("category"===i.type?v:"value"===i.type?u+"":u,l):_})});if(x.anid="label_"+u,f){var w=EN.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=v,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),Ng(x).eventData=w}t.add(x),x.updateTransform(),h.push(x),e.add(x),x.decomposeTransform()})),h}(n,r,t,e);(function(e,t,n){if(OA(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],h=n[n.length-2];!1===r?(DN(o),DN(u)):ON(o,a)&&(r?(DN(a),DN(c)):(DN(o),DN(u)));!1===i?(DN(s),DN(d)):ON(l,s)&&(i?(DN(l),DN(h)):(DN(s),DN(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=Nu(s.getLineStyle(),Nu(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=RN(a[c],t.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)e.add(d[h])}(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 wd(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,h=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){h=!0;break}if(f.obb||(f.obb=new j_(f.localRect,f.transform)),d||(d=new j_(s,l)),d.intersect(f.obb)){h=!0;break}}}h?(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 j_(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}(Bu(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=ec(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(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,NN(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*MN/180),NN(s)?o=EN.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=Bf(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;Ff(a-MN/2)?(o=l?"bottom":"top",i="center"):Ff(a-1.5*MN)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*MN&&a>MN/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 m=u.getFont(),v=t.get("nameTruncate",!0)||{},g=v.ellipsis,y=ec(e.nameTruncateMaxWidth,v.maxWidth,a),_=new Og({x:p[0],y:p[1],rotation:o.rotation,silent:EN.isLabelSilent(t),style:Rb(u,{text:i,font:m,overflow:"truncate",width:y,ellipsis:g,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Cb({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var b=EN.makeAxisEventDataBase(t);b.targetType="axisName",b.name=i,Ng(_).eventData=b}r.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function DN(e){e&&(e.ignore=!0)}function ON(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=ad([]);return ud(i,i,-e.rotation),n.applyTransform(sd([],i,e.getLocalTransform())),r.applyTransform(sd([],i,t.getLocalTransform())),n.intersect(r)}}function NN(e){return"middle"===e||"center"===e}function RN(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&&(Ec(a,a,t),Ec(s,s,t));var c=new I_({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});pb(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var LN=EN;function PN(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=[];ku(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=UN(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(ku(n.getAxes(),Vu(p,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),h=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&ku(h.baseAxes,Vu(p,!d||"cross",c)),d&&ku(h.otherAxes,Vu(p,"cross",!1))}}function p(r,s,c){var d=c.model.getModel("axisPointer",i),h=d.get("show");if(h&&("auto"!==h||r||FN(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};ku(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Au(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&&Nu(l,c.textStyle)}}return e.model.getModel("axisPointer",new Jb(s,n,r))}(c,u,i,t,r,s):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),m=UN(c.model),v=s||p||"category"===c.type,g=e.axesInfo[m]={key:m,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:v,snap:p,useHandle:FN(d),seriesModels:[],linkGroup:null};l[m]=g,e.seriesInvolved=e.seriesInvolved||v;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(kN(o[r+"AxisId"],n.id)||kN(o[r+"AxisIndex"],n.componentIndex)||kN(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var _=a[y]||(a[y]={axesInfo:{}});_.axesInfo[m]=g,_.mapper=o[y].mapper,g.linkGroup=_}}}}))}(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)&&ku(e.coordSysAxesInfo[UN(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 kN(e,t){return"all"===e||Wu(e)&&Ru(e,t)>=0||e===t}function BN(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[UN(e)]}function FN(e){return!!e.get(["handle","show"])}function UN(e){return e.type+"||"+e.id}var zN={},HN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=BN(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=FN(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=BN(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){zN[e]=t},t.getAxisPointerClass=function(e){return e&&zN[e]},t.type="axis",t}(WT),VN=HN,WN=um();var YN=["axisLine","axisTickLabel","axisName"],jN=["splitArea","splitLine","minorSplitLine"],GN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return Ie(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Tf,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=yN(a,t),l=new LN(t,Ou({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(OE(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));ku(YN,l.add,l),this._axisGroup.add(l.getGroup()),ku(jN,(function(e){t.get([e,"show"])&&qN[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||_b(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){WN(this).splitAreaColors=null},t.type="cartesianAxis",t}(VN),qN={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=Wu(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),h=[],p=[],f=a.getLineStyle(),m=0;m<d.length;m++){var v=i.toGlobalCoord(d[m].coord);u?(h[0]=v,h[1]=l.y,p[0]=v,p[1]=l.y+l.height):(h[0]=l.x,h[1]=v,p[0]=l.x+l.width,p[1]=v);var g=c++%s.length,y=d[m].tickValue,_=new I_({anid:null!=y?"line_"+d[m].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:Nu({stroke:s[g]},f),silent:!0});pb(_.shape,f.lineWidth),t.add(_)}}},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(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var f=i.toGlobalCoord(l[h][p].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 m=new I_({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});pb(m.shape,d.lineWidth),t.add(m)}},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=WN(e).splitAreaColors,h=pc(),p=0;if(d)for(var f=0;f<u.length;f++){var m=d.get(u[f].tickValue);if(null!=m){p=(m+(c-1)*f)%c;break}}var v=i.toGlobalCoord(u[0].coord),g=a.getAreaStyle();for(s=Wu(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),_=void 0,b=void 0,x=void 0,w=void 0;i.isHorizontal()?(_=v,b=l.y,x=y-_,w=l.height,v=_+x):(_=l.x,b=v,x=l.width,v=b+(w=y-b));var S=u[f-1].tickValue;null!=S&&h.set(S,p),t.add(new mg({anid:null!=S?"area_"+S:null,shape:{x:_,y:b,width:x,height:w},style:Nu({fill:s[p]},g),autoBatch:!0,silent:!0})),p=(p+1)%c}WN(e).splitAreaColors=h}}}(e,t,n,r)}},QN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.type="xAxis",t}(GN),ZN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=QN.type,t}return Ie(t,e),t.type="yAxis",t}(GN),XN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return Ie(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new mg({shape:e.coordinateSystem.getRect(),style:Nu({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(WT),$N={offset:0};function KN(e){e.registerComponentView(XN),e.registerComponentModel(rN),e.registerCoordinateSystem("cartesian2d",IN),cN(e,"x",iN,$N),cN(e,"y",iN,$N),e.registerComponentView(QN),e.registerComponentView(ZN),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var JN=um(),eR=Au,tR=Hu,nR=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=Vu(rR,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Tf,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);sR(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=BN(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=JN(e).pointerEl=new Eb[i.type](eR(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=JN(e).labelEl=new Og(eR(t.label));e.add(i),oR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=JN(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=JN(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),oR(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=xb(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){td(e.event)},onmousedown:tR(this._onHandleDragMove,this,0,0),drift:tR(this._onHandleDragMove,this),ondragend:tR(this._onHandleDragEnd,this)}),r.add(i)),sR(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Wu(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){rR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,aR(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(aR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(aR(r)),JN(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),oC(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 rR(e,t,n,r){iR(JN(n).lastProp,r)||(JN(n).lastProp=r,t?X_(n,r,e):(n.stopAnimation(),n.attr(r)))}function iR(e,t){if(Qu(e)&&Qu(t)){var n=!0;return ku(t,(function(t,r){n=n&&iR(e[r],t)})),!!n}return e===t}function oR(e,t){e[t.get(["label","show"])?"show":"hide"]()}function aR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function sR(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 lR(e,t,n,r,i){var o=uR(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=Wx(a.get("padding")||0),l=a.getFont(),u=af(o,l),c=i.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=i.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/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,h,r);var m=a.get("backgroundColor");m&&"auto"!==m||(m=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Rb(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:m}),z2:10}}function uR(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:EA(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};ku(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),ju(a)?o=a.replace("{value}",o):Yu(a)&&(o=a(s))}return o}function cR(e,t,n){var r=[1,0,0,1,0,0];return ud(r,r,n.rotation),ld(r,r,n.position),vb([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var dR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=hR(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=pR[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=LN.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),lR(t,r,i,o,{position:cR(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,yN(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=yN(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=cR(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=hR(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}(nR);function hR(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var pR={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=fR(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=fR(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function fR(e){return"x"===e.dim?0:1}var mR=dR,vR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(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}(sw),gR=um(),yR=ku;function _R(e,t,n){if(!lu.node){var r=t.getZr();gR(r).records||(gR(r).records={}),function(e,t){if(gR(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);yR(gR(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)}))}gR(e).initialized=!0,n("click",Vu(xR,"click")),n("mousemove",Vu(xR,"mousemove")),n("globalout",bR)}(r,t),(gR(r).records[e]||(gR(r).records[e]={})).handler=n}}function bR(e,t,n){e.handler("leave",null,n)}function xR(e,t,n,r){t.handler(e,n,r)}function wR(e,t){if(!lu.node){var n=t.getZr();(gR(n).records||{})[e]&&(gR(n).records[e]=null)}}var SR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";_R("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){wR("axisPointer",t)},t.prototype.dispose=function(e,t){wR("axisPointer",t)},t.type="axisPointer",t}(WT),TR=SR;function CR(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=lm(o,e);if(null==a||a<0||Wu(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,h="x"===c||"radius"===c?1:0,p=o.mapDimension(d),f=[];f[h]=o.get(p,a),f[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(Bu(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var IR=um();function MR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||Hu(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){NR(i)&&(i=CR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=NR(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||NR(i),h={},p={},f={list:[],map:{}},m={showPointer:Vu(AR,p),showTooltip:Vu(DR,f)};ku(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);ku(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&&ER(e,a,m,!1,h)}}))}));var v={};return ku(c,(function(e,t){var n=e.linkGroup;n&&!p[t]&&ku(n.axesInfo,(function(t,r){var i=p[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,OR(t),OR(e)))),v[e.key]=o}}))})),ku(v,(function(e,t){ER(c[t],e,m,!0,h)})),function(e,t,n){var r=n.axesInfo=[];ku(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})}))}(p,c,h),function(e,t,n,r){if(NR(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=IR(r)[i]||{},a=IR(r)[i]={};ku(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&ku(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];ku(o,(function(e,t){!a[t]&&l.push(e)})),ku(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),h}}function ER(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 ku(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.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 p=e-u,f=Math.abs(p);f<=a&&((f<a||p>=0&&s<0)&&(a=f,s=p,i=u,o.length=0),ku(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&&Ou(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 AR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function DR(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=UN(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 OR(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 NR(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function RR(e){VN.registerAxisPointerClass("CartesianAxisPointer",mR),e.registerComponentModel(vR),e.registerComponentView(TR),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Wu(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=PN(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},MR)}function LR(e){kA(KN),kA(RR)}var PR="\0_ec_interaction_mutex";function kR(e,t){return!!BR(e)[t]}function BR(e){return e[PR]||(e[PR]={})}BM({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},gc);var FR=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=Hu(n._mousedownHandler,n),i=Hu(n._mousemoveHandler,n),o=Hu(n._mouseupHandler,n),a=Hu(n._mousewheelHandler,n),s=Hu(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=Nu(Au(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 Ie(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(!nd(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&&HR("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!kR(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&&td(e.event),zR(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){nd(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=HR("zoomOnMouseWheel",e,this._opt),n=HR("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;UR(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);UR(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){kR(this._zr,"globalPan")||UR(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Pc);function UR(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(td(r.event),zR(e,t,n,r,i))}function zR(e,t,n,r,i){i.isAvailableBehavior=Hu(HR,null,n,r),e.trigger(t,i)}function HR(e,t,n){var r=n[e];return!e||r&&(!ju(r)||t.event[r+"Key"])}var VR=FR,WR={axisPointer:1,tooltip:1,brush:1};function YR(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=GR(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=GR(s,[0,a]),i=o=GR(s,[i,o]),r=0}t[0]=GR(t[0],n),t[1]=GR(t[1],n);var l=jR(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]=GR(t[r],d),u=jR(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=jR(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function jR(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 GR(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var qR=!0,QR=Math.min,ZR=Math.max,XR=Math.pow,$R="globalPan",KR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},JR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},eL={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},tL=0,nL=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Tf,n._uid="brushController_"+tL++,ku(AL,(function(e,t){this._handlers[t]=Hu(e,this)}),n),n}return Ie(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){BR(e)[t]=n}(t,$R,this._uid),ku(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=Du(Au(eL),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=BR(e);r[t]===n&&(r[t]=null)}(e,$R,this._uid),ku(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={};ku(e,(function(e){t[e.panelId]=Au(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=Bu(e,(function(e){return Du(Au(eL),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new GM(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]):iL(r,rL(r,s));sL(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),dL(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Pc);function rL(e,t){var n=OL[t.brushType].createCover(e,t);return n.__brushOption=t,aL(n,t),e.group.add(n),n}function iL(e,t){var n=lL(t);return n.endCreating&&(n.endCreating(e,t),aL(t,t.__brushOption)),t}function oL(e,t){var n=t.__brushOption;lL(t).updateCoverShape(e,t,n.range,n)}function aL(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function sL(e,t){lL(t).updateCommon(e,t),oL(e,t)}function lL(e){return OL[e.__brushOption.brushType]}function uL(e,t,n){var r,i=e._panels;if(!i)return qR;var o=e._transform;return ku(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function cL(e,t){var n=e._panels;if(!n)return qR;var r=t.__brushOption.panelId;return null!=r?n[r]:qR}function dL(e){var t=e._covers,n=t.length;return ku(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function hL(e,t){var n=Bu(e._covers,(function(e){var t=e.__brushOption,n=Au(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function pL(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function fL(e,t,n,r){var i=new Tf;return i.add(new mg({name:"main",style:yL(n),silent:!0,draggable:!0,cursor:"move",drift:Vu(xL,e,t,i,["n","s","w","e"]),ondragend:Vu(hL,t,{isEnd:!0})})),ku(r,(function(n){i.add(new mg({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Vu(xL,e,t,i,n),ondragend:Vu(hL,t,{isEnd:!0})}))})),i}function mL(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=ZR(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],h=c-o+i/2,p=d-o+i/2,f=c-a,m=d-s,v=f+i,g=m+i;gL(e,t,"main",a,s,f,m),r.transformable&&(gL(e,t,"w",l,u,o,g),gL(e,t,"e",h,u,o,g),gL(e,t,"n",l,u,v,o),gL(e,t,"s",l,p,v,o),gL(e,t,"nw",l,u,o,o),gL(e,t,"ne",h,u,o,o),gL(e,t,"sw",l,p,o,o),gL(e,t,"se",h,p,o,o))}function vL(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(yL(n)),i.attr({silent:!r,cursor:r?"move":"default"}),ku([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?bL(e,n[0]):function(e,t){var n=[bL(e,t[0]),bL(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?JR[o]+"-resize":null})}))}function gL(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=QR(e[0][0],e[1][0]),n=QR(e[0][1],e[1][1]),r=ZR(e[0][0],e[1][0]),i=ZR(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(TL(e,t,[[r,i],[r+o,i+a]])))}function yL(e){return Nu({strokeNoScale:!0},e.brushStyle)}function _L(e,t,n,r){var i=[QR(e,n),QR(t,r)],o=[ZR(e,n),ZR(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function bL(e,t){var n=gb({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return mb(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function xL(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=SL(t,i,o);ku(r,(function(e){var t=KR[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(_L(s[0][0],s[1][0],s[0][1],s[1][1])),sL(t,n),hL(t,{isEnd:!1})}function wL(e,t,n,r){var i=t.__brushOption.range,o=SL(e,n,r);ku(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),sL(e,t),hL(e,{isEnd:!1})}function SL(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 TL(e,t,n){var r=cL(e,t);return r&&r!==qR?r.clipPath(n,e._transform):Au(n)}function CL(e){var t=e.event;t.preventDefault&&t.preventDefault()}function IL(e,t,n){return e.childOfName("main").contain(t,n)}function ML(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 XR(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&dL(e);var l=Au(s);l.brushType=EL(l.brushType,a),l.panelId=a===qR?null:a.panelId,o=e._creatingCover=rL(e,l),e._covers.push(o)}if(o){var u=OL[EL(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(TL(e,o,e._track)),r&&(iL(e,o),u.updateCommon(e,o)),oL(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&uL(e,t,n)&&dL(e)&&(i={isEnd:r,removeOnClick:!0});return i}function EL(e,t){return"auto"===e?t.defaultBrushType:e}var AL={mousedown:function(e){if(this._dragging)DL(this,e);else if(!e.target||!e.target.draggable){CL(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=uL(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=uL(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===qR||s.panelId===o.panelId)&&OL[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){CL(e);var i=ML(this,e,r,!1);i&&hL(this,i)}},mouseup:function(e){DL(this,e)}};function DL(e,t){if(e._dragging){CL(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=ML(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&hL(e,o)}}var OL={lineX:NL(0),lineY:NL(1),rect:{createCover:function(e,t){function n(e){return e}return fL({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=pL(e);return _L(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){mL(e,t,n,r)},updateCommon:vL,contain:IL},polygon:{createCover:function(e,t){var n=new Tf;return n.add(new w_({name:"main",style:yL(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new __({name:"main",draggable:!0,drift:Vu(wL,e,t),ondragend:Vu(hL,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:TL(e,t,n)})},updateCommon:vL,contain:IL}};function NL(e){return{createCover:function(t,n){return fL({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=pL(t);return[QR(n[0][e],n[1][e]),ZR(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=cL(t,n);if(a!==qR&&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(),mL(t,n,l,i)},updateCommon:vL,contain:IL}}var RL=nL;function LL(e){return e=BL(e),function(t){return bb(t,e)}}function PL(e,t){return e=BL(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 kL(e,t,n){var r=BL(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&&!WR.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function BL(e){return wd.create(e)}var FL=["x","y","radius","angle","single"],UL=["cartesian2d","polar","singleAxis"];function zL(e){return e+"Axis"}function HL(e,t){var n,r=pc(),i=[],o=pc();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 VL(e){var t=e.ecModel,n={infoList:[],infoMap:pc()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(zL(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 WL=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}(),YL=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 Ie(t,e),t.prototype.init=function(e,t,n){var r=jL(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=jL(e);Du(this.option,e,!0),Du(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;ku([["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=pc();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 ku(FL,(function(n){var r=this.getReferringComponents(zL(n),fm);if(r.specified){t=!0;var i=new WL;ku(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 WL;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",pm).models[0];a&&ku(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",pm).models[0]&&o.add(e.componentIndex)}))}}}r&&ku(FL,(function(t){if(r){var i=n.findComponents({mainType:zL(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new WL;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");ku([["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(zL(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){ku(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(zL(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;ku([["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;ku(["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}(sw);function jL(e){var t={};return ku(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var GL=YL,qL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.type="dataZoom.select",t}(GL),QL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(WT),ZL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.type="dataZoom.select",t}(QL),XL=ku,$L=Rf,KL=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 Ru(UL,t)>=0}(t)){var n=zL(this._dimName),r=t.getReferringComponents(n,pm).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 Au(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=[];XL(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(Df(c,o,n))):(t=!0,c=Df(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})),$L(s),$L(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";YR(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=Df(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];XL(n,(function(e){!function(e,t,n){t&&ku(NA(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=SA(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&&XL(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=Bu(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],h=u>o[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(t=!0),h&&(n=!0)}return i&&t&&n}))}else XL(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)}}));XL(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;XL(["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=Df(n[0]+o,n,[0,100],!0):null!=i&&(o=Df(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=Pf(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 JL=KL,eP={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(zL(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 JL(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=pc();return ku(n,(function(e){ku(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 tP=!1;function nP(e){tP||(tP=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,eP),function(e){e.registerAction("dataZoom",(function(e,t){ku(HL(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"})))}function rP(e){e.registerComponentModel(qL),e.registerComponentView(ZL),nP(e)}var iP=function(){},oP={};function aP(e,t){oP[e]=t}function sP(e){return oP[e]}var lP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;ku(this.option.feature,(function(e,n){var r=sP(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),Du(e,r.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(sw);function uP(e,t,n){var r=t.getBoxLayoutParams(),i=t.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=tw(r,o,i);ew(t.get("orient"),e,t.get("itemGap"),a.width,a.height),function(e,t,n,r,i,o){var a,s=!i||!i.hv||i.hv[0],l=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if((o=o||e).x=e.x,o.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new wd(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=tw(Nu({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;"raw"===u?(o.x=h,o.y=p):(o.x+=h,o.y+=p),o===e&&e.markRedraw()}(e,r,o,i)}function cP(e,t){var n=Wx(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new mg({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})}var dP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),e.get("show")){var o=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];ku(s,(function(e,t){u.push(t)})),new GM(this._featureNames||[],u).add(c).update(c).remove(Vu(c,null)).execute(),this._featureNames=u,uP(i,e,n),i.add(cP(i.getBoundingRect(),e)),a||i.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Yu(l)&&t){var u=l.style||(l.style={}),c=af(t,Og.makeFont(u)),d=e.x+i.x,h=!1;e.y+i.y+o+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:o+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function c(c,d){var h,p=u[c],f=u[d],m=s[p],v=new Jb(m,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(m.title=r.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:v.option.onclick,featureName:p};else{var g=sP(p);if(!g)return;h=new g}l[p]=h}else if(!(h=l[f]))return;h.uid=tx("toolbox-feature"),h.model=v,h.ecModel=t,h.api=n;var y=h instanceof iP;p||!f?!v.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(r,s,l){var u,c,d=r.getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),p=s instanceof iP&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};ju(p)?(u={})[l]=p:u=p;ju(f)?(c={})[l]=f:c=f;var m=r.iconPaths={};ku(u,(function(l,u){var p=xb(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new Og({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null},ignore:!0});p.setTextContent(f),Cb({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",(function(){var t=h.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===r.get(["iconStatus",u])?sy:ly)(p),i.add(p),p.on("click",Hu(s.onclick,s,t,n,u)),m[u]=p}))}(v,h,p),v.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?sy:ly)(r[e])},h instanceof iP&&h.render&&h.render(v,t,n,r)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){ku(this._features,(function(e){e instanceof iP&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){ku(this._features,(function(n){n instanceof iP&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){ku(this._features,(function(n){n instanceof iP&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(WT);var hP=dP,pP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=lu.browser;if(Yu(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+o,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||i){var c=a.split(","),d=c[0].indexOf("base64")>-1,h=i?decodeURIComponent(c[1]):c[1];d&&(h=window.atob(h));var p=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var f=h.length,m=new Uint8Array(f);f--;)m[f]=h.charCodeAt(f);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,p)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,_=y.document;_.open("image/svg+xml","replace"),_.write(h),_.close(),y.focus(),_.execCommand("SaveAs",!0,p),document.body.removeChild(g)}}else{var b=n.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',w=window.open();w.document.write(x),w.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(iP),fP=pP,mP="__ec_magicType_stack__",vP=[["line","bar"],["stack"]],gP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return ku(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get(["seriesIndex",n]);if(yP[n]){var o,a={series:[]};ku(vP,(function(e){Ru(e,n)>=0&&ku(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},(function(e){var t=e.subType,i=e.id,o=yP[n](t,i,e,r);o&&(Nu(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,pm).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=Du({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},t}(iP),yP={line:function(e,t,n,r){if("bar"===e)return Du({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return Du({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===mP;if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),Du({id:t,stack:i?"":mP},r.get(["option","stack"])||{},!0)}};BM({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));var _P=gP,bP=new Array(60).join("-"),xP="\t";function wP(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var SP=new RegExp("[\t]+","g");function TP(e,t){var n=e.split(new RegExp("\n*"+bP+"\n*","g")),r={series:[]};return ku(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(xP)>=0)return!0}(e)){var i=function(e){for(var t=e.split(/\n+/g),n=[],r=Bu(wP(t.shift()).split(SP),(function(e){return{name:e,data:[]}})),i=0;i<t.length;i++){var o=wP(t[i]).split(SP);n.push(o.shift());for(var a=0;a<o.length;a++)r[a]&&(r[a].data[i]=o[a])}return{series:r,categories:n}}(e),o=t[n],a=o.axisDim+"Axis";o&&(r[a]=r[a]||[],r[a][o.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{i=function(e){for(var t=e.split(/\n+/g),n=wP(t.shift()),r=[],i=0;i<t.length;i++){var o=wP(t[i]);if(o){var a=o.split(SP),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),r[i]={name:s,value:[]},l=r[i].value):l=r[i]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?r[i].value=l[0]:r[i]=l[0])}}return{name:n,data:r}}(e);r.series.push(i)}})),r}var CP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.onclick=function(e,t){setTimeout((function(){t.dispatchAction({type:"hideTip"})}));var n=t.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",i.style.backgroundColor=r.get("backgroundColor")||"#fff";var o=document.createElement("h4"),a=r.get("lang")||[];o.innerHTML=a[0]||r.get("title"),o.style.cssText="margin:10px 20px",o.style.color=r.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="overflow:auto";var u=r.get("optionToContent"),c=r.get("contentToOption"),d=function(e){var t,n,r,i=function(e){var t={},n=[],r=[];return e.eachRawSeries((function(e){var i=e.coordinateSystem;if(!i||"cartesian2d"!==i.type&&"polar"!==i.type)n.push(e);else{var o=i.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;t[a]||(t[a]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),t[a].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:r}}(e);return{value:Uu([(n=i.seriesGroupByCategoryAxis,r=[],ku(n,(function(e,t){var n=e.categoryAxis,i=e.valueAxis.dim,o=[" "].concat(Bu(e.series,(function(e){return e.name}))),a=[n.model.getCategories()];ku(e.series,(function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(i),(function(e){return e})))}));for(var s=[o.join(xP)],l=0;l<a[0].length;l++){for(var u=[],c=0;c<a.length;c++)u.push(a[c][l]);s.push(u.join(xP))}r.push(s.join("\n"))})),r.join("\n\n"+bP+"\n\n")),(t=i.other,Bu(t,(function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,i=arguments[e-1],o=t.getName(i),a=0;a<e-1;a++)r[a]=arguments[a];n.push((o?o+xP:"")+r.join(xP))})),n.join("\n")})).join("\n\n"+bP+"\n\n"))],(function(e){return!!e.replace(/[\n\t\s]/g,"")})).join("\n\n"+bP+"\n\n"),meta:i.meta}}(e);if(Yu(u)){var h=u(t.getOption());ju(h)?s.innerHTML=h:$u(h)&&s.appendChild(h)}else{l.readOnly=r.get("readOnly");var p=l.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=r.get("textColor"),p.borderColor=r.get("textareaBorderColor"),p.backgroundColor=r.get("textareaColor"),l.value=d.value,s.appendChild(l)}var f=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",g=document.createElement("div"),y=document.createElement("div");v+=";background-color:"+r.get("buttonColor"),v+=";color:"+r.get("buttonTextColor");var _=this;function b(){n.removeChild(i),_._dom=null}Jc(g,"click",b),Jc(y,"click",(function(){if(null==c&&null!=u||null!=c&&null==u)b();else{var e;try{e=Yu(c)?c(s,t.getOption()):TP(l.value,f)}catch(e){throw b(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),b()}})),g.innerHTML=a[1],y.innerHTML=a[2],y.style.cssText=g.style.cssText=v,!r.get("readOnly")&&m.appendChild(y),m.appendChild(g),i.appendChild(o),i.appendChild(s),i.appendChild(m),s.style.height=n.clientHeight-80+"px",n.appendChild(i),this._dom=i},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},t}(iP);function IP(e,t){return Bu(e,(function(e,n){var r=t&&t[n];if(Qu(r)&&!Wu(r)){Qu(e)&&!Wu(e)||(e={value:e});var i=null!=r.name&&null==e.name;return e=Nu(e,r),i&&delete e.name,e}return e}))}BM({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var n=[];ku(e.newOption.series,(function(e){var r=t.getSeriesByName(e.name)[0];if(r){var i=r.get("data");n.push({name:e.name,data:IP(e.data,i)})}else n.push(Ou({type:"scatter"},e))})),t.mergeOption(Nu({series:n},e.newOption))}));var MP=CP,EP=ku,AP=um();function DP(e){var t=AP(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var OP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.onclick=function(e,t){!function(e){AP(e).snapshots=null}(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(iP);BM({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));var NP=OP,RP=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LP=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=kP(t,e);ku(BP,(function(e,t){(!n||!n.include||Ru(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=zP[e.brushType](0,n,t);e.__rangeOffset={offset:VP[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){ku(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&ku(r.coordSyses,(function(r){var i=zP[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){ku(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=zP[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?VP[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=YP(n),o=YP(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 Bu(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:LL(r),isTargetByCursor:kL(r,e,n.coordSysModel),getLinearBrushOtherExtent:PL(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&Ru(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=kP(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<FP.length;s++)if(FP[s](r,o))return o}return!0},e}();function PP(e){return e[0]>e[1]&&e.reverse(),e}function kP(e,t){return dm(e,t,{includeMainTypes:RP})}var BP={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=pc(),a={},s={};(n||r||i)&&(ku(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),ku(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),ku(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=[];ku(i.getCartesians(),(function(e,t){(Ru(n,e.getAxis("x").model)>=0||Ru(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:UP.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){ku(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:UP.geo})}))}},FP=[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}],UP={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(mb(e)),t}},zP={lineX:Vu(HP,0),lineY:Vu(HP,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=[PP([i[0],o[0]]),PP([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:Bu(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 HP(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=PP(Bu([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 VP={lineX:Vu(WP,0),lineY:Vu(WP,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 Bu(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function WP(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function YP(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var jP,GP,qP=LP,QP=ku,ZP=Xf+"toolbox-dataZoom_",XP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new RL(n.getZr()),this._brushController.on("brush",Hu(this._onBrush,this)).mount()),function(e,t,n,r,i){var o=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new qP(KP(e),t,{include:["grid"]}),s=a.makePanelOpts(i,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return DP(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){$P[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new qP(KP(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(i("x",n,t[0]),i("y",n,t[1])):i({lineX:"x",lineY:"y"}[r],n,t)}})),function(e,t){var n=DP(e);EP(t,(function(t,r){for(var i=n.length-1;i>=0&&!n[i][r];i--);if(i<0){var o=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(o){var a=o.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(t)}(r,n),this._dispatchZoomAction(n)}function i(e,t,i){var o=t.getAxis(e),a=o.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)})),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(i=YR(0,i.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:i[0],endValue:i[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];QP(e,(function(e,n){t.push(Au(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(iP),$P={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=DP(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return EP(n,(function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n]){r[n]=e;break}})),r}(this.ecModel))}};function KP(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}jP="dataZoom",GP=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),i=[],o=dm(e,KP(r));return QP(o.xAxisModels,(function(e){return a(e,"xAxis","xAxisIndex")})),QP(o.yAxisModels,(function(e){return a(e,"yAxis","yAxisIndex")})),i}function a(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:ZP+t+o};a[n]=o,i.push(a)}},oc(null==Mw.get(jP)&&GP),Mw.set(jP,GP);var JP=XP;var ek=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(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}(sw);function tk(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function nk(e){if(lu.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var rk=nk(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function ik(e,t){if(!e)return t;t=Vx(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var ok=ik(nk(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),ak=ik(rk,"transform"),sk="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(lu.transform3dSupported?"will-change:transform;":"");function lk(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!lu.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=lu.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+ak+":"+a+";":[["top",0],["left",0],[rk,a]]}function uk(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=ET(e,"html"),h=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+h),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+=lu.transformSupported?","+ak+r:",left"+r+",top"+r),ok+":"+i}(i,n)),o&&r.push("background-color:"+o),ku(["width","color","radius"],(function(t){var n="border-"+t,i=Vx(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),ku(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+Wx(d).join("px ")+"px"),r.join(";")+";"}function ck(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){Hc(zc,t,r,i,!0)&&Hc(e,n,zc[0],zc[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 dk=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,lu.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;ck(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;Kc(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=sk+uk(e,!this._firstShow,this._longHide)+lk(i[0],i[1],!0)+"border-color:"+Qx(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(ju(i)&&"item"===n.get("trigger")&&!tk(n)&&(a=function(e,t,n){if(!ju(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=Qx(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=ak+":";Ru(["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,h=l+i,p=h*Math.abs(Math.cos(d))+h*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*((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-h)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),ju(e))o.innerHTML=e+a;else if(e){o.innerHTML="",Wu(e)||(e=[e]);for(var s=0;s<e.length;s++)$u(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(ck(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;ku(lk(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",lu.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(Hu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),hk=dk;function pk(e){return Math.max(0,e)}function fk(e){var t=pk(e.shadowBlur||0),n=pk(e.shadowOffsetX||0),r=pk(e.shadowOffsetY||0);return{left:pk(t-n),right:pk(t+n),top:pk(t-r),bottom:pk(t+r)}}function mk(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var vk=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),mk(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;Qu(e)&&qf(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new Og({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:ET(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),ku(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),ku(["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=fk(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;mk(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=pk(i.borderWidth||0),a=fk(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(Hu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),gk=new mg({shape:{x:-1,y:-1,width:2,height:2}}),yk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.init=function(e,t){if(!lu.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?lu.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new vk(t):new hk(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!lu.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"):oC(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");_R("itemTooltip",this._api,Hu((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&&!lu.node&&n.getDom()){var i=bk(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=hm(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=mm(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=Ng(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=gk;l.x=r.x,l.y=r.y,l.update(),Ng(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=CR(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(bk(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"===_k([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,qC(n,(function(e){return null!=Ng(e).dataIndex?(i=e,!0):null!=Ng(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=Hu(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=_k([t.tooltipOption],r),a=this._renderMode,s=[],l=_T("section",{blocks:[],noHeader:!0}),u=[],c=new AT;ku(e,(function(e){ku(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=uR(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=_T("section",{header:o,noHeader:!ac(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),ku(e.seriesDataIndices,(function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=EA(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",Qx(f.color),a);var m=VS(h.formatTooltip(p,!0,null)),v=m.frag;if(v){var g=_k([h],r).get("valueFormatter");d.blocks.push(g?Ou({valueFormatter:g},v):v)}m.text&&u.push(m.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,h=o.get("order"),p=CT(l,c,a,h,n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"<br/>",m=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,m,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Ng(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,h=e.positionDefault,p=_k([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var m=s.getDataParams(l,u),v=new AT;m.marker=v.makeTooltipMarker("item",Qx(m.color),d);var g=VS(s.formatTooltip(l,!1,u)),y=p.get("order"),_=p.get("valueFormatter"),b=g.frag,x=b?CT(_?Ou({valueFormatter:_},b):b,v,d,y,r.get("useUTC"),p.get("textStyle")):g.text,w="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,x,m,w,e.offsetX,e.offsetY,e.position,e.target,v)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=Ng(t),i=r.tooltipConfig.option||{};if(ju(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=_k(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new AT;this._showOrMove(l,(function(){var n=Au(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,h=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(ju(c)){var p=e.ecModel.get("useUTC"),f=Wu(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=Tx(f.axisValue,d,p)),d=qx(d,n,!0)}else if(Yu(c)){var m=Hu((function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,m)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||Wu(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:Wu(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"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),Yu(t)&&(t=t([n,r],o,i.el,h,{viewSize:[s,l],contentSize:u.slice()})),Wu(t))n=Of(t[0],s),r=Of(t[1],l);else if(Qu(t)){var p=t;p.width=u[0],p.height=u[1];var f=tw(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(ju(t)&&a){var m=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,h,u,e.get("borderWidth"));n=m[0],r=m[1]}else{m=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=m[0],r=m[1]}if(c&&(n-=xk(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=xk(d)?u[1]/2:"bottom"===d?u[1]:0),tk(e)){m=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=m[0],r=m[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&&ku(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&ku(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)&&ku(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&ku(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){!lu.node&&t.getDom()&&(oC(this,"_updatePosition"),this._tooltipContent.dispose(),wR("itemTooltip",t))},t.type="tooltip",t}(WT);function _k(e,t,n){var r,i=t.ecModel;n?(r=new Jb(n,i,i),r=new Jb(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof Jb&&(a=a.get("tooltip",!0)),ju(a)&&(a={formatter:a}),a&&(r=new Jb(a,r,i)))}return r}function bk(e,t){return e.dispatchAction||Hu(t.dispatchAction,t)}function xk(e){return"center"===e||"middle"===e}var wk=yk;function Sk(e){kA(RR),e.registerComponentModel(ek),e.registerComponentView(wk),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},gc),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},gc)}var Tk=["rect","polygon","keep","clear"];function Ck(e,t){var n=$f(e?e.brush:[]);if(n.length){var r=[];ku(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;Wu(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={};ku(e,(function(e){t[e]=1})),e.length=0,ku(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,Tk)}}var Ik=ku,Mk=Qu,Ek=-1,Ak=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=Au(t);this.type=r,this.mappingMethod=n,this._normalizeData=Uk[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(Dk(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,ku(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(Ik(t,(function(e,t){n[e]=t})),!Wu(r)){var i=[];Qu(r)?Ik(r,(function(e,t){var r=n[t];i[null!=r?r:Ek]=e})):i[-1]=r,r=Fk(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):Dk(i,!0):(oc("linear"!==n||i.dataExtent),Dk(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Hu(this._normalizeData,this)},e.listVisualTypes=function(){return zu(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Qu(e)?ku(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=Wu(t)?[]:Qu(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&&Ik(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(Wu(e))e=e.slice();else{if(!Mk(e))return[];var t=[];Ik(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||ju(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(zk(c[1],e,u[1]))return o}else if(u[1]===1/0){if(zk(c[0],u[0],e))return o}else if(zk(c[0],u[0],e)&&zk(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:Rk("color"),getColorMapper:function(){var e=this.option;return Hu("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),Lk.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Fh(t,e.parsedVisual,r),i?r:zh(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return zh(Fh(e,this.option.parsedVisual),"rgba")},category:Lk,piecewise:function(e,t){var n=Bk.call(this,t);return null==n&&(n=zh(Fh(e,this.option.parsedVisual),"rgba")),n},fixed:Pk}},colorHue:Ok((function(e,t){return Uh(e,t)})),colorSaturation:Ok((function(e,t){return Uh(e,null,t)})),colorLightness:Ok((function(e,t){return Uh(e,null,null,t)})),colorAlpha:Ok((function(e,t){return function(e,t){var n=Ph(e);if(n&&null!=t)return n[3]=Ch(t),zh(n,"rgba")}(e,t)})),decal:{applyVisual:Rk("decal"),_normalizedToVisual:{linear:null,category:Lk,piecewise:null,fixed:null}},opacity:{applyVisual:Rk("opacity"),_normalizedToVisual:kk([0,1])},liftZ:{applyVisual:Rk("liftZ"),_normalizedToVisual:{linear:Pk,category:Pk,piecewise:Pk,fixed:Pk}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:Nk,category:Lk,piecewise:function(e,t){var n=Bk.call(this,t);return null==n&&(n=Nk.call(this,e)),n},fixed:Pk}},symbolSize:{applyVisual:Rk("symbolSize"),_normalizedToVisual:kk([0,1])}},e}();function Dk(e,t){var n=e.visual,r=[];Qu(n)?Ik(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]),Fk(e,r)}function Ok(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:kk([0,1])}}function Nk(e){var t=this.option.visual;return t[Math.round(Df(e,[0,1],[0,t.length-1],!0))]||{}}function Rk(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function Lk(e){var t=this.option.visual;return t[this.option.loop&&e!==Ek?e%t.length:e]}function Pk(){return this.option.visual[0]}function kk(e){return{linear:function(t){return Df(t,e,this.option.visual,!0)},category:Lk,piecewise:function(t,n){var r=Bk.call(this,n);return null==r&&(r=Df(t,e,this.option.visual,!0)),r},fixed:Pk}}function Bk(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[Ak.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function Fk(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Bu(t,(function(e){var t=Ph(e);return t||[0,0,0,1]}))),t}var Uk={linear:function(e){return Df(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=Ak.findPieceIndex(e,t,!0);if(null!=n)return Df(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?Ek:t},fixed:gc};function zk(e,t,n){return e?t<=n:t<n}var Hk=Ak,Vk=ku;function Wk(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var Yk={lineX:jk(0),lineY:jk(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])&&FA(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!!(FA(r,i,o)||FA(r,i+a,o)||FA(r,i,o+s)||FA(r,i+a,o+s)||wd.create(e).contain(l[0],l[1])||wb(i,o,i+a,o,r)||wb(i,o,i,o+s,r)||wb(i+a,o,i+a,o+s,r)||wb(i,o+s,i+a,o+s,r))||void 0}}};function jk(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return Gk(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(),Gk(s[0],a)||Gk(s[1],a)||Gk(a[0],s)||Gk(a[1],s)}}}}function Gk(e,t){return t[0]<=e&&e<=t[1]}var qk=["inBrush","outOfBrush"],Qk="__ecBrushSelect",Zk="__ecInBrushSelectEvent";function Xk(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new qP(t.option,e)).setInputRanges(t.areas,e)}))}function $k(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})})),Xk(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:Au(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],h=!1;n||(r=s.throttleType,i=s.throttleDelay);var p=Bu(t.areas,(function(e){var t=eB[e.brushType],n=Nu({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return Yk[t].point(r,n,e)},rect:function(r){return Yk[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return Vk(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);Vk(e[t],(function(e,r){if(Hk.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new Hk(i),"opacity"===r&&((i=Au(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Hk(i))}}))})),r}(t.option,qk,(function(e){e.mappingMethod="fixed"}));function m(e){return"all"===l||!!u[e]}function v(e){return!!e.length}Wu(l)&&ku(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;h=h||n.hasAxisBrushed(),m(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&&(Wu(n)?Ru(n,t)<0:t!==n)}(t,r))return;if(ku(p,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),h=h||v(i)})),m(r)&&v(i)){var o=n.getData();o.each((function(e){Jk(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=m(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return Jk(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(m(t)?h:v(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return jC(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 h=r.call(i,e),p=t[h],f=s[h],m=0,v=f.length;m<v;m++){var g=f[m];p[g]&&p[g].applyVisual(e,l,u)}}ku(e,(function(e){var n=Hk.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(qk,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[Zk])return;o[Qk]||(o[Qk]=Kk);var a=iC(o,Qk,n,t);a(e,r)}(t,r,i,o,n)}function Kk(e,t){if(!e.isDisposed()){var n=e.getZr();n[Zk]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[Zk]=!1}}function Jk(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 eB={rect:function(e){return tB(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&&tB(t)}};function tB(e){return new wd(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var nB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new RL(t.getZr())).on("brush",Hu(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){Xk(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:Au(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:Au(n),$from:t})},t.type="brush",t}(WT),rB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return Ie(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;ku(n,(function(e){t.hasOwnProperty(e)&&Wk(t[e])&&(r=!0)})),r&&ku(n,(function(n){t.hasOwnProperty(n)&&Wk(t[n])?e[n]=Au(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=Bu(e,(function(e){return iB(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=iB(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}(sw);function iB(e,t){return Du({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Jb(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var oB=rB,aB=["rect","polygon","lineX","lineY","keep","clear"],sB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(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,ku(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 ku(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:aB.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}(iP);function lB(e){e.registerComponentView(nB),e.registerComponentModel(oB),e.registerPreprocessor(Ck),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,$k),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"},gc),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},gc),aP("brush",sB)}var uB=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 Ie(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}(sw),cB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(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=tc(e.get("textBaseline"),e.get("textVerticalAlign")),l=new Og({style:Rb(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new Og({style:Rb(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){Zx(h,"_"+e.get("target"))})),p&&d.on("click",(function(){Zx(p,"_"+e.get("subtarget"))})),Ng(l).eventData=Ng(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var m=r.getBoundingRect(),v=e.getBoxLayoutParams();v.width=m.width,v.height=m.height;var g=tw(v,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?g.x+=g.width:"center"===a&&(g.x+=g.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?g.y+=g.height:"middle"===s&&(g.y+=g.height/2),s=s||"top"),r.x=g.x,r.y=g.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),m=r.getBoundingRect();var _=g.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var x=new mg({shape:{x:m.x-_[3],y:m.y-_[0],width:m.width+_[1]+_[3],height:m.height+_[0]+_[2],r:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type="title",t}(WT);function dB(e){e.registerComponentModel(uB),e.registerComponentView(cB)}function hB(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=US(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(US(e,t,n[a]));return o.join(" ")}}function pB(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Wu(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 fB=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return Ie(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=aI(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=mB,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(){sy(this.childAt(0))},t.prototype.downplay=function(){ly(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{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):X_(h,d,a,n),nb(h)}if(this._updateCommon(e,n,s,r,i),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,$_(h,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,h,p,f=this.childAt(0),m=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var v=r&&r.itemModel?r.itemModel:e.getItemModel(t),g=v.getModel("emphasis");o=g.getModel("itemStyle").getItemStyle(),s=v.getModel(["select","itemStyle"]).getItemStyle(),a=v.getModel(["blur","itemStyle"]).getItemStyle(),l=g.get("focus"),u=g.get("blurScope"),c=g.get("disabled"),d=Nb(v),h=g.getShallow("scale"),p=v.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var _=sI(e.getItemVisual(t,"symbolOffset"),n);_&&(f.x=_[0],f.y=_[1]),p&&f.attr("cursor",p);var b=e.getItemVisual(t,"style"),x=b.fill;if(f instanceof sg){var w=f.style;f.useStyle(Ou({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},b))}else f.__isEmptyBrush?f.useStyle(Ou({},b)):f.useStyle(b),f.style.decal=null,f.setColor(x,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),T=this._z2;null!=S?null==T&&(this._z2=f.z2,f.z2+=S):null!=T&&(f.z2=T,this._z2=null);var C=i&&i.useNameLabel;Ob(f,d,{labelFetcher:m,labelDataIndex:t,defaultText:function(t){return C?e.getName(t):hB(e,t)},inheritColor:x,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=f.ensureState("emphasis");I.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var M=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;I.scaleX=this._sizeX*M,I.scaleY=this._sizeY*M,this.setSymbolScale(1),by(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=Ng(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&J_(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();J_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Wu(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(Tf);function mB(e,t){this.parent.drift(e,t)}var vB=fB;function gB(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 yB(e){return null==e||Qu(e)||(e={isIgnore:e}),e||{}}function _B(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:Nb(t),cursorStyle:t.get("cursor")}}var bB=function(){function e(e){this.group=new Tf,this._SymbolCtor=e||vB}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=yB(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=_B(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(gB(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 h=i.getItemGraphicEl(d),p=u(c);if(gB(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==f)n.remove(h),(h=new o(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var v={x:p[0],y:p[1]};a?h.attr(v):X_(h,v,r)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)})).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=_B(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=yB(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(gB(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){Mb(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}(),xB=bB;function wB(e,t){return e.type===t}var SB=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 Ie(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"]),Wu(t)&&ku(t,(function(e,r){ju(e)&&(e={type:e}),t[r]=Du(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&&am(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=pc(),o=Bu(r,(function(e){return(ju(e)||qu(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Jb(e,this,this.ecModel))}),this);this._data=Uu(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")&&ku(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;ku(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;ku(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])&&Ru(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}(sw),TB=SB,CB=Vu,IB=ku,MB=Tf,EB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Ie(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new MB),this.group.add(this._selectorGroup=new MB),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=tw(l,u,c),h=this.layoutInner(e,i,d,r,a,s),p=tw(Nu({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=cP(h,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=pc(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),IB(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new MB;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a))if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},m=p.getVisual("legendIcon"),v=p.getVisual("style");this._createItem(h,a,o,i,t,e,f,v,m,u,r).on("click",CB(AB,a,null,r,c)).on("mouseover",CB(OB,h.name,null,r,c)).on("mouseout",CB(NB,h.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),h=s.getItemVisual(d,"style"),p=s.getItemVisual(d,"legendIcon"),f=Ph(h.fill);f&&0===f[3]&&(f[3]=.2,h=Ou(Ou({},h),{fill:zh(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},h,p,u,r).on("click",CB(AB,null,a,r,c)).on("mouseover",CB(OB,null,a,r,c)).on("mouseout",CB(NB,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();IB(e,(function(e){var r=e.type,i=new Og({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),Ob(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),_y(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,h=i.get("itemWidth"),p=i.get("itemHeight"),f=i.isSelected(t),m=r.get("symbolRotate"),v=r.get("symbolKeepAspect"),g=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),IB(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?NI(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 h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),m=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=g||l||"roundRect",r,a,s,d,f,c),_=new MB,b=r.getModel("textStyle");if(!Yu(e.getLegendIcon)||g&&"inherit"!==g){var x="inherit"===g&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;_.add(function(e){var t=e.icon||"roundRect",n=aI(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:h,itemHeight:p,icon:l,iconRotate:x,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:v}))}else _.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:m,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:v}));var w="left"===o?h+5:-5,S=o,T=i.get("formatter"),C=t;ju(T)&&T?C=T.replace("{name}",null!=t?t:""):Yu(T)&&(C=T(t));var I=f?b.getTextColor():r.get("inactiveColor");_.add(new Og({style:Rb(b,{text:C,x:w,y:p/2,fill:I,align:S,verticalAlign:"middle"},{inheritColor:I})}));var M=new mg({shape:_.getBoundingRect(),invisible:!0}),E=r.getModel("tooltip");return E.get("show")&&Cb({el:M,componentModel:i,itemName:t,itemTooltipOption:E.option}),_.add(M),_.eachChild((function(e){e.silent=!0})),M.silent=!u,this.getContentGroup().add(_),_y(_),_.__legendDataIndex=n,_},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();ew(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){ew("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",m=0===p?"height":"width",v=0===p?"y":"x";"end"===o?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[m]/2-c[m]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var g={x:0,y:0};return g[f]=l[f]+h+c[f],g[m]=Math.max(l[m],c[m]),g[v]=Math.min(0,c[v]+d[1-p]),g}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}(WT);function AB(e,t,n,r){NB(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),OB(e,t,n,r)}function DB(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 OB(e,t,n,r){DB(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function NB(e,t,n,r){DB(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var RB=EB;function LB(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 PB(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)),ku(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 kB(e){e.registerComponentModel(TB),e.registerComponentView(RB),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,LB),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Vu(PB,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Vu(PB,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Vu(PB,"inverseSelect")),e.registerAction("legendSelect","legendselected",Vu(PB,"select")),e.registerAction("legendUnSelect","legendunselected",Vu(PB,"unSelect"))}(e)}function BB(e,t,n){var r=[1,1];r[e.getOrient().index]=0,rw(t,n,{type:"box",ignoreSize:!!r})}var FB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=iw(t);e.prototype.init.call(this,t,n,r),BB(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),BB(this,this.option,t)},t.type="legend.scroll",t.defaultOption=nx(TB.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}(TB),UB=Tf,zB=["width","height"],HB=["x","y"],VB=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 Ie(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new UB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new UB)},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=Wu(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var r=e+"DataIndex",o=xb(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Hu(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 Og({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=zB[s],u=HB[s],c=zB[1-s],d=HB[1-s];i&&ew("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],m=Au(n);i&&(m[l]=n[l]-p[l]-h);var v=this._layoutContentAndController(e,r,m,s,l,c,d,u);if(i){if("end"===o)f[s]+=v[l]+h;else{var g=p[l]+h;f[s]-=g,v[u]-=g}v[l]+=p[l]+h,f[1-s]+=v[d]+v[c]/2-p[c]/2,v[c]=Math.max(v[c],p[c]),v[d]=Math.min(v[d],p[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return v},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;ew(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),ew("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var m=[0,0],v=[-h.x,-h.y],g=tc(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?v[r]+=n[i]-h[i]:m[r]+=h[i]+g);v[1-r]+=d[o]/2-h[o]/2,l.setPosition(f),u.setPosition(m),c.setPosition(v);var y={x:0,y:0};if(y[i]=p?n[i]:d[i],y[o]=Math.max(d[o],h[o]),y[a]=Math.min(0,h[a]+v[1-r]),u.__rectSize=n[i],p){var _={x:0,y:0};_[i]=Math.max(n[i]-h[i]-g,0),_[o]=y[o],u.setClipPath(new mg({shape:_})),u.__rectSize=_[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var b=this._getPageInfo(e);return null!=b.pageIndex&&X_(l,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),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;ku(["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",ju(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=zB[i],a=HB[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[i]=-p.s;for(var f=s+1,m=p,v=p,g=null;f<=c;++f)(!(g=y(l[f]))&&v.e>m.s+r||g&&!_(g,m.s))&&(m=v.i>m.i?v:g)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=m.i),++h.pageCount),v=g;for(f=s-1,m=p,v=p,g=null;f>=-1;--f)(g=y(l[f]))&&_(v,g.s)||!(m.i<v.i)||(v=m,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=m.i),++h.pageCount,++h.pageIndex),m=g;return h;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 _(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}(RB),WB=VB;function YB(e){kA(kB),e.registerComponentModel(FB),e.registerComponentView(WB),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 jB(e){kA(kB),kA(YB)}var GB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.type="dataZoom.inside",t.defaultOption=nx(GL.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(GL),qB=um();function QB(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function ZB(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function XB(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function $B(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=qB(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=pc());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){ku(VL(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:Vu(XB,t),dispatchAction:Vu(ZB,e),dataZoomInfoMap:null,controller:null},r=n.controller=new VR(e.getZr());return ku(["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=pc())).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 QB(r,e)}))}))}var KB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Ie(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){qB(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:Hu(JB.pan,this),zoom:Hu(JB.zoom,this),scrollMove:Hu(JB.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=qB(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||QB(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(QL),JB={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=tF[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 YR(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:eF((function(e,t,n,r,i,o){var a=tF[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:eF((function(e,t,n,r,i,o){return tF[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function eF(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return YR(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 tF={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}},nF=KB;function rF(e){nP(e),e.registerComponentModel(GB),e.registerComponentView(nF),$B(e)}var iF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=nx(GL.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}(GL),oF=mg,aF="horizontal",sF="vertical",lF=["line","bar","candlestick","scatter"],uF={easing:"cubicOut",duration:100,delay:0},cF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Ie(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Hu(this._onBrush,this),this._onBrushEnd=Hu(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(){oC(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 Tf;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===aF?{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=iw(e.option);ku(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=tw(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===sF&&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!==aF||i?n===aF&&i?{scaleY:a?1:-1,scaleX:-1}:n!==sF||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 oF({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new oF({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Hu(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,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],m=[],v=p[1]/(i.count()-1),g=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)g+=v;else{var n=null==e||isNaN(e)||""===e,r=n?0:Df(e,u,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),m.push([m[m.length-1][0],0])):!n&&d&&(f.push([g,0]),m.push([g,0])),f.push([g,r]),m.push([g,r]),g+=v,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=m}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var _=this.dataZoomModel,b=0;b<3;b++){var x=w(1===b);this._displayables.sliderGroup.add(x),this._displayables.dataShadowSegs.push(x)}}}function w(e){var t=_.getModel(e?"selectedDataBackground":"dataBackground"),n=new Tf,r=new __({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new w_({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){ku(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&Ru(lF,e.get("type"))<0)){var a,s=r.getComponent(zL(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 oF({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new oF({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)"}})),ku([0,1],(function(t){var o=a.get("handleIcon");!rI[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=aI(o,-1,0,2,2,null,!0);s.attr({cursor:dF(this._orient),draggable:!0,drift:Hu(this._onDragMove,this,t),ondragend:Hu(this._onDragEnd,this),onmouseover:Hu(this._showDataInfo,this,!0),onmouseout:Hu(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Of(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(),_y(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 Og({silent:!0,invisible:!0,style:Rb(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 h=Of(a.get("moveHandleSize"),o[1]),p=t.moveHandle=new mg({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:h}}),f=.8*h,m=t.moveHandleIcon=aI(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);m.silent=!0,m.y=o[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var v=Math.min(o[1]/2,Math.max(h,10));(d=t.moveZone=new mg({invisible:!0,shape:{y:o[1]-v,height:h+v}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),i.add(p),i.add(m),i.add(d)}d.attr({draggable:!0,cursor:dF(this._orient),drift:Hu(this._onDragMove,this,"all"),ondragstart:Hu(this._showDataInfo,this,!0),ondragend:Hu(this._onDragEnd,this),onmouseover:Hu(this._showDataInfo,this,!0),onmouseout:Hu(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Df(e[0],[0,100],t,!0),Df(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];YR(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?Df(o.minSpan,a,i,!0):null,null!=o.maxSpan?Df(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=Rf([Df(r[0],i,a,!0),Df(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=Rf(n.slice()),i=this._size;ku([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 mg,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=Rf(this._handleEnds.slice());function d(e){var t=mb(n.handles[e].parent,this.group),a=gb(0===e?"right":"left",t),s=this._handleWidth/2+5,l=vb([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===aF?"middle":a,align:i===aF?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 Yu(r)?r(e,o):ju(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,td(r.event);var i=vb([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 hd(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=Rf([Df(n.x,r,i,!0),Df(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&&(td(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 oF({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?uF:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=VL(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}(QL);function dF(e){return"vertical"===e?"ns-resize":"ew-resize"}var hF=cF;function pF(e){e.registerComponentModel(iF),e.registerComponentView(hF),nP(e)}function fF(e){kA(rF),kA(pF)}var mF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Ie(t,e),t.prototype.getInitialData=function(e){return TE(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Tf,n=aI("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=aI(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}(HT);function vF(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]:qu(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=Bu(e.dimensions,(function(e){return t.mapDimension(e)})),h=!1,p=t.getCalculationInfo("stackResultDimension");return SE(t,d[0])&&(h=!0,d[0]=p),SE(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function gF(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 yF=Math.min,_F=Math.max;function bF(e,t){return isNaN(e)||isNaN(t)}function xF(e,t,n,r,i,o,a,s,l){for(var u,c,d,h,p,f,m=n,v=0;v<r;v++){var g=t[2*m],y=t[2*m+1];if(m>=i||m<0)break;if(bF(g,y)){if(l){m+=o;continue}break}if(m===n)e[o>0?"moveTo":"lineTo"](g,y),d=g,h=y;else{var _=g-u,b=y-c;if(_*_+b*b<.5){m+=o;continue}if(a>0){for(var x=m+o,w=t[2*x],S=t[2*x+1];w===g&&S===y&&v<r;)v++,m+=o,w=t[2*(x+=o)],S=t[2*x+1],_=(g=t[2*m])-u,b=(y=t[2*m+1])-c;var T=v+1;if(l)for(;bF(w,S)&&T<r;)T++,w=t[2*(x+=o)],S=t[2*x+1];var C=.5,I=0,M=0,E=void 0,A=void 0;if(T>=r||bF(w,S))p=g,f=y;else{I=w-u,M=S-c;var D=g-u,O=w-g,N=y-c,R=S-y,L=void 0,P=void 0;if("x"===s){var k=I>0?1:-1;p=g-k*(L=Math.abs(D))*a,f=y,E=g+k*(P=Math.abs(O))*a,A=y}else if("y"===s){var B=M>0?1:-1;p=g,f=y-B*(L=Math.abs(N))*a,E=g,A=y+B*(P=Math.abs(R))*a}else L=Math.sqrt(D*D+N*N),p=g-I*a*(1-(C=(P=Math.sqrt(O*O+R*R))/(P+L))),f=y-M*a*(1-C),A=y+M*a*C,E=yF(E=g+I*a*C,_F(w,g)),A=yF(A,_F(S,y)),E=_F(E,yF(w,g)),f=y-(M=(A=_F(A,yF(S,y)))-y)*L/P,p=yF(p=g-(I=E-g)*L/P,_F(u,g)),f=yF(f,_F(c,y)),E=g+(I=g-(p=_F(p,yF(u,g))))*P/L,A=y+(M=y-(f=_F(f,yF(c,y))))*P/L}e.bezierCurveTo(d,h,p,f,g,y),d=E,h=A}else e.lineTo(g,y)}u=g,c=y,m+=o}return v}var wF=function(){this.smooth=0,this.smoothConstraint=!0},SF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Ie(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new wF},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&bF(n[2*i-2],n[2*i-1]);i--);for(;r<i&&bF(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=xF(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=Rv.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,m=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++],(m=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&m>=0){var v=a?(c-r)*m+r:(u-n)*m+n;return a?[e,v]:[v,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],h=i[l++],p=i[l++],f=i[l++];var g=a?sh(n,u,d,p,e,s):sh(r,c,h,f,e,s);if(g>0)for(var y=0;y<g;y++){var _=s[y];if(_<=1&&_>=0){v=a?oh(r,c,h,f,_):oh(n,u,d,p,_);return a?[e,v]:[v,e]}}n=p,r=f}}},t}(eg),TF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t}(wF),CF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Ie(t,e),t.prototype.getDefaultShape=function(){return new TF},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&&bF(n[2*o-2],n[2*o-1]);o--);for(;i<o&&bF(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=xF(e,n,i,o,o,1,t.smooth,a,t.connectNulls);xF(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(eg);function IF(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 mg({shape:{x:a,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var m=Yu(i)?function(e){i(e,d)}:null;$_(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,m)}return d}function MF(e,t,n){var r=e.getArea(),i=Nf(r.r0,1),o=Nf(r.r,1),a=new h_({shape:{cx:Nf(e.cx,1),cy:Nf(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,$_(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function EF(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function AF(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 DF(e,t){var n=AF(e),r=n[0],i=n[1],o=AF(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 OF(e){return qu(e)?e:e?.5:0}function NF(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 h=(u[o]+c[o])/2,p=[];l[o]=p[o]=h,l[1-o]=u[1-o],p[1-o]=c[1-o],a.push(l[0],l[1]),a.push(p[0],p[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 RF(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=Ph(t[i]),s=Ph(t[o]),l=r-i,u=zh([Th(Ah(a[0],s[0],l)),Th(Ah(a[1],s[1],l)),Th(Ah(a[2],s[2],l)),Ch(Ah(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 LF(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*vB.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return ku(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function PF(e,t){return[e[2*t],e[2*t+1]]}function kF(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Bg.length;t++)if(e.get([Bg[t],"endLabel","show"]))return!0;return!1}function BF(e,t,n,r){if(wB(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=kF(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=IF(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,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return MF(t,n,r)}var FF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(t,e),t.prototype.init=function(){var e=new Tf,t=new xB;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,h=this._symbolDraw,p=this._polyline,f=this._polygon,m=this._lineGroup,v=!t.ssr&&e.isAnimationEnabled(),g=!l.isEmpty(),y=l.get("origin"),_=vF(i,a,y),b=g&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=GE(2*r),o=0;o<r;o++){var a=gF(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,_),x=e.get("showSymbol"),w=e.get("connectNulls"),S=x&&!c&&LF(e,a,i),T=this._data;T&&T.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),T.setItemGraphicEl(t,null))})),x||h.remove(),o.add(m);var C,I=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(C=i.getArea()).width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var M=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=Bu(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 h=RF(u,"x"===i?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,m=h[p-1].coord+10,v=m-f;if(v<.001)return"transparent";ku(h,(function(e){e.offset=(e.coord-f)/v})),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var g=new F_(0,0,0,0,h,!0);return g[i]=f,g[i+"2"]=m,g}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(p&&d.type===i.type&&I===this._step){g&&!f?f=this._newPolygon(u,b):f&&!g&&(m.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Qx(M));var E=m.getClipPath();if(E)$_(E,{shape:BF(this,i,!1,e).shape},e);else m.setClipPath(BF(this,i,!0,e));x&&h.updateData(a,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),EF(this._stackedOnPoints,b)&&EF(this._points,u)||(v?this._doUpdateAnimation(a,b,i,n,I,y,w):(I&&(u=NF(u,i,I,w),b&&(b=NF(b,i,I,w))),p.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:b})))}else x&&h.updateData(a,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),v&&this._initSymbolLabelAnimation(a,i,C),I&&(u=NF(u,i,I,w),b&&(b=NF(b,i,I,w))),p=this._newPolyline(u),g?f=this._newPolygon(u,b):f&&(m.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Qx(M)),m.setClipPath(BF(this,i,!0,e));var A=e.getModel("emphasis"),D=A.get("focus"),O=A.get("blurScope"),N=A.get("disabled");(p.useStyle(Nu(s.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"})),Sy(p,e,"lineStyle"),p.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);Ng(p).seriesIndex=e.seriesIndex,by(p,D,O,N);var R=OF(e.get("smooth")),L=e.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:L,connectNulls:w}),f){var P=a.getCalculationInfo("stackedOnSeries"),k=0;f.useStyle(Nu(l.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),P&&(k=OF(P.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:k,smoothMonotone:L,connectNulls:w}),Sy(f,e,"areaStyle"),Ng(f).seriesIndex=e.seriesIndex,by(f,D,O,N)}var B=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=i,this._stackedOnPoints=b,this._points=u,this._step=I,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,p),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){Ng(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=lm(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 vB(i,o)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else JT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=lm(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 JT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;ny(this._polyline,e),t&&ny(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new SF({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 CF({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");Yu(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Yu(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(i){var m=n,v=t.pointToCoord(d);r?(h=m.startAngle,p=m.endAngle,f=-v[1]/180*Math.PI):(h=m.r0,p=m.r,f=v[0])}else{var g=n;r?(h=g.x,p=g.x+g.width,f=e.x):(h=g.y+g.height,p=g.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var _=Yu(u)?u(o):l*y+c,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:_}),b.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(kF(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 Og({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&&(Ob(o,Nb(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?pB(i,n):hB(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"),h=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),m=f.isHorizontal(),v=f.inverse,g=t.shape,y=v?m?g.x:g.y+g.height:m?g.x+g.width:g.y,_=(m?p:0)*(v?-1:1),b=(m?0:-p)*(v?-1:1),x=m?"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,x),S=w.range,T=S[1]-S[0],C=void 0;if(T>=1){if(T>1&&!d){var I=PF(u,S[0]);s.attr({x:I[0]+_,y:I[1]+b}),i&&(C=c.getRawValue(S[0]))}else{(I=l.getPointOn(y,x))&&s.attr({x:I[0]+_,y:I[1]+b});var M=c.getRawValue(S[0]),E=c.getRawValue(S[1]);i&&(C=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(qu(r))return Nf(f=Qf(n||0,r,i),o?Math.max(Lf(n||0),Lf(r)):t);if(ju(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 h=s&&s[c]?s[c]:0,p=l[c],f=Qf(h,p,i);a[c]=Nf(f,o?Math.max(Lf(h),Lf(p)):t)}}return a}(n,h,M,E,w.t))}r.lastFrameIndex=S[0]}else{var A=1===e||r.lastFrameIndex>0?S[0]:0;I=PF(u,A);i&&(C=c.getRawValue(A)),s.attr({x:I[0]+_,y:I[1]+b})}if(i){var D=Ub(s);"function"==typeof D.setLabelText&&D.setLabelText(C)}}},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=[],h=[],p=[],f=[],m=vF(i,t,a),v=e.getLayout("points")||[],g=t.getLayout("points")||[],y=0;y<s.length;y++){var _=s[y],b=!0,x=void 0,w=void 0;switch(_.cmd){case"=":x=2*_.idx,w=2*_.idx1;var S=v[x],T=v[x+1],C=g[w],I=g[w+1];(isNaN(S)||isNaN(T))&&(S=C,T=I),l.push(S,T),u.push(C,I),c.push(n[x],n[x+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(_.idx1));break;case"+":var M=_.idx,E=m.dataDimsForPoint,A=i.dataToPoint([t.get(E[0],M),t.get(E[1],M)]);w=2*M,l.push(A[0],A[1]),u.push(g[w],g[w+1]);var D=gF(m,i,t,M);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(M));break;case"-":b=!1}b&&(h.push(_),p.push(p.length))}p.sort((function(e,t){return f[e]-f[t]}));var O=l.length,N=GE(O),R=GE(O),L=GE(O),P=GE(O),k=[];for(y=0;y<p.length;y++){var B=p[y],F=2*y,U=2*B;N[F]=l[U],N[F+1]=l[U+1],R[F]=u[U],R[F+1]=u[U+1],L[F]=c[U],L[F+1]=c[U+1],P[F]=d[U],P[F+1]=d[U+1],k[y]=h[B]}return{current:N,next:R,stackedOnCurrent:L,stackedOnNext:P,status:k}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(i&&(d=NF(c.current,n,i,a),h=NF(c.stackedOnCurrent,n,i,a),p=NF(c.next,n,i,a),f=NF(c.stackedOnNext,n,i,a)),DF(d,p)>3e3||l&&DF(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var m={shape:{points:p}};c.current!==d&&(m.shape.__points=c.next),s.stopAnimation(),X_(s,m,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),X_(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],g=c.status,y=0;y<g.length;y++){if("="===g[y].cmd){var _=e.getItemGraphicEl(g[y].idx1);_&&v.push({el:_,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<v.length;t++){var n=v[t].el,r=2*v[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}(JT),UF=FF;var zF={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]}},HF=function(e){return Math.round(e.length/2)};function VF(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),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h));var p=void 0;ju(i)?p=zF[i]:Yu(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,HF))}}}}}function WF(e){e.registerChartView(UF),e.registerSeriesModel(mF),e.registerLayout(function(e,t){return{seriesType:e,plan:YT(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=Bu(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");SE(n,a[0])&&(a[0]=l),SE(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&&GE(n*s),a=[],l=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===s){var m=u.get(c,h);f=r.dataToPoint(m,null,l)}else a[0]=u.get(c,h),a[1]=u.get(d,h),f=r.dataToPoint(a,null,l);o?(i[p++]=f[0],i[p++]=f[1]):t.setItemLayout(h,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,VF("line"))}var YF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.getInitialData=function(e,t){return TE(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)ku(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 h=r[d].coord,p=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(p===a){u=h;break}if(p<a)l=h;else if(null!=l&&p>a){u=(h+l)/2;break}1===d&&(c=p-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}(HT);HT.registerClass(YF);var jF=YF,GF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ie(t,e),t.prototype.getInitialData=function(){return TE(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=nx(jF.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}(jF),qF=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},QF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Ie(t,e),t.prototype.getDefaultShape=function(){return new qF},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,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),f=Math.sin(l),m=Math.cos(u),v=Math.sin(u);h?(e.moveTo(p*i+n,f*i+r),e.arc(p*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(p*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(m*s+n,v*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(eg),ZF=QF;function XF(e,t,n){return t*Math.sin(e)*(n?-1:1)}function $F(e,t,n){return t*Math.cos(e)*(n?1:-1)}var KF=Math.max,JF=Math.min;var eU=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return Ie(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){Mb(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 h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(wB(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),m=e.get("showBackground",!0),v=e.getModel("backgroundStyle"),g=v.get("borderRadius")||0,y=[],_=this._backgroundEls,b=r&&r.isInitSort,x=r&&"changeAxisOrder"===r.type;function w(e){var t=lU[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?h_:mg;return new r({shape:mU(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(v.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",g):n.setShape("cornerRadius",g),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=lU[l.type](a,t,n);if(m&&w(t),a.hasValue(t)&&sU[l.type](r)){var s=!1;h&&(s=tU[l.type](p,r));var v=nU[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(v.forceLabelAnimation=!0),cU(v,a,t,n,r,e,i,"polar"===l.type),b?v.attr({shape:r}):d?rU(d,c,v,r,t,i,!1,!1):$_(v,{shape:r},e,t),a.setItemGraphicEl(t,v),o.add(v),v.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=lU[l.type](a,t,r);if(m){var T=void 0;0===_.length?T=w(n):((T=_[n]).useStyle(v.getItemStyle()),"cartesian2d"===l.type?T.setShape("r",g):T.setShape("cornerRadius",g),y[t]=T);var C=lU[l.type](a,t);X_(T,{shape:mU(i,C,l)},c,t)}var I=s.getItemGraphicEl(n);if(a.hasValue(t)&&sU[l.type](S)){var M=!1;if(h&&(M=tU[l.type](p,S))&&o.remove(I),I?nb(I):I=nU[l.type](e,a,t,S,i,c,u.model,!!I,f),d&&(I.forceLabelAnimation=!0),x){var E=I.getTextContent();if(E){var A=Ub(E);null!=A.prevValue&&(A.prevValue=A.value)}}else cU(I,a,t,r,S,e,i,"polar"===l.type);b?I.attr({shape:S}):d?rU(d,c,I,S,t,i,!0,x):X_(I,{shape:S},e,t,null),a.setItemGraphicEl(t,I),I.ignore=M,o.add(I)}else o.remove(I)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&tb(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Tf);S.removeAll();for(var T=0;T<y.length;++T)S.add(y[T]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),pU(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),pU(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?MF(e,t,n):"cartesian2d"===e.type?IF(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:Bu(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){tb(t,e,Ng(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}(JT),tU={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=KF(t.x,e.x),s=JF(t.x+t.width,i),l=KF(t.y,e.y),u=JF(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=JF(t.r,e.r),o=KF(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}},nU={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new mg({shape:Ou({},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?ZF:h_,c=new u({shape:r,z2:1});c.name="item";var d,h,p=uU(i);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===ZF}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return df(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,p=(u+c)/2,f=a.startAngle,m=a.endAngle,v=(f+m)/2,g=h?Math.abs(u-c)/2:0,y=Math.cos,_=Math.sin,b=s+u*y(f),x=l+u*_(f),w="left",S="top";switch(i){case"startArc":b=s+(c-o)*y(v),x=l+(c-o)*_(v),w="center",S="top";break;case"insideStartArc":b=s+(c+o)*y(v),x=l+(c+o)*_(v),w="center",S="bottom";break;case"startAngle":b=s+p*y(f)+XF(f,o+g,!1),x=l+p*_(f)+$F(f,o+g,!1),w="right",S="middle";break;case"insideStartAngle":b=s+p*y(f)+XF(f,-o+g,!1),x=l+p*_(f)+$F(f,-o+g,!1),w="left",S="middle";break;case"middle":b=s+p*y(v),x=l+p*_(v),w="center",S="middle";break;case"endArc":b=s+(u+o)*y(v),x=l+(u+o)*_(v),w="center",S="bottom";break;case"insideEndArc":b=s+(u-o)*y(v),x=l+(u-o)*_(v),w="center",S="top";break;case"endAngle":b=s+p*y(m)+XF(m,o+g,!0),x=l+p*_(m)+$F(m,o+g,!0),w="left",S="middle";break;case"insideEndAngle":b=s+p*y(m)+XF(m,-o+g,!0),x=l+p*_(m)+$F(m,-o+g,!0),w="right",S="middle";break;default:return df(e,t,n)}return(e=e||{}).x=b,e.y=x,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",m={};c.shape[f]=i?r.r0:r.startAngle,m[f]=r[f],(s?X_:$_)(c,{shape:m},o)}return c}};function rU(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?X_:$_)(n,{shape:l},t,i,null),(a?X_:$_)(n,{shape:u},t?e.baseAxis.model:null,i)}function iU(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var oU=["x","y","width","height"],aU=["cx","cy","r","startAngle","endAngle"],sU={cartesian2d:function(e){return!iU(e,oU)},polar:function(e){return!iU(e,aU)}},lU={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 uU(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 cU(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;Ou(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;Wu(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Bu(r,(function(e){return cf(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 h=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",p=Nb(r);Ob(e,p,{labelFetcher:o,labelDataIndex:n,defaultText:hB(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(s&&f){var m=r.get(["label","position"]);e.textConfig.inside="middle"===m||null,function(e,t,n,r){if(qu(r))e.setTextConfig({rotation:r});else if(Wu(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"===m?h:m,uU(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=Ub(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,p,o.getRawValue(n),(function(e){return pB(t,e)}));var v=r.getModel(["emphasis"]);by(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),Sy(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",ku(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var dU=function(){},hU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Ie(t,e),t.prototype.getDefaultShape=function(){return new dU},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}(eg);function pU(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 hU({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 hU({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")),Ng(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",fU),d.on("mousemove",fU)),n&&n.push(d)}var fU=rC((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 h=3*c;if(l[r]=u,l[i]=o[h+2],s[r]=o[h+r],s[i]=o[h+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);Ng(this).dataIndex=t>=0?t:null}),30,!1);function mU(e,t,n){if(wB(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 vU=eU;function gU(e){e.registerChartView(vU),e.registerSeriesModel(GF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Vu($E,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:YT(),reset:function(e){if(KE(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=SE(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),p=JE(e),f=e.get("barMinHeight")||0,m=u&&t.getDimensionIndex(u),v=t.getLayout("size"),g=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=p&&GE(3*i),u=p&&s&&GE(3*i),y=p&&GE(i),_=n.master.getRect(),b=d?_.width:_.height,x=t.getStore(),w=0;null!=(r=e.next());){var S=x.get(c?m:o,r),T=x.get(a,r),C=h,I=void 0;c&&(I=+S-x.get(o,r));var M=void 0,E=void 0,A=void 0,D=void 0;if(d){var O=n.dataToPoint([S,T]);c&&(C=n.dataToPoint([I,T])[0]),M=C,E=O[1]+g,A=O[0]-C,D=v,Math.abs(A)<f&&(A=(A<0?-1:1)*f)}else O=n.dataToPoint([T,S]),c&&(C=n.dataToPoint([T,I])[1]),M=O[0]+g,E=C,A=v,D=O[1]-C,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);p?(l[w]=M,l[w+1]=E,l[w+2]=d?A:D,u&&(u[w]=d?_.x:M,u[w+1]=d?E:_.y,u[w+2]=b),y[r]=r):t.setItemLayout(r,{x:M,y:E,width:A,height:D}),w+=3}p&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,VF("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 yU=Math.sin,_U=Math.cos,bU=Math.PI,xU=2*Math.PI,wU=180/bU,SU=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=jh(c-xU)||(u?l>=xU:-l>=xU),h=l>0?l%xU:l%xU+xU,p=!1;p=!!d||!jh(c)&&h>=bU==!!u;var f=e+n*_U(o),m=t+r*yU(o);this._start&&this._add("M",f,m);var v=Math.round(i*wU);if(d){var g=1/this._p,y=(u?1:-1)*(xU-g);this._add("A",n,r,v,1,+u,e+n*_U(o+y),t+r*yU(o+y)),g>.01&&this._add("A",n,r,v,0,+u,f,m)}else{var _=e+n*_U(a),b=t+r*yU(a);this._add("A",n,r,v,+p,+u,_,b)}},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 h=arguments[d];if(isNaN(h))return void(this._invalid=!0);u.push(Math.round(h*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}(),TU="none",CU=Math.round;var IU=["lineCap","miterLimit","lineJoin"],MU=Bu(IU,(function(e){return"stroke-"+e.toLowerCase()}));function EU(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof sg)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==TU}(t)){var o=Wh(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",TU);if(function(e){var t=e.stroke;return null!=t&&t!==TU}(t)){var s=Wh(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 h=hI(n),p=h[0],f=h[1];p&&(f=CU(f||0),e("stroke-dasharray",p.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",TU);for(var m=0;m<IU.length;m++){var v=IU[m];if(r||t[v]!==Xv[v]){var g=t[v]||Xv[v];g&&e(MU[m],g)}}}else r&&e("stroke",TU)}}var AU="http://www.w3.org/2000/svg",DU="http://www.w3.org/1999/xlink";function OU(e){return document.createElementNS(AU,e)}function NU(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function RU(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?jc(a):a||"")+(r?""+n+Bu(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function LU(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function PU(e,t,n,r){return NU("svg","root",{width:e,height:t,xmlns:AU,"xmlns:xlink":DU,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var kU={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"},BU="transform-origin";function FU(e,t,n){var r=Ou({},e.shape);Ou(r,t),e.buildPath(n,r);var i=new SU;return i.reset(tp(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function UU(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[BU]=n+"px "+r+"px")}var zU={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function HU(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function VU(e){return ju(e)?kU[e]?"cubic-bezier("+kU[e]+")":gh(e)?e:"":""}function WU(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof k_){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(ku(o,(function(e){var t=LU(n.zrId);t.animation=!0,WU(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=zu(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var h=c[d];a[d]=a[d]||{d:""},a[d].d+=h.d||""}for(var p in s){var f=s[p].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=HU(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"],h=VU(c.getClip().easing),p=c.getDelay();h?d.push(h):d.push("linear"),p&&d.push(p/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function m(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function h(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],h=Math.round(c.time/i*100)+"%",p=VU(c.easing),f=c.rawValue;(ju(f)||qu(f))&&(t[h]=t[h]||{},t[h][l]=c.rawValue,p&&(t[h][d]=p))}}}}for(var p=0;p<s;p++){(S=(w=a[p]).targetName)?"shape"===S&&h(w,u):!r&&h(w,l)}for(var f in l){var m={};tf(m,e),Ou(m,l[f]);var v=np(m),g=l[f][d];c[f]=v?{transform:v}:{},UU(c[f],m),g&&(c[f][d]=g)}var y=!0;for(var f in u){c[f]=c[f]||{};var _=!o;g=u[f][d];_&&(o=new Rv);var b=o.len();o.reset(),c[f].d=FU(e,u[f],o);var x=o.len();if(!_&&b!==x){y=!1;break}g&&(c[f][d]=g)}if(!y)for(var f in c)delete c[f].d;if(!r)for(p=0;p<s;p++){var w,S;"style"===(S=(w=a[p]).targetName)&&h(w,c,(function(e){return zU[e]}))}var T,C=zu(c),I=!0;for(p=1;p<C.length;p++){var M=C[p-1],E=C[p];if(c[M][BU]!==c[E][BU]){I=!1;break}T=c[M][BU]}if(I&&T){for(var f in c)c[f][BU]&&delete c[f][BU];t[BU]=T}if(Uu(C,(function(e){return zu(c[e]).length>0})).length)return HU(c,n)+" "+i[0]+" both"}for(var v in l){(s=m(l[v]))&&a.push(s)}if(a.length){var g=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+g]={animation:a.join(",")},t.class=g}}var YU=Math.round;function jU(e){return e&&ju(e.src)}function GU(e){return e&&Yu(e.toDataURL)}function qU(e,t,n,r){EU((function(i,o){var a="fill"===i||"stroke"===i;a&&Jh(o)?rz(t,e,i,r):a&&Xh(o)?iz(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,h=r.shadowBlur,p=Wh(r.shadowColor),f=p.opacity,m=p.color,v=h/2/l+" "+h/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=NU("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[NU("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:v,"flood-color":m,"flood-opacity":f})]),o[i]=a}t.filter=ep(a)}}(n,e,r)}function QU(e){return jh(e[0]-1)&&jh(e[1])&&jh(e[2])&&jh(e[3]-1)}function ZU(e,t,n){if(t&&(!function(e){return jh(e[4])&&jh(e[5])}(t)||!QU(t))){var r=n?10:1e4;e.transform=QU(t)?"translate("+YU(t[4]*r)/r+" "+YU(t[5]*r)/r+")":function(e){return"matrix("+Gh(e[0])+","+Gh(e[1])+","+Gh(e[2])+","+Gh(e[3])+","+qh(e[4])+","+qh(e[5])+")"}(t)}}function XU(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(YU(r[o][0]*n)/n),i.push(YU(r[o][1]*n)/n);t.points=i.join(" ")}function $U(e){return!e.smooth}var KU,JU,ez={circle:[(KU=["cx","cy","r"],JU=Bu(KU,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<JU.length;r++){var i=JU[r],o=e[i[0]];null!=o&&(t[i[1]]=YU(o*n)/n)}})],polyline:[XU,$U],polygon:[XU,$U]};function tz(e,t){var n=e.style,r=e.shape,i=ez[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&tp(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 h=d.getVersion(),p=e,f=p.__svgPathBuilder;p.__svgPathVersion===h&&f&&l===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new SU),f.reset(u),d.rebuildPath(f,l),f.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var m=Math.pow(10,u);i[0](r,o,m)}return ZU(o,e.transform),qU(o,n,e,t),t.animation&&WU(e,o,t),NU(s,e.id+"",o)}function nz(e,t){return e instanceof eg?tz(e,t):e instanceof sg?function(e,t){var n=e.style,r=n.image;if(r&&!ju(r)&&(jU(r)?r=r.src:GU(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),ZU(a,e.transform),qU(a,n,e,t),t.animation&&WU(e,a,t),NU("image",e.id+"",a)}}(e,t):e instanceof rg?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||cu,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,uf(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":Qh[n.textAlign]||n.textAlign};if(Tg(n)){var l="",u=n.fontStyle,c=wg(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||uu,h=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),h&&"normal"!==h&&(l+="font-weight:"+h+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),ZU(s,e.transform),qU(s,n,e,t),t.animation&&WU(e,s,t),NU("text",e.id+"",s,void 0,r)}}(e,t):void 0}function rz(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if($h(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Kh(o))return;i="radialGradient",a.cx=tc(o.x,.5),a.cy=tc(o.y,.5),a.r=tc(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*qh(s[u].offset)+"%",h=Wh(s[u].color),p=h.color,f=h.opacity,m={offset:d};m["stop-color"]=p,f<1&&(m["stop-opacity"]=f),l.push(NU("stop",u+"",m))}var v=RU(NU(i,"",a,l)),g=r.gradientCache,y=g[v];y||(y=r.zrId+"-g"+r.gradientIdx++,g[v]=y,a.id=y,r.defs[y]=NU(i,y,a,l)),t[n]=ep(y)}function iz(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(Zh(o)){var h=o.imageWidth,p=o.imageHeight,f=void 0,m=o.image;if(ju(m)?f=m:jU(m)?f=m.src:GU(m)&&(f=m.toDataURL()),"undefined"==typeof Image){var v="Image width/height must been given explictly in svg-ssr renderer.";oc(h,v),oc(p,v)}else if(null==h||null==p){var g=function(e,t){if(e){var n=e.elm,r=h||t.width,i=p||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=Om(f,null,e,(function(e){u||g(w,e),g(i,e)}));y&&y.width&&y.height&&(h=h||y.width,p=p||y.height)}i=NU("image","img",{href:f,width:h,height:p}),s.width=h,s.height=p}else o.svgElement&&(i=Au(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var _,b;u?_=b=1:c?(b=1,_=s.width/a.width):d?(_=1,b=s.height/a.height):s.patternUnits="userSpaceOnUse",null==_||isNaN(_)||(s.width=_),null==b||isNaN(b)||(s.height=b);var x=np(o);x&&(s.patternTransform=x);var w=NU("pattern","",s,[i]),S=RU(w),T=r.patternCache,C=T[S];C||(C=r.zrId+"-p"+r.patternIdx++,T[S]=C,s.id=C,w=r.defs[C]=NU("pattern",C,s,[i])),t[n]=ep(C)}}function oz(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]=NU("clipPath",o,a,[tz(e,n)])}t["clip-path"]=ep(o)}function az(e){return document.createTextNode(e)}function sz(e,t,n){e.insertBefore(t,n)}function lz(e,t){e.removeChild(t)}function uz(e,t){e.appendChild(t)}function cz(e){return e.parentNode}function dz(e){return e.nextSibling}function hz(e,t){e.textContent=t}var pz=NU("","");function fz(e){return void 0===e}function mz(e){return void 0!==e}function vz(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 gz(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function yz(e){var t,n=e.children,r=e.tag;if(mz(r)){var i=e.elm=OU(r);if(xz(pz,e),Wu(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&uz(i,yz(o))}else mz(e.text)&&!Qu(e.text)&&uz(i,az(e.text))}else e.elm=az(e.text);return e.elm}function _z(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&sz(e,yz(o),t)}}function bz(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(mz(i.tag))lz(cz(i.elm),i.elm);else lz(e,i.elm)}}function xz(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(DU,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function wz(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(xz(e,t),fz(t.text)?mz(r)&&mz(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,h=n[0],p=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==h?h=n[++s]:null==p?p=n[--d]:gz(u,h)?(wz(u,h),u=t[++a],h=n[++s]):gz(c,p)?(wz(c,p),c=t[--l],p=n[--d]):gz(u,p)?(wz(u,p),sz(e,u.elm,dz(c.elm)),u=t[++a],p=n[--d]):gz(c,h)?(wz(c,h),sz(e,c.elm,u.elm),c=t[--l],h=n[++s]):(fz(r)&&(r=vz(t,a,l)),fz(i=r[h.key])||(o=t[i]).tag!==h.tag?sz(e,yz(h),u.elm):(wz(o,h),t[i]=void 0,sz(e,o.elm,u.elm)),h=n[++s]);(a<=l||s<=d)&&(a>l?_z(e,null==n[d+1]?null:n[d+1].elm,n,s,d):bz(e,t,a,l))}(n,r,i):mz(i)?(mz(e.text)&&hz(n,""),_z(n,null,i,0,i.length-1)):mz(r)?bz(n,r,0,r.length-1):mz(e.text)&&hz(n,""):e.text!==t.text&&(mz(r)&&bz(n,r,0,r.length-1),hz(n,t.text)))}var Sz=0,Tz=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=Ou({},n),this.root=e,this._id="zr"+Sz++,this._oldVNode=PU(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=OU("svg");xz(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(gz(e,t))wz(e,t);else{var n=e.elm,r=cz(n);yz(t),null!==r&&(sz(r,t.elm,dz(n)),bz(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return nz(e,LU(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=LU(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=NU("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Jh(n))rz({fill:n},i.attrs,"fill",r);else if(Xh(n))iz({style:{fill:n},dirty:gc,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=Wh(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=NU("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=Bu(zu(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(NU("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=Bu(zu(e),(function(t){return t+i+Bu(zu(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=Bu(zu(t),(function(e){return"@keyframes "+e+i+Bu(zu(t[e]),(function(n){return n+i+Bu(zu(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=NU("style","stl",{},[],u);o.push(c)}}return PU(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},RU(this.renderToVNode({animation:tc(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:tc(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,h=d&&d.length||0,p=i&&i.length||0,f=void 0;for(f=Math.max(h-1,p-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var m=p-1;m>f;m--)r=a[--s-1];for(var v=f+1;v<h;v++){var g={};oz(d[v],g,t);var y=NU("g","clip-g-"+l++,g,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var _=nz(c,t);_&&(r?r.children:n).push(_)}}},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=dI(r,0,n),t=dI(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(Xh(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=rp(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var Cz=Tz;function Iz(e,t,n){var r=fu.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 Mz=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||Wp,"string"==typeof t?i=Iz(t,n,r):Qu(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(mc(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return Ie(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=Iz("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 wd(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new wd(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 wd(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 h=e.width*e.height,p=c.width*c.height,f=l.width*l.height-h-p;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new wd(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(p=e[c]){var d=p.shouldBePainted(n,r,!0,!0);(f=p.__isRendered&&(1&p.__dirty||!d)?p.getPrevPaintRect():null)&&u(f);var h=d&&(1&p.__dirty||!p.__isRendered)?p.getPaintRect():null;h&&u(h)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p,f;d=(p=t[c]).shouldBePainted(n,r,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered)(f=p.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(i=!0,o[c].union(o[m]),o.splice(m,1)):m++;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 h(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Ku(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||uI(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=_I(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?h(0,0,o,a):n.length&&ku(n,(function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(Pc),Ez=Mz,Az=1e5,Dz=314159,Oz=.01;var Nz=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=Ou({},n||{}),this.dpr=n.devicePixelRatio||Wp,this._singleCanvas=i,this.root=e,e.style&&(mc(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 Ez(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=Dz,o.push(Dz),this._domRoot=e}else{this._width=dI(e,0,n),this._height=dI(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(Az)),r||(r=n.ctx).save(),EI(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(Az)},e.prototype.paintOne=function(e,t){MI(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;jd((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(Dz).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,p=o&&l.createRepaintRects(e,t,h._width,h._height),f=n?l.__startIndex:l.__drawIndex,m=!n&&l.incremental&&Date.now,v=m&&Date.now(),g=l.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,g,p);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,g,p)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var _=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),m)if(Date.now()-v>15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var b=h.dpr,x=0;x<p.length;++x){var w=p[x];d.save(),d.beginPath(),d.rect(w.x*b,w.y*b,w.width*b,w.height*b),d.clip(),_(w),d.restore()}else d.save(),_(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},h=this,p=0;p<i.length;p++)d(p);return lu.wxa&&ku(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))&&(EI(a,e,i,o),e.setPrevPaintRect(s))}else EI(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Dz);var n=this._layers[e];return n||((n=new Ez("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Du(n,this._layerConfig[e],!0):this._layerConfig[e-Oz]&&Du(n,this._layerConfig[e-Oz],!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?Oz:0),this._needsManuallyCompositing),u.__builtin__||Eu("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,ku(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Du(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+Oz)Du(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(Ru(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=dI(i,0,r),t=dI(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(Dz).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 Ez("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];EI(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),Rz=Nz;function Lz(e){var t=u();return a((function(){t.current=e}),[e]),t.current}kA([dB,Sk,jB,LR,fF,function(e){e.registerComponentModel(lP),e.registerComponentView(hP),aP("saveAsImage",fP),aP("magicType",_P),aP("dataView",MP),aP("dataZoom",JP),aP("restore",NP),kA(rP)},WF,gU,function(e){e.registerPainter("canvas",Rz)},lB]);var Pz=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,kz=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,Bz=b((function(){return{metricPanel:{position:"relative"},groupByContainer:{position:"absolute",top:"12px",right:"8px",zIndex:2,pointerEvents:"auto",display:"flex",alignItems:"center"},overrideMuiInput:{width:"168px",height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"}}}})),Fz=i.memo((function(n){var r,i,s,c=n.metricData,d=n.appName,h=n.metricKey,p=n.metricMeasure,f=n.operations,m=n.groupByOperations;n.height;var v=n.isRecommendationGraph,g=void 0!==v&&v,y=n.timezone,_=n.graphTitle,b=n.graphType,w=n.queryData,T=n.dateTimeRange,C=n.isHistoricalQueryView,I=n.showTitle,M=void 0===I||I,E=n.onEChartsDateSelect,A=n.onSelectAshLabel,D=n.registerChartInstance,O=Bz(),N=f,R="".concat("echart-").concat(h),L=l(null==m?void 0:m[0]),P=L[0],k=L[1],B=l(null==N?void 0:N[0]),F=B[0],U=B[1],H=l("undefined"!=typeof window?window.innerWidth:1280),V=H[0],W=H[1],Y=l([]),j=Y[0],G=Y[1],q=u(j),Q=u(null),Z=u(null),X=Lz(c),$=u(null),K=o((function(){var e,t,n=b===Cn.SINGLE_SUPPORTING||b===Cn.MAIN_RCA,r=null===(t=null===(e=Q.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:V;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,Pz),d===Sn.YBM?kz:490)}),[b,V]),J=o((function(e){var t,n,r,i,o,a,s,l,u=nN(c,5),h=M?null!=_?_:null===(t=u.layout)||void 0===t?void 0:t.title:"";if(!$i(u)||!Qi(u.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:h,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 m=p===hn.OUTLIER,v=p===hn.OUTLIER_TABLES,g=p===hn.OUTLIER_DB,b=null!=e?e:null==f?void 0:f[0];((null==f?void 0:f.length)||e)&&(m||v||g)&&(u.data=u.data.filter((function(e){return(null==e?void 0:e.name)===b})));var x=null!==(o=null===(i=null===(r=null===(n=u.layout)||void 0===n?void 0:n.yaxis)||void 0===r?void 0:r.ticksuffix)||void 0===i?void 0:i.replace(/( |\s)+/g,""))&&void 0!==o?o:null,S=0,I=u.data.map((function(e,t){var n,r,i,o,a,s,l,c,d,h,f=e.name;if(e.instanceName&&e.name!==e.instanceName)f="".concat(e.name," (").concat(e.instanceName,")"),p===hn.OUTLIER&&(f=e.instanceName);else if(p!==hn.OUTLIER||e.instanceName||e.global){if(v)f=e.tableName;else if(g)f=e.dbName;else if((null===(n=null==u?void 0:u.layout)||void 0===n?void 0:n.type)===er&&p===hn.OVERALL&&(null===(o=null===(i=null===(r=null==u?void 0:u.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===xn.QUERY_ID){var m=null==w?void 0:w.find((function(t){return t.id.queryId===e.name}));f=null==m?void 0:m.query}}else f=lr.NODE_AVERAGE;var _=f,b=(null==f?void 0:f.length)>30;(null===(a=null==u?void 0:u.layout)||void 0===a?void 0:a.type)===er&&p===hn.OVERALL&&(null===(c=null===(l=null===(s=null==u?void 0:u.layout)||void 0===s?void 0:s.metadata)||void 0===l?void 0:l.currentGroupBy)||void 0===c?void 0:c[0])===xn.QUERY_ID?_=(null==f?void 0:f.substring(0,30))+"...":b&&p!==hn.OUTLIER?_=f.substring(0,30)+"...":p!==hn.OUTLIER||e.global?v?_=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:g&&(_=e.namespaceName):_=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):lr.NODE_AVERAGE;var x=e.x.map((function(t,n){return[t,e.y[n]]})),S=(null===(d=null==u?void 0:u.layout)||void 0===d||d.type,x);return Me(Me({name:_,fullname:f,type:"line",data:S,color:null!==(h=li[_])&&void 0!==h?h:si[t%si.length]},e.name===lr.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:y});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:void 0,smooth:!1,showSymbol:!1})}));$i(null===(a=u.layout)||void 0===a?void 0:a.yaxis)&&"µs"===x&&Qi(u.data)&&no(u.data)&&(I.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),x="ms");var E=0;I.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>E&&(E=t)}));S=1.5*E,(null===(s=null==u?void 0:u.layout)||void 0===s?void 0:s.type)===er&&(S=4.5*E),0===S&&(S=1.01);var A=d!==Sn.YBA&&x?"".concat(h," (").concat(x,")"):h;(null===(l=null==u?void 0:u.layout)||void 0===l?void 0:l.type)===er&&C&&(A="Cluster Load for Selected Query");var D={title:{text:A,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=Xl(y?$l(r,y):r,"MMM d HH:mm (zzz)",{timeZone:null!=y?y:void 0}),o=e.map((function(t,n){var r,i,o=t.value[1],a=Aa(t.color,t.seriesName),s=Da(null!==(i=null===(r=Number(o))||void 0===r?void 0:r.toFixed(3))&&void 0!==i?i:"0"),l=n===e.length-1;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:'.concat(l?"0":"8px",';\n ">\n ').concat(a).concat(s,"\n </div>\n ")})).join("");return'<div style="'.concat("letter-spacing:0.5px;padding: 6px 2px;",'"><b style="').concat("color:#0B1117 !important; font-weight: 400 !important; font-size: 13px !important; line-height: 16px !important; display:block; margin-bottom: 16px; font-family: Inter !important;",'">').concat(i,'</b><span style="').concat("display:block;",'">').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=T.startDateTime,(T.endDateTime-t)/864e5);return Xl(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!=x?x:"")}},splitLine:{lineStyle:{color:"#E9EEF2",type:"dashed"}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}},min:0,max:S},series:I,toolbox:{show:!1},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0,brushType:"rect",brushMode:"single"},legend:{type:I.length>3?"scroll":"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"400",color:"#6D7C88",fontFamily:ar},symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,bottom:10,data:I.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return D}),[d,T,_,c,p,f,w,M,y]),te=function(e){if(null==e?void 0:e.current){$.current&&(e.current.off("brushEnd",$.current),$.current=null),setTimeout((function(){var t;try{null===(t=e.current)||void 0===t||t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}})}catch(e){console.error("Failed to activate brush:",e)}}),100);var t=function(e){try{if(e&&e.areas&&e.areas.length>0){var t=e.areas[0];if(t&&t.coordRange&&t.coordRange[0]&&Array.isArray(t.coordRange[0])){var n=t.coordRange[0],r=n[0],i=n[1];void 0!==r&&void 0!==i&&E(r,i)}}}catch(e){console.warn("Error handling brush selection:",e)}};$.current=t,e.current.on("brushEnd",t)}},ne=o((function(){var e;if(Q.current){Z.current||(Z.current=DM(Q.current,"light",{renderer:"canvas"})),D&&D(Z.current);var t=J(F);Z.current.setOption(t,!0),b===Cn.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=Z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==Q?void 0:Q.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),te(Z)})):(null===(e=Z.current)||void 0===e||e.resize({width:K()}),te(Z)),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=Oe([],q.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===q.current.length||q.current.length===s.length?[i]:q.current.includes(i)?q.current.filter((function(e){return e!==i})):Oe(Oe([],q.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})})),G(o)}))}(Z)}}),[F,J,K]);a((function(){var e=function(){return W(window.innerWidth)};return window.addEventListener("resize",e),ne(),function(){window.removeEventListener("resize",e),Z.current&&($.current&&(Z.current.off("brushEnd",$.current),$.current=null),Z.current.dispose(),Z.current=null)}}),[ne]),a((function(){q.current=j}),[j]),a((function(){var e;if(Z.current){var t=J(F);Z.current.setOption(t,!0),b===Cn.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=Z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==Q?void 0:Q.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),te(Z)})):(null===(e=Z.current)||void 0===e||e.resize({width:K()}),te(Z))}}),[c,X,F,P,K,J]);a((function(){var e;Z.current&&(b===Cn.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=Z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==Q?void 0:Q.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=Z.current)||void 0===e||e.resize({width:K()}))}),[V,K]);return t(x,Me({id:h,onClick:function(e){return e.stopPropagation()},className:O.metricPanel},{children:[t("span",Me({className:O.groupByContainer},{children:[(null===(r=null==c?void 0:c.layout)||void 0===r?void 0:r.type)===er&&!g&&e(x,Me({mr:.5},{children:e(ee,{children:"Show"})})),(null===(i=null==c?void 0:c.layout)||void 0===i?void 0:i.type)===er&&(p===hn.OUTLIER||p===hn.OUTLIER_TABLES||p===hn.OUTLIER_DB||C)&&Qi(m)&&e(x,Me({ml:1,mr:1},{children:e(z,Me({value:P,className:O.overrideMuiInput,menuProps:{PaperProps:{style:{minHeight:"50px",maxHeight:"250px"}}},dataTestId:"GraphView-GroupBySelect"},{children:null==m?void 0:m.map((function(t,n){var r;return e(S,Me({value:t,onClick:function(e){!function(e){var t;k(e),(null===(t=null==c?void 0:c.layout)||void 0===t?void 0:t.type)!==er||p!==hn.OUTLIER&&p!==hn.OUTLIER_TABLES&&p!==hn.OUTLIER_DB&&!C||null==A||A(e,c,!!C)}(t),e.stopPropagation()}},{children:null!==(r=Yn[t])&&void 0!==r?r:t}),n)}))}))})),Qi(N)&&((null===(s=null==c?void 0:c.layout)||void 0===s?void 0:s.type)===er||(null==N?void 0:N.length)>1)&&e(x,Me({mr:2},{children:e(z,Me({value:F,className:O.overrideMuiInput,dataTestId:"GraphView-MetricOperationSelect",menuProps:{PaperProps:{style:{minHeight:"50px",maxHeight:"250px"}}}},{children:null==N?void 0:N.map((function(t,n){return e(S,Me({value:t,onClick:function(e){!function(e){var t;if(U(e),(null===(t=null==c?void 0:c.layout)||void 0===t?void 0:t.type)===er&&p===hn.OVERALL&&Qi(f)&&(null==A||A(e,c,!!C)),Z.current){var n=J(e);Z.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))}))]})),e("div",{ref:Q,id:R,style:{overflow:"hidden",position:"relative",zIndex:1,minHeight:d===Sn.WEB?320:340,width:"100%",minWidth:0}})]}))})),Uz={exports:{}},zz=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)}},Hz=zz,Vz=Object.prototype.toString;function Wz(e){return"[object Array]"===Vz.call(e)}function Yz(e){return void 0===e}function jz(e){return null!==e&&"object"==typeof e}function Gz(e){if("[object Object]"!==Vz.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function qz(e){return"[object Function]"===Vz.call(e)}function Qz(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),Wz(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 Zz={isArray:Wz,isArrayBuffer:function(e){return"[object ArrayBuffer]"===Vz.call(e)},isBuffer:function(e){return null!==e&&!Yz(e)&&null!==e.constructor&&!Yz(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:jz,isPlainObject:Gz,isUndefined:Yz,isDate:function(e){return"[object Date]"===Vz.call(e)},isFile:function(e){return"[object File]"===Vz.call(e)},isBlob:function(e){return"[object Blob]"===Vz.call(e)},isFunction:qz,isStream:function(e){return jz(e)&&qz(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:Qz,merge:function e(){var t={};function n(n,r){Gz(t[r])&&Gz(n)?t[r]=e(t[r],n):Gz(n)?t[r]=e({},n):Wz(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)Qz(arguments[r],n);return t},extend:function(e,t,n){return Qz(t,(function(t,r){e[r]=n&&"function"==typeof t?Hz(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}},Xz=Zz;function $z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Kz=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(Xz.isURLSearchParams(t))r=t.toString();else{var i=[];Xz.forEach(t,(function(e,t){null!=e&&(Xz.isArray(e)?t+="[]":e=[e],Xz.forEach(e,(function(e){Xz.isDate(e)?e=e.toISOString():Xz.isObject(e)&&(e=JSON.stringify(e)),i.push($z(t)+"="+$z(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},Jz=Zz;function eH(){this.handlers=[]}eH.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},eH.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},eH.prototype.forEach=function(e){Jz.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var tH,nH,rH,iH,oH,aH,sH,lH,uH,cH,dH,hH,pH,fH,mH,vH,gH,yH,_H=eH,bH=Zz,xH=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 wH(){if(nH)return tH;nH=1;var e=xH;return tH=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)}}function SH(){if(iH)return rH;iH=1;var e=wH();return rH=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 TH(){if(aH)return oH;aH=1;var e=Zz;return oH=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(){}},oH}function CH(){return lH?sH:(lH=1,sH=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function IH(){return cH?uH:(cH=1,uH=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function MH(){if(hH)return dH;hH=1;var e=CH(),t=IH();return dH=function(n,r){return n&&!e(r)?t(n,r):r}}function EH(){if(fH)return pH;fH=1;var e=Zz,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 pH=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 AH(){if(vH)return mH;vH=1;var e=Zz;return mH=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 DH,OH,NH,RH,LH,PH={exports:{}},kH={exports:{}},BH={exports:{}};function FH(){if(OH)return DH;OH=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 DH=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))},DH}function UH(){if(RH)return NH;return RH=1,NH=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=FH(),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},NH}var zH,HH,VH,WH,YH,jH,GH,qH,QH,ZH={exports:{}};function XH(){return HH?zH:(HH=1,zH=(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 $H(){return YH||(YH=1,function(e,t){const n=fe,r=me;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} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}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(WH)return VH;WH=1;const e=ve,t=fe,n=XH(),{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)),VH={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=UH()(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)}}(ZH,ZH.exports)),ZH.exports}function KH(){return jH||(jH=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?kH.exports=(LH||(LH=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=UH()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(BH,BH.exports)),BH.exports):kH.exports=$H()),kH.exports}function JH(){if(QH)return PH.exports;QH=1;var e,t,n,r=de,i=r.URL,o=ue,a=ce,s=he.Writable,l=pe,u=function(){return qH||(qH=1,GH=function(){if(!e){try{e=KH()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),GH;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=D(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"],h=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);h.forEach((function(e){p[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=M("ERR_INVALID_URL","Invalid URL",TypeError),m=M("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),v=M("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",m),g=M("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=M("ERR_STREAM_WRITE_AFTER_END","write after end"),_=s.prototype.destroy||w;function b(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 m?e:new m({cause:e}))}},this._performRequest()}function x(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=C(e):A(e)?e=C(S(e)):(a=r,r=T(e),e={protocol:o}),D(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,A(r.host)||A(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new b(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(!A((t=T(r.parse(e))).protocol))throw new f({input:e});return t}function T(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 C(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 I(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 M(e,t,n){function r(n){D(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 E(e,t){for(var n of h)e.removeListener(n,p[n]);e.on("error",w),e.destroy(t)}function A(e){return"string"==typeof e||e instanceof String}function D(e){return"function"==typeof e}return b.prototype=Object.create(s.prototype),b.prototype.abort=function(){E(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},b.prototype.destroy=function(e){return E(this._currentRequest,e),_.call(this,e),this},b.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!A(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;D(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 g),this.abort()):n&&n()},b.prototype.end=function(e,t,n){if(D(e)?(n=e,e=t=null):D(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)},b.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},b.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},b.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){b.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(b.prototype,e,{get:function(){return this._currentRequest[e]}})})),b.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))}},b.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,h))i.on(o,p[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()}()}},b.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(E(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new v;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=[],I(/^content-/i,this._options.headers));var d=I(/^host$/i,this._options.headers),h=S(this._currentUrl),p=d||h.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(h,{host:p})),m=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",m.href),this._isRedirect=!0,C(m,this._options),(m.protocol!==h.protocol&&"https:"!==m.protocol||m.host!==p&&!function(e,t){l(A(e)&&A(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(m.host,p))&&I(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),D(a)){var g={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,g,y),this._sanitizeOptions(this._options)}this._performRequest()},PH.exports=x({http:o,https:a}),PH.exports.wrap=x,PH.exports}var eV,tV,nV={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 rV(){if(tV)return eV;tV=1;var e=Zz,t=SH(),n=MH(),r=Kz,i=ue,o=ce,a=JH().http,s=JH().https,l=de,u=ge,c=nV,d=wH(),h=xH,p=/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 eV=function(m){return new Promise((function(v,g){var y=function(e){v(e)},_=function(e){g(e)},b=m.data,x=m.headers;if("User-Agent"in x||"user-agent"in x?x["User-Agent"]||x["user-agent"]||(delete x["User-Agent"],delete x["user-agent"]):x["User-Agent"]="axios/"+c.version,b&&!e.isStream(b)){if(Buffer.isBuffer(b));else if(e.isArrayBuffer(b))b=Buffer.from(new Uint8Array(b));else{if(!e.isString(b))return _(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",m));b=Buffer.from(b,"utf-8")}x["Content-Length"]=b.length}var w=void 0;m.auth&&(w=(m.auth.username||"")+":"+(m.auth.password||""));var S=n(m.baseURL,m.url),T=l.parse(S),C=T.protocol||"http:";if(!w&&T.auth){var I=T.auth.split(":");w=(I[0]||"")+":"+(I[1]||"")}w&&delete x.Authorization;var M=p.test(C),E=M?m.httpsAgent:m.httpAgent,A={path:r(T.path,m.params,m.paramsSerializer).replace(/^\?/,""),method:m.method.toUpperCase(),headers:x,agent:E,agents:{http:m.httpAgent,https:m.httpsAgent},auth:w};m.socketPath?A.socketPath=m.socketPath:(A.hostname=T.hostname,A.port=T.port);var D,O=m.proxy;if(!O&&!1!==O){var N=C.slice(0,-1)+"_proxy",R=process.env[N]||process.env[N.toUpperCase()];if(R){var L=l.parse(R),P=process.env.no_proxy||process.env.NO_PROXY,k=!0;if(P)k=!P.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&T.hostname.substr(T.hostname.length-e.length)===e||T.hostname===e))}));if(k&&(O={host:L.hostname,port:L.port,protocol:L.protocol},L.auth)){var B=L.auth.split(":");O.auth={username:B[0],password:B[1]}}}}O&&(A.headers.host=T.hostname+(T.port?":"+T.port:""),f(A,O,C+"//"+T.hostname+(T.port?":"+T.port:"")+A.path));var F=M&&(!O||p.test(O.protocol));m.transport?D=m.transport:0===m.maxRedirects?D=F?o:i:(m.maxRedirects&&(A.maxRedirects=m.maxRedirects),D=F?s:a),m.maxBodyLength>-1&&(A.maxBodyLength=m.maxBodyLength);var U=D.request(A,(function(n){if(!U.aborted){var r=n,i=n.req||U;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==m.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:m,request:i};if("stream"===m.responseType)o.data=r,t(y,_,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,m.maxContentLength>-1&&s>m.maxContentLength&&(r.destroy(),_(d("maxContentLength size of "+m.maxContentLength+" exceeded",m,null,i)))})),r.on("error",(function(e){U.aborted||_(h(e,m,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==m.responseType&&(n=n.toString(m.responseEncoding),m.responseEncoding&&"utf8"!==m.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,_,o)}))}}}));if(U.on("error",(function(e){U.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||_(h(e,m,null,U))})),m.timeout){var z=parseInt(m.timeout,10);if(isNaN(z))return void _(d("error trying to parse `config.timeout` to int",m,"ERR_PARSE_TIMEOUT",U));U.setTimeout(z,(function(){U.abort(),_(d("timeout of "+z+"ms exceeded",m,m.transitional&&m.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",U))}))}m.cancelToken&&m.cancelToken.promise.then((function(e){U.aborted||(U.abort(),_(e))})),e.isStream(b)?b.on("error",(function(e){_(h(e,m,null,U))})).pipe(U):U.end(b)}))}}var iV=Zz,oV=function(e,t){bH.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},aV=xH,sV={"Content-Type":"application/x-www-form-urlencoded"};function lV(e,t){!iV.isUndefined(e)&&iV.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var uV,cV={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?uV=function(){if(yH)return gH;yH=1;var e=Zz,t=SH(),n=TH(),r=Kz,i=MH(),o=EH(),a=AH(),s=wH();return gH=function(l){return new Promise((function(u,c){var d=l.data,h=l.headers,p=l.responseType;e.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var m=l.auth.username||"",v=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+v)}var g=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:p&&"text"!==p&&"json"!==p?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(g,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 _=(l.withCredentials||a(g))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;_&&(h[l.xsrfHeaderName]=_)}"setRequestHeader"in f&&e.forEach(h,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete h[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),p&&"json"!==p&&(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)&&(uV=rV()),uV),transformRequest:[function(e,t){return oV(t,"Accept"),oV(t,"Content-Type"),iV.isFormData(e)||iV.isArrayBuffer(e)||iV.isBuffer(e)||iV.isStream(e)||iV.isFile(e)||iV.isBlob(e)?e:iV.isArrayBufferView(e)?e.buffer:iV.isURLSearchParams(e)?(lV(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):iV.isObject(e)||t&&"application/json"===t["Content-Type"]?(lV(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&&iV.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw aV(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}};cV.headers={common:{Accept:"application/json, text/plain, */*"}},iV.forEach(["delete","get","head"],(function(e){cV.headers[e]={}})),iV.forEach(["post","put","patch"],(function(e){cV.headers[e]=iV.merge(sV)}));var dV,hV,pV=cV,fV=Zz,mV=pV;function vV(){return hV?dV:(hV=1,dV=function(e){return!(!e||!e.__CANCEL__)})}var gV=Zz,yV=function(e,t,n){var r=this||mV;return fV.forEach(n,(function(n){e=n.call(r,e,t)})),e},_V=vV(),bV=pV;function xV(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var wV=Zz,SV=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 wV.isPlainObject(e)&&wV.isPlainObject(t)?wV.merge(e,t):wV.isPlainObject(t)?wV.merge({},t):wV.isArray(t)?t.slice():t}function l(r){wV.isUndefined(t[r])?wV.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}wV.forEach(r,(function(e){wV.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),wV.forEach(i,l),wV.forEach(o,(function(r){wV.isUndefined(t[r])?wV.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),wV.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 wV.forEach(c,l),n},TV=nV,CV={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){CV[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var IV={},MV=TV.version.split(".");function EV(e,t){for(var n=t?t.split("."):MV,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}CV.transitional=function(e,t,n){var r=t&&EV(t);function i(e,t){return"[Axios v"+TV.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&&!IV[o]&&(IV[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 AV,DV,OV,NV,RV,LV,PV,kV,BV={isOlderVersion:EV,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:CV},FV=Zz,UV=Kz,zV=_H,HV=function(e){return xV(e),e.headers=e.headers||{},e.data=yV.call(e,e.data,e.headers,e.transformRequest),e.headers=gV.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),gV.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||bV.adapter)(e).then((function(t){return xV(e),t.data=yV.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return _V(t)||(xV(e),t&&t.response&&(t.response.data=yV.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},VV=SV,WV=BV,YV=WV.validators;function jV(e){this.defaults=e,this.interceptors={request:new zV,response:new zV}}function GV(){if(DV)return AV;function e(e){this.message=e}return DV=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,AV=e}jV.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=VV(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&&WV.assertOptions(t,{silentJSONParsing:YV.transitional(YV.boolean,"1.0.0"),forcedJSONParsing:YV.transitional(YV.boolean,"1.0.0"),clarifyTimeoutError:YV.transitional(YV.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=[HV,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=HV(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},jV.prototype.getUri=function(e){return e=VV(this.defaults,e),UV(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},FV.forEach(["delete","get","head","options"],(function(e){jV.prototype[e]=function(t,n){return this.request(VV(n||{},{method:e,url:t,data:(n||{}).data}))}})),FV.forEach(["post","put","patch"],(function(e){jV.prototype[e]=function(t,n,r){return this.request(VV(r||{},{method:e,url:t,data:n}))}}));var qV=Zz,QV=zz,ZV=jV,XV=SV;function $V(e){var t=new ZV(e),n=QV(ZV.prototype.request,t);return qV.extend(n,ZV.prototype,t),qV.extend(n,t),n}var KV=$V(pV);KV.Axios=ZV,KV.create=function(e){return $V(XV(KV.defaults,e))},KV.Cancel=GV(),KV.CancelToken=function(){if(NV)return OV;NV=1;var e=GV();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}},OV=t}(),KV.isCancel=vV(),KV.all=function(e){return Promise.all(e)},KV.spread=LV?RV:(LV=1,RV=function(e){return function(t){return e.apply(null,t)}}),KV.isAxiosError=kV?PV:(kV=1,PV=function(e){return"object"==typeof e&&!0===e.isAxiosError}),Uz.exports=KV,Uz.exports.default=KV;var JV,eW,tW=Ka(Uz.exports),nW="undefined"!=typeof process&&process.env?process.env:{},rW="development"===nW.NODE_ENV,iW=null!==(JV=nW.REACT_APP_API_URL)&&void 0!==JV?JV:rW?"http://localhost:8080/api":"/api",oW=new Map;!function(e){e.fetchAnomalies="fetchAnomalies",e.fetchGraphs="fetchGraphs",e.fetchUniverseMetadataList="fetchUniverseMetadataList",e.deleteUniverseMetadata="deleteUniverseMetadata",e.updateUniverseMetadata="updateUniverseMetadata",e.fetchUniverseListDetails="fetchUniverseListDetails",e.fetchUniverseById="fetchUniverseById",e.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",e.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",e.fetchAnomaliesPage="fetchAnomaliesPage",e.fetchQueriesPage="fetchQueriesPage",e.fetchQueriesStatsPage="fetchQueriesStatsPage",e.fetchQueriesDatabases="fetchQueriesDatabases",e.fetchCustomerMetadataList="fetchCustomerMetadataList",e.fetchQueryStats="fetchQueryStats",e.fetchTablesPage="fetchTablesPage",e.fetchNamespaces="fetchNamespaces",e.deleteRuntimeConfig="deleteRuntimeConfig",e.fetchRuntimeConfigs="fetchRuntimeConfigs",e.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",e.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",e.updateRuntimeConfig="updateRuntimeConfig",e.fetchAnomalyGroups="fetchAnomalyGroups",e.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",e.fetchAnomalyGroupsById="fetchAnomalyGroupsById",e.getUniverseMetadata="getUniverseMetadata",e.fetchMetricsGraphs="fetchMetricsGraphs",e.fetchLoadDbStatsPage="fetchLoadDbStatsPage",e.fetchTabletsStatsPage="fetchTabletsStatsPage",e.fetchNodeLoadStatsPage="fetchNodeLoadStatsPage",e.sendTelemetryEvent="sendTelemetryEvent",e.fetchBackgroundTasks="fetchBackgroundTasks"}(eW||(eW={}));var aW=tW.create({baseURL:iW});aW.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===Sn.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===Sn.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===Sn.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var sW,lW,uW,cW,dW,hW,pW,fW,mW,vW=function(){this.fetchAnomalies=function(e,t,n,r){var i=Ki(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),aW.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=Ki(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!==Kn&&(u.category=a),Ki(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,aW.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=Ki(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),Ki(s)&&(h.query=s),l&&l!==Kn&&(h.dbName=l),h.sortBy=Ji(u)?"dbName":u,h.direction=Ji(c)?"DESC":c,h.offset=n*i,h.needTotalCount=!0,h.limit=i,aW.get(d,{params:h})},this.fetchLoadDbStatsPage=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=t.dbWaitEventType,h={};Qi(d)&&d.forEach((function(e){return h.eventTypes=e}));var p=Ki(r)?"".concat(r,"/universe/").concat(e,"/databases/stats/page"):"/universe/".concat(e,"/databases/stats/page");return o&&(h.startTime=o),a&&(h.endTime=a),(Ki(s)||l&&l!==Kn)&&(h.namespaceName=Ji(s)?l:s),h.sortBy=Ji(u)?"eps":u,h.direction=Ji(c)?"DESC":c,h.offset=n*i,h.needTotalCount=!0,h.limit=i,h.excludeSystemDBs=!1,h.groupEventsBy="TYPE",aW.get(p,{params:h})},this.fetchTabletStatsPage=function(e,t,n){var r=t.queryId,i=t.dbId,o=t.tableName,a=t.dbName,s=t.currentTablePage,l=t.apiUrl,u=t.pageSize,c=t.startTime,d=t.endTime,h=t.searchInput,p=t.sortBy,f=t.sortDirection,m={},v=n(),g=v.cluster,y=v.region,_=v.zone,b=v.node,x=new URLSearchParams;Ki(g)&&g!==Kn&&x.append("clusterUuids",g),Ki(y)&&y!==Kn&&x.append("regionCodes",y),Ki(_)&&_!==Kn&&x.append("azCodes",_),Ki(b)&&b!==Kn&&x.append("instanceNames",b);var w=Ki(l)?"".concat(l,"/universe/").concat(e,"/tablets/stats/page?").concat(x.toString()):"/universe/".concat(e,"/tablets/stats/page?").concat(x.toString());return c&&(m.startTime=c),d&&(m.endTime=d),(Ki(h)||h&&h!==Kn)&&(m.tableName=h),r&&Ki(r)&&(m.queryId=r),i&&Ki(i)&&(m.dbId=i),o&&Ki(o)&&(m.tableName=o),a&&Ki(a)&&(m.namespaceName=a),m.sortBy=Ji(p)?"eps":p,m.direction=Ji(f)?"DESC":f,m.offset=s*u,m.needTotalCount=!0,m.limit=u,m.groupEventsBy="TYPE",aW.get(w,{params:m})},this.fetchNodeLoadStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.sortBy,u=t.sortDirection,c=t.dbWaitEventType,d={},h=Ki(r)?"".concat(r,"/universe/").concat(e,"/nodes/stats/page"):"/universe/".concat(e,"/nodes/stats/page");return o&&(d.startTime=o),a&&(d.endTime=a),Qi(c)&&c.forEach((function(e){return d.eventTypes=e})),Ki(s)&&(d.name=s),d.sortBy=Ji(l)?"eps":l,d.direction=Ji(u)?"DESC":u,d.offset=n*i,d.needTotalCount=!0,d.limit=i,d.groupEventsBy="TYPE",aW.get(h,{params:d})},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.tabletId,h=t.instancesName,p=t.sortBy,f=t.sortDirection,m=t.queryType,v=t.groupByOperation,g=n(),y=g.cluster,_=g.region,b=g.zone,x=g.node,w=new URLSearchParams;if(Ki(y)&&y!==Kn&&w.append("clusterUuids",y),Ki(_)&&_!==Kn&&w.append("regionCodes",_),Ki(b)&&b!==Kn&&w.append("azCodes",b),Ki(x)&&x!==Kn?w.append("instanceNames",x):h&&Ki(h)&&w.append("instanceNames",h),Qi(r)){var S=v===xn.WAIT_EVENT_TYPE?"eventTypes":"events";r.forEach((function(e){return w.append(S,e)}))}var T=Ki(o)?"".concat(o,"/universe/").concat(e,"/queries/stats/page?").concat(w.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(w.toString()),C={};return m&&(C.queryType=m.toUpperCase()),s&&(C.startTime=s),l&&(C.endTime=l),Ki(u)&&(C.query=u),c&&c!==Kn&&(C.namespaceName=c),d&&Ki(d)&&(C.tabletId=d),v&&v===xn.WAIT_EVENT&&(C.groupEventsBy=In.waitEvent),C.sortBy=Ji(p)?"eps":p,C.direction=Ji(f)?"DESC":f,C.offset=i*a,C.needTotalCount=!0,C.limit=a,C.excludeTpUser=!0,aW.get(T,{params:C})},this.fetchNamespaceSchemas=function(e,t,n){var r=Ki(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return aW.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=Ki(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return aW.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,h=Ki(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),Ki(s)&&(p.tableName=s),l&&l!==Kn&&(p.namespaceName=l),u&&u!==Kn&&(p.schemaName=u),p.sortBy=Ji(c)?"namespaceName":c,p.direction=Ji(d)?"DESC":d,p.offset=n*i,p.needTotalCount=!0,p.limit=i,aW.get(h,{params:p})},this.fetchNamespaces=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return aW.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return aW.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Ki(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return aW.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n,r){var i=null!=r?r:"fetchGraphs-".concat(e),o=oW.get(i);o&&o.abort();var a=new AbortController;oW.set(i,a);var s=Ki(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),l=tW.CancelToken.source();return a.signal.addEventListener("abort",(function(){l.cancel("Request aborted"),oW.delete(i)})),aW.post(s,t,{cancelToken:l.token}).then((function(e){return oW.delete(i),e.data})).catch((function(e){throw oW.delete(i),e}))},this.fetchCustomerMetadataList=function(e){var t=Ki(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return aW.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Ki(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return aW.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Ki(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return aW.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Ki(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return aW.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Ki(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return aW.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return aW.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Ki(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return aW.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return aW.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=Ki(e)?"".concat(e,"/universe/details"):"/universe/details";return aW.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return aW.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return aW.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Ki(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return aW.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=Ki(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return aW.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=Ki(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return aW.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=Ki(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return aW.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=Ki(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return aW.delete(r).then((function(e){return e.data}))},this.fetchBackgroundTasks=function(e,t,n,r,i){var o=Ki(i)?"".concat(i,"/universe/").concat(e,"/background_tasks"):"/universe/".concat(e,"/background_tasks"),a={};return t&&(a.startTime=t),n&&(a.endTime=n),null!==r&&(a.limit=r),aW.get(o,{params:a}).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{};Ki(r)&&d.append("anomalyType",r),Ki(s)&&s!==Kn&&d.append("clusterUuids",s),Ki(l)&&l!==Kn&&d.append("regionCodes",l),Ki(u)&&u!==Kn&&d.append("azCodes",u),Ki(c)&&c!==Kn&&d.append("instanceNames",c);var h=Ki(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return aW.get(h).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=Ki(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 aW.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=Ki(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 aW.get(o).then((function(e){return e.data}))},this.sendTelemetryEvent=function(e,t,n){var r=Ki(n)?"".concat(n,"/universe/").concat(e,"/ui_events"):"/universe/".concat(e,"/ui_events");return aW.post(r,t).then((function(e){return e.data}))}},gW=new vW;function yW(){return yW=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},yW.apply(null,arguments)}const _W=e=>r.createElement("svg",yW({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),sW||(sW=r.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),lW||(lW=r.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),uW||(uW=r.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),cW||(cW=r.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),dW||(dW=r.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),hW||(hW=r.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),pW||(pW=r.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),fW||(fW=r.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),mW||(mW=r.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},r.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),r.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var bW="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",xW=E(te)((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)}}})),wW=function(n){var r,i,o,s=n.appName,c=n.timezone,d=n.startTime,h=n.endTime,p=n.dateTimeRange,f=n.metricMeasure,m=n.anomalyData,g=n.getClusterDetails,y=n.apiUrl,_=n.amomalyGraphRequestParams,b=n.formattedAnomalyRca,w=n.urlParams,S=n.onEChartsDateSelect,T=u([]),C=xi(),I=l(0),M=I[0],E=I[1],A=l(null),D=A[0],O=A[1],N=l(_),R=N[0],L=N[1],P=g(),k=P.universeUuid,B=P.cluster,F=P.region,U=P.zone,z=P.node,H=P.numNodes,V=P.outlierType,W=Lz(f),Y=function(e,t,n){var r,i,o=xn.WAIT_EVENT_COMPONENT;if("Class"===e?o=xn.WAIT_EVENT_CLASS:"Type"===e?o=xn.WAIT_EVENT_TYPE:"Event"===e?o=xn.WAIT_EVENT:"Query"===e?o=xn.QUERY_ID:"Client IP"===e&&(o=xn.CLIENT_NODE_IP),(null===(r=null==m?void 0:m.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==m?void 0:m.lastInstance)||void 0===i?void 0:i.category)!==yn.DB){var a=JSON.parse(JSON.stringify(R)),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})),L(a),j.mutate(a)}};a((function(){var e;W&&W!==f&&O(null);var t=JSON.parse(JSON.stringify(R)),n=g(),r=Ia(!1,!1,0,n,t,Me(Me({},w),{type:null!==(e=w.type)&&void 0!==e?e:null})),i=null!=r?r:R;L(i),j.mutate(i)}),[f,d,h,F,B,U,z,V,H]);var j=v({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return gW.fetchGraphs(k,e,y,"fetchAnomalyGraphs")},onSuccess:function(e){O(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),G=null===(o=null===(i=null===(r=null==j?void 0:j.error)||void 0===r?void 0:r.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error,q=function(t,n,r,i,o,a){return e(x,Me({mr:8},{children:e(Fz,{metricData:t,metricKey:t.name,graphTitle:a,containerWidth:null,dateTimeRange:p,metricMeasure:f,operations:n,groupByOperations:r,registerChartInstance:function(e){return Z(e,o)},isRecommendationGraph:!0,appName:s,graphType:i,timezone:c,onSelectAshLabel:Y,onEChartsDateSelect:S},"".concat(f,"-").concat(t.name))}))},Q=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.length)>0}));a((function(){T.current=[]}),[f]);var Z=function(e,t){T.current[t]=e};return a((function(){return j.isSuccess&&D&&D.length>0&&OM(T.current),function(){NM(T.current)}}),[j.isSuccess,D,M]),e(x,{children:t(x,{children:[j.isLoading&&e(x,Me({mt:2,className:C.loadingBox},{children:e(_W,{className:Re(C.icon,C.inProgressIcon)})})),j.isError&&t(x,Me({mt:4},{children:[(s===Sn.YBA||s===Sn.WEB)&&e(ke,{customErrorMessage:Ki(G)?G:hi.RCA_GRAPHS_FETCH_ERROR}),s===Sn.YBM&&e(ne,{text:Ki(G)?G:hi.RCA_GRAPHS_FETCH_ERROR})]})),j.isSuccess&&e(x,{children:Qi(D)&&Qi(Q)&&t(x,{children:[e(re,Me({pill:!0,value:M,onChange:function(e,t){var n=window.scrollY;E(t),setTimeout((function(){return window.scrollTo(0,n)}),0)}},{children:null==Q?void 0:Q.map((function(t,n){return e(xW,{value:n,label:t.cause,className:C.causeTabButton},n)}))})),null==Q?void 0:Q.map((function(n,r){var i,o;return e(x,Me({role:"tabpanel",hidden:M!==r,id:"tabpanel-".concat(r),"aria-labelledby":"tab-".concat(r),style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF",padding:"16px"}},{children:M===r&&t(x,Me({mt:2,display:"flex",flexDirection:"column"},{children:[e("span",Me({className:C.causeText},{children:n.cause})),t(x,Me({mt:1},{children:[e("img",{src:bW,alt:"path"}),e("span",Me({className:C.descriptionText},{children:n.description}))]})),e(x,Me({mt:2,className:(null===(i=null==n?void 0:n.name)||void 0===i?void 0:i.length)>1?Re(C.gridBox,C.gridBoxDouble):""},{children:null===(o=null==n?void 0:n.name)||void 0===o?void 0:o.map((function(t,i){var o,a,s,l=null==D?void 0:D.find((function(e,r){return r>0&&(null==e?void 0:e.name)===t&&n.index.includes(r)})),u=1===(null===(o=null==n?void 0:n.name)||void 0===o?void 0:o.length),c=null===(a=n.groupByControl)||void 0===a?void 0:a[0];if(Ki(null!==(s=null==l?void 0:l.errorMessage)&&void 0!==s?s:""))return e(x,{});var d=Ta(f,l,Cn.MULTI_SUPPORTING,c,_);return e(x,Me({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:u?"0px":"16px"}},{children:q(l,d.uniqueOperations,d.groupByOperations,u?Cn.SINGLE_SUPPORTING:Cn.MULTI_SUPPORTING,r+i,n.title)}))}))}))]}))}),r)}))]})})]})})};var SW=/\s/;var TW=/^\s+/;function CW(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&SW.test(e.charAt(t)););return t}(e)+1).replace(TW,""):e}var IW=/^[-+]0x[0-9a-f]+$/i,MW=/^0b[01]+$/i,EW=/^0o[0-7]+$/i,AW=parseInt;function DW(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Yi(e)&&"[object Symbol]"==Wi(e)}(e))return NaN;if(Oi(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Oi(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=CW(e);var n=MW.test(e);return n||EW.test(e)?AW(e.slice(2),n?2:8):IW.test(e)?NaN:+e}var OW=function(){return Pi.Date.now()},NW=Math.max,RW=Math.min;function LW(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(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 m(){var e=OW();if(f(e))return v(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?RW(n,o-(e-u)):n}(e))}function v(e){return s=void 0,h&&r?p(e):(r=i=void 0,a)}function g(){var e=OW(),n=f(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(m,t),c?p(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=DW(t)||0,Oi(n)&&(c=!!n.leading,o=(d="maxWait"in n)?NW(DW(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),g.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},g.flush=function(){return void 0===s?a:v(OW())},g}var PW,kW="EMPTY_EVENT",BW=function(t){var n=t.data,r=t.maxEPS,i=t.groupByOperation,o=t.isTabletAnomaly,s=void 0!==o&&o,l=u(null);return a((function(){if(l.current){var e=DM(l.current),t=n.map((function(e){return i===xn.WAIT_EVENT?e.waitEvent:e.waitEventType})),o=n.reduce((function(e,t){return e+t.eps}),0),a=Math.max(0,r-o),s=[];t.forEach((function(e,t){var r;s.push({name:e,type:"bar",stack:"total",label:{show:!1},data:[n[t].eps],itemStyle:{color:null!==(r=li[e])&&void 0!==r?r:si[t]}})})),a>0&&s.push({name:kW,type:"bar",stack:"total",label:{show:!1},data:[a],itemStyle:{color:li[kW]},silent:!0,tooltip:{show:!1}});var u={animation:!1,grid:{left:0,right:0,top:10,bottom:10,containLabel:!1},tooltip:{trigger:"item",confine:!1,extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:10000 !important;",formatter:function(e){var t=Aa(e.color,e.seriesName),n=Da(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:r},yAxis:{type:"category",data:[""],show:!1},series:s};e.setOption(u);var c=new ResizeObserver((function(){e.resize()}));return c.observe(l.current),function(){c.disconnect(),e.dispose()}}}),[n,i,r]),e("div",{className:"query-events-chart-container",ref:l,style:{height:"".concat(40,"px"),width:s?"75%":"100%",display:"flex",alignItems:"center",justifyContent:"center"}})},FW=b((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"}}}})),UW=function(t){var n;t.appName;var r=t.columns,i=t.hiddenColumns,o=t.isDbLoadMetadataColumns,s=void 0!==o&&o,l=t.isTabletsMetadataColumns,u=void 0!==l&&l,c=t.isNodeLoadMetadataColumns,d=void 0!==c&&c,h=t.onColumnVisibilityChange,p=t.close,f=FW(),m=pi;u?m=mi:s?m=fi:d&&(m=gi);var v=JSON.parse(null!==(n=sessionStorage.getItem(m))&&void 0!==n?n:"[]"),g=r.reduce((function(e,t){var n;return e[t.name]=v.length>0?v.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),y=un({defaultValues:g}),_=y.control,b=y.handleSubmit,w=y.reset;a((function(){w(g)}),[r,w]);var S=function(){p()};return e(ie,Me({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:S,onSubmit:b((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;h(i,r),r&&t.push(i)})),sessionStorage.setItem(m,JSON.stringify(t)),S()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e(x,{children:e(x,Me({className:f.itemsContainer},{children:r.map((function(t){return i.includes(t.name)?null:e(x,Me({className:f.item},{children:e(uo,{name:t.name,label:t.label,control:_,dataTestId:t.name,className:f.checkbox})}),t.name)}))}))})}))},zW="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";function HW(){return HW=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},HW.apply(null,arguments)}const VW=e=>r.createElement("svg",HW({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),PW||(PW=r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M0 0h24v24H0z"}),r.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 WW;function YW(){return YW=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},YW.apply(null,arguments)}const jW=e=>r.createElement("svg",YW({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),WW||(WW=r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M0 0h24v24H0z"}),r.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 GW,qW="databaseName",QW="eps",ZW="events",XW="schemaName",$W="tableName",KW="tabletId",JW="totalEpsRatio",eY="universeId",tY="partition",nY="Database",rY="Avg Active Context",iY="Wait Event Types",oY="Schema",aY="Table",sY="Tablet ID",lY="Total Load",uY="Partition",cY=function(r){var i,o,s,d,h,p,f,m,v,y=r.universeUuid,_=r.appName,b=r.apiUrl,w=r.startTime,S=r.endTime,T=r.getClusterDetails,C=r.queryId,M=r.dbId,E=xi(),O=l(!1),N=O[0],R=O[1],L=l(""),P=L[0],k=L[1],B=l(""),F=B[0],z=B[1],H=l([]),V=H[0],W=H[1],Y=l(!1),j=Y[0],G=Y[1],q=l(wr[0]),X=q[0],$=q[1],K=l(0),J=K[0],ee=K[1],te=l(0),re=te[0],ie=te[1],ae=l(1),se=ae[0],le=ae[1],ue=l(On.DESC),ce=ue[0],de=ue[1],he=l([]),pe=he[0],fe=he[1],me=l(QW),ve=me[0],ge=me[1],_e=u(LW((function(e){k(e),ee(0)}),500)),be=u(""),xe=T(),we=xe.cluster,Se=xe.region,Te=xe.zone,Ce=xe.node,Ie=c((function(){return JSON.stringify({cluster:we,region:Se,zone:Te,node:Ce})}),[we,Se,Te,Ce]),Ee=c((function(){return[eW.fetchTabletsStatsPage,y,X,w,S,P,ve,ce,C,Ie]}),[y,X,w,S,P,ve,ce,C,Ie]),Ae=g(Ee,(function(e){var t=e.pageParam,n=void 0===t?0:t;return gW.fetchTabletStatsPage(y,{queryId:C,dbId:M,currentTablePage:n,apiUrl:b,pageSize:X,startTime:w,endTime:S,searchInput:P,sortBy:ve,sortDirection:ce},T)}),{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,h,p,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:[]}));ve===QW&&!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)&&ce===On.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)&&le(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 m=La(f);fe(m),ie(null!==(p=null===(h=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===h?void 0:h.totalCount)&&void 0!==p?p:0)}}),De=Ae.isFetching;Ae.isSuccess;var Oe=Ae.isError,Ne=Ae.error,Le=Ae.fetchNextPage,Pe=Ae.hasNextPage,Be=Ae.isFetchingNextPage,Fe=Ae.data;a((function(){var e,t,n;if(void 0!==Pe&&(null===(e=null==Fe?void 0:Fe.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==Fe?void 0:Fe.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;Pe&&!Be&&J===r&&J>=0&&Le()}}),[Pe,Le,J,Be,null===(i=null==Fe?void 0:Fe.pages)||void 0===i?void 0:i.length]),a((function(){Oe&&fe([])}),[Oe]),a((function(){var e=JSON.stringify(Ee);be.current&&be.current!==e&&ee(0),be.current=e}),[Ee]),a((function(){return function(){_e.current.cancel()}}),[]);var Ue=De,ze=c((function(){var e;return bi(Le,"Rows per page:",null!==(e=null==pe?void 0:pe.length)&&void 0!==e?e:0,Pe)}),[Le,null==pe?void 0:pe.length,Pe]),He=c((function(){return{sorting:ve?[{id:ve,desc:ce===On.DESC}]:[],pagination:{pageIndex:J,pageSize:X},isLoading:Ue,showProgressBars:Ue}}),[ve,ce,J,X,Ue]);return a((function(){var n,r,i=sessionStorage.getItem(mi),o=i?JSON.parse(i):null;W([{name:eY,label:"",options:{sort:!1,display:!1,filter:!1}},{name:JW,label:lY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_EPS_RATIO_QUERY_LEVEL_TABLET_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:lY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:QW,label:rY,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customHeadRender:function(){return e(Q,Me({title:ui.ACTIVE_SESSIONS_PER_SECOND_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:rY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:ZW,label:iY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,minWidth:"15%",maxWidth:"26%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.WAIT_EVENT_TYPE_CHART_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:iY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},customBodyRender:function(t){return e(BW,{data:null!=t?t:[],maxEPS:se,groupByOperation:xn.WAIT_EVENT_TYPE})}}},{name:qW,label:nY,options:{sort:!1,display:null!==(n=null==o?void 0:o.includes(qW))&&void 0!==n&&n,customHeadRender:function(){return e(Q,Me({title:ui.DATABASE_NAME_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:nY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},customBodyRender:function(e){return Ki(e)?e:"-"}}},{name:$W,label:aY,options:{sort:!0,display:!0,customHeadRender:function(){return e(Q,Me({title:ui.TABLE_NAME_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:aY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Ki(e)?e:"-"}}},{name:XW,label:oY,options:{sort:!1,display:null!==(r=null==o?void 0:o.includes(XW))&&void 0!==r&&r,customHeadRender:function(){return e(Q,Me({title:ui.SCHEMA_NAME_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:oY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{width:"8%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Ki(e)?e:"-"}}},{name:KW,label:sY,options:{sort:!1,display:!0,customHeadRender:function(){return e(Q,Me({title:ui.TABLET_ID_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:sY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{width:"21%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(n){if(!Ki(n))return"-";var r=n.length>20?"".concat(n.substring(0,20),"..."):n;return t(x,Me({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e(Q,Me({title:n,placement:"top",arrow:!0},{children:e(x,Me({component:"span",style:{display:"inline-block",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"100%"}},{children:r}))})),e(Q,Me({title:N?"Copied":"Copy",open:!!N||void 0},{children:e("img",{src:Ga,alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(n),R(!0),setTimeout((function(){return R(!1)}),2e3)}})}))]}))}}},{name:tY,label:uY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"10%",maxWidth:"20%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.PARTITION_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:uY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Ki(e)?e:"-"}}}])}),[pe,se,N]),t(n,{children:[j&&e(UW,{appName:_,hiddenColumns:[eY,JW,QW,ZW,$W,KW],columns:V,isTabletsMetadataColumns:!0,onColumnVisibilityChange:function(e,t){W((function(n){return n.map((function(n){return n.name===e?Me(Me({},n),{options:Me(Me({},n.options),{display:t})}):n}))}))},close:function(){return G(!1)}}),t(x,Me({className:Re(E.mainContainer,E.mainContainerBorder)},{children:[e(x,Me({className:E.headerContainer},{children:e(I,Me({variant:"h5"},{children:"Tables and Tablets Accessed"}))})),t(x,Me({className:E.metadataContainer},{children:[t(x,Me({className:E.loadFilterContainer},{children:[e(U,{dataTestId:"AccessedTablets-SearchInput",placeholder:"Filter Table",className:E.ybSearchInput,onChange:function(e){var t=e.target.value;z(t),_e.current(t)},value:F,inputProps:{"data-testid":"AccessedTablets-SearchInput"},InputProps:{startAdornment:e(A,Me({position:"start"},{children:e(jW,{})})),endAdornment:!!F&&e(A,Me({position:"end"},{children:e(D,Me({size:"small",onClick:function(){_e.current.cancel(),k(""),z(""),ee(0)},"data-testid":"AccessedTablets-ClearButton"},{children:e(ye,{fontSize:"small"})}))}))}}),e(Z,Me({size:"medium",variant:_===Sn.YBM?"ghost":"secondary",startIcon:e(VW,{style:{marginBottom:"2px"}}),onClick:function(){return G(!0)},dataTestId:"AccessedTablets-AddFieldsButton"},{children:di}))]})),e(x,{children:t(x,Me({className:_===Sn.YBM?E.overrideMuiTableContainer:E.overrideMuiTableContainerWeb},{children:[Oe&&t(x,Me({mt:3,className:E.recommendation},{children:[(_===Sn.YBA||_===Sn.WEB)&&e(ke,{customErrorMessage:Ki(null===(s=null===(o=null==Ne?void 0:Ne.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error)?null===(h=null===(d=null==Ne?void 0:Ne.response)||void 0===d?void 0:d.data)||void 0===h?void 0:h.error:hi.TABLETS_DATA_FETCH_ERROR}),_===Sn.YBM&&e(ne,{text:Ki(null===(f=null===(p=null==Ne?void 0:Ne.response)||void 0===p?void 0:p.data)||void 0===f?void 0:f.error)?null===(v=null===(m=null==Ne?void 0:Ne.response)||void 0===m?void 0:m.data)||void 0===v?void 0:v.error:hi.TABLETS_DATA_FETCH_ERROR})]})),e(oe,{id:"AccessedTablets",className:E.overrideMuiTable,data:null!=pe?pe:[],columns:null==V?void 0:V.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:Ue,options:{sort:!0,filter:!0,count:re,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:X,rowsPerPage:X,autoResetPageIndex:!1,onChangePage:function(e){ee(e)},onChangeRowsPerPage:function(e){$(e),ee(0)},textLabels:{body:{noMatch:"There are no tablets accessed by the current query"}},rowsPerPageOptions:wr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(ve?[{id:ve,desc:ce===On.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return ge(QW),de(On.DESC),void ee(0);var n=t[0],r=n.id,i=n.desc?On.DESC:On.ASC;ge(r),de(i),ee(0)},paginationDisplayMode:"custom",customFooter:ze,manualSorting:!0,state:He}},"AccessedTablets-".concat(ve,"-").concat(ce))]}))})]}))]}))]})},dY=E(te)((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)}}})),hY=function(r){var i,o,s,c,d,h,p,f,m,g,y,_,b,w,S,T=r.metricMeasure,C=r.anomalyData,M=r.apiUrl,E=r.universeQueryStatsData,A=r.appName,D=r.sqlTab,O=r.timezone,N=r.urlParams,R=r.dateTimeRange,L=r.amomalyGraphRequestParams,P=r.formattedAnomalyRca,k=r.getClusterDetails,B=r.onEChartsDateSelect,F=xi(),U=u([]),z=l(null),H=z[0],V=z[1],W=l([]),Y=W[0],j=W[1],G=l(Vn.PERFORMANCE_METRICS),q=G[0],Q=G[1],Z=k(),X=Z.universeUuid,$=Z.cluster,K=Z.region,J=Z.zone,ee=Z.node,te=Z.numNodes,ie=Z.outlierType,oe=function(e,t,n){void 0===n&&(n=!1);var r=xn.WAIT_EVENT_COMPONENT;"Class"===e?r=xn.WAIT_EVENT_CLASS:"Type"===e?r=xn.WAIT_EVENT_TYPE:"Event"===e?r=xn.WAIT_EVENT:"Query"===e?r=xn.QUERY_ID:"Client IP"===e&&(r=xn.CLIENT_NODE_IP);var i=JSON.parse(JSON.stringify(Y)),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})),j(i),ae.mutate(i)},ae=v({mutationKey:["fetchHistoricalQueryGraphs",X],mutationFn:function(e){return gW.fetchGraphs(X,e,M)},onSuccess:function(e){V(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),se=null===(s=null===(o=null===(i=null==ae?void 0:ae.error)||void 0===i?void 0:i.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error;a((function(){var e,t=Ia(!0,!1,0,k(),null,Me(Me({},N),{type:null!==(e=N.type)&&void 0!==e?e:null}),C);t&&(j(t),ae.mutate(t))}),[T,null==R?void 0:R.endDateTime,null==R?void 0:R.startDateTime,K,$,J,ee,ie,te]);var le=function(e,t){U.current[t]=e};a((function(){U.current=[]}),[T]),a((function(){return ae.isSuccess&&H&&H.length>0&&U.current.length===H.length&&OM(U.current),function(){NM(U.current)}}),[ae.isSuccess,H]);var ue=function(){var e,t;return C?{dbId:null===(e=ma(C))||void 0===e?void 0:e.dbId,queryId:null===(t=ma(C))||void 0===t?void 0:t.queryId}:{dbId:null==N?void 0:N.dbId,queryId:null==N?void 0:N.queryId}};return t(n,{children:[t(x,Me({mt:3},{children:[ae.isLoading&&e(x,Me({mt:2,className:F.loadingBox},{children:e(_W,{className:Re(F.icon,F.inProgressIcon)})})),ae.isError&&t(x,Me({mt:4},{children:[(A===Sn.YBA||A===Sn.WEB)&&e(ke,{customErrorMessage:Ki(se)?se:hi.QUERIES_GRAPHS_FETCH_ERROR}),A===Sn.YBM&&e(ne,{text:Ki(se)?se:hi.QUERIES_GRAPHS_FETCH_ERROR})]})),ae.isSuccess&&D===Hn.QUERY_OVERVIEW&&t(x,{children:[e(x,Me({className:Re(F.gridBox,F.gridBoxSingle),mb:5},{children:null==H?void 0:H.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 r,i,o=Ta(T,t,Cn.SINGLE_SUPPORTING,!0,Y,!0),a=null===(r=null==t?void 0:t.name)||void 0===r?void 0:r.startsWith("active_session_history"),s=t.name;if(a){var l=t.layout.metadata,u=l.currentGroupBy,c=null===(i=l.supportedGroupBy.find((function(e){return e.label===u[0]})))||void 0===i?void 0:i.name;c&&o.groupByOperations.sort((function(e,t){return e===c?-1:t===c?1:0}))}return e(x,Me({id:"HistoricalQueryView-ash-".concat(T,"-").concat(n)},{children:e(x,Me({style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF"}},{children:e(Fz,{metricData:t,metricKey:s,dateTimeRange:R,containerWidth:null,metricMeasure:T,operations:T===hn.OVERALL?[]:o.uniqueOperations,registerChartInstance:function(e){return le(e,n)},graphType:Cn.MULTI_SUPPORTING,groupByOperations:o.groupByOperations,appName:A,timezone:O,queryData:E,onSelectAshLabel:oe,isHistoricalQueryView:!0,onEChartsDateSelect:B,showTitle:!0},"".concat(T,"-").concat(s))}))}),"HistoricalQueryView-ash-".concat(T,"-").concat(n))}))})),!C&&e(re,Me({pill:!0,value:q,onChange:function(e,t){t!==q&&Q(t)}},{children:e(dY,{value:Vn.PERFORMANCE_METRICS,label:Vn.PERFORMANCE_METRICS})})),!C&&q===Vn.PERFORMANCE_METRICS&&e(x,Me({className:Re(F.gridBox,F.gridBoxThree)},{children:null==H?void 0:H.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 r=Ta(T,t,Cn.SINGLE_SUPPORTING,!0,Y,!0),i=t.name;return e(x,Me({id:"HistoricalQueryView-".concat(T,"-").concat(n)},{children:e(x,Me({style:{border:"1px solid #E9EEF2",borderRadius:"8px",backgroundColor:"#FFFFFF",marginTop:"16px",marginBottom:"16px"}},{children:e(Fz,{metricData:t,metricKey:i,dateTimeRange:R,containerWidth:null,metricMeasure:T,operations:T===hn.OVERALL?[]:r.uniqueOperations,registerChartInstance:function(e){return le(e,n)},graphType:Cn.MULTI_SUPPORTING,groupByOperations:r.groupByOperations,appName:A,timezone:O,queryData:E,onSelectAshLabel:oe,isHistoricalQueryView:!0,onEChartsDateSelect:B,showTitle:!0},"".concat(T,"-").concat(i))}))}),"HistoricalQueryView-".concat(T,"-").concat(n))}))}))]})]})),e(x,{children:e(cY,{appName:A,getClusterDetails:k,universeUuid:X,apiUrl:M,queryId:null!==(d=null===(c=ue())||void 0===c?void 0:c.queryId)&&void 0!==d?d:null,dbId:null!==(p=null===(h=ue())||void 0===h?void 0:h.dbId)&&void 0!==p?p:null,startTime:null!==(m=null===(f=null==R?void 0:R.startDateTime)||void 0===f?void 0:f.toISOString())&&void 0!==m?m:null,endTime:null!==(y=null===(g=null==R?void 0:R.endDateTime)||void 0===g?void 0:g.toISOString())&&void 0!==y?y:null})}),C&&t(x,Me({mt:2},{children:[e(I,Me({variant:"h5"},{children:"Possible Causes"})),e(x,Me({mt:1},{children:e(wW,{appName:A,timezone:O,startTime:null!==(b=null===(_=null==R?void 0:R.startDateTime)||void 0===_?void 0:_.toISOString())&&void 0!==b?b:null,endTime:null!==(S=null===(w=null==R?void 0:R.endDateTime)||void 0===w?void 0:w.toISOString())&&void 0!==S?S:null,anomalyData:C,getClusterDetails:k,apiUrl:M,dateTimeRange:R,metricMeasure:T,amomalyGraphRequestParams:L,formattedAnomalyRca:P,onEChartsDateSelect:B,urlParams:N})}))]}))]})},pY=[{value:"ALL",label:"All Event Types"},{value:_i,label:_i},{value:yi,label:yi}],fY=le((function(e){return{dbSelectorBox:{gap:e.spacing(2)}}})),mY=function(n){var r,i=n.outlierType,o=n.numNodes,s=n.waitEventType,u=n.isDbClusterLoadView,c=void 0===u||u,d=n.onChangeDbWaitEventType,h=n.onOutlierTypeSelected,p=n.onNumNodesChanged,f=fY(),m=l(0),v=m[0],g=m[1];a((function(){g(s===Xn.CPU.toUpperCase()?2:s===Xn.IO.toUpperCase()?1:0)}),[s]);var y=pY.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){d(e.value),g(t)},buttonProps:{dataTestId:"DbLoadHeader-DbSelector-".concat(e.value)}}}));return t(x,Me({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e(Di,{outlierType:i,metricOutlierSelectors:mr,onOutlierTypeSelected:h,onNumNodesChanged:p,selectedNumNodes:o,showNumNodesInput:!1,showNumNodesSelector:!0}),e(I,Me({variant:"body2",style:{marginRight:"16px"}},{children:c?"databases":"nodes"})),t(x,Me({display:"flex",flexDirection:"row",className:f.dbSelectorBox},{children:[e("img",{src:Za,alt:"Divider"}),e(W,{divider:!0,buttons:y,dataTestId:"DbLoadHeader-DbSelector",value:null===(r=pY[v])||void 0===r?void 0:r.value})]}))]}))};function vY(){return vY=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},vY.apply(null,arguments)}const gY=e=>r.createElement("svg",vY({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),GW||(GW=r.createElement("path",{d:"M10 2h1.867c.746 0 1.12 0 1.405.145.25.128.455.332.583.583.145.285.145.659.145 1.405V6m-8 8H4.133c-.746 0-1.12 0-1.405-.145a1.334 1.334 0 0 1-.583-.583C2 12.987 2 12.613 2 11.867V10m1.66-3.333h1.347c.581 0 .872 0 1.093-.113.196-.1.354-.258.454-.454.113-.221.113-.512.113-1.093V3.66c0-.58 0-.87-.113-1.093a1.037 1.037 0 0 0-.454-.453C5.88 2 5.588 2 5.007 2H3.66c-.58 0-.87 0-1.093.113-.195.1-.354.258-.453.453C2 2.788 2 3.078 2 3.66v1.348c0 .581 0 .872.113 1.093.1.196.258.354.453.454.222.113.512.113 1.093.113ZM10.992 14h1.348c.58 0 .87 0 1.093-.113.195-.1.354-.258.453-.453.113-.222.113-.512.113-1.093v-1.348c0-.581 0-.872-.113-1.093a1.038 1.038 0 0 0-.453-.454c-.222-.113-.512-.113-1.093-.113h-1.348c-.581 0-.872 0-1.093.113-.196.1-.354.258-.454.454-.113.221-.113.512-.113 1.093v1.348c0 .58 0 .87.113 1.093.1.195.258.354.454.453.221.113.512.113 1.093.113Z",stroke:"#6D7C88",strokeLinecap:"round",strokeLinejoin:"round"})));var yY=b((function(){return{selectBox:{width:"168px"},overrideMuiInput:{height:"32px","& .MuiMenu-list":{maxHeight:"250px"}}}})),_Y=function(r){var i,o,s,d,h,p,f,m,y,_=r.dbWaitEventType,b=r.name,w=r.apiUrl,T=r.appName,C=r.startTime,M=r.endTime,E=r.universeUuid,O=r.groupByOperation,N=void 0===O?xn.WAIT_EVENT_TYPE:O,R=r.isDbLoadMetadata,L=void 0!==R&&R,P=r.isNodeLoadMetadata,k=void 0!==P&&P,B=r.isTabletLoadMetadata,F=void 0!==B&&B,H=r.onSelectedQuery,V=r.onSetGroupByOperation,W=r.onNavigateToUrl,Y=xi(),j=yY(),G=Le(),q=u(LW((function(e){Te(e)}),500)),$=l(null),K=$[0],J=$[1],te=l(On.DESC),re=te[0],ie=te[1],ae=l(!1),se=ae[0],le=ae[1],ue=l([]),ce=ue[0],de=ue[1],he=l(1),pe=he[0],fe=he[1],me=l([]),ve=me[0],ge=me[1],_e=l(Zn.EPS),be=_e[0],xe=_e[1],we=l(""),Se=we[0],Te=we[1],Ce=l(""),Ie=Ce[0],Ee=Ce[1],Ae=null,De=function(){return{cluster:"",region:"",zone:"",node:""}},Oe=c((function(){return[eW.fetchQueriesStatsPage,E,C,M,b,Se,_,be,re,Ae,N]}),[E,C,M,b,Se,_,be,re,Ae,N]),Ne=function(e){null!==e.target.closest("button")&&e.stopPropagation()},Pe=v((function(e){return gW.sendTelemetryEvent(E,e,w)})),Be=g(Oe,(function(){return gW.fetchQueriesStatsPage(E,Me(Me(Me(Me({currentTablePage:0,apiUrl:w,pageSize:5,startTime:C,endTime:M,searchInput:Se},L&&{database:b}),k&&{instancesName:b}),F&&{tabletId:b}),{sortBy:be,sortDirection:re,queryType:Ae,groupByOperation:N}),De,(e=[],_===Kn.toUpperCase()?e=[]:_===yi?e=[Xn.CPU]:_===_i&&(e=[Xn.DISK_IO]),e));var e}),{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=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:[]}));be===Zn.EPS&&!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)&&re===On.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)&&fe(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 h=Ra(d);ge(h)}}),Fe=Be.isFetching;Be.isSuccess;var Ue=Be.isError,ze=Be.error;a((function(){}),[K]),a((function(){Ue&&ge([])}),[Ue]),a((function(){var n,r,i,o,a,s,l,u=sessionStorage.getItem(pi),c=u?JSON.parse(u):null;de([{name:Zn.DB_ID,label:"",options:{sort:!1,display:!1,filter:!1}},{name:Zn.TOTAL_EPS_RATIO,label:ci.TOTAL_EPS_RATIO,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_EPS_RATIO_QUERY_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.TOTAL_EPS_RATIO})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:Zn.EPS,label:ci.EPS,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.ACTIVE_SESSIONS_PER_SECOND_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.EPS})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:Zn.EVENTS,label:ci.EVENTS,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,width:"140px",minWidth:"140px",maxWidth:"160px"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.EVENTS_QUERY_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.EVENTS})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},customBodyRender:function(t){return e(x,Me({onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}},{children:e(BW,{data:t,maxEPS:pe,groupByOperation:N})}))}}},{name:Zn.QUERY,label:ci.QUERY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"300px",maxWidth:"300px",minWidth:"300px"},onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e(Q,Me({title:ui.QUERY_TEXT_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.QUERY})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},customBodyRender:function(t,n){var r=n.rowIndex;return e(Q,Me({title:t,placement:"top",arrow:!0},{children:e(x,Me({onClick:Ne,className:G.queryCellBox},{children:e(X,{lang:"sql",text:t,maxWidth:350,showBorder:!0,showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!1,preClassName:G.preClassNameInTable,codeClassName:G.codeClassNameInTable,containerClassName:G.queryContainerCodeInTable},"TableHelperQueries-".concat(b,"-").concat(r))}))}))}}},{name:Zn.NAMESPACE_NAME,label:ci.NAMESPACE_NAME,options:{sort:!1,display:null!==(n=null==c?void 0:c.includes(Zn.NAMESPACE_NAME))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.DATABASE_NAME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.NAMESPACE_NAME})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return e||"-"}}},{name:Zn.FIRST_ACTIVE,label:ci.FIRST_ACTIVE_TIME,options:{sort:!1,display:null!==(r=null==c?void 0:c.includes(Zn.FIRST_ACTIVE))&&void 0!==r&&r,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.FIRST_ACTIVE_TIME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.FIRST_ACTIVE_TIME})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return e||"-"}}},{name:Zn.LAST_ACTIVE,label:ci.LAST_ACTIVE_TIME,options:{sort:!1,display:null!==(i=null==c?void 0:c.includes(Zn.LAST_ACTIVE))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.LAST_ACTIVE_TIME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.LAST_ACTIVE_TIME})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return e||"-"}}},{name:Zn.AVG_LATENCY,label:ci.AVG_LATENCY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.AVG_LATENCY_TOOLTIP,arrow:!0,placement:"top"},{children:e(x,Me({className:Y.headerBox},{children:e(I,Me({variant:"body2",className:Y.headerText},{children:ci.AVG_LATENCY}))}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Zn.LATENCY_P90,label:ci.LATENCY_P90,options:{sort:!1,display:null!==(o=null==c?void 0:c.includes(Zn.LATENCY_P90))&&void 0!==o&&o,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.LATENCY_P90_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.LATENCY_P90})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Zn.LATENCY_P99,label:ci.LATENCY_P99,options:{sort:!1,display:null!==(a=null==c?void 0:c.includes(Zn.LATENCY_P99))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.LATENCY_P99_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.LATENCY_P99})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Zn.QUERY_TYPE,label:ci.QUERY_TYPE,options:{sort:!1,display:null!==(s=null==c?void 0:c.includes(Zn.QUERY_TYPE))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customHeadRender:function(){return e(Q,Me({title:ui.QUERY_TYPE_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.QUERY_TYPE})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:Zn.TOTAL_TIME,label:ci.TOTAL_TIME,options:{sort:!1,display:null!==(l=null==c?void 0:c.includes(Zn.TOTAL_TIME))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_TIME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.TOTAL_TIME})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return e||"-"}}},{name:Zn.ROWS_AVG,label:ci.ROWS_AVG,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.ROWS_AVG_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.ROWS_AVG})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Zn.RPS,label:ci.RPS,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:Re(Y.tableHeaderCell,T===Sn.WEB&&Y.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.RPS_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:Y.headerBox},{children:[e(I,Me({variant:"body2",className:Y.headerText},{children:ci.RPS})),e("img",{src:zW,alt:"info",className:Y.infoIcon})]}))}))},setCellProps:function(){return{className:Y.queryLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[ve,pe,_]);a((function(){return function(){q.current.cancel()}}),[]);var He=Fe,Ve=c((function(){return{sorting:be?[{id:be,desc:re===On.DESC}]:[],pagination:{pageIndex:0,pageSize:5},isLoading:He,showProgressBars:He}}),[be,re,He]);return t(n,{children:[se&&e(UW,{appName:T,hiddenColumns:[Zn.DB_ID,Zn.AVG_LATENCY,Zn.ROWS_AVG,Zn.RPS,Zn.EPS,Zn.EVENTS,Zn.QUERY_ID,Zn.UNIVERSE_ID,Zn.QUERY],columns:ce,onColumnVisibilityChange:function(e,t){de((function(n){return n.map((function(n){return n.name===e?Me(Me({},n),{options:Me(Me({},n.options),{display:t})}):n}))}))},close:function(){return le(!1)}}),t(x,Me({mt:1,mb:2,className:F?"":Y.dataBox},{children:[t(x,Me({display:"flex",flexDirection:"column"},{children:[e(x,{mb:2}),t(x,Me({className:Y.filterContainer},{children:[t(x,Me({className:Y.filterLeftContainer},{children:[F&&t(n,{children:[e(gY,{}),e(ee,Me({style:{marginLeft:"8px",marginRight:"8px"}},{children:"Group By"})),e(z,Me({dataTestId:"TabletLevelQueryMetadata-GroupBySelect",value:N,className:Re(j.selectBox,j.overrideMuiInput)},{children:null==jn?void 0:jn.map((function(t,n){return e(S,Me({value:t,onClick:function(e){null==V||V(t),e.stopPropagation()}},{children:Yn[t]}),"".concat(t,"-").concat(n))}))}))]}),e(U,{dataTestId:"DbLoadQueriesMetadata-SearchInput",placeholder:"Filter Queries",className:Y.ybSearchInput,onChange:function(e){var t=e.target.value;Ee(t),q.current(t)},value:Ie,inputProps:{"data-testid":"DbLoadQueriesMetadata-SearchInput"},InputProps:{startAdornment:e(A,Me({position:"start"},{children:e(jW,{})})),endAdornment:!!Ie&&e(A,Me({position:"end"},{children:e(D,Me({size:"small",onClick:function(){q.current.cancel(),Te(""),Ee("")},"data-testid":"DbLoadQueriesMetadata-ClearButton"},{children:e(ye,{fontSize:"small"})}))}))}})]})),e(Z,Me({size:"medium",variant:T===Sn.YBM?"ghost":"secondary",startIcon:e(VW,{style:{marginBottom:"2px"}}),onClick:function(){return le(!0)},dataTestId:"DbLoadQueriesMetadata-".concat(b,"-AddFieldsButton")},{children:di}))]}))]})),t(x,Me({className:T===Sn.YBM?Y.overrideMuiTableContainer:Y.overrideMuiTableContainerWeb},{children:[Ue&&t(x,Me({mt:3,className:Y.recommendation},{children:[(T===Sn.YBA||T===Sn.WEB)&&e(ke,{customErrorMessage:Ki(null===(o=null===(i=null==ze?void 0:ze.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error)?null===(d=null===(s=null==ze?void 0:ze.response)||void 0===s?void 0:s.data)||void 0===d?void 0:d.error:hi.HISTORICAL_QUERY_DATA_FETCH_ERROR}),T===Sn.YBM&&e(ne,{text:Ki(null===(p=null===(h=null==ze?void 0:ze.response)||void 0===h?void 0:h.data)||void 0===p?void 0:p.error)?null===(m=null===(f=null==ze?void 0:ze.response)||void 0===f?void 0:f.data)||void 0===m?void 0:m.error:hi.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),e(oe,{id:"DbLoadQueriesMetadata-".concat(b),className:Y.overrideMuiTable,data:null!=ve?ve:[],columns:null==ce?void 0:ce.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:He,options:{sort:!1,filter:!0,count:null!==(y=null==ve?void 0:ve.length)&&void 0!==y?y:5,serverSide:!0,pagination:!1,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:5,rowsPerPage:5,autoResetPageIndex:!1,textLabels:{body:{noMatch:"There are no queries with the current ".concat(T===Sn.YBM?"cluster":"universe")}},onRowClick:function(e,t){Ci({rowData:e,rowMeta:t,appName:T,onSelectedQuery:H,onClose:function(){return function(e){J(e)}(null)},isDbQueryLoadMetadata:!0,onNavigateToUrl:W}),function(e){var t=e[10],n=ja(T,t,C,M,E,L?"db_drillown_query_click":k?"node_anomaly_drilldown_query_click":F?"tablet_anomaly_drilldown_query_click":"query_drilldown_click");Pe.mutate(n)}(e)},rowsPerPageOptions:[5],onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(be?[{id:be,desc:re===On.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return xe(Zn.EPS),void ie(On.DESC);var n=t[0],r=n.id,i=n.desc?On.DESC:On.ASC;xe(r),ie(i)},manualSorting:!0,state:Ve}},"DbLoadQueriesMetadata-".concat(b))]}))]}))]})},bY="name",xY="nodeRegionZone",wY="connections",SY="eps",TY="events",CY="rps",IY="totalEpsRatio",MY="universeId",EY="Node",AY="Region",DY="# of Connections",OY="Total Load",NY="Avg Active Context",RY="Wait Event Types",LY="Calls/Sec",PY=function(r){var i,o,s,d,h,p,f,m,v,y=r.universeUuid,_=r.appName,b=r.apiUrl,w=r.startTime,S=r.endTime,T=r.dbWaitEventType,C=r.onSelectedQuery,M=r.onNavigateToUrl,E=xi(),O=l(""),N=O[0],R=O[1],L=l(""),P=L[0],k=L[1],B=l([]),F=B[0],z=B[1],H=l(!1),V=H[0],W=H[1],Y=l(wr[0]),j=Y[0],G=Y[1],q=l(0),X=q[0],$=q[1],K=l(0),J=K[0],ee=K[1],te=l(1),re=te[0],ie=te[1],ae=l(On.DESC),se=ae[0],le=ae[1],ue=l([]),ce=ue[0],de=ue[1],he=l(SY),pe=he[0],fe=he[1],me=u(LW((function(e){R(e),$(0)}),500)),ve=u(""),ge=c((function(){return[eW.fetchNodeLoadStatsPage,y,j,w,S,N,pe,se,T]}),[y,j,w,S,N,pe,se,T]),_e=g(ge,(function(e){var t=e.pageParam,n=void 0===t?0:t;return gW.fetchNodeLoadStatsPage(y,function(e){var t=[];return T===Kn.toUpperCase()?t=[]:T===yi?t=[Xn.CPU]:T===_i&&(t=[Xn.DISK_IO]),{currentTablePage:e,apiUrl:b,pageSize:j,startTime:w,endTime:S,searchInput:N,sortBy:pe,sortDirection:se,dbWaitEventType:t}}(n))}),{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,h,p,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:[]}));pe===SY&&!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)&&se===On.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)&&ie(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 m=function(e){return null==e?void 0:e.map((function(e){var t,n,r,i,o,a,s,l;return{name:null!==(t=e.name)&&void 0!==t?t:"",nodeRegionZone:"".concat(null===(n=e.region)||void 0===n?void 0:n.toUpperCase()," (").concat(e.availabilityZone,")"),connections:null!==(r=e.connections)&&void 0!==r?r:0,eps:null!==(i=e.eps)&&void 0!==i?i:0,events:null!==(o=e.events)&&void 0!==o?o:[],rps:null!==(a=e.rps)&&void 0!==a?a:0,totalEpsRatio:null!==(s=e.totalEpsRatio)&&void 0!==s?s:0,universeId:null!==(l=e.universeId)&&void 0!==l?l:""}}))}(f);de(m),ee(null!==(p=null===(h=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===h?void 0:h.totalCount)&&void 0!==p?p:0)}}),be=_e.isFetching,xe=_e.isSuccess,we=_e.isError,Se=_e.error,Te=_e.fetchNextPage,Ce=_e.hasNextPage,Ie=_e.isFetchingNextPage,Ee=_e.data;a((function(){var e,t,n;if(void 0!==Ce&&(null===(e=null==Ee?void 0:Ee.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==Ee?void 0:Ee.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;Ce&&!Ie&&X===r&&X>=0&&Te()}}),[Ce,Te,X,Ie,null===(i=null==Ee?void 0:Ee.pages)||void 0===i?void 0:i.length]),a((function(){we&&de([])}),[we]),a((function(){var e=JSON.stringify(ge);ve.current&&ve.current!==e&&$(0),ve.current=e}),[ge]),a((function(){return function(){me.current.cancel()}}),[]);var Ae=be,De=c((function(){var e;return bi(Te,"Rows per page:",null!==(e=null==ce?void 0:ce.length)&&void 0!==e?e:0,Ce)}),[Te,null==ce?void 0:ce.length,Ce]),Oe=c((function(){return{sorting:pe?[{id:pe,desc:se===On.DESC}]:[],pagination:{pageIndex:X,pageSize:j},isLoading:Ae,showProgressBars:Ae}}),[pe,se,X,j,Ae]);return a((function(){var n,r=sessionStorage.getItem(gi),i=r?JSON.parse(r):null;z([{name:MY,label:"",options:{sort:!1,display:!1,filter:!1}},{name:bY,label:EY,options:{sort:!0,display:!0,customHeadRender:function(){return e(Q,Me({title:ui.NODE_NAME_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:EY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{width:"15%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(t){if(!Ki(t))return"-";var n=t.length>18?"...".concat(t.slice(-18)):t;return e(Q,Me({title:t,placement:"top",arrow:!0},{children:e(x,Me({component:"span",style:{display:"inline-block",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"100%"}},{children:n}))}))}}},{name:xY,label:AY,options:{sort:!1,display:null===(n=null==i?void 0:i.includes(xY))||void 0===n||n,customHeadRender:function(){return e(Q,Me({title:ui.NODE_REGION_ZONE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:AY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{width:"13%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Ki(e)?e:"-"}}},{name:wY,label:DY,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customHeadRender:function(){return e(Q,Me({title:ui.CONNECTIONS_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:DY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString(void 0,{maximumFractionDigits:2}):"0.0"}}},{name:IY,label:OY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_EPS_RATIO_NODE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:OY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:SY,label:NY,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"15%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.EPS_NODE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:NY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:TY,label:RY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,minWidth:"15%",maxWidth:"22%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.EVENTS_NODE_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:RY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},customBodyRender:function(t){return e(BW,{data:null!=t?t:[],maxEPS:re,groupByOperation:xn.WAIT_EVENT_TYPE})}}},{name:CY,label:LY,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(E.tableHeaderCell,_===Sn.WEB&&E.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.RPS_NODE_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:E.headerBox},{children:[e(I,Me({variant:"body2",className:E.headerText},{children:LY})),e("img",{src:zW,alt:"info",className:E.infoIcon})]}))}))},setCellProps:function(){return{className:E.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[ce,re]),t(n,{children:[V&&e(UW,{appName:_,hiddenColumns:[MY,IY,SY,TY,CY,wY,bY],columns:F,isNodeLoadMetadataColumns:!0,onColumnVisibilityChange:function(e,t){z((function(n){return n.map((function(n){return n.name===e?Me(Me({},n),{options:Me(Me({},n.options),{display:t})}):n}))}))},close:function(){return W(!1)}}),t(x,Me({mt:2,className:Re(E.mainContainer,E.mainContainerBorder)},{children:[e(x,Me({className:E.headerContainer},{children:e(I,Me({variant:"h5"},{children:"".concat(T===Kn.toUpperCase()?"":T===yi?yi:_i," Load By Node")}))})),t(x,Me({className:E.metadataContainer},{children:[t(x,Me({className:E.loadFilterContainer},{children:[e(U,{dataTestId:"NodeLoad-SearchInput",placeholder:"Filter Table",className:E.ybSearchInput,onChange:function(e){var t=e.target.value;k(t),me.current(t)},value:P,inputProps:{"data-testid":"NodeLoad-SearchInput"},InputProps:{startAdornment:e(A,Me({position:"start"},{children:e(jW,{})})),endAdornment:!!P&&e(A,Me({position:"end"},{children:e(D,Me({size:"small",onClick:function(){me.current.cancel(),R(""),k(""),$(0)},"data-testid":"NodeLoad-ClearButton"},{children:e(ye,{fontSize:"small"})}))}))}}),e(Z,Me({size:"medium",variant:_===Sn.YBM?"ghost":"secondary",startIcon:e(VW,{style:{marginBottom:"2px"}}),onClick:function(){return W(!0)},dataTestId:"NodeLoad-AddFieldsButton"},{children:di}))]})),e(x,{children:t(x,Me({className:_===Sn.YBM?E.overrideMuiTableContainer:E.overrideMuiTableContainerWeb},{children:[we&&t(x,Me({mt:3,className:E.recommendation},{children:[(_===Sn.YBA||_===Sn.WEB)&&e(ke,{customErrorMessage:Ki(null===(s=null===(o=null==Se?void 0:Se.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error)?null===(h=null===(d=null==Se?void 0:Se.response)||void 0===d?void 0:d.data)||void 0===h?void 0:h.error:hi.NODE_LOAD_DATA_FETCH_ERROR}),_===Sn.YBM&&e(ne,{text:Ki(null===(f=null===(p=null==Se?void 0:Se.response)||void 0===p?void 0:p.data)||void 0===f?void 0:f.error)?null===(v=null===(m=null==Se?void 0:Se.response)||void 0===m?void 0:m.data)||void 0===v?void 0:v.error:hi.NODE_LOAD_DATA_FETCH_ERROR})]})),xe&&e(oe,{id:"NodeLoad",className:E.overrideMuiTable,data:null!=ce?ce:[],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:Ae,options:{enableExpanding:!0,renderDetailPanel:function(t){var r=t.row;if(!r.getIsExpanded())return e(n,{});var i=r.original,o=null==i?void 0:i.name;return e(x,{children:e(_Y,{dbWaitEventType:T,universeUuid:y,name:o,apiUrl:b,appName:_,startTime:w,endTime:S,onSelectedQuery:C,isDbLoadMetadata:!1,isNodeLoadMetadata:!0,onNavigateToUrl:M})})},sort:!0,filter:!0,count:J,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:j,rowsPerPage:j,autoResetPageIndex:!1,onChangePage:function(e){$(e)},onChangeRowsPerPage:function(e){G(e),$(0)},textLabels:{body:{noMatch:"The node load data is not available"}},rowsPerPageOptions:wr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(pe?[{id:pe,desc:se===On.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return fe(SY),le(On.DESC),void $(0);var n=t[0],r=n.id,i=n.desc?On.DESC:On.ASC;fe(r),le(i),$(0)},paginationDisplayMode:"custom",customFooter:De,manualSorting:!0,state:Oe}},"NodeLoad-".concat(T,"-").concat(pe,"-").concat(se))]}))})]}))]}))]})},kY=b((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"}}})),BY=[{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/"}],FY=function(n){var r=n.isAshSupported,i=kY();return t(x,Me({className:i.messageBox},{children:[e("img",{src:r?"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("span",Me({className:i.ashText},{children:r?"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."})),t(x,Me({display:"flex",flexDirection:"row"},{children:[e("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("a",Me({className:i.ashLink,href:r?BY[1].link:BY[0].link,target:"_blank",rel:"noreferrer"},{children:r?BY[1].text:BY[0].text}))]}))]}))},UY="Cluster Load Overview",zY="Activity By Database",HY="Activity By Node";kA([WF,gU,LR,Sk,jB,fF,dB,function(e){e.registerPainter("svg",Cz)},lB]);var VY,WY=le((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",lineHeight:"16px",fontWeight:400,color:e.palette.grey[600]},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),padding:"16px 24px 20px 16px"},groupByContainerYBM:{gap:e.spacing(1),marginTop:e.spacing(2)}}})),YY=[{value:qn.LINE,label:"Line"},{value:qn.BAR,label:"Bar"}],jY=function(r){var i,o,s,c=r.startTime,d=r.endTime,h=r.appName,p=r.metricKey,f=r.shouldAbbreviateTraceName,m=r.groupByOperation,g=r.timezone,y=r.universeUuid,_=r.isAshEnabled,b=r.isAshSupported,w=r.apiUrl,T=r.dbWaitEventType,C=r.isDbClusterLoadView,M=void 0!==C&&C,E=r.isNodeClusterLoadView,A=void 0!==E&&E,D=r.onEChartsDateSelect,O=r.onSetGroupByOperation,N=r.onFilterBarData,R=r.getClusterDetails,L=WY(),P=xi(),k=u(null),B=u(null),F=l([]),U=F[0],H=F[1],V=l(qn.LINE),Y=V[0],j=V[1],G=u(U),q=l(null),Q=q[0],Z=q[1],X=R(),$=X.cluster,K=X.region,J=X.zone,ee=X.node,te=X.numNodes,re=X.outlierType,ie=YY.map((function(t){return{value:t.value,icon:e("img",{src:t.value===qn.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,j(e)},buttonProps:{dataTestId:"PerfAdvisorClusterLoad-ChartTypeSelector-".concat(t.value)}}})),oe=v((function(e){return gW.fetchGraphs(y,e,w)}),{onSuccess:function(e){!Qi(e)||Z(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),ae=null===(s=null===(o=null===(i=null==oe?void 0:oe.error)||void 0===i?void 0:i.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error,se=function(){var e={universeUuid:[y]};M||A?(delete e.clusterUuid,delete e.regionCode,delete e.azCode,delete e.instanceName,T===Kn.toUpperCase()?delete e.waitEventType:e.waitEventType=T===yi?[Xn.CPU]:[Xn.DISK_IO]):($&&$!==Kn?e.clusterUuid=[$]:delete e.clusterUuid,K&&K!==Kn?e.regionCode=[K]:delete e.regionCode,J&&J!==Kn?e.azCode=[J]:delete e.azCode,ee&&ee!==Kn?e.instanceName=[ee]:delete e.instanceName);var t=En.NONE;(M||A)&&(t=M?En.NAMESPACE:En.NODE);var n=function(n){return Me(Me({start:c,end:d,name:n,filters:e,settings:{aggregatedValueFunction:M||A?Dn.SUM:Dn.AVERAGE,returnAggregatedValue:!1,splitCount:M||A?te:3,splitMode:M||A?re:Mn.NONE,splitType:t}},n!==ur||M||A?{}:{groupBy:[m]}),{stepSeconds:Ma(c,d)})},r=[n(ur)];M||A||(r.push(n(cr)),r.push(n(hr))),Ki(c)&&Ki(d)&&_&&oe.mutate(r)};a((function(){se()}),[c,d,m,$,K,J,ee,T,te,re]),a((function(){return se(),function(){Z(null)}}),[]);return a((function(){G.current=U}),[U]),a((function(){if(Qi(Q)&&B.current){k.current||(k.current=DM(B.current,null,{renderer:"svg"}));var e=function(e,t,n,r,i,o){var a,s,l,u,c,d,h,p,f,m,v,g=o.shouldAbbreviateTraceName;o.appName;var y=o.timezone,_=void 0===y?"":y,b=o.groupByOperation,x=null==e?void 0:e.flatMap((function(e){return e.data||[]}));x&&(null==x?void 0:x.length)>1&&!n&&!r&&(x=Oe(Oe([],x.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),x.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var w=[];if(!x||0===(null==x?void 0:x.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||r?t===Kn.toUpperCase()?r?HY:zY:"".concat(t," Activity By ").concat(r?"Node":"Database"):UY,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==x||x.forEach((function(t,o){var a,s,l=t.name;n?l=null!==(a=t.namespaceName)&&void 0!==a?a:t.name:r&&(l=null!==(s=t.instanceName)&&void 0!==s?s:t.name);var u=null;if(l===nr){var c=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(u=null==c?void 0:c.name)===hr?l=sr:u===cr&&(l=rr)}var d=b===xn.WAIT_EVENT?22:30,h=g&&(null==l?void 0:l.length)>d?"...".concat(l.substring(15,l.length)):l;if(l===rr)w.push({name:h,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}),w.push({name:h,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:o<55,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 p={name:h,type:"scatter"===t.type||(n||r)&&i===qn.LINE?"line":"bar",stack:n||r?i===qn.BAR?"total":null:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:o<55,lineStyle:{color:l===sr?"#888888":li[l]||si[o%si.length],width:2,type:l===sr?"dashed":"solid"},itemStyle:{color:l===sr?"transparent":li[l]||si[o%si.length]},symbolSize:6,symbol:n||r?"none":"circle",z:1,emphasis:{lineStyle:{color:l===sr?"#888888":li[l]||si[o%si.length],width:2},itemStyle:{color:l===sr?li[l]||si[o%si.length]:void 0},symbolSize:l===sr?8:void 0}};w.push(p)}}));var S=(null===(s=null===(a=null==w?void 0:w[0])||void 0===a?void 0:a.data)||void 0===s?void 0:s.length)||0,T=[];if(S)for(var C=0;C<S;C++){for(var I=0,M=0,E=w;M<E.length;M++){var A=E[M];"bar"===A.type&&(I+=parseFloat(null===(l=A.data[C])||void 0===l?void 0:l[1])||0)}T.push(I)}var D=Math.max.apply(Math,Oe([.1],T,!1)),O=0;w.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>O&&(O=t)}}));var N=Math.max(1,1.4*D,1.4*O),R=Math.ceil(N),L=null===(h=null===(d=null===(c=null===(u=null==e?void 0:e[0])||void 0===u?void 0:u.data)||void 0===c?void 0:c[0])||void 0===d?void 0:d.x)||void 0===h?void 0:h[0],P=null===(v=null===(m=null===(f=null===(p=null==e?void 0:e[0])||void 0===p?void 0:p.data)||void 0===f?void 0:f[0])||void 0===m?void 0:m.x)||void 0===v?void 0:v.slice(-1)[0],k=P&&L?(new Date(P).getTime()-new Date(L).getTime())/864e5:0,B={title:{text:n||r?t===Kn.toUpperCase()?r?HY:zY:"".concat(t," Activity By ").concat(r?"Node":"Database"):UY,left:16,top:16,textStyle:{fontWeight:600,fontFamily:ar,fontSize:15,color:"#0B1117"}},tooltip:{trigger:b===xn.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,i,o,a="letter-spacing:0.5px;padding: 6px 2px;",s="color:#0B1117 !important; font-weight: 400 !important; font-size: 13px !important; line-height: 16px !important; display:block; margin-bottom: 16px; font-family: Inter !important;",l="display:block;";if(Array.isArray(e)){var u=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",c=new Date(u),d=Xl(_?$l(c,_):c,"MMM d HH:mm (zzz)",{timeZone:_||void 0}),h=e.map((function(t,n){var r,i,o=Array.isArray(t.value)?t.value[1]:t.value,a=Aa(t.color,t.seriesName),s=Da(null!==(i=null===(r=Number(o))||void 0===r?void 0:r.toFixed(3))&&void 0!==i?i:"0"),l=n===e.length-1;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:'.concat(l?"0":"8px",';\n ">\n ').concat(a).concat(s,"\n </div>\n ")})).join("");return'<div style="'.concat(a,'"><b style="').concat(s,'">').concat(d,'</b><span style="').concat(l,'">').concat(h,"</span></div>")}u=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",c=new Date(u),d=Xl(_?$l(c,_):c,"MMM d HH:mm (zzz)",{timeZone:_||void 0});var p=Array.isArray(e.value)?e.value[1]:e.value,f=Aa(e.color,e.seriesName),m=Da(null!==(o=null===(i=Number(p))||void 0===i?void 0:i.toFixed(3))&&void 0!==o?o:"0");return h='<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:0;\n ">\n '.concat(f).concat(m,"\n </div>"),'<div style="'.concat(a,'"><b style="').concat(s,'">').concat(d,'</b><span style="').concat(l,'">').concat(h,"</span></div>")}},legend:Me(Me({type:"scroll",orient:n||r?"horizontal":"vertical",bottom:n||r?4:"10%"},!n&&!r&&{left:"1%",top:"18%",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:w.filter((function(e){return e.showLegend})).map((function(e){return e.name===sr||e.name===rr?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===sr?"{dashedLine|} # vCPU":e===rr?"{thickLine|} Queries":e}}),grid:{left:n||r?"3%":"270px",right:n||r?"4%":"2%",top:"22%",bottom:n||r?"20%":"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:ar,fontSize:11.5},formatter:function(e){var t=new Date(e);return Xl(_?$l(t,_):t,k>1?"MMM d HH:mm":"HH:mm",{timeZone:_||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:R},series:w,toolbox:{show:!1},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return B}(Q,T,M,A,A?qn.LINE:Y,{shouldAbbreviateTraceName:f,appName:h,timezone:g,metricKey:p,groupByOperation:m});k.current.setOption(e),n=!1,r=null,(t=k).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);D(l,u)}}n=!1})),M||A||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=Oe([],G.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===G.current.length||G.current.length===s.length?[i]:G.current.includes(i)?G.current.filter((function(e){return e!==i})):Oe(Oe([],G.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})})),qi(o)&&s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:"legendSelect",name:t})})),H(o),N(o)}))}(k)}var t,n,r;return function(){k.current&&(k.current.dispose(),k.current=null)}}),[Q,oe.isLoading,p,Y]),a((function(){var e=function(){k.current&&k.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),t(n,{children:[!M&&!A&&t(x,Me({display:"flex",flexDirection:"row",alignItems:"center",className:L.groupByContainerYBM},{children:[e("img",{src:ro,alt:"Tree Icon"}),e(I,Me({variant:"body2",className:L.groupByText},{children:"Group by"})),e(z,Me({dataTestId:"PerfAdvisorClusterLoad-GroupBySelect",value:m,className:Re(L.groupByOperationDropdown,L.overrideDefaultMuiSelect,L.overrideDefaultMuiFormControl)},{children:null==jn?void 0:jn.map((function(t,n){return e(S,Me({value:t,onClick:function(e){O(t),e.stopPropagation()}},{children:Yn[t]}),"".concat(t,"-").concat(n))}))}))]})),e(x,Me({mt:h===Sn.WEB?2:0,className:Re(h===Sn.WEB?void 0:L.clusterLoadBoxYBM)},{children:t(x,{children:[oe.isLoading&&e(x,Me({mt:2,className:P.loadingBox},{children:e(_W,{className:Re(P.icon,P.inProgressIcon)})})),oe.isError&&t(x,Me({mt:3},{children:[(h===Sn.YBA||h===Sn.WEB)&&e(ke,{customErrorMessage:Ki(ae)?ae:hi.CLUSTER_LOAD_FETCH_ERROR}),h===Sn.YBM&&e(ne,{text:Ki(ae)?ae:hi.CLUSTER_LOAD_FETCH_ERROR})]})),t(x,{children:[oe.isSuccess&&t(x,Me({id:"".concat(p,"-wrapper"),display:"flex",flexDirection:"row",className:Re(h===Sn.WEB?L.metricPanel:L.metricPanelYBM),onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e("div",{ref:B,id:p,style:{flexGrow:1,minWidth:0}}),M&&e("div",Me({className:L.groupByContainer},{children:e(W,{divider:!0,value:Y,buttons:ie,dataTestId:"PerfAdvisorClusterLoad-ChartTypeSelector"})}))]})),!_&&e(x,Me({mt:2,mb:1.5},{children:e(FY,{isAshSupported:b})}))]})]})}))]})},GY=function(r){var i,o,a,s,l,u,c,d,h,p,f,m,v=r.appName,g=r.dbWaitEventType,y=r.timezone,_=r.apiUrl,b=r.anomalyData,w=r.metricMeasure,S=r.amomalyGraphRequestParams,T=r.formattedAnomalyRca,C=r.urlParams,M=r.dateTimeRange,E=r.groupByOperation,A=r.onFilterBarData,D=r.onChangeDbWaitEventType,O=r.getClusterDetails,N=r.onOutlierTypeSelected,R=r.onNumNodesChanged,L=r.onEChartsDateSelect,P=r.onSetGroupByOperation,k=r.onSelectedQuery,B=r.onNavigateToUrl,F=O(),U=F.universeUuid,z=F.numNodes,H=F.outlierType;return t(n,{children:[e(mY,{outlierType:H,numNodes:z,onOutlierTypeSelected:N,onNumNodesChanged:R,onChangeDbWaitEventType:D,waitEventType:g,isDbClusterLoadView:!1}),e(jY,{dbWaitEventType:g,isDbClusterLoadView:!1,isNodeClusterLoadView:!0,startTime:null!==(o=null===(i=null==M?void 0:M.startDateTime)||void 0===i?void 0:i.toISOString())&&void 0!==o?o:null,endTime:null!==(s=null===(a=null==M?void 0:M.endDateTime)||void 0===a?void 0:a.toISOString())&&void 0!==s?s:null,apiUrl:_,universeUuid:U,appName:v,metricKey:"node_drilldown_cluster_load",groupByOperation:E,shouldAbbreviateTraceName:!0,timezone:y,isAshEnabled:!0,isAshSupported:!0,onFilterBarData:A,onSetGroupByOperation:P,onEChartsDateSelect:L,getClusterDetails:O}),e(PY,{appName:v,dbWaitEventType:g,universeUuid:U,apiUrl:_,startTime:null!==(u=null===(l=null==M?void 0:M.startDateTime)||void 0===l?void 0:l.toISOString())&&void 0!==u?u:null,endTime:null!==(d=null===(c=null==M?void 0:M.endDateTime)||void 0===c?void 0:c.toISOString())&&void 0!==d?d:null,onSelectedQuery:k,onNavigateToUrl:B}),t(x,Me({mt:2},{children:[e(I,Me({variant:"h5"},{children:"Possible Causes"})),e(x,Me({mt:1},{children:e(wW,{appName:v,timezone:y,startTime:null!==(p=null===(h=null==M?void 0:M.startDateTime)||void 0===h?void 0:h.toISOString())&&void 0!==p?p:null,endTime:null!==(m=null===(f=null==M?void 0:M.endDateTime)||void 0===f?void 0:f.toISOString())&&void 0!==m?m:null,anomalyData:b,getClusterDetails:O,apiUrl:_,dateTimeRange:M,metricMeasure:w,amomalyGraphRequestParams:S,formattedAnomalyRca:T,onEChartsDateSelect:L,urlParams:C})}))]}))]})},qY=function(n){var r=n.universeUuid,i=n.apiUrl,o=n.sourceData,s=n.expandAll,c=void 0!==s&&s,d=n.showMoreOptions,h=void 0!==d&&d,p=n.onClickShowMoreAnomalies,f=n.onSelectedIssue,m=n.startTime,g=n.name,y=n.endTime,_=n.appName,b=n.showMultiline,w=void 0===b||b,S=n.isInsightsTab,T=void 0!==S&&S;n.currentTab;var C=n.viewAllAnomalies,I=void 0!==C&&C,M=n.onNavigateToUrl,E=n.isBackgroundJobs,A=void 0!==E&&E,D=_===Sn.YBM?27:35,O=l({}),N=O[0],R=O[1],L=l({}),P=L[0],k=L[1],B=u(null),F=u(null),U=v((function(e){return gW.sendTelemetryEvent(r,e,i)}));a((function(){if(o){if(h||A){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];if(s&&"object"==typeof s&&(n[a]=Object.keys(s),!A))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}(o),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];if(t[o]=!1,a&&"object"==typeof a)for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(o);k(e),R(t)}else k({}),R({})}}),[o]),a((function(){R((function(e){var t=Me({},e);return Object.keys(t).forEach((function(e){t[e]=c})),t}))}),[c]);var z=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},H=function(e){for(var t=0,n=Object.entries(P);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return H(i)}return e};function V(){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 a((function(){if((Object.keys(N).length>0||Qi(o)||A)&&B.current){var e=void 0,t=void 0;if(A){var n=function(e){for(var t=[],n=[],r=0,i=function(e,i){var o=Object.entries(i),a=o.length;t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:a});for(var s=function(i,o){var a="".concat(i),s=o.title||i;t.push({categoryLevel:2,id:a,content:s,parent:e,name:s,categoryCount:o.totalCount||0}),o.tasks.forEach((function(e){r++,n.push({id:"bg-job-".concat(r),content:"bg-job-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},l=0,u=o;l<u.length;l++){var c=u[l];s(c[0],c[1])}var d=[];o.forEach((function(e){e[0];var t=e[1].tasks.map((function(e){return{startTime:e.startTime,endTime:e.endTime}}));d.push.apply(d,t)})),Ea(d).forEach((function(t){r++,n.push({id:"bg-job-".concat(r),content:"bg-job-".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}}(o);e=n.items,t=n.groups}else if(h){n=function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:z(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"+ ".concat(s):"− ".concat(s),parent:e,name:s,categoryCount:o.totalCount});var l=[];if(o.groups.forEach((function(e,i){var o,s,u,c="".concat(a,"_").concat(i),d=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:c,name:d,content:d,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),null===(u=null==e?void 0:e.anomalyIntervals)||void 0===u||u.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:c})})),l.push.apply(l,e.anomalyIntervals)})),o.hasMore&&h){var u="".concat(a,"_").concat(Mr),c=Mr;t.push({id:u,name:c,content:Ar,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(Mr),content:"anomaly-".concat(a,"-").concat(Mr),start:"",end:"",group:a})}Ea(l).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 l=s[a];o(l[0],l[1])}var u=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));Ea(u).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}}(o);e=n.items,t=n.groups}else{n=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}}(o);e=n.items,t=n.groups}var i={items:e,groups:t},a=t;if(h||A){var s=t.map((function(e){var t,n,r,i,o=(null===(t=P[e.id])||void 0===t?void 0:t.length)>0,a=A&&2===e.categoryLevel,s=o&&!a,l=null!==(n=N[e.id])&&void 0!==n&&n,u=s?l?"−":"+":"",c=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,d="",h=H(e.id);3===e.categoryLevel&&e.name===Mr&&(h=e.grandParent),1===e.categoryLevel?d="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?(d="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;",a&&(d="font-family: Inter;font-size: 11.5px; font-weight: 400 !important;")):3===e.categoryLevel&&(d="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var p=0;2===e.categoryLevel?p=40:3===e.categoryLevel&&(p=44);var f="margin-left: ".concat(p,"px;"),m=o||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",v="".concat(f).concat(m).concat("color: #0B1117 !important;").concat(d),g="",y="";if(h)switch(h){case yn.DB:g="db-background",y="Database";break;case yn.NODE:g="node-background",y="Node";break;case yn.SQL:g="sql-background",y="SQL";break;case yn.APP:g="app-background",y="Application";break;case yn.INFRA:g="infra-background",y="Infrastructure";break;case Bn.RUNNING_BACKGROUND_JOBS:g="bg-jobs-background",y="Running Background Jobs"}var _="";1===e.categoryLevel?_="custom-group-row-1":2===e.categoryLevel?_="custom-group-row-2":3===e.categoryLevel&&(_="custom-group-row-3");var b=e.content.replace(/ /g,"").length>D?"".concat(e.content.substring(0,D),"..."):e.content,x="";if(a){var w=null!==(r=e.name)&&void 0!==r?r:"";x='<a title="'.concat(w,'">').concat(w,"</a>")}else if(o){var S=null!==(i=e.name)&&void 0!==i?i:"",T="";T=S&&S.length>D?1===e.categoryLevel?y:"".concat(S.substring(0,D),"..."):1===e.categoryLevel?y:S;var C=1!==e.categoryLevel&&2!==e.categoryLevel||l?"":"<span>".concat(e.categoryCount,"</span>");x='<a title="'.concat(S,'">').concat(u," ").concat(T,"</a>").concat(C)}else{C=c?"<span>".concat(3===e.categoryCount?"+":"").concat(e.categoryCount,"</span>"):"";x='<a title="'.concat(e.content,'">').concat(u).concat(b,"</a>").concat(C)}return Me(Me({},e),{content:x,className:[_,g].filter(Boolean).join(" "),style:v,visible:!e.parent||N[e.parent]})})),l=s.filter((function(e){return e.visible}));Object.entries(P).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=s.find((function(t){return t.id===e}));n&&(n.visible=N[t])}))}));var u=e.filter((function(e){var t,n=s.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=P[n.id])||void 0===t?void 0:t.length)>0,i=N[n.id];return!!(A&&2===n.categoryLevel)||(!r||!i)}return!1}));i={items:v=u.map((function(e){var t=s.find((function(t){return t.id===e.group})),n=t?H(t.id):null,r="#CCCCCC";if(n)switch(n){case yn.DB:r=li[yn.DB];break;case yn.NODE:r=li[yn.NODE];break;case yn.SQL:r=li[yn.SQL];break;case yn.APP:r=li[yn.APP];break;case yn.INFRA:r=li[yn.INFRA];break;case _n.BACKGROUND_JOBS:r=li[_n.BACKGROUND_JOBS]}return Me(Me({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:l}}else{var c="custom-group-row",d=t.map((function(e){return Me(Me({},e),{content:w?'<a title="'.concat(e.content,'"> ').concat(e.content.length>D?"".concat(e.content.substring(0,D),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[c].filter(Boolean).join(" ")})})),v=e.map((function(e){var t,n,r="#CCCCCC",i=null===(n=null===(t=null==o?void 0:o[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(i)switch(i){case yn.DB:r=li[yn.DB];break;case yn.NODE:r=li[yn.NODE];break;case yn.SQL:r=li[yn.SQL];break;case yn.APP:r=li[yn.APP];break;case yn.INFRA:r=li[yn.INFRA];break;case _n.BACKGROUND_JOBS:r=li[_n.BACKGROUND_JOBS]}return Me(Me({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));i={items:v,groups:d}}if(F.current){b={stack:!1,showCurrentTime:!1,min:m,max:y,start:m,end:y,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};F.current.setOptions(b),F.current.setItems(i.items),F.current.setGroups(i.groups),!h&&!A||T||V()}else{var b={stack:!1,showCurrentTime:!1,min:m,max:y,start:m,end:y,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};F.current=new be(B.current,i.items,i.groups,b)}F.current.on("changed",(function(){if(I){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")})),document.querySelectorAll(".vis-label.bg-jobs-background .vis-inner span").forEach((function(e){return e.classList.add("bg-jobs-inner-background")})),!h&&!A||T||V();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=g===ni?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=g===ni?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==F||F.current.on("click",(function(e){var t,n=window.scrollY;setTimeout((function(){return window.scrollTo(0,n)}),0);var i=e.group,o="",s=null;if(i&&(s=a.find((function(e){return e.id===i})))&&"string"==typeof s.content&&(o=s.id),2===(null==s?void 0:s.categoryLevel)||3===(null==s?void 0:s.categoryLevel)){var l=2===(null==s?void 0:s.categoryLevel)?"anomaly_category_select":"anomaly_drilldown_click",u=ja(_,null!==(t=null==s?void 0:s.name)&&void 0!==t?t:"",m,y,r,l);U.mutate(u)}(null==s?void 0:s.uuid)&&(_===Sn.YBM||_===Sn.YBA?function(e){var t=new URLSearchParams(window.location.search),n={};n.duration=t.get("duration"),n.startTime=t.get("startTime"),n.endTime=t.get("endTime"),null==f||f(e,n);var r="".concat(window.location.pathname,"/").concat(e).concat(t.toString()?"?".concat(t.toString()):"");M?null==M||M(r):window.history.pushState({},"","".concat(window.location.pathname,"/").concat(e).concat(t.toString()?"?".concat(t.toString()):""))}(s.uuid):_===Sn.WEB&&function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();_===Sn.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(s.uuid)),(null==s?void 0:s.name)===Mr&&(null==p||p(s.parent)),o&&function(e){R((function(t){var n=Me({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=P[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(o)}))}else if(qi(o)&&B.current&&!F.current){b={stack:!1,showCurrentTime:!1,min:m,max:y,start:m,end:y,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};F.current=new be(B.current,[],[],b),F.current.setOptions(b),F.current.setItems([]),F.current.setGroups([])}return function(){F.current&&(F.current.destroy(),F.current=null)}}),[N,o,A,h,P,I,T,g,w]),t(x,Me({id:g},{children:[e("div",{ref:B,style:{backgroundColor:"#FFFFFF"}},g),e("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-time-axis .vis-grid.vis-horizontal {\n display: none !important;\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-label.bg-jobs-background .vis-inner .bg-jobs-inner-background {\n background-color: #E9EEF2 !important;\n color: #4E5F6D !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),g)},QY=E(te)((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)}}})),ZY=function(r){var i,o,s,c,d,h,p,f,m,g,y,_,b,w,S,T,C,I,M,E,A,D,O,N,R,L=r.metricMeasure,P=r.appName,k=r.timezone,B=r.universeQueryData,F=r.amomalyGraphRequestParams,U=r.formattedAnomalyRca,z=r.anomalyData,H=r.gantChartData,V=r.dateTimeRange,W=r.urlParams,Y=r.apiUrl,j=r.getClusterDetails,G=r.onEChartsDateSelect,q=r.onSelectedIssue,Q=u([]),Z=xi(),X=l(!1);X[0],X[1];var $=l(0),K=$[0],J=$[1],ee=l(z),te=ee[0],ie=ee[1],oe=l(null),ae=oe[0],se=oe[1],le=l(F),ue=le[0],ce=le[1],de=j(),he=de.universeUuid,pe=de.cluster,fe=de.region,me=de.zone,ve=de.node,ge=de.numNodes,ye=de.outlierType,_e=Lz(L),be=function(e,t,n){var r,i,o=xn.WAIT_EVENT_COMPONENT;if("Class"===e?o=xn.WAIT_EVENT_CLASS:"Type"===e?o=xn.WAIT_EVENT_TYPE:"Event"===e?o=xn.WAIT_EVENT:"Query"===e?o=xn.QUERY_ID:"Client IP"===e&&(o=xn.CLIENT_NODE_IP),(null===(r=null==z?void 0:z.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==z?void 0:z.lastInstance)||void 0===i?void 0:i.category)!==yn.DB){var a=JSON.parse(JSON.stringify(ue)),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})),ce(a),xe.mutate(a)}};a((function(){ie(z)}),[z]),a((function(){var e;_e&&_e!==L&&se(null);var t=JSON.parse(JSON.stringify(ue)),n=j(),r=Ia(!1,!1,0,n,t,Me(Me({},W),{type:null!==(e=W.type)&&void 0!==e?e:null})),i=null!=r?r:ue;ce(i),xe.mutate(i)}),[L,V,fe,pe,me,ve,ye,ge]);var xe=v({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return gW.fetchGraphs(he,e,Y)},onSuccess:function(e){se(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),we=null===(s=null===(o=null===(i=null==xe?void 0:xe.error)||void 0===i?void 0:i.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error,Se=function(t,n,r,i,o,a){return e(x,Me({mr:8},{children:e(Fz,{metricData:t,metricKey:t.name,graphTitle:a,containerWidth:null,dateTimeRange:V,metricMeasure:L,operations:n,groupByOperations:r,registerChartInstance:function(e){return Ce(e,o)},appName:P,graphType:i,timezone:k,queryData:B,onSelectAshLabel:be,onEChartsDateSelect:G},"".concat(L,"-").concat(t.name))}))},Te=null==U?void 0:U.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0}));a((function(){Q.current=[]}),[L]);var Ce=function(e,t){Q.current[t]=e};return a((function(){return xe.isSuccess&&ae&&ae.length>0&&OM(Q.current),function(){NM(Q.current)}}),[xe.isSuccess,ae,K]),e(x,Me({mt:2},{children:t(n,{children:[xe.isLoading&&e(x,Me({mt:2,className:Z.loadingBox},{children:e(_W,{className:Re(Z.icon,Z.inProgressIcon)})})),xe.isError&&t(x,Me({mt:4},{children:[(P===Sn.YBA||P===Sn.WEB)&&e(ke,{customErrorMessage:Ki(we)?we:hi.RCA_GRAPHS_FETCH_ERROR}),P===Sn.YBM&&e(ne,{text:Ki(we)?we:hi.RCA_GRAPHS_FETCH_ERROR})]})),xe.isSuccess&&t(x,{children:[Qi(ae)&&Qi(null===(c=null==z?void 0:z.lastInstance)||void 0===c?void 0:c.mainGraphs)&&(null===(d=null==z?void 0:z.lastInstance)||void 0===d?void 0:d.mainGraphs.map((function(n,r){var i,o,a,s=null==ae?void 0:ae.find((function(e){return e.name===n.name})),l=n.groupByControl,u=L===hn.OVERALL?{uniqueOperations:[],groupByOperations:[]}:Ta(L,s,Cn.MAIN_RCA,l,F);return t(x,Me({className:Z.mainGraphBox},{children:[e(x,Me({className:Z.mainGraphMetadataBox},{children:t(x,Me({className:Z.anomalyMetadataOneBox},{children:[e("span",Me({className:Z.headerTitle},{children:jr})),e("span",Me({className:Z.metadataDetails},{children:null===(i=null==z?void 0:z.lastInstance)||void 0===i?void 0:i.title})),e("span",Me({className:Re(Z.regularMetadata,(null===(o=null==z?void 0:z.lastInstance)||void 0===o?void 0:o.category)===yn.SQL&&Z.restrictLines)},{children:null===(a=null==z?void 0:z.lastInstance)||void 0===a?void 0:a.summary}))]}))})),e(x,Me({className:Z.boxContainer},{children:Se(s,u.uniqueOperations,u.groupByOperations,Cn.MAIN_RCA,r+10)}))]}))}))),t(x,Me({mt:2,mb:1,className:Z.ghantChartContainer},{children:[H.isLoading&&e(x,Me({mt:2,className:Z.loadingBox},{children:e(_W,{className:Re(Z.icon,Z.inProgressIcon)})})),H.isError&&404!==(null===(p=null===(h=null==H?void 0:H.error)||void 0===h?void 0:h.response)||void 0===p?void 0:p.status)&&t(x,Me({mt:2},{children:[(P===Sn.WEB||P===Sn.YBA)&&e(ke,{customErrorMessage:Ki(null===(g=null===(m=null===(f=null==H?void 0:H.error)||void 0===f?void 0:f.response)||void 0===m?void 0:m.data)||void 0===g?void 0:g.error)?null===(b=null===(_=null===(y=null==H?void 0:H.error)||void 0===y?void 0:y.response)||void 0===_?void 0:_.data)||void 0===b?void 0:b.error:hi.GANTCHART_FETCH_ERROR}),P===Sn.YBM&&e(ne,{text:Ki(null===(T=null===(S=null===(w=null==H?void 0:H.error)||void 0===w?void 0:w.response)||void 0===S?void 0:S.data)||void 0===T?void 0:T.error)?null===(M=null===(I=null===(C=null==H?void 0:H.error)||void 0===C?void 0:C.response)||void 0===I?void 0:I.data)||void 0===M?void 0:M.error:hi.GANTCHART_FETCH_ERROR})]})),(H.isSuccess||H.isError&&404===(null===(A=null===(E=null==H?void 0:H.error)||void 0===E?void 0:E.response)||void 0===A?void 0:A.status))&&($i(te)?e(x,Me({className:Z.rcaGantChartBox},{children:e(qY,{universeUuid:he,apiUrl:Y,sourceData:H.isError&&404===(null===(O=null===(D=null==H?void 0:H.error)||void 0===D?void 0:D.response)||void 0===O?void 0:O.status)?[]:[te],name:ni,showMoreOptions:!1,expandAll:!0,startTime:null===(N=null==V?void 0:V.startDateTime)||void 0===N?void 0:N.toISOString(),endTime:null===(R=null==V?void 0:V.endDateTime)||void 0===R?void 0:R.toISOString(),onSelectedIssue:q,appName:P,showMultiline:!1},ni)})):t(x,Me({mt:2},{children:[(P===Sn.WEB||P===Sn.YBA)&&e("span",{children:"Failed to fetch anomaly data, please try again."}),P===Sn.YBM&&e(ne,{text:"Failed to fetch anomaly data, please try again."})]})))]})),Qi(ae)&&Qi(Te)&&t(x,Me({mt:2},{children:[e(re,Me({pill:!0,value:K,onChange:function(e,t){var n=window.scrollY;J(t),setTimeout((function(){return window.scrollTo(0,n)}),0)}},{children:null==Te?void 0:Te.map((function(t,n){return e(QY,{value:n,label:t.cause,className:Z.causeTabButton},n)}))})),null==Te?void 0:Te.map((function(n,r){var i,o;return e(x,Me({role:"tabpanel",hidden:K!==r,id:"tabpanel-".concat(r),"aria-labelledby":"tab-".concat(r),style:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px"}},{children:K===r&&t(x,Me({mt:2,display:"flex",flexDirection:"column"},{children:[e("span",Me({className:Z.causeText},{children:n.cause})),t(x,{children:[e("img",{src:bW,alt:"path"}),e("span",Me({className:Z.descriptionText},{children:n.description}))]}),e(x,Me({mt:2,className:(null===(i=null==n?void 0:n.name)||void 0===i?void 0:i.length)>1?Re(Z.gridBox,Z.gridBoxDouble):""},{children:null===(o=null==n?void 0:n.name)||void 0===o?void 0:o.map((function(t,i){var o,a,s,l=null==ae?void 0:ae.find((function(e,r){return r>0&&(null==e?void 0:e.name)===t&&n.index.includes(r)})),u=1===(null===(o=null==n?void 0:n.name)||void 0===o?void 0:o.length),c=null===(a=n.groupByControl)||void 0===a?void 0:a[0];if(Ki(null!==(s=null==l?void 0:l.errorMessage)&&void 0!==s?s:""))return e(x,{});var d=Ta(L,l,Cn.MULTI_SUPPORTING,c,F);return e(x,Me({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:u?"0px":"16px"}},{children:Se(l,d.uniqueOperations,d.groupByOperations,u?Cn.SINGLE_SUPPORTING:Cn.MULTI_SUPPORTING,r+i,n.title)}))}))}))]}))}),r)}))]}))]})]})}))},XY=b((function(e){return{headerContainer:{height:"24px"},metadataContainer:{display:"flex",flexDirection:"row"},metadataItem:{display:"flex",flexDirection:"column",flex:1,minWidth:0},metadataItemWider:{flex:"1.5"},metadataLabel:{display:"flex",justifyContent:"flex-start"},metadataValue:{display:"flex",alignItems:"center",justifyContent:"flex-start",minWidth:0,minHeight:"40px"},truncatedTagWrapper:{maxWidth:"100%",minWidth:0,overflow:"hidden"},truncatedTagContent:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%",display:"block"},truncatedText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"}}})),$Y="WAIT EVENT TYPES",KY="TOTAL_LOAD",JY="AAS",ej="SIZE",tj="TABLET RANGE",nj="LEADER NODE",rj="FOLLOWER NODES",ij=function(n){var r=n.anomalyTabletData,i=n.isHotTablet,o=n.universeUuid,a=n.apiUrl,s=n.appName,u=n.startTime,c=n.endTime,d=n.onSelectedQuery,h=n.onNavigateToUrl,p=xi(),f=XY(),m=l(xn.WAIT_EVENT_TYPE),v=m[0],g=m[1],y=r.eps,_=r.events,b=r.leaderNode,w=r.followerNodes,S=r.size,T=r.totalEpsRatio,C=r.partition,M=r.tabletId;return t(x,Me({className:Re(p.mainContainer,p.mainContainerBorder),p:2},{children:[e(x,Me({className:f.headerContainer},{children:e(I,Me({variant:"h5"},{children:i?"Hot Tablet Queries":"Large Tablet Queries"}))})),t(x,Me({className:p.mainContainer,p:2,mt:2},{children:[t(x,Me({display:"flex",flexDirection:"column"},{children:[e(ee,{children:Yr}),e(I,Me({variant:"h5",style:{marginTop:"4px"}},{children:M}))]})),t(x,Me({className:f.metadataContainer,mt:3},{children:[t(x,Me({className:f.metadataItem},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:$Y})})),e(x,Me({className:f.metadataValue,style:{minWidth:0,maxWidth:"100%"}},{children:e(BW,{data:_,maxEPS:1,groupByOperation:xn.WAIT_EVENT_TYPE,isTabletAnomaly:!0})}))]})),t(x,Me({className:f.metadataItem},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:KY})})),e(x,Me({className:f.metadataValue},{children:e(I,Me({variant:"body2"},{children:Number.isFinite(Number(T))?"".concat((100*Number(T)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}))}))]})),t(x,Me({className:f.metadataItem},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:JY})})),e(x,Me({className:f.metadataValue},{children:e(I,Me({variant:"body2"},{children:Number(y)?Number(y).toLocaleString():"0.0"}))}))]})),t(x,Me({className:f.metadataItem},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:ej})})),e(x,Me({className:f.metadataValue},{children:e(I,Me({variant:"body2"},{children:Pa(S)}))}))]})),t(x,Me({className:Re(f.metadataItem,f.metadataItemWider)},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:tj})})),e(x,Me({className:f.metadataValue},{children:Ki(C)?e(Q,Me({arrow:!0,placement:"top",title:C},{children:e(I,Me({variant:"body2",className:f.truncatedText},{children:ka(C,25)}))})):e(I,Me({variant:"body2"},{children:"-"}))}))]})),t(x,Me({className:Re(f.metadataItem,f.metadataItemWider)},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:nj})})),e(x,Me({className:f.metadataValue},{children:b?e(Q,Me({title:b,placement:"top",arrow:!0},{children:e(x,Me({className:f.truncatedTagWrapper},{children:e(ae,Me({variant:"light",size:"medium"},{children:e("span",Me({className:f.truncatedTagContent},{children:ka(b,20)}))}))}))})):e(I,Me({variant:"body2"},{children:"-"}))}))]})),t(x,Me({className:Re(f.metadataItem,f.metadataItemWider)},{children:[e(x,Me({className:f.metadataLabel},{children:e(ee,{children:rj})})),e(x,Me({className:f.metadataValue,flexWrap:"wrap"},{children:w&&(null==w?void 0:w.length)>0?e(Q,Me({arrow:!0,placement:"top",title:w.join(",\n")},{children:t(x,Me({display:"flex",alignItems:"center",flexWrap:"wrap"},{children:[e(x,Me({className:f.truncatedTagWrapper},{children:e(ae,Me({variant:"light",size:"medium"},{children:e("span",Me({className:f.truncatedTagContent},{children:ka(w[0],20)}))}))})),w.length>=2&&e(ae,Me({customSx:{marginLeft:"4px"},variant:"light",size:"medium"},{children:e("span",{children:"+".concat(w.length-1)})}))]}))})):e(I,Me({variant:"body2"},{children:"-"}))}))]}))]})),e(x,{children:e(_Y,{groupByOperation:v,dbWaitEventType:Kn.toUpperCase(),universeUuid:o,name:M,apiUrl:a,appName:s,startTime:u,endTime:c,onSelectedQuery:d,isDbLoadMetadata:!1,isNodeLoadMetadata:!1,isTabletLoadMetadata:!0,onSetGroupByOperation:function(e){g(e)},onNavigateToUrl:h})})]}))]}))},oj=function(n){var r=n.size,i=n.maxSize,o=u(null);if(a((function(){if(o.current&&i&&0!==i){var e=DM(o.current),t=r===i,n=Math.max(0,i-r),a=[{name:"size",type:"bar",stack:"total",label:{show:!1},data:[r],itemStyle:{color:t?"#F9ACAC":"#8DABF0"}}];n>0&&a.push({name:"empty",type:"bar",stack:"total",label:{show:!1},data:[n],itemStyle:{color:"transparent"},silent:!0,tooltip:{show:!1}});var s={animation:!1,grid:{left:0,right:0,top:10,bottom:10,containLabel:!1},tooltip:{trigger:"item",confine:!1,extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:99999 !important;",formatter:function(e){if("empty"===e.seriesName)return"";var t=Pa(r);return'<div style="letter-spacing:0.5px;padding: 12px 16px;">\n <div style="margin-bottom: 4px;"><b>Size</b></div>\n <div>'.concat(t,"</div>\n </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:a};e.setOption(s);var l=new ResizeObserver((function(){e.resize()}));return l.observe(o.current),function(){l.disconnect(),e.dispose()}}}),[r,i]),!i||0===i)return e("div",{children:"0 B"});var s=Pa(r),l=Math.min(r/i,1),c=Math.max(100*l,10);return t(x,Me({display:"flex",flexDirection:"row",alignItems:"center",style:{width:"100%",height:"".concat(40,"px")}},{children:[e("div",{className:"size-bar-chart-container",ref:o,style:{height:"".concat(40,"px"),width:"".concat(c,"%"),minWidth:"30px",display:"flex",alignItems:"center",justifyContent:"flex-start"}}),e(x,Me({style:{marginLeft:"4px",fontSize:"11.5px",color:"#0B1117",whiteSpace:"nowrap"}},{children:s}))]}))};function aj(){return aj=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},aj.apply(null,arguments)}const sj=e=>r.createElement("svg",aj({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),VY||(VY=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.426 2.193A5.927 5.927 0 0 1 12.19 3.81a5.927 5.927 0 1 1-8.38 8.38 5.927 5.927 0 0 1 2.616-9.997Zm.907 8.474a.667.667 0 1 0 1.334 0 .667.667 0 0 0-1.334 0Zm0-2a.667.667 0 0 0 1.334 0V5.333a.667.667 0 0 0-1.334 0v3.334Z",fill:"#DA1515"})));var lj="tabletId",uj="size",cj="walSize",dj="sstSize",hj="leaderNode",pj="followerNodes",fj="partition",mj="eps",vj="totalEpsRatio",gj="databaseType",yj="events",_j="Tablet ID",bj="Size",xj="Partition",wj="Leader Node",Sj="Follower Nodes",Tj="Total Load",Cj="Avg Active Context",Ij="Wait Event Types",Mj="WAL Size",Ej="SST Size",Aj="Database Type",Dj=function(r){var i,o,s,d,h,p,f,m,v,y=r.universeUuid,_=r.appName,b=r.apiUrl,w=r.startTime,S=r.endTime,T=r.dateTimeRange,C=r.getClusterDetails,M=r.timezone,E=r.amomalyGraphRequestParams,A=r.formattedAnomalyRca,D=r.metricMeasure,O=r.urlParams,N=r.tableName,R=r.dbName,L=r.tabletId,P=r.isHotTablet,k=r.anomalyData,B=r.onSelectedQuery,F=r.onNavigateToUrl,U=r.onEChartsDateSelect,z=xi(),H=l([]),V=H[0],W=H[1],Y=l(!1),j=Y[0],G=Y[1],q=l(wr[0]),X=q[0],$=q[1],K=l(0),J=K[0],ee=K[1],te=l(0),re=te[0],ie=te[1],se=l(0),le=se[0],ue=se[1],ce=l(null),de=ce[0],he=ce[1],pe=l(On.DESC),fe=pe[0],me=pe[1],ve=l([]),ge=ve[0],ye=ve[1],_e=l(1),be=_e[0],xe=_e[1],we=l(P?mj:uj),Se=we[0],Te=we[1],Ce=u(""),Ie=C(),Ee=Ie.cluster,Ae=Ie.region,De=Ie.zone,Oe=Ie.node,Ne=c((function(){return JSON.stringify({cluster:Ee,region:Ae,zone:De,node:Oe})}),[Ee,Ae,De,Oe]),Le=c((function(){return[eW.fetchTabletsStatsPage,y,X,w,S,Se,fe,L,R,Ne]}),[y,X,w,S,Se,fe,L,R,Ne]),Pe=g(Le,(function(e){var t=e.pageParam,n=void 0===t?0:t;return gW.fetchTabletStatsPage(y,{tableName:N,dbName:R,currentTablePage:n,apiUrl:b,pageSize:X,startTime:w,endTime:S,sortBy:Se,sortDirection:fe},C)}),{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,h,p,f,m,v,g,y,_,b,x,w,S,T,C,I=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:[]}));!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)&&fe===On.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)&&(P&&Se===mj?(xe(null!==(d=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)&&void 0!==d?d:1),he(null===(f=null===(p=null===(h=null==e?void 0:e.pages)||void 0===h?void 0:h[0])||void 0===p?void 0:p.data)||void 0===f?void 0:f.entities[0])):P||Se!==uj||(ue(null!==(_=null===(y=null===(g=null===(v=null===(m=null==e?void 0:e.pages)||void 0===m?void 0:m[0])||void 0===v?void 0:v.data)||void 0===g?void 0:g.entities[0])||void 0===y?void 0:y.size)&&void 0!==_?_:1),he(null===(w=null===(x=null===(b=null==e?void 0:e.pages)||void 0===b?void 0:b[0])||void 0===x?void 0:x.data)||void 0===w?void 0:w.entities[0])));var M=La(I,!0);ye(M),ie(null!==(C=null===(T=null===(S=null==e?void 0:e.pages[0])||void 0===S?void 0:S.data)||void 0===T?void 0:T.totalCount)&&void 0!==C?C:0)}}),Be=Pe.isFetching,Fe=Pe.isSuccess,Ue=Pe.isError,ze=Pe.error,He=Pe.fetchNextPage,Ve=Pe.hasNextPage,We=Pe.isFetchingNextPage,Ye=Pe.data;a((function(){var e,t,n;if(void 0!==Ve&&(null===(e=null==Ye?void 0:Ye.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==Ye?void 0:Ye.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;Ve&&!We&&J===r&&J>=0&&He()}}),[Ve,He,J,We,null===(i=null==Ye?void 0:Ye.pages)||void 0===i?void 0:i.length]),a((function(){Ue&&ye([])}),[Ue]),a((function(){var e=JSON.stringify(Le);Ce.current&&Ce.current!==e&&ee(0),Ce.current=e}),[Le]);var je=Be,Ge=c((function(){var e;return bi(He,"Rows per page:",null!==(e=null==ge?void 0:ge.length)&&void 0!==e?e:0,Ve)}),[He,null==ge?void 0:ge.length,Ve]),qe=c((function(){return{sorting:Se?[{id:Se,desc:fe===On.DESC}]:[],pagination:{pageIndex:J,pageSize:X},isLoading:je,showProgressBars:je}}),[Se,fe,J,X,je]);return a((function(){var r,i,o,a,s,l,u,c,d=sessionStorage.getItem(vi),h=d?JSON.parse(d):null;W([{name:lj,label:_j,options:{sort:!1,display:!0,customHeadRender:function(){return e(Q,Me({title:ui.TABLET_ID_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:_j})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{minWidth:"10%",maxWidth:"20%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(n){return t(x,Me({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e("span",{children:Ki(n)?n:"-"}),!P&&n===(null==de?void 0:de.tabletId)&&e(sj,{style:{marginLeft:"4px"}})]}))}}},{name:uj,label:bj,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"10%",maxWidth:"20%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.SIZE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:bj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},customBodyRender:function(t){if(!P)return e(oj,{size:t,maxSize:le});var n=Pa(t);return Ki(n)?n:"-"}}},{name:fj,label:xj,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"10%",maxWidth:"20%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.PARTITION_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:xj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Ki(e)?e:"-"}}},{name:hj,label:wj,options:{sort:!1,display:null!==(r=null==h?void 0:h.includes(hj))&&void 0!==r?r:!P,customHeadRender:function(){return e(Q,Me({title:ui.LEADER_NODE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:wj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{minWidth:"10%",maxWidth:"20%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(t){return e(ae,Me({variant:"light",size:"medium"},{children:t}))}}},{name:pj,label:Sj,options:{sort:!1,display:null!==(i=null==h?void 0:h.includes(pj))&&void 0!==i?i:!P,customHeadRender:function(){return e(Q,Me({title:ui.FOLLOWER_NODES_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Sj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{minWidth:"10%",maxWidth:"20%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(r){var i,o,a;return t(n,{children:[e(ae,Me({variant:"light",size:"medium"},{children:null!==(i=null==r?void 0:r[0])&&void 0!==i?i:"-"})),(null==r?void 0:r.length)>=2&&e(ae,Me({customSx:{marginLeft:"4px"},variant:"light",size:"medium"},{children:e(Q,Me({title:null!==(a=null===(o=null==r?void 0:r.slice(1))||void 0===o?void 0:o.join("\n"))&&void 0!==a?a:"",placement:"top",arrow:!0},{children:e("span",{children:"+".concat(r.length-1)})}))}))]})}}},{name:vj,label:Tj,options:{sort:!1,display:null!==(o=null==h?void 0:h.includes(vj))&&void 0!==o?o:!!P,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_EPS_RATIO_TABLET_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Tj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:mj,label:Cj,options:{sort:!0,display:null!==(a=null==h?void 0:h.includes(mj))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.ACTIVE_SESSIONS_PER_SECOND_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Cj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:yj,label:Ij,options:{sort:!1,display:null!==(s=null==h?void 0:h.includes(yj))&&void 0!==s?s:!!P,setCellHeaderProps:function(){return{style:{zIndex:50,minWidth:"10%",maxWidth:"15%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.WAIT_EVENT_TYPE_CHART_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Ij})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},customBodyRender:function(t){return e(BW,{data:null!=t?t:[],maxEPS:be,groupByOperation:xn.WAIT_EVENT_TYPE})}}},{name:cj,label:Mj,options:{sort:!0,display:null!==(l=null==h?void 0:h.includes(cj))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.WAL_SIZE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Mj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Pa(e)}}},{name:dj,label:Ej,options:{sort:!0,display:null!==(u=null==h?void 0:h.includes(dj))&&void 0!==u&&u,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.SST_SIZE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Mj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Pa(e)}}},{name:gj,label:Aj,options:{sort:!1,display:null!==(c=null==h?void 0:h.includes(gj))&&void 0!==c&&c,customHeadRender:function(){return e(Q,Me({title:ui.DATABASE_TYPE_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:z.headerBox},{children:[e(I,Me({variant:"body2",className:z.headerText},{children:Aj})),e("img",{src:zW,alt:"info",className:z.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(z.tableHeaderCell,_===Sn.WEB&&z.tableBorder)}},setCellProps:function(){return{className:z.tabletNodeLoadMetadataTableCell}},customBodyRender:function(e){return Ki(e)?e:"-"}}}])}),[ge,be,le,de]),t(n,{children:[j&&e(UW,{appName:_,hiddenColumns:[lj,uj,fj],columns:V,isTabletsMetadataColumns:!0,onColumnVisibilityChange:function(e,t){W((function(n){return n.map((function(n){return n.name===e?Me(Me({},n),{options:Me(Me({},n.options),{display:t})}):n}))}))},close:function(){return G(!1)}}),e(x,Me({className:Re(z.mainContainer,z.mainContainerBorder),mt:2,p:2},{children:t(x,Me({style:{display:"flex",flexDirection:"column"}},{children:[t(x,Me({className:z.loadFilterContainer,style:{alignItems:"center"}},{children:[e(I,Me({variant:"h5"},{children:"Tablets"})),e(Z,Me({size:"medium",variant:_===Sn.YBM?"ghost":"secondary",startIcon:e(VW,{style:{marginBottom:"2px"}}),onClick:function(){return G(!0)},dataTestId:"TabletMetadata-AddFieldsButton"},{children:di}))]})),e(x,{children:t(x,Me({className:_===Sn.YBM?z.overrideMuiTableContainer:z.overrideMuiTableContainerWeb},{children:[Ue&&t(x,Me({mt:3,className:z.recommendation},{children:[(_===Sn.YBA||_===Sn.WEB)&&e(ke,{customErrorMessage:Ki(null===(s=null===(o=null==ze?void 0:ze.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error)?null===(h=null===(d=null==ze?void 0:ze.response)||void 0===d?void 0:d.data)||void 0===h?void 0:h.error:hi.TABLETS_DATA_FETCH_ERROR}),_===Sn.YBM&&e(ne,{text:Ki(null===(f=null===(p=null==ze?void 0:ze.response)||void 0===p?void 0:p.data)||void 0===f?void 0:f.error)?null===(v=null===(m=null==ze?void 0:ze.response)||void 0===m?void 0:m.data)||void 0===v?void 0:v.error:hi.TABLETS_DATA_FETCH_ERROR})]})),Fe&&e(oe,{id:"TabletMetadata",className:z.overrideMuiTable,data:null!=ge?ge:[],columns:null==V?void 0:V.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:je,options:{sort:!0,filter:!0,count:re,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:X,rowsPerPage:X,autoResetPageIndex:!1,onChangePage:function(e){ee(e)},onChangeRowsPerPage:function(e){$(e),ee(0)},textLabels:{body:{noMatch:"There are no tablets accessed by the current table"}},rowsPerPageOptions:wr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(Se?[{id:Se,desc:fe===On.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return Te(P?mj:uj),me(On.DESC),void ee(0);var n=t[0],r=n.id,i=n.desc?On.DESC:On.ASC;Te(r),me(i),ee(0)},paginationDisplayMode:"custom",customFooter:Ge,manualSorting:!0,state:qe}},"TabletMetadata-".concat(Se,"-").concat(fe))]}))})]}))})),e(x,Me({mt:3},{children:de&&e(ij,{anomalyTabletData:de,isHotTablet:P,appName:_,universeUuid:y,startTime:w,endTime:S,apiUrl:b,onSelectedQuery:B,onNavigateToUrl:F})})),t(x,Me({mt:2},{children:[e(I,Me({variant:"h5"},{children:"Possible Causes"})),e(x,Me({mt:1},{children:e(wW,{appName:_,timezone:M,startTime:w,endTime:S,anomalyData:k,getClusterDetails:C,apiUrl:b,dateTimeRange:T,metricMeasure:D,amomalyGraphRequestParams:E,formattedAnomalyRca:A,onEChartsDateSelect:U,urlParams:O})}))]}))]})},Oj=function(t){var r=t.appName,i=t.metricMeasure,o=t.timezone,a=t.getClusterDetails,s=t.apiUrl,l=t.urlParams,u=t.tabletTab,c=t.dateTimeRange,d=t.startTime,h=t.endTime,p=t.isHotTablet,f=t.anomalyData,m=t.amomalyGraphRequestParams,v=t.formattedAnomalyRca,g=t.onSelectedQuery,y=t.onNavigateToUrl,_=t.onEChartsDateSelect,b=ma(f),x=b.tableName,w=b.dbName,S=b.tabletId,T=a().universeUuid;return e(n,{children:u===zn.TABLET_OVERVIEW&&e(Dj,{appName:r,timezone:o,urlParams:l,metricMeasure:i,amomalyGraphRequestParams:m,formattedAnomalyRca:v,getClusterDetails:a,universeUuid:T,apiUrl:s,dateTimeRange:c,startTime:d,endTime:h,tableName:null!=x?x:null,dbName:null!=w?w:null,tabletId:null!=S?S:null,isHotTablet:p,anomalyData:f,onSelectedQuery:g,onNavigateToUrl:y,onEChartsDateSelect:_})})},Nj=function(n){var r,i,o,s,u,c,d,h,p,f,m,v,g,y,_,b,w,S,T=n.metricMeasure,C=n.appName,I=n.timezone,M=n.universeQueryStatsData,E=n.amomalyGraphRequestParams,A=n.formattedAnomalyRca,D=n.anomalyData,O=n.gantChartData,N=n.dateTimeRange,R=n.urlParams,L=n.apiUrl,P=n.sqlTab,k=n.tabletTab,B=n.getClusterDetails,F=n.onEChartsDateSelect,U=n.onSelectedIssue,z=n.onSelectedQuery,H=n.onOutlierTypeSelected,V=n.onNumNodesChanged,W=n.onNavigateToUrl,Y=l([]);Y[0];var j=Y[1],G=l(Kn.toUpperCase()),q=G[0],Q=G[1],Z=l(jn[0]),X=Z[0],$=Z[1],K=function(e){j(e)},J=function(e){Q(e)},ee=function(e){$(e)};return a((function(){var e,t;(null===(e=null==D?void 0:D.lastInstance)||void 0===e?void 0:e.category)===yn.NODE&&(null===(t=null==D?void 0:D.lastInstance)||void 0===t?void 0:t.type)===bn.HOT_NODE_CPU&&J(Xn.CPU.toUpperCase())}),[D]),t(x,{children:[(null===(r=null==D?void 0:D.lastInstance)||void 0===r?void 0:r.category)===yn.SQL&&e(hY,{metricMeasure:T,apiUrl:L,anomalyData:D,universeQueryStatsData:M,appName:C,timezone:I,urlParams:R,dateTimeRange:N,sqlTab:P,amomalyGraphRequestParams:E,formattedAnomalyRca:A,getClusterDetails:B,onEChartsDateSelect:F}),(null===(i=null==D?void 0:D.lastInstance)||void 0===i?void 0:i.category)===yn.NODE&&(null===(o=null==D?void 0:D.lastInstance)||void 0===o?void 0:o.type)!==bn.SLOW_DISKS&&e(GY,{appName:C,dateTimeRange:N,groupByOperation:X,onSetGroupByOperation:ee,onFilterBarData:K,onChangeDbWaitEventType:J,dbWaitEventType:q,timezone:I,apiUrl:L,anomalyData:D,urlParams:R,metricMeasure:T,amomalyGraphRequestParams:E,formattedAnomalyRca:A,getClusterDetails:B,onOutlierTypeSelected:H,onNumNodesChanged:V,onEChartsDateSelect:F,onNavigateToUrl:W}),(null===(s=null==D?void 0:D.lastInstance)||void 0===s?void 0:s.category)===yn.APP&&e(GY,{appName:C,dateTimeRange:N,groupByOperation:X,onSetGroupByOperation:ee,onFilterBarData:K,onChangeDbWaitEventType:J,dbWaitEventType:q,timezone:I,apiUrl:L,anomalyData:D,urlParams:R,metricMeasure:T,amomalyGraphRequestParams:E,formattedAnomalyRca:A,getClusterDetails:B,onOutlierTypeSelected:H,onNumNodesChanged:V,onEChartsDateSelect:F,onSelectedQuery:z,onNavigateToUrl:W}),(null===(u=null==D?void 0:D.lastInstance)||void 0===u?void 0:u.category)===yn.DB&&((null===(c=null==D?void 0:D.lastInstance)||void 0===c?void 0:c.type)===bn.HOT_TABLET||(null===(d=null==D?void 0:D.lastInstance)||void 0===d?void 0:d.type)===bn.LARGE_TABLET)&&e(Oj,{appName:C,metricMeasure:T,getClusterDetails:B,apiUrl:L,dateTimeRange:N,timezone:I,amomalyGraphRequestParams:E,formattedAnomalyRca:A,startTime:null!==(p=null===(h=null==N?void 0:N.startDateTime)||void 0===h?void 0:h.toISOString())&&void 0!==p?p:null,endTime:null!==(m=null===(f=null==N?void 0:N.endDateTime)||void 0===f?void 0:f.toISOString())&&void 0!==m?m:null,anomalyData:D,isHotTablet:(null===(v=null==D?void 0:D.lastInstance)||void 0===v?void 0:v.type)===bn.HOT_TABLET,tabletTab:k,urlParams:R,onEChartsDateSelect:F,onSelectedQuery:z,onNavigateToUrl:W}),((null===(g=null==D?void 0:D.lastInstance)||void 0===g?void 0:g.category)===yn.DB&&((null===(y=null==D?void 0:D.lastInstance)||void 0===y?void 0:y.type)===bn.UNUSED_INDEX||(null===(_=null==D?void 0:D.lastInstance)||void 0===_?void 0:_.type)===bn.REDUNDANT_INDEX||(null===(b=null==D?void 0:D.lastInstance)||void 0===b?void 0:b.type)===bn.RANGE_SHARDING)||(null===(w=null==D?void 0:D.lastInstance)||void 0===w?void 0:w.category)===yn.NODE&&(null===(S=null==D?void 0:D.lastInstance)||void 0===S?void 0:S.type)===bn.SLOW_DISKS)&&e(ZY,{metricMeasure:T,appName:C,dateTimeRange:N,timezone:I,universeQueryData:M,amomalyGraphRequestParams:E,formattedAnomalyRca:A,apiUrl:L,anomalyData:D,gantChartData:O,onEChartsDateSelect:F,onSelectedIssue:U,urlParams:R,getClusterDetails:B})]})},Rj=E(te)((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)}}})),Lj=i.memo((function(r){var i,o,s,u,c,d,h,p,f,m,v=r.universeUuid,g=r.universeData,_=r.anomalyData,b=r.amomalyGraphRequestParams,w=r.appName,S=r.timezone,T=r.formattedAnomalyRca,C=r.apiUrl,I=r.dbIdParam,M=r.isHistoricalQueryView,E=r.troubleshootUuid,A=r.queryIdParam,D=r.showStandaloneAnomalies,O=r.onSelectedIssue,N=r.onSelectedQuery,R=r.onNavigateToUrl,L=xi(),P=function(e){var t,n,r,i,o,a,s=hn.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===En.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===En.NONE&&(s=hn.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==Mn.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==Mn.BOTTOM||(s=hn.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===En.TABLE?s=hn.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===En.NAMESPACE&&(s=hn.OUTLIER_DB)),s}(_),k=function(e){var t,n,r=Mn.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Mn.TOP?r=Mn.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===Mn.BOTTOM&&(r=Mn.BOTTOM),r}(_),B=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}(_),F=new URLSearchParams(window.location.search),U={startTime:F.get("startTime"),endTime:F.get("endTime"),duration:F.get("duration"),dbId:F.get("dbId"),queryId:null!=A?A:void 0,userId:F.get("userId"),type:F.get("type"),universeId:v},z=null==U?void 0:U.endTime,H=z?new Date(z):new Date,V=new Date(H);(null==U?void 0:U.startTime)?V=new Date(null==U?void 0:U.startTime):V.setDate(V.getDate()-1);var W=l(!0),Y=W[0],j=W[1],G=l($n),q=G[0],Q=G[1],Z=l(Jn),X=Z[0],$=Z[1],K=l(!0),J=K[0],ee=K[1],te=l(Kn),ie=te[0],oe=te[1],ae=l(Kn),se=ae[0],le=ae[1],ue=l(Kn),ce=ue[0],de=ue[1],he=l(Kn),pe=he[0],fe=he[1],me=l(P),ve=me[0],ge=me[1],ye=l(k),_e=ye[0],be=ye[1],xe=l(zn.TABLET_OVERVIEW),we=xe[0],Se=xe[1],Te=l(Hn.QUERY_OVERVIEW),Ce=Te[0],Ie=Te[1],Ee=l(null!==(i=null==U?void 0:U.duration)&&void 0!==i?i:Nr[0].value),Ae=Ee[0],De=Ee[1],Oe=l(B),Ne=Oe[0],Le=Oe[1],Pe=l(null),Be=Pe[0],Fe=Pe[1],Ue=l((function(){return Na(Ae,H,V)})),ze=Ue[0],He=Ue[1],Ve=l(null),We=Ve[0],Ye=Ve[1],je=y([eW.fetchAnomalyGroupsById,v,null==_?void 0:_.groupId,ze.startDateTime,ze.endDateTime],(function(){return _&&(null==_?void 0:_.groupId)?gW.fetchAnomalyGroupById(v,_.groupId,ze.startDateTime.toISOString(),ze.endDateTime.toISOString(),C):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){Ye(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:Ki(E)}),Ge=function(e){j(e)},qe=function(){var e,t,n=null===(e=ze.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=ze.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:v,cluster:ie,region:se,zone:ce,node:pe,metricMeasure:ve,numNodes:Ne,outlierType:_e,formattedStartDate:n,formattedEndDate:r}},Qe=function(){if(Ae!==Or.CUSTOM){var e=Oa(Ae,H),t=e.formattedStartDate,n=e.formattedEndDate;He({startDateTime:t,endDateTime:n})}};a((function(){Qe()}),[Ae]);var Ze=function(e,t){He({startDateTime:new Date(e),endDateTime:new Date(t)})};a((function(){(null==U?void 0:U.duration)&&Ki(U.duration)&&Qe()}),[]);var Xe=function(e){ge(e)},$e=function(e){be(e)},Ke=function(e){Le(e>10?10:e)},Je=function(e,t,n,r){ee(r),n===$n&&(Q($n),oe(Kn),le(Kn)),(e||t)&&(Q(n),e&&(oe(n),le("")),t&&(le(n),oe("")))},et=function(e,t,n){n===Jn&&($(Jn),de(Kn),fe(Kn)),(e||t)&&($(n),e&&(de(n),fe("")),t&&(de(""),fe(n)))},tt=y([eW.fetchQueryStats,v],(function(){return gW.fetchQueryStats(v,{dbId:M?I:fa(_).dbId,queryId:M?A:fa(_).queryId},C)}),{onSuccess:function(e){Fe([e])},onError:function(e){Fe([]),console.error("Failed to fetch query stats",e)},enabled:M||(null==_?void 0:_.category)===yn.SQL}),nt=tt.isLoading,rt=tt.isError;if(nt)return e(x,Me({mt:2,className:L.loadingBox},{children:e(_W,{className:Re(L.icon,L.inProgressIcon)})}));if(rt&&M&&(null==_?void 0:_.category)===yn.SQL)return t(x,Me({mt:3},{children:[(w===Sn.YBA||w===Sn.WEB)&&e(ke,{customErrorMessage:hi.QUERY_STATS_FETCH_ERROR}),w===Sn.YBM&&e(ne,{text:hi.QUERY_STATS_FETCH_ERROR})]}));var it=null==U?void 0:U.queryId,ot=M?it:null==it?void 0:it[0],at=null==Be?void 0:Be.find((function(e){return e.queryId===ot}));return t(x,Me({style:{height:"100vh",display:"flex",flexDirection:"column"}},{children:[e(Qa,{appName:w,queryObject:at,isHistoricalQueryView:M,showStandaloneAnomalies:D,anomalyData:$i(We)?We:null,onSelectedIssue:$i(_)?O:void 0,onSelectedQuery:N,showDetails:Y,onShowDetails:Ge,onNavigateToUrl:R}),((null===(o=null==We?void 0:We.lastInstance)||void 0===o?void 0:o.category)===yn.SQL||M)&&e(re,Me({value:Ce,onChange:function(e,t){t!==Ce&&Ie(t)}},{children:e(Rj,{value:Hn.QUERY_OVERVIEW,label:Hn.QUERY_OVERVIEW})})),(null===(s=null==We?void 0:We.lastInstance)||void 0===s?void 0:s.category)===yn.DB&&!M&&((null===(u=null==We?void 0:We.lastInstance)||void 0===u?void 0:u.type)===bn.HOT_TABLET||(null===(c=null==We?void 0:We.lastInstance)||void 0===c?void 0:c.type)===bn.LARGE_TABLET)&&e(re,Me({value:we,onChange:function(e,t){t!==we&&Se(t)}},{children:e(Rj,{value:zn.TABLET_OVERVIEW,label:zn.TABLET_OVERVIEW})})),e(qa,{universeData:g,queryObject:at,isHistoricalQueryView:M,universeQueryStatsData:Be,anomalyData:$i(We)?We:null,showDetails:Y,onShowDetails:Ge}),e(x,Me({className:Re(w===Sn.WEB?L.stickyHeader:L.stickyHeaderYBM)},{children:e(ou,{appName:w,filterDuration:Ae,startDateTime:ze.startDateTime,endDateTime:ze.endDateTime,timezone:S,onSelectedFilterDuration:function(e){De(e)},metricMeasure:ve,showStandaloneAnomalies:D,onStartDateChange:function(e){e&&He((function(t){return Me(Me({},t),{startDateTime:e})}))},onEndDateChange:function(e){e&&He((function(t){return Me(Me({},t),{endDateTime:e})}))},onRefresh:function(){He((function(e){return Me(Me({},e),{endDateTime:new Date})}))}})})),t(x,Me({style:{flex:1,overflow:"auto"}},{children:[M&&t(n,{children:[e($a,{appName:w,universeData:g,anomalyData:null,clusterRegionItem:q,zoneNodeItem:X,isPrimaryCluster:J,cluster:ie,region:se,metricMeasure:ve,outlierType:_e,numNodes:Ne,onZoneNodeSelected:et,onClusterRegionSelected:Je,onOutlierTypeSelected:$e,onSplitTypeSelected:Xe,onNumNodesChanged:Ke}),e(hY,{urlParams:U,anomalyData:null,getClusterDetails:qe,metricMeasure:ve,apiUrl:C,appName:w,timezone:S,sqlTab:Ce,dateTimeRange:ze,universeQueryStatsData:Be,amomalyGraphRequestParams:null,formattedAnomalyRca:null,onEChartsDateSelect:Ze})]}),$i(We)&&!M&&t(n,{children:[!((null===(d=null==We?void 0:We.lastInstance)||void 0===d?void 0:d.category)===yn.APP||(null===(h=null==We?void 0:We.lastInstance)||void 0===h?void 0:h.category)===yn.NODE&&(null===(p=null==We?void 0:We.lastInstance)||void 0===p?void 0:p.type)!==bn.SLOW_DISKS)&&e($a,{appName:w,universeData:g,anomalyData:We,clusterRegionItem:q,zoneNodeItem:X,isPrimaryCluster:J,cluster:ie,region:se,metricMeasure:ve,outlierType:_e,numNodes:Ne,showSplitSelector:(null===(f=null==We?void 0:We.lastInstance)||void 0===f?void 0:f.type)!==bn.LARGE_TABLET&&(null===(m=null==We?void 0:We.lastInstance)||void 0===m?void 0:m.type)!==bn.HOT_TABLET,onZoneNodeSelected:et,onClusterRegionSelected:Je,onOutlierTypeSelected:$e,onSplitTypeSelected:Xe,onNumNodesChanged:Ke}),e(Nj,{metricMeasure:ve,appName:w,dateTimeRange:ze,timezone:S,universeQueryStatsData:Be,amomalyGraphRequestParams:b,formattedAnomalyRca:T,apiUrl:C,anomalyData:We,gantChartData:je,tabletTab:we,sqlTab:Ce,onEChartsDateSelect:Ze,onSelectedIssue:O,onSelectedQuery:N,urlParams:U,getClusterDetails:qe,onOutlierTypeSelected:$e,onNumNodesChanged:Ke,onNavigateToUrl:R})]})]}))]}))})),Pj=function(n){var r,i,o,s=n.universeUuid,u=n.troubleshootUuid,c=n.appName,d=n.timezone,h=n.apiUrl,p=n.showStandaloneAnomalies,f=void 0!==p&&p,m=n.onSelectedIssue,v=n.onSelectedQuery,g=n.onNavigateToUrl,_=xi(),b=l(null),w=b[0],S=b[1],T=l(null),C=T[0],I=T[1],M=l(null),E=M[0],A=M[1],D=new URLSearchParams(window.location.search),O=window.location.pathname,N=null;if(O.includes("/queries/")){var R=O.split("/"),L=R.indexOf("queries");N=R[L+1]||null}c!==Sn.YBM&&c!==Sn.YBA||(N=D.get("queryId"));var P=D.get("dbId"),k=Ki(N);a((function(){localStorage.setItem("appName",c)}),[]);var B=y(eW.fetchUniverseById,(function(){return gW.fetchUniverseById(s,h)})),F=null===(o=null===(i=null===(r=null==B?void 0:B.error)||void 0===r?void 0:r.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error,U=y([eW.fetchAnomalies,s],(function(){return gW.fetchAnomaliesById(s,u,h)}),{onSuccess:function(e){S(e),I(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 $i(e)}));return Oe(Oe([],n,!0),o,!0)}(e)),A(function(e){var t,n;if(pa=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(wa()):r>1&&i.index.push(wa()+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:Ki(u)}),z=U.isLoading,H=U.isError,V=U.isIdle;return z?e(x,Me({mt:2,className:_.loadingBox},{children:e(_W,{className:Re(_.icon,_.inProgressIcon)})})):H||F||V&&void 0===w?t(x,Me({mt:3},{children:[(c===Sn.YBA||c===Sn.WEB)&&e(ke,{customErrorMessage:H?hi.ANOMALIES_FETCH_ERROR:hi.QUERY_STATS_FETCH_ERROR}),c===Sn.YBM&&e(ne,{text:H?hi.ANOMALIES_FETCH_ERROR:hi.QUERY_STATS_FETCH_ERROR})]})):e(ho,Me({appName:c},{children:e(x,Me({className:Re(c!==Sn.WEB&&_.headerContainerYBM)},{children:(null==B?void 0:B.data)&&e(Lj,{apiUrl:h,troubleshootUuid:u,anomalyData:w,universeData:null==B?void 0:B.data,universeUuid:s,appName:c,timezone:d,isHistoricalQueryView:k,amomalyGraphRequestParams:C,formattedAnomalyRca:E,dbIdParam:P,queryIdParam:N,showStandaloneAnomalies:f,onSelectedIssue:m,onSelectedQuery:v,onNavigateToUrl:g})}))}))},kj="databaseId",Bj="eps",Fj="events",Uj="firstActive",zj="lastActive",Hj="latencyAvg",Vj="latencyP90",Wj="latencyP99",Yj="namespaceName",jj="query",Gj="queryid",qj="queryType",Qj="rowsAvg",Zj="rps",Xj="totalTime",$j="universeId",Kj="totalEpsRatio",Jj={SHOW_ALL:"All Queries",SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ACTIVITIES:"Background Tasks Only"},eG=function(r){var i,o,s,d,h,p,f,m,_,b=r.universeUuid,w=r.apiUrl,T=r.startTime,C=r.endTime,M=r.appName,E=r.groupByOperation,O=r.filteredLegends,N=r.getClusterDetails,R=r.onSelectedQuery,L=r.onNavigateToUrl,P=Le(),k=xi(),B=l(null),F=B[0],H=B[1],V=l(""),W=V[0],Y=V[1],j=l(""),G=j[0],q=j[1],$=u(LW((function(e){Y(e),de(0)}),500)),K=l([]),J=K[0],ee=K[1],te=l(!1),re=te[0],ie=te[1],ae=l(wr[0]),se=ae[0],le=ae[1],ue=l(0),ce=ue[0],de=ue[1],he=l(0),pe=he[0],fe=he[1],me=l(Kn),ve=me[0],ge=me[1],_e=l([]),be=_e[0],xe=_e[1],we=l([]),Se=we[0],Te=we[1],Ce=l(Bj),Ie=Ce[0],Ee=Ce[1],Ae=l(null),De=Ae[0],Oe=Ae[1],Ne=l(Jj.SHOW_ALL),Pe=Ne[0],Be=Ne[1],Fe=l(1),Ue=Fe[0],ze=Fe[1],He=l(On.DESC),Ve=He[0],We=He[1],Ye=u(""),je=N(),Ge=je.cluster,qe=je.region,Qe=je.zone,Ze=je.node,Xe=c((function(){return JSON.stringify({cluster:Ge,region:qe,zone:Qe,node:Ze})}),[Ge,qe,Qe,Ze]),$e=c((function(){return JSON.stringify((O||[]).slice().sort())}),[O]),Ke=c((function(){return[eW.fetchQueriesStatsPage,b,se,T,C,W,ve,Ie,Ve,De,E,Xe,$e]}),[b,se,T,C,W,ve,Ie,Ve,De,E,Xe,$e]),Je=v((function(e){return gW.sendTelemetryEvent(b,e,w)})),et=g(Ke,(function(e){var t=e.pageParam,n=void 0===t?0:t;return gW.fetchQueriesStatsPage(b,{currentTablePage:n,apiUrl:w,pageSize:se,startTime:T,endTime:C,searchInput:W,database:ve,sortBy:Ie,sortDirection:Ve,queryType:De,groupByOperation:E},N,O)}),{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,h,p,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:[]}));Ie===Bj&&!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)&&Ve===On.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)&&ze(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 m=Ra(f);Te(m),fe(null!==(p=null===(h=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===h?void 0:h.totalCount)&&void 0!==p?p:0)}}),tt=et.isFetching,nt=et.isError,rt=et.error,it=et.fetchNextPage,ot=et.hasNextPage,at=et.isFetchingNextPage,st=et.data,lt=y([eW.fetchQueriesDatabases,b],(function(){return gW.fetchQueriesDatabases(b,w)}),{onSuccess:function(e){xe(e)}}),ut=lt.isLoading,ct=lt.isError;a((function(){var e,t,n;if(void 0!==ot&&(null===(e=null==st?void 0:st.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==st?void 0:st.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;ot&&!at&&ce===r&&ce>=0&&it()}}),[ot,it,ce,at,null===(i=null==st?void 0:st.pages)||void 0===i?void 0:i.length]);var dt=function(e){null!==e.target.closest("button")&&e.stopPropagation()};a((function(){}),[F]),a((function(){nt&&Te([])}),[nt]),a((function(){var e=JSON.stringify(Ke);Ye.current&&Ye.current!==e&&de(0),Ye.current=e}),[Ke]),a((function(){return function(){$.current.cancel()}}),[]),a((function(){var n,r,i,o,a,s,l,u=sessionStorage.getItem(pi),c=u?JSON.parse(u):null;ee([{name:kj,label:"",options:{sort:!1,display:!1,filter:!1}},{name:Kj,label:ci.TOTAL_EPS_RATIO,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_EPS_RATIO_QUERY_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.TOTAL_EPS_RATIO})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:Bj,label:ci.EPS,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.ACTIVE_SESSIONS_PER_SECOND_QUERY_TOOLTIP,placement:"top",arrow:!0},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.EPS})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:Fj,label:ci.EVENTS,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,width:"140px",minWidth:"140px",maxWidth:"160px"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.EVENTS_QUERY_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.EVENTS})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(t){return e(BW,{data:null!=t?t:[],maxEPS:Ue,groupByOperation:E})}}},{name:jj,label:ci.QUERY,options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"300px",maxWidth:"450px",minWidth:"300px"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e(Q,Me({title:ui.QUERY_TEXT_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.QUERY})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(t,n){var r=n.rowIndex;return e(Q,Me({title:t,placement:"top",arrow:!0},{children:e(x,Me({onClick:dt,className:P.queryCellBox},{children:e(X,{lang:"sql",text:t,maxWidth:500,showBorder:!0,showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!1,preClassName:P.preClassNameInTable,codeClassName:P.codeClassNameInTable,containerClassName:P.queryContainerCodeInTable},"TableHelperQueries-".concat(ce,"-").concat(r))}))}))}}},{name:Yj,label:ci.NAMESPACE_NAME,options:{sort:!0,display:null!==(n=null==c?void 0:c.includes(Yj))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.DATABASE_NAME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.NAMESPACE_NAME})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:Uj,label:ci.FIRST_ACTIVE_TIME,options:{sort:!0,display:null!==(r=null==c?void 0:c.includes(Uj))&&void 0!==r&&r,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.FIRST_ACTIVE_TIME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.FIRST_ACTIVE_TIME})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:zj,label:ci.LAST_ACTIVE_TIME,options:{sort:!0,display:null!==(i=null==c?void 0:c.includes(zj))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.LAST_ACTIVE_TIME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.LAST_ACTIVE_TIME})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:Hj,label:ci.AVG_LATENCY,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.AVG_LATENCY_TOOLTIP,arrow:!0,placement:"top"},{children:e(x,Me({className:k.headerBox},{children:e(I,Me({variant:"body2",className:k.headerText},{children:ci.AVG_LATENCY}))}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Vj,label:ci.LATENCY_P90,options:{sort:!0,display:null!==(o=null==c?void 0:c.includes(Vj))&&void 0!==o&&o,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.LATENCY_P90_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.LATENCY_P90})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Wj,label:ci.LATENCY_P99,options:{sort:!0,display:null!==(a=null==c?void 0:c.includes(Wj))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.LATENCY_P99_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.LATENCY_P99})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:qj,label:ci.QUERY_TYPE,options:{sort:!1,display:null!==(s=null==c?void 0:c.includes(qj))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"10%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e(Q,Me({title:ui.QUERY_TYPE_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.QUERY_TYPE})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:Xj,label:ci.TOTAL_TIME,options:{sort:!0,display:null!==(l=null==c?void 0:c.includes(Xj))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.TOTAL_TIME_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.TOTAL_TIME})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:Qj,label:ci.ROWS_AVG,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.ROWS_AVG_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.ROWS_AVG})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Zj,label:ci.RPS,options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"8%"},className:Re(k.tableHeaderCell,M===Sn.WEB&&k.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:ui.RPS_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:k.headerBox},{children:[e(I,Me({variant:"body2",className:k.headerText},{children:ci.RPS})),e("img",{src:zW,alt:"info",className:k.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[Se,Ue,E]);var ht=tt||ut,pt=c((function(){var e;return bi(it,"Rows per page:",null!==(e=null==Se?void 0:Se.length)&&void 0!==e?e:0,ot)}),[it,null==Se?void 0:Se.length,ot]),ft=c((function(){return{sorting:Ie?[{id:Ie,desc:Ve===On.DESC}]:[],pagination:{pageIndex:ce,pageSize:se},isLoading:ht,showProgressBars:ht}}),[Ie,Ve,ce,se,ht]);return t(n,{children:[re&&e(UW,{appName:M,hiddenColumns:[kj,Hj,Qj,Zj,Bj,Fj,Gj,$j,jj],columns:J,onColumnVisibilityChange:function(e,t){ee((function(n){return n.map((function(n){return n.name===e?Me(Me({},n),{options:Me(Me({},n.options),{display:t})}):n}))}))},close:function(){return ie(!1)}}),t(x,Me({mt:1,mb:2,className:k.dataBox},{children:[t(x,Me({display:"flex",flexDirection:"column"},{children:[e(x,Me({mb:2},{children:e(I,Me({variant:"h5"},{children:"Queries"}))})),t(x,Me({className:k.filterContainer},{children:[t(x,Me({className:k.filterLeftContainer},{children:[t(z,Me({label:"",value:ve,dataTestId:"HistoricalQueryData-DatabaseSelect",className:k.ybOverrideMuiSelect,onChange:function(e){de(0),ge(e.target.value)},menuProps:{PaperProps:{style:{maxHeight:"300px"}}}},{children:[e(S,Me({value:Kn,"data-testid":"HistoricalQueryData-".concat(Kn)},{children:e("span",{children:lr.ALL_DATABASES})}),Kn),be.map((function(t){return e(S,Me({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e("span",{children:t})}),t)}))]})),e(z,Me({label:"",value:Pe,dataTestId:"HistoricalQueryData-QueryTypeSelect",className:k.ybOverrideMuiSelect,onChange:function(e){de(0),e.target.value===Jj.SHOW_ALL&&Oe(null),e.target.value===Jj.SHOW_YSQL&&Oe(Tn.SQL),e.target.value===Jj.SHOW_YCQL&&Oe(Tn.CQL),e.target.value===Jj.SHOW_ACTIVITIES&&Oe(Tn.BACKGROUND),Be(e.target.value)},menuProps:{PaperProps:{style:{maxHeight:"300px"}}}},{children:Object.entries(Jj).map((function(t){var n=t[0],r=t[1];return e(S,Me({value:r,"data-testid":"HistoricalQueryData-".concat(r)},{children:e("span",{children:r})}),n)}))})),e(U,{dataTestId:"HistoricalQueryData-SearchInput",placeholder:"Filter Queries",className:k.ybSearchInput,onChange:function(e){var t=e.target.value;q(t),$.current(t)},value:G,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"},InputProps:{startAdornment:e(A,Me({position:"start"},{children:e(jW,{})})),endAdornment:!!G&&e(A,Me({position:"end"},{children:e(D,Me({size:"small",onClick:function(){$.current.cancel(),Y(""),q(""),de(0)},"data-testid":"HistoricalQueryData-ClearButton"},{children:e(ye,{fontSize:"small"})}))}))}})]})),e(Z,Me({size:"medium",variant:M===Sn.YBM?"ghost":"secondary",startIcon:e(VW,{style:{marginBottom:"2px"}}),onClick:function(){return ie(!0)},dataTestId:"HistoricalQueryData-AddFieldsButton"},{children:di}))]}))]})),t(x,Me({className:M===Sn.YBM?k.overrideMuiTableContainer:k.overrideMuiTableContainerWeb},{children:[(nt||ct)&&t(x,Me({mt:3,className:k.recommendation},{children:[(M===Sn.YBA||M===Sn.WEB)&&e(ke,{customErrorMessage:Ki(null===(s=null===(o=null==rt?void 0:rt.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error)?null===(h=null===(d=null==rt?void 0:rt.response)||void 0===d?void 0:d.data)||void 0===h?void 0:h.error:hi.HISTORICAL_QUERY_DATA_FETCH_ERROR}),M===Sn.YBM&&e(ne,{text:Ki(null===(f=null===(p=null==rt?void 0:rt.response)||void 0===p?void 0:p.data)||void 0===f?void 0:f.error)?null===(_=null===(m=null==rt?void 0:rt.response)||void 0===m?void 0:m.data)||void 0===_?void 0:_.error:hi.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),e(oe,{id:"HistoricalQueryData",className:k.overrideMuiTable,data:null!=Se?Se:[],columns:null==J?void 0:J.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:ht,options:{sort:!0,filter:!0,count:pe,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:se,rowsPerPage:se,autoResetPageIndex:!1,onChangePage:function(e){de(e)},onChangeRowsPerPage:function(e){le(e),de(0)},textLabels:{body:{noMatch:"There are no queries with the current ".concat(M===Sn.YBM?"cluster":"universe")}},onRowClick:function(e,t){Ci({rowData:e,rowMeta:t,appName:M,onSelectedQuery:R,onClose:function(){return function(e){H(e)}(null)},isDbQueryLoadMetadata:!1,onNavigateToUrl:L}),function(e){var t=e[10],n=ja(M,t,T,C,b);Je.mutate(n)}(e)},rowsPerPageOptions:wr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(Ie?[{id:Ie,desc:Ve===On.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return Ee(Bj),We(On.DESC),void de(0);var n=t[0],r=n.id,i=n.desc?On.DESC:On.ASC;Ee(r),We(i),de(0)},paginationDisplayMode:"custom",customFooter:pt,manualSorting:!0,state:ft}},"HistoricalQueryData-".concat(Ie,"-").concat(Ve))]}))]}))]})},tG=b((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:O(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"}}}})),nG=function(n){var r=n.open,i=n.selectedTabIndex,o=n.metricMeasure,s=n.onClose,u=n.onSubmit,d=n.metricResources,h=tG(),p=o===hn.OUTLIER_TABLES,f=o===hn.OUTLIER_DB,m=p||f?p?$r[i]:Kr[i]:Xr[i],v=ti.reduce((function(e,t){return e[t.name]=t.name===m,e}),{}),g=l(v),y=g[0],_=g[1],b=function(){var e=p||f?p?sessionStorage.getItem(oi):sessionStorage.getItem(ai):sessionStorage.getItem(ii);if(e)return JSON.parse(e);var t={};return d.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},w=l(""),S=w[0],T=w[1],C=l(b),M=C[0],E=C[1];a((function(){E(b())}),[r]);var D=c((function(){return d.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(S.toLowerCase())}));return 0===t.length?null:Me(Me({},e),{metrics:t})})).filter(Boolean)}),[d,S]),O=0===D.length;return e(ie,Me({open:r,isSidePanel:!0,title:"Add and Remove Charts",onClose:s,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(p||f?p?oi:ai:ii,JSON.stringify(M)),u(M),s()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:t(x,{children:[e(x,Me({className:h.search},{children:e(U,{fullWidth:!0,placeholder:"Search",value:S,InputProps:{startAdornment:e(A,Me({position:"end"},{children:e(jW,{})}))},onChange:function(e){T(e.target.value)},dataTestId:"MetricsSelectionSearch",className:h.searchInput})})),e(x,O?Me({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e(I,Me({variant:"body2"},{children:"No results returned"}))}):Me({className:h.container},{children:D.map((function(n){if(!n.metrics.length)return null;var r=y[n.name]||!!S;return t(x,Me({className:h.group},{children:[t(x,Me({className:h.groupHeader,onClick:function(){return e=n.name,void _((function(t){var n;return Me(Me({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e(x,Me({display:"flex",alignItems:"center"},{children:e(I,Me({variant:"body1"},{children:n.title}))})),e(Se,{className:Re(r&&h.iconRotate)})]})),e(N,Me({in:r},{children:e(x,Me({className:h.itemsContainer},{children:n.metrics.map((function(t){return e(x,Me({className:Re(h.item)},{children:e(Y,{name:"".concat(n.name,".").concat(t),label:ri[t]||t,dataTestId:"MetricsSelectionCheckbox-".concat(t),checked:!!M[t],onChange:function(){return e=t,void E((function(t){var n;return Me(Me({},t),((n={})[e]=!t[e],n))}));var e},className:h.checkbox})}),t)}))}))}))]}),n.name)}))}))]})}))},rG="metricsTab",iG=function(n){var r,i,o,s,c,d=n.appName,h=n.isMetricsDrawerOpen,p=n.apiUrl,f=n.timezone,m=n.metricMeasure,g=n.dateTimeRange,y=n.filterTrigger,_=n.urlParams,b=n.getClusterDetails,w=n.onEChartsDateSelect,S=n.handleFilterMetrics,T=n.openSelectionModal,C=n.closeSelectionModal,I=xi(),M=u([]),E=l(null),A=E[0],D=E[1],O=l(0),N=O[0],R=O[1],L=l(!1),P=L[0],k=L[1],B=b(),F=B.universeUuid,U=B.cluster,z=B.region,H=B.zone,V=B.node,W=B.numNodes,Y=B.outlierType;a((function(){if(d===Sn.YBA){var e=new URLSearchParams(window.location.search).get(rG),t=m===hn.OUTLIER_TABLES,n=m===hn.OUTLIER_DB,r=t||n?t?$r:Kr:Xr;R(r.includes(e)?r.indexOf(e):0),k(!0)}}),[]),a((function(){var e=m===hn.OUTLIER_TABLES,t=m===hn.OUTLIER_DB,n=e?$r:Xr;if(e||t)R(0),k(!0);else if(m&&d!==Sn.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===Qn.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),R(0),void k(!0)}var a=n.indexOf(i);if(-1!==a)R(a),k(!0);else{o=n[0];var s=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(s,"/").concat(o)),R(0),k(!0)}}}),[m]);var j=v({mutationKey:[eW.fetchMetricsGraphs,F,g],mutationFn:function(e){return gW.fetchGraphs(F,e,p)},onSuccess:function(e){D(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),G=null===(o=null===(i=null===(r=null==j?void 0:j.error)||void 0===r?void 0:r.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error;return a((function(){var e;if(P){var t=Ia(!1,!0,N,b(),null,Me(Me({},_),{type:null!==(e=_.type)&&void 0!==e?e:null}));t&&j.mutate(t)}}),[m,null===(s=null==g?void 0:g.startDateTime)||void 0===s?void 0:s.getTime(),null===(c=null==g?void 0:g.endDateTime)||void 0===c?void 0:c.getTime(),N,z,P,U,H,V,Y,W,y]),a((function(){return j.isSuccess&&A&&A.length>0&&M.current.length===A.length&&OM(M.current),function(){NM(M.current)}}),[j.isSuccess,A]),t(x,Me({mt:2,mb:2,className:I.metricsBox},{children:[e(x,Me({display:"flex",alignItems:"center"},{children:t(re,Me({value:N,onChange:function(e,t){if(t!==N){var n=m===hn.OUTLIER_TABLES,r=m===hn.OUTLIER_DB,i=(n||r?n?$r:Kr:Xr)[t],o=window.location.pathname;if(d!==Sn.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(rG,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString())),window.dispatchEvent(new Event("url-changed"))}R(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto",className:I.ybTabs},{children:[(m===hn.OVERALL||m===hn.OUTLIER)&&Xr.map((function(t,n){var r;return e(te,{value:n,label:null===(r=null==ti?void 0:ti.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:I.causeTabButton},t)})),m===hn.OUTLIER_TABLES&&$r.map((function(t,n){var r;return e(te,{value:n,label:null===(r=null==Jr?void 0:Jr.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:I.causeTabButton},t)})),m===hn.OUTLIER_DB&&Kr.map((function(t,n){var r;return e(te,{value:n,label:null===(r=null==ei?void 0:ei.find((function(e){return t===e.name})))||void 0===r?void 0:r.title,className:I.causeTabButton},t)}))]}))})),e(x,Me({className:I.secondRow},{children:e(Z,Me({variant:"ghost",startIcon:e(VW,{}),size:"medium",onClick:T,dataTestId:"GenericHeader-AddChartsButton"},{children:"Add and Remove Charts"}))})),j.isLoading&&e(x,Me({mt:2,className:I.loadingBox},{children:e(_W,{className:Re(I.icon,I.inProgressIcon)})})),j.isError&&t(x,Me({mt:4},{children:[(d===Sn.YBA||d===Sn.WEB)&&e(ke,{customErrorMessage:Ki(G)?G:hi.METRICS_GRAPHS_FETCH_ERROR}),d===Sn.YBM&&e(ne,{text:Ki(G)?G:hi.METRICS_GRAPHS_FETCH_ERROR})]})),j.isSuccess&&e(x,Me({className:Re(I.gridBox,I.gridBoxDouble)},{children:null==A?void 0:A.map((function(t,n){if(Ki(null==t?void 0:t.errorMessage))return e(x,{});var r=Ta(m,t,Cn.MULTI_SUPPORTING,!0,[],!0);return e(x,Me({style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e(x,{children:e(Fz,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:m,operations:m===hn.OVERALL?[]:r.uniqueOperations,registerChartInstance:function(e){return function(e,t){M.current[t]=e}(e,n)},graphType:Cn.MULTI_SUPPORTING,dateTimeRange:g,groupByOperations:r.groupByOperations,appName:d,timezone:f,isHistoricalQueryView:!1,onEChartsDateSelect:w,showTitle:!0},"".concat(t.name,"-").concat(m))},"TopKMetricsView-".concat(n))}))}))})),h&&e(nG,{onSubmit:S,metricResources:m===hn.OUTLIER_TABLES||m===hn.OUTLIER_DB?m===hn.OUTLIER_TABLES?Jr:ei:ti,open:h,onClose:C,selectedTabIndex:N,metricMeasure:m})]}))},oG=i.memo((function(t){var n,r,i,o=t.universeUuid,s=t.appName,u=t.timezone,d=t.apiUrl,h=t.onEChartsDateSelect,p=t.getClusterDetails,f=l(window.location.search),m=f[0],v=f[1];a((function(){var e=function(){v(window.location.search)};return window.addEventListener("popstate",e),window.addEventListener("url-changed",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("url-changed",e)}}),[]);var g=c((function(){var e=new URLSearchParams(m);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:o}}),[m,o]),y=l(0),_=y[0],b=y[1],w=l(!1),S=w[0],T=w[1];a((function(){var e=sessionStorage.getItem(ii),t=sessionStorage.getItem(oi),n=sessionStorage.getItem(ai);if(!e){var r={};ti.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(ii,JSON.stringify(r))}if(!t){var i={};Jr.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem(oi,JSON.stringify(i))}if(!n){var o={};ei.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(ai,JSON.stringify(o))}}),[]);return e(x,{children:e(iG,{apiUrl:d,isMetricsDrawerOpen:S,appName:s,timezone:u,metricMeasure:null===(n=p())||void 0===n?void 0:n.metricMeasure,dateTimeRange:{startDateTime:null===(r=p())||void 0===r?void 0:r.formattedStartDate,endDateTime:null===(i=p())||void 0===i?void 0:i.formattedEndDate},urlParams:g,filterTrigger:_,onEChartsDateSelect:h,openSelectionModal:function(){return T(!0)},closeSelectionModal:function(){return T(!1)},getClusterDetails:p,handleFilterMetrics:function(){b((function(e){return e+1}))}})})}));function aG(){return aG=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},aG.apply(this,arguments)}function sG(e){return"number"==typeof e&&!isNaN(e)}function lG(e){return"boolean"==typeof e}function uG(e){return"string"==typeof e}function cG(e){return"function"==typeof e}function dG(e){return uG(e)||cG(e)?e:null}function hG(e){return 0===e||e}var pG=!("undefined"==typeof window||!window.document||!window.document.createElement);function fG(e){return f(e)||uG(e)||cG(e)||sG(e)}var mG={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},vG={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function gG(e){var t=e.enter,n=e.exit,r=e.appendPosition,o=void 0!==r&&r,s=e.collapse,l=void 0===s||s,c=e.collapseDuration,d=void 0===c?300:c;return function(e){var r=e.children,s=e.position,c=e.preventExitTransition,p=e.done,f=e.nodeRef,m=e.isIn,v=o?t+"--"+s:t,g=o?n+"--"+s:n,y=u(),_=u(0);function b(){var e=f.current;e.removeEventListener("animationend",b),0===_.current&&(e.className=y.current)}function x(){var e=f.current;e.removeEventListener("animationend",x),l?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,p,d):p()}return h((function(){!function(){var e=f.current;y.current=e.className,e.className+=" "+v,e.addEventListener("animationend",b)}()}),[]),a((function(){m||(c?x():function(){_.current=1;var e=f.current;e.className+=" "+g,e.addEventListener("animationend",x)}())}),[m]),i.createElement(i.Fragment,null,r)}}var yG={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 _G(e,t){void 0===t&&(t=!1);var n=u(e);return a((function(){t&&(n.current=e)})),n.current}function bG(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return hG(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function xG(e){var t=p((function(e){return e+1}),0)[1],n=p(bG,[]),r=n[0],i=n[1],o=u(null),s=_G(0),l=_G([]),c=_G({}),d=_G({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:h,getToast:function(e){return c[e]||null}});function h(e){return-1!==r.indexOf(e)}function v(e){var t=e.containerId,n=d.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||d.containerId===t&&i)&&(s-=l.length,l=[])}function g(e){i({type:1,toastId:e})}function y(){var e=l.shift();b(e.toastContent,e.toastProps,e.staleId)}function _(e,n){var r=n.delay,i=n.staleId,a=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}(n,["delay","staleId"]);if(fG(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!o.current||d.props.enableMultiContainer&&t!==d.props.containerId||c[n]&&null==r)}(a)){var u=a.toastId,h=a.updateId,p=d.props,v=function(){return g(u)},_=null==a.updateId;_&&s++;var x,w,S={toastId:u,updateId:h,isIn:!1,key:a.key||d.toastKey++,type:a.type,closeToast:v,closeButton:a.closeButton,rtl:p.rtl,position:a.position||p.position,transition:a.transition||p.transition,className:dG(a.className||p.toastClassName),bodyClassName:dG(a.bodyClassName||p.bodyClassName),style:a.style||p.toastStyle,bodyStyle:a.bodyStyle||p.bodyStyle,onClick:a.onClick||p.onClick,pauseOnHover:lG(a.pauseOnHover)?a.pauseOnHover:p.pauseOnHover,pauseOnFocusLoss:lG(a.pauseOnFocusLoss)?a.pauseOnFocusLoss:p.pauseOnFocusLoss,draggable:lG(a.draggable)?a.draggable:p.draggable,draggablePercent:sG(a.draggablePercent)?a.draggablePercent:p.draggablePercent,draggableDirection:a.draggableDirection||p.draggableDirection,closeOnClick:lG(a.closeOnClick)?a.closeOnClick:p.closeOnClick,progressClassName:dG(a.progressClassName||p.progressClassName),progressStyle:a.progressStyle||p.progressStyle,autoClose:(x=a.autoClose,w=p.autoClose,!1===x||sG(x)&&x>0?x:w),hideProgressBar:lG(a.hideProgressBar)?a.hideProgressBar:p.hideProgressBar,progress:a.progress,role:uG(a.role)?a.role:p.role,deleteToast:function(){!function(e){delete c[e];var n=l.length;s=hG(e)?s-1:s-d.displayedToast,s<0&&(s=0);if(n>0){var r=hG(e)?1:d.props.limit;if(1===n||1===r)d.displayedToast++,y();else{var i=r>n?n:r;d.displayedToast=i;for(var o=0;o<i;o++)y()}}else t()}(u)}};cG(a.onOpen)&&(S.onOpen=a.onOpen),cG(a.onClose)&&(S.onClose=a.onClose),"y"===S.draggableDirection&&80===S.draggablePercent&&(S.draggablePercent*=1.5);var T=p.closeButton;!1===a.closeButton||fG(a.closeButton)?T=a.closeButton:!0===a.closeButton&&(T=!fG(p.closeButton)||p.closeButton),S.closeButton=T;var C=e;f(e)&&!uG(e.type)?C=m(e,{closeToast:v,toastProps:S}):cG(e)&&(C=e({closeToast:v,toastProps:S})),p.limit&&p.limit>0&&s>p.limit&&_?l.push({toastContent:C,toastProps:S,staleId:i}):sG(r)&&r>0?setTimeout((function(){b(C,S,i)}),r):b(C,S,i)}}function b(e,t,n){var r=t.toastId;n&&delete c[n],c[r]={content:e,props:t},i({type:0,toastId:r,staleId:n})}return a((function(){return d.containerId=e.containerId,yG.cancelEmit(3).on(0,_).on(1,(function(e){return o.current&&g(e)})).on(5,v).emit(2,d),function(){return yG.emit(3,d)}}),[]),a((function(){d.isToastActive=h,d.displayedToast=r.length,yG.emit(4,r.length,e.containerId)}),[r]),a((function(){d.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(c).reverse():Object.keys(c),i=0;i<r.length;i++){var o=c[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:c,containerRef:o,isToastActive:h}}function wG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function SG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function TG(e){var t=l(!0),n=t[0],r=t[1],i=l(!1),o=i[0],s=i[1],c=u(null),d=_G({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),h=_G(e,!0),p=e.autoClose,m=e.pauseOnHover,v=e.closeToast,g=e.onClick,y=e.closeOnClick;function _(t){if(e.draggable){var n=c.current;d.canCloseOnClick=!0,d.canDrag=!0,d.boundingRect=n.getBoundingClientRect(),n.style.transition="",d.x=wG(t.nativeEvent),d.y=SG(t.nativeEvent),"x"===e.draggableDirection?(d.start=d.x,d.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(d.start=d.y,d.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function b(){if(d.boundingRect){var t=d.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&d.x>=i&&d.x<=o&&d.y>=n&&d.y<=r?w():x()}}function x(){r(!0)}function w(){r(!1)}function S(t){if(d.canDrag){t.preventDefault();var r=c.current;n&&w(),d.x=wG(t),d.y=SG(t),"x"===e.draggableDirection?d.delta=d.x-d.start:d.delta=d.y-d.start,d.start!==d.x&&(d.canCloseOnClick=!1),r.style.transform="translate"+e.draggableDirection+"("+d.delta+"px)",r.style.opacity=""+(1-Math.abs(d.delta/d.removalDistance))}}function T(){var t=c.current;if(d.canDrag){if(d.canDrag=!1,Math.abs(d.delta)>d.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"}}a((function(){return cG(e.onOpen)&&e.onOpen(f(e.children)&&e.children.props),function(){cG(h.onClose)&&h.onClose(f(h.children)&&h.children.props)}}),[]),a((function(){return e.draggable&&(document.addEventListener("mousemove",S),document.addEventListener("mouseup",T),document.addEventListener("touchmove",S),document.addEventListener("touchend",T)),function(){e.draggable&&(document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",T),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",T))}}),[e.draggable]),a((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||w();window.addEventListener("focus",x),window.addEventListener("blur",w)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",x),window.removeEventListener("blur",w))}}),[e.pauseOnFocusLoss]);var C={onMouseDown:_,onTouchStart:_,onMouseUp:b,onTouchEnd:b};return p&&m&&(C.onMouseEnter=w,C.onMouseLeave=x),y&&(C.onClick=function(e){g&&g(e),d.canCloseOnClick&&v()}),{playToast:x,pauseToast:w,isRunning:n,preventExitTransition:o,toastRef:c,eventHandlers:C}}function CG(e){var t=e.closeToast,n=e.type,r=e.ariaLabel;return d("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":void 0===r?"close":r},d("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},d("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 IG(e){var t,n,r=e.delay,i=e.isRunning,o=e.closeToast,a=e.type,s=e.hide,l=e.className,u=e.style,c=e.controlledProgress,h=e.progress,p=e.rtl,f=e.isIn,m=aG({},u,{animationDuration:r+"ms",animationPlayState:i?"running":"paused",opacity:s?0:1});c&&(m.transform="scaleX("+h+")");var v=Re("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+a,((t={})["Toastify__progress-bar--rtl"]=p,t)),g=cG(l)?l({rtl:p,type:a,defaultClassName:v}):Re(v,l),y=((n={})[c&&h>=1?"onTransitionEnd":"onAnimationEnd"]=c&&h<1?null:function(){f&&o()},n);return d("div",Object.assign({role:"progressbar",className:g,style:m},y))}IG.defaultProps={type:vG.DEFAULT,hide:!1};var MG=function(e){var t,n=TG(e),r=n.isRunning,i=n.preventExitTransition,o=n.toastRef,a=n.eventHandlers,s=e.closeButton,l=e.children,u=e.autoClose,c=e.onClick,h=e.type,p=e.hideProgressBar,v=e.closeToast,g=e.transition,y=e.position,_=e.className,b=e.style,x=e.bodyClassName,w=e.bodyStyle,S=e.progressClassName,T=e.progressStyle,C=e.updateId,I=e.role,M=e.progress,E=e.rtl,A=e.toastId,D=e.deleteToast,O=e.isIn,N=Re("Toastify__toast","Toastify__toast--"+h,((t={})["Toastify__toast--rtl"]=E,t)),R=cG(_)?_({rtl:E,position:y,type:h,defaultClassName:N}):Re(N,_),L=!!M;return d(g,{isIn:O,done:D,position:y,preventExitTransition:i,nodeRef:o},d("div",Object.assign({id:A,onClick:c,className:R},a,{style:b,ref:o}),d("div",Object.assign({},O&&{role:I},{className:cG(x)?x({type:h}):Re("Toastify__toast-body",x),style:w}),l),function(e){if(e){var t={closeToast:v,type:h};return cG(e)?e(t):f(e)?m(e,t):void 0}}(s),(u||L)&&d(IG,Object.assign({},C&&!L?{key:"pb-"+C}:{},{rtl:E,delay:u,isRunning:r,isIn:O,closeToast:v,hide:p,type:h,style:T,className:S,controlledProgress:L,progress:M}))))},EG=function(e){var t=xG(e),n=t.getToastToRender,r=t.containerRef,i=t.isToastActive,o=e.className,a=e.style,s=e.rtl,l=e.containerId;function u(e){var t,n=Re("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=s,t));return cG(o)?o({position:e,rtl:s,defaultClassName:n}):Re(n,dG(o))}return d("div",{ref:r,className:"Toastify",id:l},n((function(e,t){var n=0===t.length?aG({},a,{pointerEvents:"none"}):aG({},a);return d("div",{className:u(e),style:n,key:"container-"+e},t.map((function(e){var t=e.content,n=e.props;return d(MG,Object.assign({},n,{isIn:i(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?CG:n.closeButton}),t)})))})))};EG.defaultProps={position:mG.TOP_RIGHT,transition:gG({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:CG,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var AG,DG,OG,NG=new Map,RG=[],LG=!1;function PG(){return Math.random().toString(36).substr(2,9)}function kG(e){return e&&(uG(e.toastId)||sG(e.toastId))?e.toastId:PG()}function BG(e,t){return NG.size>0?yG.emit(0,e,t):(RG.push({content:e,options:t}),LG&&pG&&(LG=!1,DG=document.createElement("div"),document.body.appendChild(DG),Te(d(EG,Object.assign({},OG)),DG))),t.toastId}function FG(e,t){return aG({},t,{type:t&&t.type||e,toastId:kG(t)})}var UG=function(e){return function(t,n){return BG(t,FG(e,n))}},zG=function(e,t){return BG(e,FG(vG.DEFAULT,t))};zG.success=UG(vG.SUCCESS),zG.info=UG(vG.INFO),zG.error=UG(vG.ERROR),zG.warning=UG(vG.WARNING),zG.dark=UG(vG.DARK),zG.warn=zG.warning,zG.dismiss=function(e){return yG.emit(1,e)},zG.clearWaitingQueue=function(e){return void 0===e&&(e={}),yG.emit(5,e)},zG.isActive=function(e){var t=!1;return NG.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},zG.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=NG.get(n||AG);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=aG({},r,t,{toastId:t.toastId||e,updateId:PG()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,BG(a,o)}}),0)},zG.done=function(e){zG.update(e,{progress:1})},zG.onChange=function(e){return cG(e)&&yG.on(4,e),function(){cG(e)&&yG.off(4,e)}},zG.configure=function(e){void 0===e&&(e={}),LG=!0,OG=e},zG.POSITION=mG,zG.TYPE=vG,yG.on(2,(function(e){AG=e.containerId||e,NG.set(AG,e),RG.forEach((function(e){yG.emit(0,e.content,e.options)})),RG=[]})).on(3,(function(e){NG.delete(e.containerId||e),0===NG.size&&yG.off(0).off(1).off(5),pG&&DG&&document.body.removeChild(DG)}));var HG="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",VG="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",WG="data:image/svg+xml,%3csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.2925 0.825396L6.75926 6.1142C6.36016 6.57981 5.63984 6.57981 5.24074 6.1142L0.707482 0.825396C0.42948 0.501059 0.659934 0 1.08711 0L10.9129 0C11.3401 0 11.5705 0.501059 11.2925 0.825396Z' fill='black'/%3e%3c/svg%3e",YG=b((function(e){return{accordion:{borderRadius:e.spacing(1),backgroundColor:e.palette.common.white,border:"1px solid ".concat(e.palette.grey[200]),boxShadow:"none","&:before":{display:"none"},"&.Mui-expanded":{margin:e.spacing(2,0,0,0)}},accordionSummary:{padding:e.spacing(1.5,2,1,2),minHeight:"auto","&.Mui-expanded":{minHeight:"auto"},"& .MuiAccordionSummary-content":{margin:0,"&.Mui-expanded":{margin:0}}},accordionSummaryCollapsed:{padding:e.spacing(1.5,2,1.5,2)},headerTitle:{fontWeight:600,fontSize:"13px",lineHeight:"16px"},accordionDetails:{padding:e.spacing(0,2,2,2),flexDirection:"column"},expandIcon:{padding:e.spacing(0,.8)},expandAllButton:{fontSize:"13px",fontWeight:600},runDetectionButtonContainer:{gap:e.spacing(2),display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginBottom:e.spacing(1)}}})),jG=function(n){var r,i,o=n.apiUrl,a=n.appName,s=n.endTime,u=n.currentTab,c=n.startTime,d=n.universeUuid,h=n.anomalyGroups,p=n.onSelectedIssue,f=n.fetchAnomalyGroups,m=n.anomalyGroupsFetchError,g=n.onClickShowMoreAnomalies,_=n.onNavigateToUrl,b=YG(),w=xi(),S=l(!1),T=S[0],C=S[1],M=l(!0),E=M[0],A=M[1],D=l(Pn.EMPTY),O=D[0],N=D[1];y(eW.fetchAnomalyDetectionStatus,(function(){return gW.fetchAnomalyDetectionStatus(d,o)}),{onSuccess:function(e){N(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:O!==Pn.SUCCESS});var k=v((function(){return gW.scheduleAnomalyDetectionStatus(d,o)}),{onSuccess:function(e){N(e.status)},onError:function(e){var t,n,r,i;zG.error(Ki(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:hi.ANOMALY_SCHEDULE_ERROR)}});return t(R,Me({expanded:E,className:b.accordion,onChange:function(e,t){A(t)}},{children:[e(L,Me({className:Re(b.accordionSummary,!E&&b.accordionSummaryCollapsed),expandIcon:e("img",{src:WG,className:b.expandIcon,alt:E?"Collapse":"Expand"})},{children:e(I,Me({variant:"body2",className:b.headerTitle},{children:u===Fn.INSIGHTS?"Insights":"Detected Anomalies"}))})),t(P,Me({className:b.accordionDetails},{children:[t(x,Me({className:b.runDetectionButtonContainer},{children:[e(Z,Me({variant:a===Sn.YBM?"ghost":"secondary",startIcon:e("img",{src:T?VG:HG,alt:"Expand Icon"}),onClick:function(){C(!T)},dataTestId:"expand-all-button"},{children:e("span",Me({className:b.expandAllButton},{children:T?"Collapse All":"Expand All"}))})),e(Z,Me({variant:"primary",size:"medium",dataTestId:"run-detection-button",onClick:function(){k.mutate()},disabled:O===Pn.SCHEDULED||O===Pn.IN_PROGRESS,showSpinner:O===Pn.SCHEDULED||O===Pn.IN_PROGRESS,startIcon:e("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"}))]})),f.isLoading&&e(x,Me({mt:2,className:w.loadingBox},{children:e(_W,{className:Re(w.icon,w.inProgressIcon)})})),f.isError&&t(x,Me({mt:2},{children:[(a===Sn.YBA||a===Sn.WEB)&&e(ke,{customErrorMessage:m&&Ki(m)?m:hi.ANOMALIES_FETCH_ERROR}),a===Sn.YBM&&e(ne,{text:m&&Ki(m)?m:hi.ANOMALIES_FETCH_ERROR})]})),f.isSuccess&&($i(null==h?void 0:h.groups)?e(qY,{universeUuid:d,apiUrl:o,name:"gant-chart-insights",sourceData:null!=h?h:[],expandAll:T,showMoreOptions:!0,onClickShowMoreAnomalies:g,startTime:null!==(r=null==c?void 0:c.toISOString())&&void 0!==r?r:null,endTime:null!==(i=null==s?void 0:s.toISOString())&&void 0!==i?i:null,onSelectedIssue:p,appName:a,currentTab:u,isInsightsTab:u===Fn.INSIGHTS,onNavigateToUrl:_},"gant-chart-insights"):e(x,Me({mt:2},{children:"No Anomalies were detected"})))]}))]}))},GG=b((function(e){return{dbLoadDataContainer:{border:"1px solid #E9EEF2",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF"}}})),qG="name",QG="universeId",ZG="eps",XG="events",$G="type",KG="connections",JG="cpuRatio",eq="rps",tq=function(r){var i,o,s,d,h,p,f,m,v,_=r.dbWaitEventType,b=r.universeUuid,w=r.apiUrl,S=r.appName,T=r.startTime,C=r.endTime,M=r.onSelectedQuery,E=r.onNavigateToUrl,O=GG(),N=xi(),R=l([]),L=R[0],P=R[1],k=l(wr[0]),B=k[0],F=k[1],z=l(0),H=z[0],V=z[1],W=l(0),Y=W[0],j=W[1],G=l(Kn),q=G[0],X=G[1],$=l(""),K=$[0],J=$[1],ee=l(""),te=ee[0],re=ee[1],ie=l([]),ae=ie[0],le=ie[1],ue=l(ZG),ce=ue[0],de=ue[1],he=l(!1),pe=he[0],fe=he[1],me=l(On.DESC),ve=me[0],ge=me[1],_e=l(1),be=_e[0],xe=_e[1],we=l([]),Se=we[0],Te=we[1],Ce=u(LW((function(e){J(e),V(0)}),500)),Ie=u(""),Ee=c((function(){return[eW.fetchQueriesStatsPage,b,B,T,C,K,q,ce,ve,_]}),[b,B,T,C,K,q,ce,ve,_]),Ae=g(Ee,(function(e){var t=e.pageParam,n=void 0===t?0:t;return gW.fetchLoadDbStatsPage(b,function(e){var t=[];return _===Kn.toUpperCase()?t=[]:_===yi?t=[Xn.CPU]:_===_i&&(t=[Xn.DISK_IO]),{currentTablePage:e,apiUrl:w,pageSize:B,startTime:T,endTime:C,searchInput:K,database:q,sortBy:ce,sortDirection:ve,dbWaitEventType:t}}(n))}),{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,h,p,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:[]}));ce===ZG&&!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)&&ve===On.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)&&xe(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 m=function(e){return null==e?void 0:e.map((function(e){var t,n,r,i,o,a,s,l;return{name:null!==(t=e.name)&&void 0!==t?t:"",connections:null!==(n=e.connections)&&void 0!==n?n:0,cpuRatio:null!==(r=e.cpuRatio)&&void 0!==r?r:0,rps:null!==(i=e.rps)&&void 0!==i?i:0,type:null!==(o=e.type)&&void 0!==o?o:"",universeId:null!==(a=e.universeId)&&void 0!==a?a:"",eps:null!==(s=e.eps)&&void 0!==s?s:0,events:null!==(l=e.events)&&void 0!==l?l:[]}}))}(f);le(m),j(null!==(p=null===(h=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===h?void 0:h.totalCount)&&void 0!==p?p:0)}}),De=Ae.isFetching,Ne=Ae.isError,Le=Ae.isSuccess,Pe=Ae.error,Be=Ae.fetchNextPage,Fe=Ae.hasNextPage,Ue=Ae.isFetchingNextPage,ze=Ae.data;a((function(){var e,t,n;if(void 0!==Fe&&(null===(e=null==ze?void 0:ze.pages)||void 0===e?void 0:e.length)){var r=(null!==(n=null===(t=null==ze?void 0:ze.pages)||void 0===t?void 0:t.length)&&void 0!==n?n:0)-1;Fe&&!Ue&&H===r&&H>=0&&Be()}}),[Fe,Be,H,Ue,null===(i=null==ze?void 0:ze.pages)||void 0===i?void 0:i.length]),a((function(){Ne&&le([])}),[Ne]),a((function(){var e=JSON.stringify(Ee);Ie.current&&Ie.current!==e&&V(0),Ie.current=e}),[Ee]),a((function(){return function(){Ce.current.cancel()}}),[]);var He=y([eW.fetchQueriesDatabases,b],(function(){return gW.fetchQueriesDatabases(b,w)}),{onSuccess:function(e){P(e)}}),Ve=He.isLoading,We=He.isError,Ye=De||Ve,je=c((function(){var e;return bi(Be,"Rows per page:",null!==(e=null==ae?void 0:ae.length)&&void 0!==e?e:0,Fe)}),[Be,null==ae?void 0:ae.length,Fe]),Ge=c((function(){return{sorting:ce?[{id:ce,desc:ve===On.DESC}]:[],pagination:{pageIndex:H,pageSize:B},isLoading:Ye,showProgressBars:Ye}}),[ce,ve,H,B,Ye]);return a((function(){var n=sessionStorage.getItem(fi);n&&JSON.parse(n),Te([{name:QG,label:"",options:{sort:!1,display:!1,filter:!1}},{name:qG,label:"Database",options:{sort:!0,display:!0,customHeadRender:function(){return e(Q,Me({title:"Name of the database",placement:"top",arrow:!0},{children:t(x,Me({className:N.headerBox},{children:[e(I,Me({variant:"body2",className:N.headerText},{children:"Database"})),e("img",{src:zW,alt:"info",className:N.infoIcon})]}))}))},setCellHeaderProps:function(){return{style:{minWidth:"14%",maxWidth:"20%"},className:Re(N.tableHeaderCell,S===Sn.WEB&&N.tableBorder)}},customBodyRender:function(e){return Ki(e)?e:"-"}}},{name:KG,label:"# of Connections",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,width:"14%",maxWidth:"24%"},className:Re(N.tableHeaderCell,S===Sn.WEB&&N.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:"The ASH events per second (AAS) filtered for that database.",placement:"top",arrow:!0},{children:t(x,Me({className:N.headerBox},{children:[e(I,Me({variant:"body2",className:N.headerText},{children:"# of Connections"})),e("img",{src:zW,alt:"info",className:N.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString(void 0,{maximumFractionDigits:2}):"0.0"}}},{name:XG,label:"Wait Event Types",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{zIndex:50,width:"30%",maxWidth:"40%"},className:Re(N.tableHeaderCell,S===Sn.WEB&&N.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},setCellProps:function(){return{style:{zIndex:50,overflow:"visible"}}},customHeadRender:function(){return e(Q,Me({title:ui.WAIT_EVENT_TYPE_CHART_TOOLTIP,arrow:!0,placement:"top"},{children:t(x,Me({className:N.headerBox},{children:[e(I,Me({variant:"body2",className:N.headerText},{children:"Events"})),e("img",{src:zW,alt:"info",className:N.infoIcon})]}))}))},customBodyRender:function(t){return Qi(t)?e(BW,{data:t,maxEPS:be,groupByOperation:xn.WAIT_EVENT_TYPE}):"-"}}},{name:$G,label:"Type",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(N.tableHeaderCell,S===Sn.WEB&&N.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadRender:function(){return e(Q,Me({title:"Type of database (SQL, CQL or System Level DB)",arrow:!0,placement:"top"},{children:t(x,Me({className:N.headerBox},{children:[e(I,Me({variant:"body2",className:N.headerText},{children:"Type"})),e("img",{src:zW,alt:"info",className:N.infoIcon})]}))}))},customBodyRender:function(e){return e||"-"}}},{name:JG,label:"CPU %",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(N.tableHeaderCell,S===Sn.WEB&&N.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:"Rate of CPU active events divided by number of vCPUs",placement:"top",arrow:!0},{children:t(x,Me({className:N.headerBox},{children:[e(I,Me({variant:"body2",className:N.headerText},{children:"CPU %"})),e("img",{src:zW,alt:"info",className:N.infoIcon})]}))}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:eq,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"12%"},className:Re(N.tableHeaderCell,S===Sn.WEB&&N.tableBorder)}},customHeadRender:function(){return e(Q,Me({title:"Sum of calls per second for queries executed in this database",arrow:!0,placement:"top"},{children:t(x,Me({className:N.headerBox},{children:[e(I,Me({variant:"body2",className:N.headerText},{children:"Calls/Sec"})),e("img",{src:zW,alt:"info",className:N.infoIcon})]}))}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[ae,be]),t(n,{children:[pe&&e(UW,{appName:S,hiddenColumns:[QG],columns:Se,onColumnVisibilityChange:function(e,t){Te((function(n){return n.map((function(n){return n.name===e?Me(Me({},n),{options:Me(Me({},n.options),{display:t})}):n}))}))},close:function(){return fe(!1)},isDbLoadMetadataColumns:!0}),t(x,Me({mt:3,p:2,className:O.dbLoadDataContainer},{children:[e(x,{children:e(I,Me({variant:"h5"},{children:"".concat("ALL"===_?"Events":_," Load By Database")}))}),t(x,Me({className:N.filterContainer,mt:2},{children:[t(x,Me({className:N.filterLeftContainer},{children:[e(se,{dataTestId:"DbLoadMetadata-DatabaseSelect",size:"medium",className:Re(N.ybOverrideMuiSelect),onChange:function(e,t){if(!t)return X(Kn),void V(0);var n=(null==t?void 0:t.value)||Kn;V(0),X(n)},onBlur:function(e){var t=e.target.value;t&&!L.includes(t)&&(X(Kn),V(0))},value:q===Kn?{value:Kn,label:lr.ALL_DATABASES}:{value:q,label:q},getOptionLabel:function(e){return"string"==typeof e?e===Kn?lr.ALL_DATABASES:e:e.value===Kn?lr.ALL_DATABASES:e.label},options:Oe([{value:Kn,label:lr.ALL_DATABASES}],L.map((function(e){return{value:e,label:e}})),!0)}),e(U,{dataTestId:"DbLoadMetadata-SearchInput",placeholder:"Filter Databases",className:N.ybSearchInput,onChange:function(e){var t=e.target.value;re(t),Ce.current(t)},value:te,inputProps:{"data-testid":"DbLoadMetadata-SearchInput"},InputProps:{startAdornment:e(A,Me({position:"start"},{children:e(jW,{})})),endAdornment:!!te&&e(A,Me({position:"end"},{children:e(D,Me({size:"small",onClick:function(){Ce.current.cancel(),J(""),re(""),V(0)},"data-testid":"DbLoadMetadata-ClearButton"},{children:e(ye,{fontSize:"small"})}))}))}})]})),e(Z,Me({size:"medium",variant:S===Sn.YBM?"ghost":"secondary",startIcon:e(VW,{}),onClick:function(){return fe(!0)},dataTestId:"DbLoadMetadata-AddFieldsButton"},{children:di}))]})),t(x,Me({className:S===Sn.YBM?N.overrideMuiTableContainer:N.overrideMuiTableContainerWeb},{children:[(Ne||We)&&t(x,Me({mt:3,className:N.recommendation},{children:[(S===Sn.YBA||S===Sn.WEB)&&e(ke,{customErrorMessage:Ki(null===(s=null===(o=null==Pe?void 0:Pe.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error)?null===(h=null===(d=null==Pe?void 0:Pe.response)||void 0===d?void 0:d.data)||void 0===h?void 0:h.error:hi.DB_STATS_FETCH_ERROR}),S===Sn.YBM&&e(ne,{text:Ki(null===(f=null===(p=null==Pe?void 0:Pe.response)||void 0===p?void 0:p.data)||void 0===f?void 0:f.error)?null===(v=null===(m=null==Pe?void 0:Pe.response)||void 0===m?void 0:m.data)||void 0===v?void 0:v.error:hi.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),Le&&e(oe,{id:"DbLoadMetadata",className:N.overrideMuiTable,data:null!=ae?ae:[],columns:null==Se?void 0:Se.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),isLoading:De,options:{enableExpanding:!0,renderDetailPanel:function(t){var r=t.row;if(!r.getIsExpanded())return e(n,{});var i=r.original,o=null==i?void 0:i.name;return e(x,{children:e(_Y,{dbWaitEventType:_,universeUuid:b,name:o,apiUrl:w,appName:S,startTime:T,endTime:C,onSelectedQuery:M,isDbLoadMetadata:!0,isNodeLoadMetadata:!1,onNavigateToUrl:E})})},sort:!0,filter:!0,count:Y,serverSide:!0,pagination:!0,tableLayout:"fixed",responsive:"standard",selectableRowsOnClick:!1,rowHover:!0,rowCount:B,rowsPerPage:B,autoResetPageIndex:!1,onChangePage:function(e){V(e)},onChangeRowsPerPage:function(e){F(e),V(0)},rowsPerPageOptions:wr,onSortingChange:function(e){var t=[];if("function"==typeof e){t=e(ce?[{id:ce,desc:ve===On.DESC}]:[])}else{if(!Array.isArray(e))return;t=e}if(0===t.length)return de(ZG),ge(On.DESC),void V(0);var n=t[0],r=n.id,i=n.desc?On.DESC:On.ASC;de(r===qG?"namespaceName":r),ge(i),V(0)},paginationDisplayMode:"custom",customFooter:je,manualSorting:!0,state:Ge}},"DbLoadMetadata-".concat(_,"-").concat(ce,"-").concat(ve))]}))]}))]})},nq=b((function(e){return{accordion:{borderRadius:e.spacing(1),backgroundColor:e.palette.common.white,border:"1px solid ".concat(e.palette.grey[200]),boxShadow:"none","&:before":{display:"none"},"&.Mui-expanded":{margin:e.spacing(2,0,0,0)}},accordionSummary:{padding:e.spacing(1.5,2,1,2),minHeight:"auto","&.Mui-expanded":{minHeight:"auto"},"& .MuiAccordionSummary-content":{margin:0,"&.Mui-expanded":{margin:0}}},accordionSummaryCollapsed:{padding:e.spacing(1.5,2,1.5,2)},headerTitle:{fontWeight:600,fontSize:"13px",lineHeight:"16px"},accordionDetails:{padding:e.spacing(0,2,2,2),flexDirection:"column"},expandIcon:{padding:e.spacing(0,.8)},expandChartButtonContainer:{marginBottom:e.spacing(1),alignSelf:"flex-end"},countText:{fontWeight:500,fontSize:"11.5px",lineHeight:"16px",color:e.palette.grey[700]},countTextContainer:{height:"20px",width:"20px",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:e.spacing(1),backgroundColor:e.palette.grey[200]},headerTitleContainer:{display:"flex",alignItems:"center",flexDirection:"row"}}})),rq=function(n){var r,i,o,s=n.apiUrl,c=n.endTime,d=n.appName,h=n.startTime,p=n.currentTab,f=n.universeUuid,m=n.onSelectedIssue,v=n.onClickShowMoreAnomalies,g=nq(),_=xi(),b=l(!1),w=b[0],S=b[1],T=l(!0),C=T[0],M=T[1],E=l(null),A=E[0],D=E[1],O=u(!1),N=y([eW.fetchBackgroundTasks,f,h,c],(function(){return gW.fetchBackgroundTasks(f,h,c,null,s)}),{onSuccess:function(e){var t=function(e){var t;return{groups:(t={},t[Bn.RUNNING_BACKGROUND_JOBS]=e.groups,t)}}(e);D(t)}}),k=null===(o=null===(i=null===(r=null==N?void 0:N.error)||void 0===r?void 0:r.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error;a((function(){if(null!==A&&!O.current){var e=(null==A?void 0:A.groups)&&Object.values(A.groups).some((function(e){return Object.keys(null!=e?e:{}).length>0}));M(e),O.current=!0}}),[A]);var B=(null==A?void 0:A.groups)?Object.values(A.groups).reduce((function(e,t){return e+Object.keys(null!=t?t:{}).length}),0):0;return t(R,Me({expanded:C,className:g.accordion,onChange:function(e,t){M(t)}},{children:[e(L,Me({className:Re(g.accordionSummary,!C&&g.accordionSummaryCollapsed),expandIcon:e("img",{src:WG,className:g.expandIcon,alt:C?"Collapse":"Expand"})},{children:t(x,Me({className:g.headerTitleContainer},{children:[e(I,Me({variant:"body2",className:g.headerTitle},{children:"Background Jobs"})),!C&&e(x,Me({className:g.countTextContainer},{children:e(I,Me({variant:"body2",className:g.countText},{children:B}))}))]}))})),t(P,Me({className:g.accordionDetails},{children:[e(x,Me({className:g.expandChartButtonContainer},{children:e(Z,Me({onClick:function(){S(!w)},dataTestId:"BackgroundJobs-ExpandAllBtn",variant:d===Sn.YBM?"ghost":"secondary",startIcon:e("img",{src:w?VG:HG,alt:"Expand Icon"})},{children:w?"Collapse All":"Expand All"}))})),N.isLoading&&e(x,Me({mt:2,className:_.loadingBox},{children:e(_W,{className:Re(_.icon,_.inProgressIcon)})})),N.isError&&t(x,Me({mt:2},{children:[(d===Sn.YBA||d===Sn.WEB)&&e(ke,{customErrorMessage:k&&Ki(k)?k:hi.ANOMALIES_FETCH_ERROR}),d===Sn.YBM&&e(ne,{text:k&&Ki(k)?k:hi.ANOMALIES_FETCH_ERROR})]})),N.isSuccess&&(A&&$i(A)?e(qY,{universeUuid:f,apiUrl:s,appName:d,endTime:c,isInsightsTab:!1,startTime:h,currentTab:p,expandAll:w,isBackgroundJobs:!0,sourceData:A,onSelectedIssue:m,name:"gant-chart-background-jobs",onClickShowMoreAnomalies:v},"gant-chart-background-jobs"):e(x,Me({mt:2},{children:e(I,Me({variant:"body2"},{children:"No Background Jobs detected"}))})))]}))]}))},iq=(0,K.styled)(te)((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)}}})),oq=b((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%"},ybTabs:{flex:1,"& .yb-MuiTabs-scroller":{boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[200]," !important")}},tabButton:{width:"160px"},tabBox:{padding:"0px 24px 24px 16px",backgroundColor:"#F7FAFC",marginTop:e.spacing(2),marginBottom:e.spacing(5)},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"},ybTabContainer:{marginBottom:e.spacing(2.5)}}})),aq=function(r){var i,o,s,u,c,d,h,p,f,m,v,g,_,b=r.startTime,w=r.endTime,S=r.universeUuid,T=r.appName,C=r.timezone,M=r.filterDuration,E=r.apiUrl,A=r.universeData,D=r.isAshEnabled,O=r.isAshSupported,N=r.showStandaloneAnomalies,R=r.onClickShowMoreAnomalies,L=r.onEChartsDateSelect,P=r.onSelectedIssue,k=r.onSelectedQuery,B=r.notifyTabChange,F=r.onStartDateChange,U=r.onEndDateChange,z=r.onRefresh,H=r.onSelectedFilterDuration,V=r.onNavigateToUrl,W=oq(),Y=xi(),j=l([]),G=j[0],q=j[1],Q=l(null),Z=Q[0],X=Q[1],$=l(za().currentTab),K=$[0],J=$[1],ee=l(Object.values(Fn)),ne=ee[0],ie=ee[1],oe=l(jn[0]),ae=oe[0],se=oe[1],le=l(Un.QUERIES),ue=le[0],ce=le[1],de=l(Wn.OVERALL_LOAD),he=de[0],pe=de[1],fe=l(Pn.EMPTY),me=fe[0];fe[1];var ve=l(Kn.toUpperCase()),ge=ve[0],ye=ve[1],_e=l($n),be=_e[0],Se=_e[1],Te=l(Jn),Ce=Te[0],Ie=Te[1],Ee=l(!0),Ae=Ee[0],De=Ee[1],Oe=l(Kn),Ne=Oe[0],Le=Oe[1],Pe=l(Kn),ke=Pe[0],Be=Pe[1],Fe=l(Kn),Ue=Fe[0],ze=Fe[1],He=l(Kn),Ve=He[0],We=He[1],Ye=l(hn.OVERALL),je=Ye[0],Ge=Ye[1],qe=l(An.ALL),Qe=qe[0],Ze=qe[1],Xe=l(Mn.TOP),$e=Xe[0],Ke=Xe[1],Je=l(3),et=Je[0],tt=Je[1],nt=function(e){q(e)},rt=function(e,t){var n=Object.values(Fn);return t||(n=n.filter((function(e){return e!==Fn.METRICS}))),n},it=function(e){se(e)},ot=y([eW.fetchAnomalyGroups,null==b?void 0:b.toISOString()],(function(){var e,t;return gW.fetchAnomalyGroups(S,null!==(e=null==b?void 0:b.toISOString())&&void 0!==e?e:null,null!==(t=null==w?void 0:w.toISOString())&&void 0!==t?t:null,K===Fn.INSIGHTS?Gn.INSIGHT:T===Sn.YBM||T===Sn.YBA?"":Gn.PERF_ANOMALY,ut,E)}),{onSuccess:function(e){X(e)}}),at=null===(s=null===(o=null===(i=null==ot?void 0:ot.error)||void 0===i?void 0:i.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error;y([eW.fetchSpecificRuntimeConfigs],(function(){return gW.fetchSpecificRuntimeConfigs(Tr,[Cr.SHOW_QUERIES_VIEW,Cr.SHOW_TOPK_METRICS_VIEW,Cr.SHOW_DB_CLUSTER_LOAD_VIEW],E)}),{onSuccess:function(e){var t,n,r="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===Cr.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value);null===(n=null==e?void 0:e.find((function(e){return e.path===Cr.SHOW_QUERIES_VIEW})))||void 0===n||n.value;ie(rt(0,!!r))},onError:function(){ie(rt(0,!1))}}),a((function(){me===Pn.SUCCESS&&ot.refetch()}),[me]),a((function(){(K===Fn.CLUSTER_LOAD&&ue===Un.ANOMALIES||K===Fn.INSIGHTS||N)&&ot.refetch()}),[null==b?void 0:b.toISOString(),null==w?void 0:w.toISOString(),K,Ne,ke,Ue,Ve]),a((function(){if(!N){var e=za();if(J(e.currentTab),pe(e.clusterLoadSubTab),ce(e.clusterLoadOverallSubTab),B(e.currentTab),e.currentTab===Fn.CLUSTER_LOAD)!function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search).toString();if(e.endsWith("/".concat(Qn.CLUSTER_LOAD))||e.endsWith("/".concat(Qn.CLUSTER_LOAD,"/").concat(Qn.OVERALL_LOAD))){var n=e.replace(new RegExp("/".concat(Qn.CLUSTER_LOAD,"(/").concat(Qn.OVERALL_LOAD,")?$")),""),r="".concat(n,"/").concat(Qn.CLUSTER_LOAD,"/").concat(Qn.OVERALL_LOAD,"/").concat(Qn.QUERIES).concat(t?"?".concat(t):"");window.history.replaceState(null,"",r)}}(0,e.currentTab),T===Sn.YBA&&Ha(0,e.currentTab,e.clusterLoadSubTab,e.clusterLoadOverallSubTab);else if(e.currentTab===Fn.METRICS||e.currentTab===Fn.INSIGHTS);else if(T!==Sn.YBA){var t=new URLSearchParams(window.location.search).toString(),n="".concat(window.location.pathname,"/").concat(Qn.QUERIES).concat(t?"?".concat(t):"");window.history.replaceState(null,"",n)}}}),[]);var st=function(e,t){t!==he&&pe(t)};a((function(){K!==Fn.CLUSTER_LOAD||N||Ha(0,K,he,ue)}),[ue,he,K]);var lt=function(t){switch(t){case Fn.METRICS:return e(x,{mt:1});case Fn.INSIGHTS:return e(x,{mt:.5});case Fn.CLUSTER_LOAD:return e(x,Me({ml:T===Sn.WEB?2:0},{children:e(x,Me({display:"flex",alignItems:"center",className:W.tabsContainer},{children:e(re,Me({value:he,className:W.ybTabs,onChange:st},{children:Object.values(Wn).map((function(t,n){return e(iq,{"data-testid":"".concat(t,"ClusterLoadSubTab"),value:t,label:t},n)}))}))}))}));default:return null}},ut=function(){return{universeUuid:S,cluster:Ne,region:ke,zone:Ue,node:Ve,metricMeasure:je,numNodes:et,outlierType:$e,formattedStartDate:b,formattedEndDate:w}},ct=function(e){Ge(e)},dt=function(e){Ke(e)},ht=function(e){tt(e>10?10:e)},pt=function(e,t,n,r){De(r),n===$n&&(Se($n),Le(Kn),Be(Kn)),(e||t)&&(Se(n),e&&(Le(n),Be("")),t&&(Be(n),Le("")))},ft=function(e,t,n){n===Jn&&(Ie(Jn),ze(Kn),We(Kn)),(e||t)&&(Ie(n),e&&(ze(n),We("")),t&&(ze(""),We(n)))},mt=function(e){Ze(e)},vt=function(){return t(x,{children:[e(x,Me({mt:2.5,mb:2.5},{children:e(ou,{appName:T,filterDuration:M,startDateTime:b,endDateTime:w,timezone:C,isDrilldownView:!1,currentTab:K,clusterLoadSubTab:K===Fn.CLUSTER_LOAD?he:null,isClusterLoadView:K===Fn.CLUSTER_LOAD,isTopKMetricsView:K===Fn.METRICS,onSelectedFilterDuration:H,metricMeasure:je,showStandaloneAnomalies:N,onStartDateChange:F,onEndDateChange:U,onRefresh:z})})),he!==Wn.LOAD_BY_DATABASE&&e(x,Me({mt:2,ml:T===Sn.WEB&&K===Fn.CLUSTER_LOAD?2:0},{children:e($a,{appName:T,universeData:A,clusterRegionItem:be,zoneNodeItem:Ce,isPrimaryCluster:Ae,cluster:Ne,region:ke,metricMeasure:je,outlierType:$e,numNodes:et,isDrilldownView:!1,anomalyData:null,queryType:Qe,showSplitSelector:!N&>,showQueryTypeSelector:yt,onZoneNodeSelected:ft,onClusterRegionSelected:pt,onOutlierTypeSelected:dt,onSplitTypeSelected:ct,onNumNodesChanged:ht,onQueryTypeSelected:mt})}))]})};if(N)return t(x,Me({mt:2},{children:[vt(),e(jG,{apiUrl:E,appName:T,endTime:w,startTime:b,currentTab:K,universeUuid:S,anomalyGroups:Z,onSelectedIssue:P,fetchAnomalyGroups:ot,anomalyGroupsFetchError:at,onClickShowMoreAnomalies:R,onNavigateToUrl:V})]}));var gt=K===Fn.METRICS,yt=K!==Fn.METRICS;return t(x,Me({className:Re(T===Sn.WEB?W.tabBox:void 0)},{children:[T===Sn.WEB&&e(x,{children:t(xe,Me({value:K},{children:[e(x,Me({display:"flex",alignItems:"center",className:W.tabsContainer},{children:e(re,Me({value:K,onChange:function(e,t){if(t!==K){J(t),B(t),pe(Wn.OVERALL_LOAD);var n=Un.ANOMALIES;Ha(0,t,Wn.OVERALL_LOAD,n,!0)}}},{children:ne.map((function(t,n){return e(te,{"data-testid":"".concat(t,"Tab"),value:t,label:t,className:W.tabButton},n)}))}))})),e(we,Me({className:Y.tabPanelPrimary,value:Fn.METRICS},{children:lt(Fn.METRICS)})),e(we,Me({className:Y.tabPanelPrimary,value:Fn.CLUSTER_LOAD},{children:lt(Fn.CLUSTER_LOAD)}))]}))}),(T===Sn.YBM||T===Sn.YBA)&&e(n,{children:lt(K)}),vt(),K===Fn.METRICS&&e(oG,{universeUuid:S,appName:T,timezone:C,apiUrl:E,onEChartsDateSelect:L,getClusterDetails:ut}),K===Fn.CLUSTER_LOAD&&he===Wn.LOAD_BY_DATABASE&&t(x,Me({mt:2,ml:T===Sn.WEB?2:0},{children:[he===Wn.LOAD_BY_DATABASE&&e(mY,{outlierType:$e,waitEventType:ge,numNodes:et,onOutlierTypeSelected:dt,onNumNodesChanged:ht,onChangeDbWaitEventType:function(e){ye(e)}}),e(jY,{dbWaitEventType:ge,isDbClusterLoadView:!0,startTime:null!==(u=null==b?void 0:b.toISOString())&&void 0!==u?u:null,endTime:null!==(c=null==w?void 0:w.toISOString())&&void 0!==c?c:null,apiUrl:E,universeUuid:S,appName:T,metricKey:"cluster_load",groupByOperation:ae,shouldAbbreviateTraceName:!0,timezone:C,isAshEnabled:D,isAshSupported:O,onFilterBarData:nt,onSetGroupByOperation:it,onEChartsDateSelect:L,getClusterDetails:ut}),e(tq,{appName:T,universeUuid:S,apiUrl:E,dbWaitEventType:ge,startTime:null!==(d=null==b?void 0:b.toISOString())&&void 0!==d?d:null,endTime:null!==(h=null==w?void 0:w.toISOString())&&void 0!==h?h:null,onSelectedQuery:k,onNavigateToUrl:V})]})),K===Fn.CLUSTER_LOAD&&he===Wn.OVERALL_LOAD&&t(x,Me({ml:T===Sn.WEB?2:0},{children:[e(jY,{dbWaitEventType:ge,isDbClusterLoadView:!1,startTime:null!==(p=null==b?void 0:b.toISOString())&&void 0!==p?p:null,endTime:null!==(f=null==w?void 0:w.toISOString())&&void 0!==f?f:null,apiUrl:E,universeUuid:S,appName:T,metricKey:"cluster_load",groupByOperation:ae,shouldAbbreviateTraceName:!0,timezone:C,isAshEnabled:D,isAshSupported:O,onFilterBarData:nt,onSetGroupByOperation:it,onEChartsDateSelect:L,getClusterDetails:ut}),T===Sn.WEB&&e(x,Me({display:"flex",alignItems:"center",className:W.tabsContainer,mt:5},{children:t(re,Me({pill:!0,value:ue,onChange:function(e,t){t!==ue&&ce(t)}},{children:[e(iq,{icon:e("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:Un.ANOMALIES,label:Un.ANOMALIES}),e(iq,{icon:e("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:Un.QUERIES,label:Un.QUERIES})]}))})),K===Fn.CLUSTER_LOAD&&he===Wn.OVERALL_LOAD&&ue===Un.QUERIES&&e(x,Me({mt:2,ml:T===Sn.WEB&&K===Fn.CLUSTER_LOAD?2:0},{children:e(rq,{apiUrl:E,appName:T,currentTab:K,universeUuid:S,onSelectedIssue:P,endTime:null!==(m=null==w?void 0:w.toISOString())&&void 0!==m?m:null,startTime:null!==(v=null==b?void 0:b.toISOString())&&void 0!==v?v:null,onClickShowMoreAnomalies:R})})),ue===Un.QUERIES&&e(x,Me({mt:2},{children:e(eG,{universeUuid:S,groupByOperation:ae,apiUrl:E,startTime:null!==(g=null==b?void 0:b.toISOString())&&void 0!==g?g:null,endTime:null!==(_=null==w?void 0:w.toISOString())&&void 0!==_?_:null,appName:T,filteredLegends:G,queryType:Qe,onSelectedQuery:k,getClusterDetails:ut,onNavigateToUrl:V})})),ue===Un.ANOMALIES&&e(x,Me({className:Y.noteTextContainer},{children:t(I,Me({variant:"body2",className:Y.noteText},{children:[e(I,Me({variant:"body2",className:Re(Y.noteText,Y.noteTextBold)},{children:"Note!"})),"Only the time window filter applies to this view."]}))}))]})),(K===Fn.INSIGHTS||K===Fn.CLUSTER_LOAD&&he===Wn.OVERALL_LOAD&&ue===Un.ANOMALIES)&&e(x,Me({mt:2,mb:T===Sn.WEB?4:0,ml:T===Sn.WEB&&K===Fn.CLUSTER_LOAD?2:0},{children:e(jG,{apiUrl:E,appName:T,endTime:w,startTime:b,currentTab:K,universeUuid:S,anomalyGroups:Z,onSelectedIssue:P,fetchAnomalyGroups:ot,anomalyGroupsFetchError:at,onClickShowMoreAnomalies:R,onNavigateToUrl:V})}))]}))},sq=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}},lq=Ka(sq),uq=Object.getOwnPropertySymbols,cq=Object.prototype.hasOwnProperty,dq=Object.prototype.propertyIsEnumerable;var hq=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]))cq.call(n,a)&&(i[a]=n[a]);if(uq){r=uq(n);for(var s=0;s<r.length;s++)dq.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},pq=hq,fq={};function mq(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 vq="mixins";var gq=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=pq({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=pq({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=c(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=pq({},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(mq(!(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 mq("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;m.hasOwnProperty(t)&&mq("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&&mq("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){mq("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),mq(!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(vq)&&a.mixins(e,n.mixins),n)if(n.hasOwnProperty(l)&&l!==vq){var u=n[l],h=r.hasOwnProperty(l);if(s(h,l),a.hasOwnProperty(l))a[l](e,u);else{var p=i.hasOwnProperty(l);if("function"==typeof u&&!p&&!h&&!1!==n.autobind)o.push(l,u),r[l]=u;else if(h){var f=i[l];mq(p&&("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 mq(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(mq(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 h(e,t){return t.bind(e)}var p={componentDidMount:function(){this.__isMounted=!0}},f={componentWillUnmount:function(){this.__isMounted=!1}},m={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},v=function(){};return pq(v.prototype,e.prototype,m),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]=h(e,i)}}(this),this.props=e,this.context=r,this.refs=fq,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;mq("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 v,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],r.forEach(l.bind(null,t)),l(t,p),l(t,e),l(t,f),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),mq(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),i)t.prototype[o]||(t.prototype[o]=null);return t}},yq=i,_q=gq;if(void 0===yq)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 bq,xq,wq,Sq,Tq=(new yq.Component).updater,Cq=Ka(_q(yq.Component,yq.isValidElement,Tq)),Iq={exports:{}};Iq.exports=function(){if(Sq)return wq;Sq=1;var e=xq?bq:(xq=1,bq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,wq=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 Mq=Iq.exports,Eq=Ka(Mq),Aq=function(){};function Dq(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Oq=Object.create(null);function Nq(e){return Oq[e]||(Oq[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+=Dq(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+=Dq(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),Oq[e]}function Rq(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=Nq(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 Lq(e){return Nq(e).paramNames}function Pq(e,t){t=t||{};for(var n=Nq(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||lq(!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||lq(!1),null==l){if(r){a[r-1]="";for(var h=n.indexOf(s),p=n.slice(h,n.length),f=-1,m=0;m<p.length;m++)if(")"==p[m]){f=m;break}f>0||lq(!1),u=h+f-1}}else r?a[r-1]+=encodeURIComponent(l):i+=encodeURIComponent(l);else r?a[r-1]+=s:i+=s;return r<=0||lq(!1),i.replace(/\/+/g,"/")}function kq(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&&Lq(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 Bq(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 Fq(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 Uq=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 zq(){var e=new Uq,t=new Uq;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;Bq(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 Hq="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 Vq(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 Vq(e,t[n])}));if("object"===(void 0===e?"undefined":Hq(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(!Vq(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function Wq(e,t){return null==t?null==e:null==e||Vq(e,t)}function Yq(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=Rq(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))&&Wq(a,n.query))}function jq(e){return e&&"function"==typeof e.then}function Gq(e,t){Fq(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);jq(i)&&i.then((function(e){return n(null,e)}),n)}else n()}}(e,t,r)}),t)}var qq=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 Qq(e){return null==e||i.isValidElement(e)}function Zq(e){return Qq(e)||Array.isArray(e)&&e.every(Qq)}function Xq(e){var t,n,r=e.type,i=(t=r.defaultProps,n=e.props,qq({},t,n));if(i.children){var o=$q(i.children,i);o.length&&(i.childRoutes=o),delete i.children}return i}function $q(e,t){var n=[];return i.Children.forEach(e,(function(e){if(i.isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(Xq(e))})),n}function Kq(e){return Zq(e)?e=$q(e):e&&!Array.isArray(e)&&(e=[e]),e}var Jq=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 eQ(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:nQ(n,r)},l=e.getChildRoutes(s,(function(e,t){t=!e&&Kq(t),o?a=[e,t]:i(e,t)}));return jq(l)&&l.then((function(e){return i(null,Kq(e))}),i),o=!1,a}function tQ(e,t,n,r,i){if(e.indexRoute)i(null,e.indexRoute);else if(e.getIndexRoute){var o={location:t,params:nQ(n,r)},a=e.getIndexRoute(o,(function(e,t){i(e,!e&&Kq(t)[0])}));jq(a)&&a.then((function(e){return i(null,Kq(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}));Bq(a.length,(function(e,i,o){tQ(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=eQ(e,t,n,r,s);l&&s.apply(void 0,l)}else i()}function nQ(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 rQ(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=Rq(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:nQ(r,i)};return void tQ(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?iQ(s,t,(function(t,n){t?o(t):n?(n.routes.unshift(e),o(null,n)):o()}),n,r,i):o()},c=eQ(e,t,r,i,u);c&&u.apply(void 0,c)}else o()}function iQ(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=Jq({},t,{pathname:"/"+t.pathname})),r=t.pathname),Bq(e.length,(function(n,a,s){rQ(e[n],t,r,i,o,(function(e,t){e||t?s(e,t):a()}))}),n)}var oQ=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 aQ(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function sQ(e,t,n){if(e[t])return new Error("<"+n+'> should not have a "'+t+'" prop')}Mq.shape({listen:Mq.func.isRequired,push:Mq.func.isRequired,replace:Mq.func.isRequired,go:Mq.func.isRequired,goBack:Mq.func.isRequired,goForward:Mq.func.isRequired});var lQ,uQ=Mq.elementType,cQ=Mq.oneOfType([uQ,Mq.object]),dQ=Mq.oneOfType([Mq.object,Mq.element]),hQ=Mq.oneOfType([dQ,Mq.arrayOf(dQ)]),pQ={exports:{}},fQ={};pQ.exports=function(){if(lQ)return fQ;lQ=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,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){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 p:case a:return e;default:return h}}case n:return h}}}function b(e){return _(e)===u}return fQ.AsyncMode=l,fQ.ConcurrentMode=u,fQ.ContextConsumer=s,fQ.ContextProvider=a,fQ.Element=t,fQ.ForwardRef=c,fQ.Fragment=r,fQ.Lazy=f,fQ.Memo=p,fQ.Portal=n,fQ.Profiler=o,fQ.StrictMode=i,fQ.Suspense=d,fQ.isAsyncMode=function(e){return b(e)||_(e)===l},fQ.isConcurrentMode=b,fQ.isContextConsumer=function(e){return _(e)===s},fQ.isContextProvider=function(e){return _(e)===a},fQ.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},fQ.isForwardRef=function(e){return _(e)===c},fQ.isFragment=function(e){return _(e)===r},fQ.isLazy=function(e){return _(e)===f},fQ.isMemo=function(e){return _(e)===p},fQ.isPortal=function(e){return _(e)===n},fQ.isProfiler=function(e){return _(e)===o},fQ.isStrictMode=function(e){return _(e)===i},fQ.isSuspense=function(e){return _(e)===d},fQ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===v||e.$$typeof===g||e.$$typeof===y||e.$$typeof===m)},fQ.typeOf=_,fQ}();var mQ=pQ.exports;var vQ=Eq.shape({subscribe:Eq.func.isRequired,eventIndex:Eq.number.isRequired});function gQ(e){return"@@contextSubscriber/"+e}var yQ=void 0!==i.forwardRef;var _Q=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},bQ="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},xQ=Cq({displayName:"RouterContext",mixins:[function(e){var t,n,r=gQ(e),i=r+"/listeners",o=r+"/eventIndex",a=r+"/subscribe",s=((n={childContextTypes:(t={},t[r]=vQ.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 yQ&&(s.UNSAFE_componentWillMount=s.componentWillMount,s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillMount,delete s.componentWillReceiveProps),s}("router")],propTypes:{router:Mq.object.isRequired,location:Mq.object.isRequired,routes:Mq.array.isRequired,params:Mq.object.isRequired,components:Mq.array.isRequired,createElement:Mq.func.isRequired},getDefaultProps:function(){return{createElement:i.createElement}},childContextTypes:{router:Mq.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,o=t.params,a=t.components,s=t.router,l=null;return a&&(l=a.reduceRight((function(t,i,a){if(null==i)return t;var l=r[a],u=function(e,t){var n={};return e.path?(Lq(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n}(l,o),c={location:n,params:o,route:l,router:s,routeParams:u,routes:r};if(Zq(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===i?"undefined":bQ(i))&&!mQ.isValidElementType(i)){var h={};for(var p in i)Object.prototype.hasOwnProperty.call(i,p)&&(h[p]=e.createElement(i[p],_Q({key:p},c)));return h}return e.createElement(i,c)}),l)),null===l||!1===l||i.isValidElement(l)||lq(!1),l}}),wQ=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 SQ(e,t){var n=t.location,r=t.params,i=t.routes;return e.location=n,e.params=r,e.routes=i,e}var TQ=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 CQ={history:Mq.object,children:hQ,routes:hQ,render:Mq.func,createElement:Mq.func,onError:Mq.func,onUpdate:Mq.func,matchContext:Mq.object},IQ=void 0!==i.forwardRef,MQ=Cq({displayName:"Router",propTypes:CQ,getDefaultProps:function(){return{render:function(e){return i.createElement(xQ,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 SQ(wQ({},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||lq(!1),function(e,t){var n={},r=zq(),i=r.runEnterHooks,o=r.runChangeHooks,a=r.runLeaveHooks,s=void 0;function l(e,n){s&&s.location===e?u(s,n):iQ(t,e,(function(t,r){t?n(t):r?u(oQ({},r,{location:e}),n):n()}))}function u(e,t){var r=kq(n,e),s=r.leaveRoutes,l=r.changeRoutes,u=r.enterRoutes;function c(r,i){if(r||i)return d(r,i);Gq(e,(function(r,i){r?t(r):t(null,null,n=oQ({},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 h=Object.create(null);function p(e){return e.map((function(e){return h[d(e)]})).filter((function(e){return e}))}function f(e,r){iQ(t,e,(function(t,i){if(null!=i){s=oQ({},i,{location:e});for(var o=p(kq(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 m(){if(n.routes){for(var e=p(n.routes),t=void 0,r=0,i=e.length;"string"!=typeof t&&r<i;++r)t=e[r]();return t}}var v=void 0,g=void 0;function y(e){var t=d(e);t&&(delete h[t],aQ(h)||(v&&(v(),v=null),g&&(g(),g=null)))}return{isActive:function(t,r){return Yq(t=e.createLocation(t),r,n.location,n.routes,n.params)},match:l,listenBeforeLeavingRoute:function(t,n){var r=!aQ(h),i=d(t,!0);return h[i]=n,r&&(v=e.listenBefore(f),e.listenBeforeUnload&&(g=e.listenBeforeUnload(m))),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,Kq(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):(SQ(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(CQ).forEach((function(e){return delete l[e]})),s(TQ({},l,{router:this.router,location:t,routes:n,params:r,components:i,createElement:a})))}});IQ&&(MQ.prototype.UNSAFE_componentWillReceiveProps=MQ.prototype.componentWillReceiveProps,MQ.prototype.UNSAFE_componentWillMount=MQ.prototype.componentWillMount,delete MQ.prototype.componentWillReceiveProps,delete MQ.prototype.componentWillMount);var EQ=Mq.shape({push:Mq.func.isRequired,replace:Mq.func.isRequired,go:Mq.func.isRequired,goBack:Mq.func.isRequired,goForward:Mq.func.isRequired,setRouteLeaveHook:Mq.func.isRequired,isActive:Mq.func.isRequired});Mq.shape({pathname:Mq.string.isRequired,search:Mq.string.isRequired,state:Mq.object,action:Mq.string.isRequired,key:Mq.string});var AQ=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 DQ(e,t){return"function"==typeof e?e(t.location):e}var OQ=Cq({displayName:"Link",mixins:[function(e){var t,n,r=gQ(e),i=r+"/lastRenderedEventIndex",o=r+"/handleContextUpdate",a=r+"/unsubscribe",s=((n={contextTypes:(t={},t[r]=vQ,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 yQ&&(s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillReceiveProps),s}("router")],contextTypes:{router:EQ},propTypes:{to:Mq.oneOfType([Mq.string,Mq.object,Mq.func]),activeStyle:Mq.object,activeClassName:Mq.string,onlyActiveOnIndex:Mq.bool.isRequired,onClick:Mq.func,target:Mq.string,innerRef:Mq.oneOfType([Mq.string,Mq.func,Mq.shape({current:Mq.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||lq(!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(DQ(this.props.to,t))))}},render:function(){var e=this.props,t=e.to,n=e.activeClassName,r=e.activeStyle,o=e.onlyActiveOnIndex,a=e.innerRef,s=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"]),l=this.context.router;if(l){if(!t)return i.createElement("a",AQ({},s,{ref:a}));var u=DQ(t,l);s.href=l.createHref(u),(n||null!=r&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r))&&l.isActive(u,o)&&(n&&(s.className?s.className+=" "+n:s.className=n),r&&(s.style=AQ({},s.style,r)))}return i.createElement("a",AQ({},s,{onClick:this.handleClick,ref:a}))}}),NQ=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};Cq({displayName:"IndexLink",render:function(){return i.createElement(OQ,NQ({},this.props,{onlyActiveOnIndex:!0}))}});var RQ,LQ={exports:{}},PQ={};LQ.exports=function(){if(RQ)return PQ;RQ=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,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){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 p:case a:return e;default:return h}}case n:return h}}}function b(e){return _(e)===u}return PQ.AsyncMode=l,PQ.ConcurrentMode=u,PQ.ContextConsumer=s,PQ.ContextProvider=a,PQ.Element=t,PQ.ForwardRef=c,PQ.Fragment=r,PQ.Lazy=f,PQ.Memo=p,PQ.Portal=n,PQ.Profiler=o,PQ.StrictMode=i,PQ.Suspense=d,PQ.isAsyncMode=function(e){return b(e)||_(e)===l},PQ.isConcurrentMode=b,PQ.isContextConsumer=function(e){return _(e)===s},PQ.isContextProvider=function(e){return _(e)===a},PQ.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},PQ.isForwardRef=function(e){return _(e)===c},PQ.isFragment=function(e){return _(e)===r},PQ.isLazy=function(e){return _(e)===f},PQ.isMemo=function(e){return _(e)===p},PQ.isPortal=function(e){return _(e)===n},PQ.isProfiler=function(e){return _(e)===o},PQ.isStrictMode=function(e){return _(e)===i},PQ.isSuspense=function(e){return _(e)===d},PQ.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===v||e.$$typeof===g||e.$$typeof===y||e.$$typeof===m)},PQ.typeOf=_,PQ}();var kQ=LQ.exports,BQ={};BQ[kQ.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},BQ[kQ.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var FQ=Cq({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=Xq(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=Pq(t.to,i);else if(t.to){var a=e.routes.indexOf(t);o=Pq(FQ.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:Mq.string,from:Mq.string,to:Mq.string.isRequired,query:Mq.object,state:Mq.object,onEnter:sQ,children:sQ},render:function(){lq(!1)}});Cq({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=FQ.createRouteFromReactElement(e))}},propTypes:{to:Mq.string.isRequired,query:Mq.object,state:Mq.object,onEnter:sQ,children:sQ},render:function(){lq(!1)}}),Cq({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=Xq(e))}},propTypes:{path:sQ,component:uQ,components:cQ,getComponent:Mq.func,getComponents:Mq.func},render:function(){lq(!1)}}),Cq({displayName:"Route",statics:{createRouteFromReactElement:Xq},propTypes:{path:Mq.string,component:uQ,components:cQ,getComponent:Mq.func,getComponents:Mq.func},render:function(){lq(!1)}});var UQ={__esModule:!0,PUSH:"PUSH",REPLACE:"REPLACE",POP:"POP"},zQ={},HQ=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},VQ=hq;function WQ(e,t){return t.encode?t.strict?HQ(e):encodeURIComponent(e):e}function YQ(e){return Array.isArray(e)?e.sort():"object"==typeof e?YQ(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}zQ.extract=function(e){return e.split("?")[1]||""},zQ.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=VQ({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]=YQ(n):e[t]=n,e}),Object.create(null))):r},zQ.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[WQ(t,e),"[",r,"]"].join(""):[WQ(t,e),"[",WQ(r,e),"]=",WQ(n,e)].join("")};case"bracket":return function(t,n){return null===n?WQ(t,e):[WQ(t,e),"[]=",WQ(n,e)].join("")};default:return function(t,n){return null===n?WQ(t,e):[WQ(t,e),"=",WQ(n,e)].join("")}}}(t=VQ({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 WQ(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 WQ(r,t)+"="+WQ(i,t)})).filter((function(e){return e.length>0})).join("&"):""};var jQ,GQ={__esModule:!0};!(jQ=Aq)||jQ.__esModule;GQ.default=function(e,t,n){var r=e(t,n);e.length<2&&n(r)};var qQ={},QQ={__esModule:!0};QQ.createPath=QQ.parsePath=QQ.getQueryStringValueFromPath=QQ.stripQueryStringValueFromPath=QQ.addQueryStringValueToPath=void 0,function(e){e&&e.__esModule}(Aq),QQ.addQueryStringValueToPath=function(e,t,n){var r=ZQ(e),i=r.pathname,o=r.search,a=r.hash;return XQ({pathname:i,search:o+(-1===o.indexOf("?")?"?":"&")+t+"="+n,hash:a})},QQ.stripQueryStringValueFromPath=function(e,t){var n=ZQ(e),r=n.pathname,i=n.search,o=n.hash;return XQ({pathname:r,search:i.replace(new RegExp("([?&])"+t+"=[a-zA-Z0-9]+(&?)"),(function(e,t,n){return"?"===t?t:n})),hash:o})},QQ.getQueryStringValueFromPath=function(e,t){var n=ZQ(e).search.match(new RegExp("[?&]"+t+"=([a-zA-Z0-9]+)"));return n&&n[1]};var ZQ=QQ.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}},XQ=QQ.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};qQ.__esModule=!0,qQ.locationsAreEqual=qQ.statesAreEqual=qQ.createLocation=qQ.createQuery=void 0;var $Q="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},KQ=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},JQ=nZ(sq);nZ(Aq);var eZ=QQ,tZ=UQ;function nZ(e){return e&&e.__esModule?e:{default:e}}qQ.createQuery=function(e){return KQ(Object.create(null),e)},qQ.createLocation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tZ.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"==typeof e?(0,eZ.parsePath)(e):e;return{pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:r.state,action:t,key:n}};var rZ=function(e){return"[object Date]"===Object.prototype.toString.call(e)},iZ=qQ.statesAreEqual=function e(t,n){if(t===n)return!0;var r=void 0===t?"undefined":$Q(t);if(r!==(void 0===n?"undefined":$Q(n)))return!1;if("function"===r&&(0,JQ.default)(!1),"object"===r){if(rZ(t)&&rZ(n)&&(0,JQ.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};qQ.locationsAreEqual=function(e,t){return e.key===t.key&&e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&iZ(e.state,t.state)};var oZ=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},aZ=zQ,sZ=function(e){return e&&e.__esModule?e:{default:e}}(GQ),lZ=qQ,uZ=QQ;var cZ=function(e){return(0,aZ.stringify)(e).replace(/%20/g,"+")},dZ=aZ.parse,hZ=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=cZ),"function"!=typeof i&&(i=dZ);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,uZ.parsePath)(e):e,i=r(t);return oZ({},n,{search:i?"?"+i:""})};return oZ({},n,{getCurrentLocation:function(){return o(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,sZ.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,lZ.createQuery)(e.query)),o(s)}})}},pZ=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},fZ=function(e){return e&&e.__esModule?e:{default:e}}(GQ),mZ=QQ;var vZ=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,mZ.parsePath)(e):e,n=t.pathname,i="/"===r.slice(-1)?r:r+"/",o="/"===n.charAt(0)?n.slice(1):n;return pZ({},t,{pathname:i+o})};return pZ({},n,{getCurrentLocation:function(){return i(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,fZ.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)))}})}},gZ={},yZ={__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())}}()}};gZ.__esModule=!0;var _Z=yZ,bZ=QQ,xZ=function(e){return e&&e.__esModule?e:{default:e}}(GQ),wZ=UQ,SZ=qQ;function TZ(e){return e&&e.__esModule?e:{default:e}}gZ.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=[],h=function(e){var t=l&&l.action===wZ.POP?d.indexOf(l.key):s?d.indexOf(s.key):-1;(s=e).action===wZ.PUSH?d=[].concat(d.slice(0,t+1),[s.key]):s.action===wZ.REPLACE&&(d[t]=s.key),c.forEach((function(e){return e(s)}))},p=function(e){var t,a;s&&(0,SZ.locationsAreEqual)(s,e)||l&&(0,SZ.locationsAreEqual)(l,e)||(l=e,t=e,a=function(t){if(l===e)if(l=null,t){if(e.action===wZ.PUSH){var n=(0,bZ.createPath)(s);(0,bZ.createPath)(e)===n&&(0,SZ.statesAreEqual)(s.state,e.state)&&(e.action=wZ.REPLACE)}e.action===wZ.POP?h(e):e.action===wZ.PUSH?!1!==r(e)&&h(e):e.action===wZ.REPLACE&&!1!==i(e)&&h(e)}else if(s&&e.action===wZ.POP){var a=d.indexOf(s.key),u=d.indexOf(e.key);-1!==a&&-1!==u&&o(a-u)}},(0,_Z.loopAsync)(u.length,(function(e,n,r){(0,xZ.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)},m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f();return(0,SZ.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:p,push:function(e){return p(m(e,wZ.PUSH))},replace:function(e){return p(m(e,wZ.REPLACE))},go:o,goBack:function(){return o(-1)},goForward:function(){return o(1)},createKey:f,createPath:bZ.createPath,createHref:function(e){return(0,bZ.createPath)(e)},createLocation:m}},TZ(Aq),TZ(sq),TZ(gZ);var CZ={__esModule:!0};CZ.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);var IZ={},MZ={__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")}},EZ={__esModule:!0};EZ.readState=EZ.saveState=void 0,function(e){e&&e.__esModule}(Aq);var AZ={QuotaExceededError:!0,QUOTA_EXCEEDED_ERR:!0},DZ={SecurityError:!0},OZ=function(e){return"@@History/"+e};EZ.saveState=function(e,t){if(window.sessionStorage)try{null==t?window.sessionStorage.removeItem(OZ(e)):window.sessionStorage.setItem(OZ(e),JSON.stringify(t))}catch(e){if(DZ[e.name])return;if(AZ[e.name]&&0===window.sessionStorage.length)return;throw e}},EZ.readState=function(e){var t=void 0;try{t=window.sessionStorage.getItem(OZ(e))}catch(e){if(DZ[e.name])return}if(t)try{return JSON.parse(t)}catch(e){}},IZ.__esModule=!0,IZ.go=IZ.replaceLocation=IZ.pushLocation=IZ.startListener=IZ.getUserConfirmation=IZ.getCurrentLocation=void 0;var NZ=qQ,RZ=MZ,LZ=EZ,PZ=QQ,kZ="popstate",BZ="hashchange",FZ=CZ.canUseDOM&&!(0,RZ.supportsPopstateOnHashchange)(),UZ=function(e){var t=e&&e.key;return(0,NZ.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:t?(0,LZ.readState)(t):void 0},void 0,t)},zZ=IZ.getCurrentLocation=function(){var e=void 0;try{e=window.history.state||{}}catch(t){e={}}return UZ(e)};IZ.getUserConfirmation=function(e,t){return t(window.confirm(e))},IZ.startListener=function(e){var t=function(t){(0,RZ.isExtraneousPopstateEvent)(t)||e(UZ(t.state))};(0,RZ.addEventListener)(window,kZ,t);var n=function(){return e(zZ())};return FZ&&(0,RZ.addEventListener)(window,BZ,n),function(){(0,RZ.removeEventListener)(window,kZ,t),FZ&&(0,RZ.removeEventListener)(window,BZ,n)}};var HZ=function(e,t){var n=e.state,r=e.key;void 0!==n&&(0,LZ.saveState)(r,n),t({key:r},(0,PZ.createPath)(e))};IZ.pushLocation=function(e){return HZ(e,(function(e,t){return window.history.pushState(e,null,t)}))},IZ.replaceLocation=function(e){return HZ(e,(function(e,t){return window.history.replaceState(e,null,t)}))},IZ.go=function(e){e&&window.history.go(e)};var VZ={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=IZ;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}});var n=qQ,r=QQ;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}}(VZ);var WZ=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},YZ=$Z(sq),jZ=CZ,GZ=XZ(IZ),qZ=XZ(VZ),QZ=MZ,ZZ=$Z(gZ);function XZ(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 $Z(e){return e&&e.__esModule?e:{default:e}}var KZ=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};jZ.canUseDOM||(0,YZ.default)(!1);var t=e.forceRefresh||!(0,QZ.supportsHistory)()?qZ:GZ,n=t.getUserConfirmation,r=t.getCurrentLocation,i=t.pushLocation,o=t.replaceLocation,a=t.go,s=(0,ZZ.default)(WZ({getUserConfirmation:n},e,{getCurrentLocation:r,pushLocation:i,replaceLocation:o,go:a})),l=0,u=void 0,c=function(e,t){1==++l&&(u=GZ.startListener(s.transitionTo));var n=t?s.listenBefore(e):s.listen(e);return function(){n(),0==--l&&u()}};return WZ({},s,{listenBefore:function(e){return c(e,!0)},listen:function(e){return c(e,!1)}})},JZ=!("undefined"==typeof window||!window.document||!window.document.createElement);function eX(e){var t=void 0;return JZ&&(t=function(e){return function(t){return hZ(vZ(e))(t)}}(e)()),t}eX(KZ);var tX={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.startListener=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=IZ;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}(Aq);var n=qQ,r=MZ,i=EZ,o=QQ;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)}))}}(tX);var nX=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};lX(Aq);var rX=lX(sq),iX=CZ,oX=MZ,aX=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}(tX),sX=lX(gZ);function lX(e){return e&&e.__esModule?e:{default:e}}var uX=function(e){return"/"===e.charAt(0)?e:"/"+e},cX={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:uX},slash:{encodePath:uX,decodePath:uX}};eX((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};iX.canUseDOM||(0,rX.default)(!1);var t=e.queryKey,n=e.hashType;"string"!=typeof t&&(t="_k"),null==n&&(n="slash"),n in cX||(n="slash");var r=cX[n],i=aX.getUserConfirmation,o=(0,sX.default)(nX({getUserConfirmation:i},e,{getCurrentLocation:function(){return aX.getCurrentLocation(r,t)},pushLocation:function(e){return aX.pushLocation(e,r,t)},replaceLocation:function(e){return aX.replaceLocation(e,r,t)},go:aX.go})),a=0,s=void 0,l=function(e,n){1==++a&&(s=aX.startListener(o.transitionTo,r,t));var i=n?o.listenBefore(e):o.listen(e);return function(){i(),0==--a&&s()}};(0,oX.supportsGoWithoutReloadUsingHash)();return nX({},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 dX,hX=b((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),pX=function(n){var r,i,o,a,s,u=n.showMoreAnomalyCategory,c=n.selectedTab,d=n.startTime,h=n.endTime,p=n.apiUrl,f=n.universeUuid,m=n.appName,v=n.onClickShowMoreAnomalies,g=n.onSelectedIssue,_=hX(),b=xi(),w=l(null),S=w[0],T=w[1],C=y([eW.fetchAnomalyGroupsByType,d,h],(function(){return gW.fetchAnomalyGroupsByType(f,d,h,u,p)}),{onSuccess:function(e){T(e)}}),M=null===(o=null===(i=null===(r=null==C?void 0:C.error)||void 0===r?void 0:r.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error;return t(x,Me({className:_.tabBox},{children:[t(k,Me({className:b.breadCrumb,separator:e(I,Me({variant:"body2"},{children:"/"})),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e(B,Me({className:b.breadcrumbColor,component:OQ,variant:"h5",onClick:function(){v(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e("span",Me({className:b.breadCrumbText},{children:c===Fn.CLUSTER_LOAD?"Anomalies":"Insights"}))})),e(I,Me({variant:"h5"},{children:e("span",Me({className:Re(b.breadCrumbText,b.anomalyCategoryText)},{children:"".concat(null===(s=null===(a=null==S?void 0:S[0])||void 0===a?void 0:a.lastInstance)||void 0===s?void 0:s.title)||"".concat(Ir[u])}))}))]})),t(x,Me({mt:3},{children:[C.isLoading&&e(x,{children:e(_W,{className:Re(b.icon,b.inProgressIcon)})}),C.isError&&t(x,Me({mt:3},{children:[(m===Sn.YBA||m===Sn.WEB)&&e(ke,{customErrorMessage:Ki(M)?M:hi.SHOW_MORE_ANOMALIES_FETCH_ERROR}),m===Sn.YBM&&e(ne,{text:Ki(M)?M:hi.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),C.isSuccess&&(Qi(S)?t(x,{children:[t(x,Me({display:"flex",alignItems:"center",mb:2,style:{marginLeft:"12px"},onClick:function(){if(Qi(S)){var e=null==S?void 0:S.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(_e,{style:{cursor:"pointer",height:16,width:16}}),e(I,Me({variant:"body2",style:{marginLeft:8,textDecoration:"underline",cursor:"pointer"}},{children:"Copy all entities"}))]})),e(qY,{universeUuid:f,apiUrl:p,name:"gant-chart-show-more-anomalies",sourceData:null!=S?S:[],showMoreOptions:!1,expandAll:!0,startTime:d,endTime:h,onSelectedIssue:g,appName:m,viewAllAnomalies:!0},"gant-chart-show-more-anomalies")]}):e(x,{children:"No Anomalies were detected"}))]}))]}))},fX=function(r){var i,o,s,u,c,d,h,p,f,m,v=r.timezone,g=r.universeUuid,_=r.appName,b=r.apiUrl,w=r.showStandaloneAnomalies,S=void 0!==w&&w,T=r.onSelectedIssue,C=r.onSelectedQuery,I=r.onNavigateToUrl,M=xi(),E=new URLSearchParams(window.location.search),A=null==E?void 0:E.get("endTime"),D=A?new Date(A):new Date,O=new Date(D);(null==E?void 0:E.get("startTime"))?O=new Date(E.get("startTime")):O.setDate(O.getDate()-1);var N=null==E?void 0:E.get("duration"),R=l(null!=N?N:Nr[0].value),L=R[0],P=R[1],k=l((function(){return Na(L,D,O)})),B=k[0],F=k[1];a((function(){localStorage.setItem("appName",_)}),[]);var U=l(null),z=U[0],H=U[1],V=l(Fn.CLUSTER_LOAD),W=V[0],Y=V[1],j=y(eW.fetchUniverseById,(function(){return gW.fetchUniverseById(g,b)})),G=y(eW.getUniverseMetadata,(function(){return gW.getUniverseMetadata(g,b)})),q=null===(s=null===(o=null===(i=null==j?void 0:j.error)||void 0===i?void 0:i.response)||void 0===o?void 0:o.data)||void 0===s?void 0:s.error,Q=null===(d=null===(c=null===(u=null==G?void 0:G.error)||void 0===u?void 0:u.response)||void 0===c?void 0:c.data)||void 0===d?void 0:d.error,Z=null===(h=null==j?void 0:j.data)||void 0===h?void 0:h.ashEnabled,X=null===(p=null==j?void 0:j.data)||void 0===p?void 0:p.ashSupported,$=function(e){H(e)},K=function(){if(L!==Or.CUSTOM){var e=Oa(L,D),t=e.formattedStartDate,n=e.formattedEndDate;F({startDateTime:t,endDateTime:n})}};a((function(){K()}),[L]),a((function(){N&&Ki(N)&&K()}),[]);return e(ho,Me({appName:_},{children:t(x,{children:[G.isLoading||j.isLoading&&e(x,Me({mt:2,className:M.loadingBox},{children:e(_W,{className:Re(M.icon,M.inProgressIcon)})})),G.isError||j.isError&&t(x,Me({mt:2},{children:[(_===Sn.YBA||_===Sn.WEB)&&e(ke,{customErrorMessage:G.isError?Ki(Q)?Q:hi.UNIVERSE_PA_STATUS_ERROR:Ki(q)?q:hi.UNIVERSE_DETAILS_ERROR}),_===Sn.YBM&&e(ne,{text:G.isError?Ki(Q)?Q:hi.UNIVERSE_PA_STATUS_ERROR:Ki(q)?q:hi.UNIVERSE_DETAILS_ERROR})]})),j.isSuccess&&e(n,{children:t(x,{children:[!z&&e(x,{children:e(aq,{startTime:null==B?void 0:B.startDateTime,endTime:null==B?void 0:B.endDateTime,filterDuration:L,universeUuid:g,universeData:null==j?void 0:j.data,appName:_,timezone:v,isAshEnabled:!!Z,isAshSupported:!!X,apiUrl:b,showStandaloneAnomalies:S,onClickShowMoreAnomalies:$,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);P(Dr.CUSTOM),F({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",Dr.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:T,onSelectedQuery:C,notifyTabChange:function(e){Y(e)},onStartDateChange:function(e){var t;if(e){F((function(t){return Me(Me({},t),{startDateTime:e})}));var n=new URLSearchParams(window.location.search);n.set("startTime",null===(t=null==B?void 0:B.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){F((function(t){return Me(Me({},t),{endDateTime:e})}));var n=new URLSearchParams(window.location.search);n.set("endTime",null===(t=null==B?void 0:B.endDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))}},onRefresh:function(){F((function(e){return Me(Me({},e),{endDateTime:new Date})}))},onSelectedFilterDuration:function(e){var t,n,r,i;P(e);var o=new URLSearchParams(window.location.search);e===Dr.CUSTOM?(o.set("startTime",null!==(n=null===(t=null==B?void 0:B.startDateTime)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:""),o.set("endTime",null!==(i=null===(r=null==B?void 0:B.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()))},onNavigateToUrl:I})}),Ki(z)&&e(pX,{onClickShowMoreAnomalies:$,selectedTab:W,showMoreAnomalyCategory:z,startTime:null===(f=null==B?void 0:B.startDateTime)||void 0===f?void 0:f.toISOString(),endTime:null===(m=null==B?void 0:B.endDateTime)||void 0===m?void 0:m.toISOString(),universeUuid:g,appName:_,apiUrl:b,onSelectedIssue:T})]})})]})}))},mX=le((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),vX=function(t){var n=t.data,r=t.open,i=t.apiUrl,o=t.onClose,a=t.onActionPerformed,s=mX(),l=v((function(){return gW.deleteUniverseMetadata(n.id,i)}),{onSuccess:function(){zG.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),a(),o()},onError:function(e){var t,n,r;zG.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(ie,Me({open:r,onClose:o,title:"Remove Universe",onSubmit:function(){return Ae(void 0,void 0,void 0,(function(){return De(this,(function(e){return l.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:s.root,dividers:!0}},{children:e(x,Me({mt:2},{children:e(I,Me({variant:"body2"},{children:"Are you sure you want to disable the universe ".concat(n.name," from Performance Monitoring service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(dX||(dX={}));var gX=le((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)}}})),yX=function(r){var i=r.metadata,o=r.apiUrl;r.customerUuid;var s=r.universeList,u=r.onActionPerformed,c=gX(),d=xi(),h=l(!1),p=h[0],f=h[1],m=l([]),v=m[0],g=m[1],y=l(wr[0]),_=y[0],b=y[1],w=l(""),S=w[0],T=w[1],C=l(0),I=C[0],M=C[1],E=l(null),A=E[0],D=E[1],O=l(null),N=O[0],R=O[1];return a((function(){var e=null==i?void 0:i.map((function(e){var t,n=null==s?void 0: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.status=!!(null==n?void 0:n.lastSyncStatus),e.actions="Unregister",e}));R(null!=e?e:[])}),[s,i]),a((function(){N&&g([{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:Re(d.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=N[r],o=null==i?void 0:i.id;return e("a",Me({href:"/universes/".concat(o)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Re(d.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"status",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Re(d.tableHeaderCell)}},customBodyRender:function(r,i){var o=i.rowIndex,a=N[o],s=null==a?void 0:a.status,l=null==a?void 0:a.lastSyncError;return e(n,{children:s?e(x,Me({className:Re(c.tagGreen,c.statusBox)},{children:e("span",Me({className:Re(c.tagTextGreen,c.statusText)},{children:dX.ACTIVE}))})):t(x,Me({className:c.flexColumn},{children:[e(x,Me({className:Re(c.tagRed,c.statusBox)},{children:e("span",Me({className:Re(c.tagTextRed,c.statusText)},{children:dX.INACTIVE}))})),e(F,Me({title:l,arrow:!0,placement:"top",className:c.tooltip},{children:e("img",{src:zW,alt:"info"})}))]}))})}}},{name:"actions",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Re(d.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex;return e(x,{children:e(Z,Me({size:"medium",variant:"ghost",dataTestId:"UniverseListMetadata-unregisterButton",onClick:function(){return e=N[r],D(e),void f(!0);var e}},{children:"Unregister"}))})}}}])}),[N]),t(x,Me({mt:2,className:c.overrideMuiTableContainer},{children:[Qi(N)&&Qi(v)&&e(x,Me({mt:2},{children:e(oe,{title:"Universe Metadata",className:d.overrideMuiTable,dataTestId:"UniverseListMetadata-Table",data:N,columns:v,options:{search:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:_,page:I,onChangePage:function(e){return M(e)},onChangeRowsPerPage:function(e){b(e),M(0)},rowsPerPageOptions:wr,globalFilterFn:"includesString",state:{globalFilter:S,pagination:{pageIndex:I,pageSize:_}},onGlobalFilterChange:T}})})),p&&A&&e(vX,{onActionPerformed:u,open:p,onClose:function(){f(!1)},data:A,apiUrl:o})]}))},_X=le((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),bX=function(r){var i=r.apiUrl,o=r.customerUuid,a=r.appName,s=void 0===a?Sn.WEB:a,u=_X(),c=xi(),d=l([]),h=d[0],p=d[1],f=l([]),m=f[0],v=f[1],g=_(),b=y(eW.fetchUniverseMetadataList,(function(){return gW.fetchUniverseMetadataList(i,o)}),{onSuccess:function(e){p(e)}}),w=b.isIdle,S=b.isLoading,T=b.isError,C=b.refetch,I=y(eW.fetchUniverseListDetails,(function(){return gW.fetchUniverseListDetails(i)}),{onSuccess:function(e){v(e)}}),M=I.isIdle,E=I.isLoading,A=I.isError,D=I.refetch;if((T||A)&&e(ke,{customErrorMessage:"Unable to fetch ".concat(s===Sn.YBM?"cluster":"universe"," details")}),S||E||w&&void 0===h||M&&void 0===m)return e(x,Me({mt:4,className:c.loadingBox},{children:e(_W,{className:Re(c.icon,c.inProgressIcon)})}));var O=function(){Ae(void 0,void 0,void 0,(function(){return De(this,(function(e){switch(e.label){case 0:return g.invalidateQueries(eW.fetchUniverseMetadataList),g.invalidateQueries(eW.fetchUniverseListDetails),[4,C()];case 1:return e.sent(),[4,D()];case 2:return e.sent(),[2]}}))}))};return e(gn,{body:t(x,Me({ml:1,mr:1,mt:1,className:u.flexColumn},{children:[e(Z,Me({variant:"secondary",size:"medium",onClick:function(){O()},className:u.refreshButton,dataTestId:"ConfigureUniverseMetadata-RefreshButton"},{children:"Refresh"})),Ki(i)&&h.length>0?e(n,{children:e(x,Me({mt:2},{children:e(yX,{apiUrl:i,customerUuid:o,metadata:h,universeList:m,onActionPerformed:O})}))}):e(x,Me({className:u.noUniverses},{children:Ki(i)?"Currently, there are no universes attached to Performance Monitoring service":"Customer is not registered with Performance Monitoring service. Please register and then enable Performance Monitoring for universes."}))]}))})},xX=b((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),wX=function(t){var n=t.data,r=t.open,i=t.apiUrl,o=t.onClose,a=t.onActionPerformed,s=t.toast,l=xX(),u=v((function(){return gW.deleteRuntimeConfig(Tr,null==n?void 0:n.path,i)}),{onSuccess:function(){s.success("Have reset runtime configuration key ".concat(n.path," successfully")),a(),o()},onError:function(e){var t,n,r;s.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(ie,Me({open:r,onClose:o,title:"Reset Runtime Configuration",onSubmit:function(){return Ae(void 0,void 0,void 0,(function(){return De(this,(function(e){return u.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:l.root,dividers:!0}},{children:e(x,Me({mt:2},{children:e(I,Me({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(n.path," ?")}))}))}))},SX=b((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),TX=function(n){var r=n.data,i=n.open,o=n.apiUrl,a=n.onClose,s=n.onActionPerformed,l=n.toast,u=SX(),c=un({defaultValues:{configValue:(null==r?void 0:r.type)===kn.BOOL?"true"===r.value:r.value},mode:"onChange",reValidateMode:"onChange"}),d=c.control,h=c.handleSubmit,p=v((function(e){return gW.updateRuntimeConfig(Tr,null==r?void 0:r.path,e.configValue?e.configValue.toString():r.value.toString(),o)}),{onSuccess:function(){l.success("Updated runtime configuration key ".concat(r.path," successfully")),s(),a()},onError:function(e){var t,n,r;l.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")}}),f=h((function(e){var t={configValue:""};Object.assign(t,r),t.configValue=e.configValue,p.mutate(t)}));return e(ie,Me({open:i,onClose:a,title:"Update Runtime Configuration",onSubmit:f,cancelLabel:"Cancel",submitLabel:"Update",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:u.root,dividers:!0}},{children:e(ct,Me({},c,{children:t(x,Me({mt:2},{children:[e(ee,{children:"Config Key "}),e(I,Me({variant:"body2"},{children:r.path})),t(x,Me({mt:1},{children:[e(ee,{children:"Config Value "}),(null==r?void 0:r.type)!==kn.BOOL&&e(pn,{style:{marginTop:"8px"},name:"configValue",control:d,fullWidth:!0,dataTestId:"UpdateRuntimeConfig-ConfigValue"}),(null==r?void 0:r.type)===kn.BOOL&&e(Ii,{name:"configValue",control:d,dataTestId:"UpdateRuntimeConfig-ConfigValue"})]}))]}))}))}))},CX=b((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"}}})),IX=function(r){var i,o,a=r.apiUrl,s=r.appName,u=r.toast,c=CX(),d=xi(),h=_(),p=l(""),f=p[0],m=p[1],v=l([]),g=v[0],b=v[1],w=l(wr[0]),S=w[0],T=w[1],C=l(0),M=C[0],E=C[1],A=l(!1),D=A[0],O=A[1],N=l(!1),R=N[0],L=N[1],P=l(null),k=P[0],B=P[1],F=y([eW.fetchRuntimeConfigs],(function(){return gW.fetchRuntimeConfigs(Tr,a)}),{onSuccess:function(e){b(e)}}),z=F.error,H=F.isLoading,V=F.isError,W=F.isIdle,Y=F.refetch,j=null===(o=null===(i=null==z?void 0:z.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error,G=function(){Ae(void 0,void 0,void 0,(function(){return De(this,(function(e){switch(e.label){case 0:return h.invalidateQueries(eW.fetchRuntimeConfigs),[4,Y()];case 1:return e.sent(),[2]}}))}))},q=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"20%"}}},customBodyRender:function(n,r){var i=r.rowIndex;return t(x,{children:[e("span",{children:g[i].path}),e(Q,Me({title:g[i].description,placement:"top",arrow:!0},{children:e(x,Me({className:c.tooltip,display:"inline-block"},{children:e("img",{src:zW,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 r=n.rowIndex;return e(x,{children:e("span",Me({className:g[r].overriden?c.textColor:""},{children:g[r].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,setCellHeaderProps:function(){return{style:{width:"10%"}}},customBodyRender:function(r,i){var o=i.rowIndex;return t(n,{children:[e(Z,Me({size:"medium",variant:"ghost",dataTestId:"RuntimeConfigs-UpdateRuntimeConfigButton",onClick:function(){return e=g[o],B(e),void O(!0);var e}},{children:"Update"})),e(Z,Me({size:"medium",variant:"ghost",dataTestId:"RuntimeConfigs-ResetRuntimeConfigButton",onClick:function(){return e=g[o],B(e),void L(!0);var e}},{children:"Reset"}))]})}}}];return e(ho,Me({appName:s},{children:t(x,Me({mt:2,ml:4,mr:4,className:c.overrideMuiTableContainer},{children:[e(I,Me({variant:"h4"},{children:"Global Runtime Configurations"})),(V||W&&null===g)&&t(x,Me({className:d.recommendation},{children:[(s===Sn.YBA||s===Sn.WEB)&&e(ke,{customErrorMessage:Ki(j)?j:hi.RUNTIME_CONFIGS_ERROR}),s===Sn.YBM&&e(ne,{text:Ki(j)?j:hi.RUNTIME_CONFIGS_ERROR})]})),e(x,Me({display:"flex",alignSelf:"center",mt:2},{children:e(U,{placeholder:"Search",className:c.searchBox,onChange:function(e){m(e.target.value),E(0)},value:f,dataTestId:"RuntimeConfigs-SearchInput"})})),e(x,Me({mt:2,mb:4,pb:2},{children:e(oe,{title:"Runtime Configuration Variables",className:c.overrideMuiTable,data:null!=g?g:[],columns:q,dataTestId:"RuntimeConfigs-Table",isLoading:H,options:{filter:!0,search:!0,selectableRowsOnClick:!1,rowHover:!0,tableLayout:"fixed",responsive:"standard",rowsPerPage:S,page:M,onChangePage:function(e){return E(e)},onChangeRowsPerPage:function(e){T(e),E(0)},rowsPerPageOptions:wr,globalFilterFn:"includesString",state:{globalFilter:f,pagination:{pageIndex:M,pageSize:S},isLoading:H,showProgressBars:H},onGlobalFilterChange:m}})})),D&&k&&e(TX,{open:D,data:k,apiUrl:a,onActionPerformed:G,onClose:function(){O(!1)},toast:u}),R&&k&&e(wX,{open:R,data:k,apiUrl:a,onActionPerformed:G,onClose:function(){L(!1)},toast:u})]}))}))};export{dr as ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE,ur as ACTIVE_SESSION_HISTORY_EPS_GLOBAL,cr as ACTIVE_SESSION_HISTORY_QUERY_EVENTS,di as ADD_COLUMNS_BUTTON_TEXT,Kn as ALL,$n as ALL_REGIONS,Jn as ALL_ZONES,Sr as ANOMALY_CATEGORY_LIST,Nr as ANOMALY_FILTER_DURATION_OPTIONS,jr as ANOMALY_TAG,Ir as ANOMALY_TYPE_TO_NAME_MAP,er as ASH,Dn as Aggregation,yn as AnomalyCategory,Pn as AnomalyDetectionStatusText,bn as AnomalyType,Gn as AnomalyTypeFilter,Sn as AppName,br as BACKGROUND_QUERY_REQUEST_GRAPHS,_n as BackgroundJobCategory,xr as CATALOG_READ_REQUEST_GRAPH,Lr as CATEGORY_HEADER_DATA_MAP,si as COLORS,nr as CORES,sr as CPU_CORES,hr as CPU_COUNT,yi as CPU_TEXT,_r as CQL_QUERY_REQUEST_GRAPHS,qn as ChartType,Un as ClusterLoadOverallTabs,Wn as ClusterLoadSubTabs,lo as ClusterRegionSelector,bX as ConfigureUniverseMetadata,Br as DB_CAPS_TAG,zr as DB_TAG,Ur as DB_TYPE_TAG,Xn as DB_WAIT_EVENT_TYPE_MAPPING,hi as DEFAULT_ERROR_MESSAGES,wr as DEFAULT_RECORDS_PER_PAGE,Er as ELLIPSIS,Tr as GLOBAL_RUNTIME_CONFIG,jn as GROUP_BY_OPERATIONS,Yn as GROUP_BY_OPERATIONS_LABELS,Cn as GraphType,In as GroupEventsParam,ci as HISTORICAL_QUERY_DATA_LABELS,rW as IN_DEVELOPMENT_MODE,_i as IO_TEXT,Fn as InsightsTabs,or as MAX_OUTLIER_NUM_NODES,ai as METRICS_OUTLIER_DATABASES_STORAGE_KEY,oi as METRICS_OUTLIER_TABLES_STORAGE_KEY,ii as METRICS_SESSION_STORAGE_KEY,ei as METRIC_DB_RESOURCES_WITH_GRAPHS,ar as METRIC_FONT,wn as METRIC_MEASURE_TEXT,ri as METRIC_NAMES,ti as METRIC_RESOURCES_WITH_GRAPHS,Jr as METRIC_TABLES_RESOURCES_WITH_GRAPHS,Xr as METRIC_TABS,Kr as METRIC_TABS_DATABASES,$r as METRIC_TABS_TABLES,ir as MIN_OUTLIER_NUM_NODES,Mr as MORE,lr as MetricConsts,hn as MetricMeasure,Zr as MetricOrigin,Mi as MetricSplitSelector,Pj as MetricsAnalysisEntry,li as NAME_COLOR_MAPPING,dn as NodeState,Di as OutlierSelector,gW as PerfAdvisorAPI,fX as PerfAdvisorEntry,Nn as PrimaryDashboardViewTabs,rr as QUERIES,Pr as QUERY_DETAILS,eW as QUERY_KEY,kr as QUERY_TAG,Fr as QUERY_TYPE_TAG,Tn as QueryType,An as QueryTypeMode,ni as RCA_GANT_CHART,iW as REACT_APP_API_URL,qr as REGION_TAG,Gr as REGION_ZONE_TAG,Cr as RUNTIME_CONFIG_KEYS,kn as RuntimeConfigType,IX as RuntimeConfigs,yr as SQL_QUERY_REQUEST_GRAPHS,On as SortDirection,Mn as SplitMode,En as SplitType,Vn as SqlDrilldownTabs,Hn as SqlTabs,Yr as TABLET_ID_TAG,Wr as TABLET_TAG,gr as TABLE_REQUEST_GRAPHS,Vr as TABLE_TAG,Dr as TIME_FILTER_LABEL,Or as TIME_FILTER_VALUES,ui as TOOLTIP_TEXT,Ln as TPFeatureFlags,tr as TYPE,zn as TabletTabs,Bn as TransformedBackgroundTasksCategory,Qn as URL_TAB_PATH,Hr as USER_TAG,Ar as VIEW_MORE,fi as VISIBLE_DB_LOAD_METADATA_COLUMNS,gi as VISIBLE_NODE_LOAD_METADATA_COLUMNS,pi as VISIBLE_QUERY_METADATA_COLUMNS,mi as VISIBLE_TABLETS_METADATA_COLUMNS,vi as VISIBLE_TABLET_DRILLDOWN_METADATA_COLUMNS,xn as WaitEventClassification,uo as YBCheckboxField,ke as YBErrorIndicator,mn as YBInfinitePagination,pn as YBInputField,gn as YBPanelItem,ho as YBThemeWrapper,Ii as YBToggleField,Zn as YSQL_COLUMNS,Qr as ZONE_TAG,ao as ZoneNodeSelector,Rr as filterDurations,bi as getCustomFooterComponent,Ti as getRowCellComponent,Gi as isDefinedNotNull,qi as isEmptyArray,Xi as isEmptyObject,Ji as isEmptyString,Qi as isNonEmptyArray,$i as isNonEmptyObject,Ki as isNonEmptyString,Zi as isNullOrEmpty,eo as isValidObject,no as isYAxisGreaterThanThousand,mr as metricOutlierSelectors,pr as metricSplitSelectors,fr as otherSplitSelectors,vr as queryTypeSelectors,to as removeNullProperties,Le as useCodeBlockStyles};
|
|
11
|
-
//# sourceMappingURL=index.js.map
|