@mcp-shark/mcp-shark 1.5.13 → 1.7.2
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/README.md +482 -56
- package/bin/mcp-shark.js +146 -52
- package/core/cli/AutoFixEngine.js +93 -0
- package/core/cli/ConfigScanner.js +193 -0
- package/core/cli/DataLoader.js +200 -0
- package/core/cli/DeclarativeRuleEngine.js +363 -0
- package/core/cli/DoctorCommand.js +218 -0
- package/core/cli/FixHandlers.js +222 -0
- package/core/cli/HtmlReportGenerator.js +203 -0
- package/core/cli/IdeConfigPaths.js +175 -0
- package/core/cli/ListCommand.js +255 -0
- package/core/cli/LockCommand.js +164 -0
- package/core/cli/LockDiffEngine.js +152 -0
- package/core/cli/RuleRegistryConfig.js +131 -0
- package/core/cli/ScanCommand.js +244 -0
- package/core/cli/ScanService.js +200 -0
- package/core/cli/SecretDetector.js +92 -0
- package/core/cli/SharkScoreCalculator.js +109 -0
- package/core/cli/ToolClassifications.js +51 -0
- package/core/cli/ToxicFlowAnalyzer.js +212 -0
- package/core/cli/UpdateCommand.js +188 -0
- package/core/cli/WalkthroughGenerator.js +195 -0
- package/core/cli/WatchCommand.js +129 -0
- package/core/cli/YamlRuleEngine.js +197 -0
- package/core/cli/data/rule-packs/aauth-visibility.json +117 -0
- package/core/cli/data/rule-packs/agentic-security-2026.json +180 -0
- package/core/cli/data/rule-packs/general-security.json +173 -0
- package/core/cli/data/rule-packs/owasp-mcp-2026.json +244 -0
- package/core/cli/data/rule-packs/toxic-flow-heuristics.json +21 -0
- package/core/cli/data/rule-sources.json +5 -0
- package/core/cli/data/secret-patterns.json +18 -0
- package/core/cli/data/tool-classifications.json +111 -0
- package/core/cli/data/toxic-flow-rules.json +47 -0
- package/core/cli/index.js +23 -0
- package/core/cli/output/Banner.js +52 -0
- package/core/cli/output/Formatter.js +183 -0
- package/core/cli/output/JsonFormatter.js +106 -0
- package/core/cli/output/index.js +16 -0
- package/core/cli/secureRegistryFetch.js +157 -0
- package/core/cli/symbols.js +16 -0
- package/core/configs/environment.js +3 -1
- package/core/configs/index.js +3 -64
- package/core/container/DependencyContainer.js +4 -1
- package/core/mcp-server/index.js +4 -1
- package/core/mcp-server/server/external/all.js +10 -3
- package/core/mcp-server/server/external/config.js +62 -5
- package/core/models/RequestFilters.js +3 -0
- package/core/repositories/PacketRepository.js +16 -0
- package/core/services/AuditService.js +2 -0
- package/core/services/ConfigService.js +9 -1
- package/core/services/ConfigTransformService.js +34 -2
- package/core/services/RequestService.js +58 -5
- package/core/services/ServerManagementService.js +59 -4
- package/core/services/security/StaticRulesService.js +69 -13
- package/core/services/security/TrafficAnalysisService.js +19 -1
- package/core/services/security/TrafficToxicFlowService.js +154 -0
- package/core/services/security/aauthGraph.js +199 -0
- package/core/services/security/aauthParser.js +274 -0
- package/core/services/security/aauthSelfTest.js +346 -0
- package/core/services/security/index.js +2 -1
- package/core/services/security/rules/index.js +25 -59
- package/core/services/security/rules/scans/configPermissions.js +91 -0
- package/core/services/security/rules/scans/duplicateToolNames.js +85 -0
- package/core/services/security/rules/scans/insecureTransport.js +148 -0
- package/core/services/security/rules/scans/missingContainment.js +123 -0
- package/core/services/security/rules/scans/shellEnvInjection.js +101 -0
- package/core/services/security/rules/scans/unsafeDefaults.js +99 -0
- package/core/services/security/toolsListFromTrafficParser.js +70 -0
- package/core/tui/App.js +144 -0
- package/core/tui/FindingsPanel.js +115 -0
- package/core/tui/FixPanel.js +132 -0
- package/core/tui/Header.js +51 -0
- package/core/tui/HelpBar.js +42 -0
- package/core/tui/ServersPanel.js +109 -0
- package/core/tui/ToxicFlowsPanel.js +100 -0
- package/core/tui/h.js +8 -0
- package/core/tui/index.js +11 -0
- package/core/tui/render.js +22 -0
- package/package.json +24 -16
- package/ui/dist/assets/index-D6zDrtMV.js +81 -0
- package/ui/dist/index.html +1 -1
- package/ui/server/controllers/AauthController.js +279 -0
- package/ui/server/controllers/RequestController.js +12 -1
- package/ui/server/controllers/SecurityFindingsController.js +46 -1
- package/ui/server/routes/aauth.js +18 -0
- package/ui/server/routes/requests.js +8 -1
- package/ui/server/routes/security.js +5 -1
- package/ui/server/setup.js +224 -6
- package/ui/server/swagger/paths/components.js +55 -0
- package/ui/server/swagger/paths/securityTrafficFlows.js +59 -0
- package/ui/server/swagger/paths.js +2 -2
- package/ui/server/swagger/swagger.js +5 -2
- package/ui/server.js +1 -1
- package/ui/src/App.jsx +26 -52
- package/ui/src/PacketFilters.jsx +31 -1
- package/ui/src/PacketList.jsx +2 -2
- package/ui/src/Security.jsx +10 -0
- package/ui/src/TabNavigation.jsx +8 -0
- package/ui/src/components/AAuthBadge.jsx +92 -0
- package/ui/src/components/AauthExplorer/AauthExplorerGraph.jsx +231 -0
- package/ui/src/components/AauthExplorer/AauthExplorerView.jsx +387 -0
- package/ui/src/components/AauthExplorer/NodeDetailPanel.jsx +272 -0
- package/ui/src/components/App/ActionMenu.jsx +4 -31
- package/ui/src/components/App/ApiDocsButton.jsx +0 -1
- package/ui/src/components/App/ShutdownButton.jsx +0 -1
- package/ui/src/components/App/useAppState.js +19 -26
- package/ui/src/components/DetailsTab/AAuthIdentitySection.jsx +119 -0
- package/ui/src/components/DetailsTab/RequestDetailsSection.jsx +2 -0
- package/ui/src/components/DetailsTab/ResponseDetailsSection.jsx +2 -0
- package/ui/src/components/DetectedPathsList.jsx +1 -5
- package/ui/src/components/FileInput.jsx +0 -1
- package/ui/src/components/PacketFilters/AAuthPostureFilter.jsx +81 -0
- package/ui/src/components/RequestRow/RequestRowMain.jsx +7 -1
- package/ui/src/components/Security/AAuthPosturePanel.jsx +360 -0
- package/ui/src/components/Security/ScannerContent.jsx +33 -1
- package/ui/src/components/Security/TrafficToxicFlowsPanel.jsx +253 -0
- package/ui/src/components/Security/securityApi.js +15 -0
- package/ui/src/components/Security/useSecurity.js +60 -3
- package/ui/src/components/ServerControl.jsx +0 -1
- package/ui/src/components/TabNavigation/DesktopTabs.jsx +0 -11
- package/ui/src/components/TabNavigationIcons.jsx +5 -0
- package/ui/src/components/ViewModeTabs.jsx +0 -1
- package/ui/src/utils/animations.js +26 -9
- package/core/services/security/rules/scans/agentic01GoalHijack.js +0 -130
- package/core/services/security/rules/scans/agentic02ToolMisuse.js +0 -129
- package/core/services/security/rules/scans/agentic03IdentityAbuse.js +0 -130
- package/core/services/security/rules/scans/agentic04SupplyChain.js +0 -130
- package/core/services/security/rules/scans/agentic06MemoryPoisoning.js +0 -130
- package/core/services/security/rules/scans/agentic07InsecureCommunication.js +0 -135
- package/core/services/security/rules/scans/agentic08CascadingFailures.js +0 -135
- package/core/services/security/rules/scans/agentic09TrustExploitation.js +0 -135
- package/core/services/security/rules/scans/agentic10RogueAgent.js +0 -130
- package/core/services/security/rules/scans/hardcodedSecrets.js +0 -130
- package/core/services/security/rules/scans/mcp01TokenMismanagement.js +0 -127
- package/core/services/security/rules/scans/mcp02ScopeCreep.js +0 -130
- package/core/services/security/rules/scans/mcp03ToolPoisoning.js +0 -132
- package/core/services/security/rules/scans/mcp04SupplyChain.js +0 -131
- package/core/services/security/rules/scans/mcp06PromptInjection.js +0 -200
- package/core/services/security/rules/scans/mcp07InsufficientAuth.js +0 -130
- package/core/services/security/rules/scans/mcp08LackAudit.js +0 -129
- package/core/services/security/rules/scans/mcp09ShadowServers.js +0 -129
- package/core/services/security/rules/scans/mcp10ContextInjection.js +0 -130
- package/ui/dist/assets/index-CiCSDYf-.js +0 -97
- package/ui/server/routes/help.js +0 -44
- package/ui/server/swagger/paths/help.js +0 -82
- package/ui/src/HelpGuide/HelpGuideContent.jsx +0 -118
- package/ui/src/HelpGuide/HelpGuideFooter.jsx +0 -59
- package/ui/src/HelpGuide/HelpGuideHeader.jsx +0 -57
- package/ui/src/HelpGuide.jsx +0 -78
- package/ui/src/IntroTour.jsx +0 -154
- package/ui/src/components/App/HelpButton.jsx +0 -90
- package/ui/src/components/TourOverlay.jsx +0 -117
- package/ui/src/components/TourTooltip/TourTooltipButtons.jsx +0 -120
- package/ui/src/components/TourTooltip/TourTooltipHeader.jsx +0 -71
- package/ui/src/components/TourTooltip/TourTooltipIcons.jsx +0 -54
- package/ui/src/components/TourTooltip/useTooltipPosition.js +0 -135
- package/ui/src/components/TourTooltip.jsx +0 -91
- package/ui/src/config/tourSteps.jsx +0 -140
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=t(a);fetch(a.href,i)}})();function Vw(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Fx={exports:{}},If={},Vx={exports:{}},pt={};var jL;function nG(){if(jL)return pt;jL=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),f=Symbol.iterator;function d(V){return V===null||typeof V!="object"?null:(V=f&&V[f]||V["@@iterator"],typeof V=="function"?V:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,y={};function m(V,Y,ne){this.props=V,this.context=Y,this.refs=y,this.updater=ne||h}m.prototype.isReactComponent={},m.prototype.setState=function(V,Y){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,Y,"setState")},m.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function x(){}x.prototype=m.prototype;function b(V,Y,ne){this.props=V,this.context=Y,this.refs=y,this.updater=ne||h}var T=b.prototype=new x;T.constructor=b,v(T,m.prototype),T.isPureReactComponent=!0;var C=Array.isArray,k=Object.prototype.hasOwnProperty,L={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function D(V,Y,ne){var ue,fe={},Ce=null,Be=null;if(Y!=null)for(ue in Y.ref!==void 0&&(Be=Y.ref),Y.key!==void 0&&(Ce=""+Y.key),Y)k.call(Y,ue)&&!A.hasOwnProperty(ue)&&(fe[ue]=Y[ue]);var ye=arguments.length-2;if(ye===1)fe.children=ne;else if(1<ye){for(var ce=Array(ye),we=0;we<ye;we++)ce[we]=arguments[we+2];fe.children=ce}if(V&&V.defaultProps)for(ue in ye=V.defaultProps,ye)fe[ue]===void 0&&(fe[ue]=ye[ue]);return{$$typeof:r,type:V,key:Ce,ref:Be,props:fe,_owner:L.current}}function P(V,Y){return{$$typeof:r,type:V.type,key:Y,ref:V.ref,props:V.props,_owner:V._owner}}function R(V){return typeof V=="object"&&V!==null&&V.$$typeof===r}function z(V){var Y={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(ne){return Y[ne]})}var B=/\/+/g;function N(V,Y){return typeof V=="object"&&V!==null&&V.key!=null?z(""+V.key):Y.toString(36)}function W(V,Y,ne,ue,fe){var Ce=typeof V;(Ce==="undefined"||Ce==="boolean")&&(V=null);var Be=!1;if(V===null)Be=!0;else switch(Ce){case"string":case"number":Be=!0;break;case"object":switch(V.$$typeof){case r:case e:Be=!0}}if(Be)return Be=V,fe=fe(Be),V=ue===""?"."+N(Be,0):ue,C(fe)?(ne="",V!=null&&(ne=V.replace(B,"$&/")+"/"),W(fe,Y,ne,"",function(we){return we})):fe!=null&&(R(fe)&&(fe=P(fe,ne+(!fe.key||Be&&Be.key===fe.key?"":(""+fe.key).replace(B,"$&/")+"/")+V)),Y.push(fe)),1;if(Be=0,ue=ue===""?".":ue+":",C(V))for(var ye=0;ye<V.length;ye++){Ce=V[ye];var ce=ue+N(Ce,ye);Be+=W(Ce,Y,ne,ce,fe)}else if(ce=d(V),typeof ce=="function")for(V=ce.call(V),ye=0;!(Ce=V.next()).done;)Ce=Ce.value,ce=ue+N(Ce,ye++),Be+=W(Ce,Y,ne,ce,fe);else if(Ce==="object")throw Y=String(V),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Be}function $(V,Y,ne){if(V==null)return V;var ue=[],fe=0;return W(V,ue,"","",function(Ce){return Y.call(ne,Ce,fe++)}),ue}function H(V){if(V._status===-1){var Y=V._result;Y=Y(),Y.then(function(ne){(V._status===0||V._status===-1)&&(V._status=1,V._result=ne)},function(ne){(V._status===0||V._status===-1)&&(V._status=2,V._result=ne)}),V._status===-1&&(V._status=0,V._result=Y)}if(V._status===1)return V._result.default;throw V._result}var U={current:null},G={transition:null},X={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:G,ReactCurrentOwner:L};function K(){throw Error("act(...) is not supported in production builds of React.")}return pt.Children={map:$,forEach:function(V,Y,ne){$(V,function(){Y.apply(this,arguments)},ne)},count:function(V){var Y=0;return $(V,function(){Y++}),Y},toArray:function(V){return $(V,function(Y){return Y})||[]},only:function(V){if(!R(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},pt.Component=m,pt.Fragment=t,pt.Profiler=a,pt.PureComponent=b,pt.StrictMode=n,pt.Suspense=l,pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,pt.act=K,pt.cloneElement=function(V,Y,ne){if(V==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+V+".");var ue=v({},V.props),fe=V.key,Ce=V.ref,Be=V._owner;if(Y!=null){if(Y.ref!==void 0&&(Ce=Y.ref,Be=L.current),Y.key!==void 0&&(fe=""+Y.key),V.type&&V.type.defaultProps)var ye=V.type.defaultProps;for(ce in Y)k.call(Y,ce)&&!A.hasOwnProperty(ce)&&(ue[ce]=Y[ce]===void 0&&ye!==void 0?ye[ce]:Y[ce])}var ce=arguments.length-2;if(ce===1)ue.children=ne;else if(1<ce){ye=Array(ce);for(var we=0;we<ce;we++)ye[we]=arguments[we+2];ue.children=ye}return{$$typeof:r,type:V.type,key:fe,ref:Ce,props:ue,_owner:Be}},pt.createContext=function(V){return V={$$typeof:o,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},V.Provider={$$typeof:i,_context:V},V.Consumer=V},pt.createElement=D,pt.createFactory=function(V){var Y=D.bind(null,V);return Y.type=V,Y},pt.createRef=function(){return{current:null}},pt.forwardRef=function(V){return{$$typeof:s,render:V}},pt.isValidElement=R,pt.lazy=function(V){return{$$typeof:c,_payload:{_status:-1,_result:V},_init:H}},pt.memo=function(V,Y){return{$$typeof:u,type:V,compare:Y===void 0?null:Y}},pt.startTransition=function(V){var Y=G.transition;G.transition={};try{V()}finally{G.transition=Y}},pt.unstable_act=K,pt.useCallback=function(V,Y){return U.current.useCallback(V,Y)},pt.useContext=function(V){return U.current.useContext(V)},pt.useDebugValue=function(){},pt.useDeferredValue=function(V){return U.current.useDeferredValue(V)},pt.useEffect=function(V,Y){return U.current.useEffect(V,Y)},pt.useId=function(){return U.current.useId()},pt.useImperativeHandle=function(V,Y,ne){return U.current.useImperativeHandle(V,Y,ne)},pt.useInsertionEffect=function(V,Y){return U.current.useInsertionEffect(V,Y)},pt.useLayoutEffect=function(V,Y){return U.current.useLayoutEffect(V,Y)},pt.useMemo=function(V,Y){return U.current.useMemo(V,Y)},pt.useReducer=function(V,Y,ne){return U.current.useReducer(V,Y,ne)},pt.useRef=function(V){return U.current.useRef(V)},pt.useState=function(V){return U.current.useState(V)},pt.useSyncExternalStore=function(V,Y,ne){return U.current.useSyncExternalStore(V,Y,ne)},pt.useTransition=function(){return U.current.useTransition()},pt.version="18.3.1",pt}var FL;function Gw(){return FL||(FL=1,Vx.exports=nG()),Vx.exports}var VL;function aG(){if(VL)return If;VL=1;var r=Gw(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,h=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:e,type:s,key:d,ref:h,props:f,_owner:a.current}}return If.Fragment=t,If.jsx=o,If.jsxs=o,If}var GL;function iG(){return GL||(GL=1,Fx.exports=aG()),Fx.exports}var w=iG(),Z=Gw();const Cd=Vw(Z);var rv={},Gx={exports:{}},ln={},Wx={exports:{}},Hx={};var WL;function oG(){return WL||(WL=1,(function(r){function e(G,X){var K=G.length;G.push(X);e:for(;0<K;){var V=K-1>>>1,Y=G[V];if(0<a(Y,X))G[V]=X,G[K]=Y,K=V;else break e}}function t(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var X=G[0],K=G.pop();if(K!==X){G[0]=K;e:for(var V=0,Y=G.length,ne=Y>>>1;V<ne;){var ue=2*(V+1)-1,fe=G[ue],Ce=ue+1,Be=G[Ce];if(0>a(fe,K))Ce<Y&&0>a(Be,fe)?(G[V]=Be,G[Ce]=K,V=Ce):(G[V]=fe,G[ue]=K,V=ue);else if(Ce<Y&&0>a(Be,K))G[V]=Be,G[Ce]=K,V=Ce;else break e}}return X}function a(G,X){var K=G.sortIndex-X.sortIndex;return K!==0?K:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;r.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();r.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,h=!1,v=!1,y=!1,m=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var X=t(u);X!==null;){if(X.callback===null)n(u);else if(X.startTime<=G)n(u),X.sortIndex=X.expirationTime,e(l,X);else break;X=t(u)}}function C(G){if(y=!1,T(G),!v)if(t(l)!==null)v=!0,H(k);else{var X=t(u);X!==null&&U(C,X.startTime-G)}}function k(G,X){v=!1,y&&(y=!1,x(D),D=-1),h=!0;var K=d;try{for(T(X),f=t(l);f!==null&&(!(f.expirationTime>X)||G&&!z());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var Y=V(f.expirationTime<=X);X=r.unstable_now(),typeof Y=="function"?f.callback=Y:f===t(l)&&n(l),T(X)}else n(l);f=t(l)}if(f!==null)var ne=!0;else{var ue=t(u);ue!==null&&U(C,ue.startTime-X),ne=!1}return ne}finally{f=null,d=K,h=!1}}var L=!1,A=null,D=-1,P=5,R=-1;function z(){return!(r.unstable_now()-R<P)}function B(){if(A!==null){var G=r.unstable_now();R=G;var X=!0;try{X=A(!0,G)}finally{X?N():(L=!1,A=null)}}else L=!1}var N;if(typeof b=="function")N=function(){b(B)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,$=W.port2;W.port1.onmessage=B,N=function(){$.postMessage(null)}}else N=function(){m(B,0)};function H(G){A=G,L||(L=!0,N())}function U(G,X){D=m(function(){G(r.unstable_now())},X)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(G){G.callback=null},r.unstable_continueExecution=function(){v||h||(v=!0,H(k))},r.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<G?Math.floor(1e3/G):5},r.unstable_getCurrentPriorityLevel=function(){return d},r.unstable_getFirstCallbackNode=function(){return t(l)},r.unstable_next=function(G){switch(d){case 1:case 2:case 3:var X=3;break;default:X=d}var K=d;d=X;try{return G()}finally{d=K}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(G,X){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var K=d;d=G;try{return X()}finally{d=K}},r.unstable_scheduleCallback=function(G,X,K){var V=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?V+K:V):K=V,G){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=K+Y,G={id:c++,callback:X,priorityLevel:G,startTime:K,expirationTime:Y,sortIndex:-1},K>V?(G.sortIndex=K,e(u,G),t(l)===null&&G===t(u)&&(y?(x(D),D=-1):y=!0,U(C,K-V))):(G.sortIndex=Y,e(l,G),v||h||(v=!0,H(k))),G},r.unstable_shouldYield=z,r.unstable_wrapCallback=function(G){var X=d;return function(){var K=d;d=X;try{return G.apply(this,arguments)}finally{d=K}}}})(Hx)),Hx}var HL;function sG(){return HL||(HL=1,Wx.exports=oG()),Wx.exports}var $L;function lG(){if($L)return ln;$L=1;var r=Gw(),e=sG();function t(p){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+p,S=1;S<arguments.length;S++)g+="&args[]="+encodeURIComponent(arguments[S]);return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function i(p,g){o(p,g),o(p+"Capture",g)}function o(p,g){for(a[p]=g,p=0;p<g.length;p++)n.add(g[p])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,c={},f={};function d(p){return l.call(f,p)?!0:l.call(c,p)?!1:u.test(p)?f[p]=!0:(c[p]=!0,!1)}function h(p,g,S,M){if(S!==null&&S.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return M?!1:S!==null?!S.acceptsBooleans:(p=p.toLowerCase().slice(0,5),p!=="data-"&&p!=="aria-");default:return!1}}function v(p,g,S,M){if(g===null||typeof g>"u"||h(p,g,S,M))return!0;if(M)return!1;if(S!==null)switch(S.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function y(p,g,S,M,I,E,j){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=M,this.attributeNamespace=I,this.mustUseProperty=S,this.propertyName=p,this.type=g,this.sanitizeURL=E,this.removeEmptyString=j}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(p){m[p]=new y(p,0,!1,p,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(p){var g=p[0];m[g]=new y(g,1,!1,p[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(p){m[p]=new y(p,2,!1,p.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(p){m[p]=new y(p,2,!1,p,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(p){m[p]=new y(p,3,!1,p.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(p){m[p]=new y(p,3,!0,p,null,!1,!1)}),["capture","download"].forEach(function(p){m[p]=new y(p,4,!1,p,null,!1,!1)}),["cols","rows","size","span"].forEach(function(p){m[p]=new y(p,6,!1,p,null,!1,!1)}),["rowSpan","start"].forEach(function(p){m[p]=new y(p,5,!1,p.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function b(p){return p[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(p){var g=p.replace(x,b);m[g]=new y(g,1,!1,p,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(p){var g=p.replace(x,b);m[g]=new y(g,1,!1,p,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(p){var g=p.replace(x,b);m[g]=new y(g,1,!1,p,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(p){m[p]=new y(p,1,!1,p.toLowerCase(),null,!1,!1)}),m.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(p){m[p]=new y(p,1,!1,p.toLowerCase(),null,!0,!0)});function T(p,g,S,M){var I=m.hasOwnProperty(g)?m[g]:null;(I!==null?I.type!==0:M||!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(v(g,S,I,M)&&(S=null),M||I===null?d(g)&&(S===null?p.removeAttribute(g):p.setAttribute(g,""+S)):I.mustUseProperty?p[I.propertyName]=S===null?I.type===3?!1:"":S:(g=I.attributeName,M=I.attributeNamespace,S===null?p.removeAttribute(g):(I=I.type,S=I===3||I===4&&S===!0?"":""+S,M?p.setAttributeNS(M,g,S):p.setAttribute(g,S))))}var C=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),L=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),z=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),G=Symbol.iterator;function X(p){return p===null||typeof p!="object"?null:(p=G&&p[G]||p["@@iterator"],typeof p=="function"?p:null)}var K=Object.assign,V;function Y(p){if(V===void 0)try{throw Error()}catch(S){var g=S.stack.trim().match(/\n( *(at )?)/);V=g&&g[1]||""}return`
|
|
2
|
-
`+V+p}var ne=!1;function ue(p,g){if(!p||ne)return"";ne=!0;var S=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(g)if(g=function(){throw Error()},Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(oe){var M=oe}Reflect.construct(p,[],g)}else{try{g.call()}catch(oe){M=oe}p.call(g.prototype)}else{try{throw Error()}catch(oe){M=oe}p()}}catch(oe){if(oe&&M&&typeof oe.stack=="string"){for(var I=oe.stack.split(`
|
|
3
|
-
`),E=M.stack.split(`
|
|
4
|
-
`),j=I.length-1,q=E.length-1;1<=j&&0<=q&&I[j]!==E[q];)q--;for(;1<=j&&0<=q;j--,q--)if(I[j]!==E[q]){if(j!==1||q!==1)do if(j--,q--,0>q||I[j]!==E[q]){var J=`
|
|
5
|
-
`+I[j].replace(" at new "," at ");return p.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",p.displayName)),J}while(1<=j&&0<=q);break}}}finally{ne=!1,Error.prepareStackTrace=S}return(p=p?p.displayName||p.name:"")?Y(p):""}function fe(p){switch(p.tag){case 5:return Y(p.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return p=ue(p.type,!1),p;case 11:return p=ue(p.type.render,!1),p;case 1:return p=ue(p.type,!0),p;default:return""}}function Ce(p){if(p==null)return null;if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case A:return"Fragment";case L:return"Portal";case P:return"Profiler";case D:return"StrictMode";case N:return"Suspense";case W:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case z:return(p.displayName||"Context")+".Consumer";case R:return(p._context.displayName||"Context")+".Provider";case B:var g=p.render;return p=p.displayName,p||(p=g.displayName||g.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case $:return g=p.displayName||null,g!==null?g:Ce(p.type)||"Memo";case H:g=p._payload,p=p._init;try{return Ce(p(g))}catch{}}return null}function Be(p){var g=p.type;switch(p.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return p=g.render,p=p.displayName||p.name||"",g.displayName||(p!==""?"ForwardRef("+p+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ce(g);case 8:return g===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function ye(p){switch(typeof p){case"boolean":case"number":case"string":case"undefined":return p;case"object":return p;default:return""}}function ce(p){var g=p.type;return(p=p.nodeName)&&p.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function we(p){var g=ce(p)?"checked":"value",S=Object.getOwnPropertyDescriptor(p.constructor.prototype,g),M=""+p[g];if(!p.hasOwnProperty(g)&&typeof S<"u"&&typeof S.get=="function"&&typeof S.set=="function"){var I=S.get,E=S.set;return Object.defineProperty(p,g,{configurable:!0,get:function(){return I.call(this)},set:function(j){M=""+j,E.call(this,j)}}),Object.defineProperty(p,g,{enumerable:S.enumerable}),{getValue:function(){return M},setValue:function(j){M=""+j},stopTracking:function(){p._valueTracker=null,delete p[g]}}}}function xe(p){p._valueTracker||(p._valueTracker=we(p))}function Ie(p){if(!p)return!1;var g=p._valueTracker;if(!g)return!0;var S=g.getValue(),M="";return p&&(M=ce(p)?p.checked?"true":"false":p.value),p=M,p!==S?(g.setValue(p),!0):!1}function dt(p){if(p=p||(typeof document<"u"?document:void 0),typeof p>"u")return null;try{return p.activeElement||p.body}catch{return p.body}}function ke(p,g){var S=g.checked;return K({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:S??p._wrapperState.initialChecked})}function $e(p,g){var S=g.defaultValue==null?"":g.defaultValue,M=g.checked!=null?g.checked:g.defaultChecked;S=ye(g.value!=null?g.value:S),p._wrapperState={initialChecked:M,initialValue:S,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function tt(p,g){g=g.checked,g!=null&&T(p,"checked",g,!1)}function bt(p,g){tt(p,g);var S=ye(g.value),M=g.type;if(S!=null)M==="number"?(S===0&&p.value===""||p.value!=S)&&(p.value=""+S):p.value!==""+S&&(p.value=""+S);else if(M==="submit"||M==="reset"){p.removeAttribute("value");return}g.hasOwnProperty("value")?yr(p,g.type,S):g.hasOwnProperty("defaultValue")&&yr(p,g.type,ye(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(p.defaultChecked=!!g.defaultChecked)}function Or(p,g,S){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var M=g.type;if(!(M!=="submit"&&M!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+p._wrapperState.initialValue,S||g===p.value||(p.value=g),p.defaultValue=g}S=p.name,S!==""&&(p.name=""),p.defaultChecked=!!p._wrapperState.initialChecked,S!==""&&(p.name=S)}function yr(p,g,S){(g!=="number"||dt(p.ownerDocument)!==p)&&(S==null?p.defaultValue=""+p._wrapperState.initialValue:p.defaultValue!==""+S&&(p.defaultValue=""+S))}var vn=Array.isArray;function gn(p,g,S,M){if(p=p.options,g){g={};for(var I=0;I<S.length;I++)g["$"+S[I]]=!0;for(S=0;S<p.length;S++)I=g.hasOwnProperty("$"+p[S].value),p[S].selected!==I&&(p[S].selected=I),I&&M&&(p[S].defaultSelected=!0)}else{for(S=""+ye(S),g=null,I=0;I<p.length;I++){if(p[I].value===S){p[I].selected=!0,M&&(p[I].defaultSelected=!0);return}g!==null||p[I].disabled||(g=p[I])}g!==null&&(g.selected=!0)}}function us(p,g){if(g.dangerouslySetInnerHTML!=null)throw Error(t(91));return K({},g,{value:void 0,defaultValue:void 0,children:""+p._wrapperState.initialValue})}function Z2(p,g){var S=g.value;if(S==null){if(S=g.children,g=g.defaultValue,S!=null){if(g!=null)throw Error(t(92));if(vn(S)){if(1<S.length)throw Error(t(93));S=S[0]}g=S}g==null&&(g=""),S=g}p._wrapperState={initialValue:ye(S)}}function K2(p,g){var S=ye(g.value),M=ye(g.defaultValue);S!=null&&(S=""+S,S!==p.value&&(p.value=S),g.defaultValue==null&&p.defaultValue!==S&&(p.defaultValue=S)),M!=null&&(p.defaultValue=""+M)}function q2(p){var g=p.textContent;g===p._wrapperState.initialValue&&g!==""&&g!==null&&(p.value=g)}function Q2(p){switch(p){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Km(p,g){return p==null||p==="http://www.w3.org/1999/xhtml"?Q2(g):p==="http://www.w3.org/2000/svg"&&g==="foreignObject"?"http://www.w3.org/1999/xhtml":p}var Xh,J2=(function(p){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(g,S,M,I){MSApp.execUnsafeLocalFunction(function(){return p(g,S,M,I)})}:p})(function(p,g){if(p.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in p)p.innerHTML=g;else{for(Xh=Xh||document.createElement("div"),Xh.innerHTML="<svg>"+g.valueOf().toString()+"</svg>",g=Xh.firstChild;p.firstChild;)p.removeChild(p.firstChild);for(;g.firstChild;)p.appendChild(g.firstChild)}});function $c(p,g){if(g){var S=p.firstChild;if(S&&S===p.lastChild&&S.nodeType===3){S.nodeValue=g;return}}p.textContent=g}var Uc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sV=["Webkit","ms","Moz","O"];Object.keys(Uc).forEach(function(p){sV.forEach(function(g){g=g+p.charAt(0).toUpperCase()+p.substring(1),Uc[g]=Uc[p]})});function eM(p,g,S){return g==null||typeof g=="boolean"||g===""?"":S||typeof g!="number"||g===0||Uc.hasOwnProperty(p)&&Uc[p]?(""+g).trim():g+"px"}function tM(p,g){p=p.style;for(var S in g)if(g.hasOwnProperty(S)){var M=S.indexOf("--")===0,I=eM(S,g[S],M);S==="float"&&(S="cssFloat"),M?p.setProperty(S,I):p[S]=I}}var lV=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qm(p,g){if(g){if(lV[p]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(t(137,p));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(t(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(t(61))}if(g.style!=null&&typeof g.style!="object")throw Error(t(62))}}function Qm(p,g){if(p.indexOf("-")===-1)return typeof g.is=="string";switch(p){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jm=null;function e0(p){return p=p.target||p.srcElement||window,p.correspondingUseElement&&(p=p.correspondingUseElement),p.nodeType===3?p.parentNode:p}var t0=null,Vl=null,Gl=null;function rM(p){if(p=vf(p)){if(typeof t0!="function")throw Error(t(280));var g=p.stateNode;g&&(g=yp(g),t0(p.stateNode,p.type,g))}}function nM(p){Vl?Gl?Gl.push(p):Gl=[p]:Vl=p}function aM(){if(Vl){var p=Vl,g=Gl;if(Gl=Vl=null,rM(p),g)for(p=0;p<g.length;p++)rM(g[p])}}function iM(p,g){return p(g)}function oM(){}var r0=!1;function sM(p,g,S){if(r0)return p(g,S);r0=!0;try{return iM(p,g,S)}finally{r0=!1,(Vl!==null||Gl!==null)&&(oM(),aM())}}function Yc(p,g){var S=p.stateNode;if(S===null)return null;var M=yp(S);if(M===null)return null;S=M[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(M=!M.disabled)||(p=p.type,M=!(p==="button"||p==="input"||p==="select"||p==="textarea")),p=!M;break e;default:p=!1}if(p)return null;if(S&&typeof S!="function")throw Error(t(231,g,typeof S));return S}var n0=!1;if(s)try{var Xc={};Object.defineProperty(Xc,"passive",{get:function(){n0=!0}}),window.addEventListener("test",Xc,Xc),window.removeEventListener("test",Xc,Xc)}catch{n0=!1}function uV(p,g,S,M,I,E,j,q,J){var oe=Array.prototype.slice.call(arguments,3);try{g.apply(S,oe)}catch(ve){this.onError(ve)}}var Zc=!1,Zh=null,Kh=!1,a0=null,cV={onError:function(p){Zc=!0,Zh=p}};function fV(p,g,S,M,I,E,j,q,J){Zc=!1,Zh=null,uV.apply(cV,arguments)}function dV(p,g,S,M,I,E,j,q,J){if(fV.apply(this,arguments),Zc){if(Zc){var oe=Zh;Zc=!1,Zh=null}else throw Error(t(198));Kh||(Kh=!0,a0=oe)}}function cs(p){var g=p,S=p;if(p.alternate)for(;g.return;)g=g.return;else{p=g;do g=p,(g.flags&4098)!==0&&(S=g.return),p=g.return;while(p)}return g.tag===3?S:null}function lM(p){if(p.tag===13){var g=p.memoizedState;if(g===null&&(p=p.alternate,p!==null&&(g=p.memoizedState)),g!==null)return g.dehydrated}return null}function uM(p){if(cs(p)!==p)throw Error(t(188))}function hV(p){var g=p.alternate;if(!g){if(g=cs(p),g===null)throw Error(t(188));return g!==p?null:p}for(var S=p,M=g;;){var I=S.return;if(I===null)break;var E=I.alternate;if(E===null){if(M=I.return,M!==null){S=M;continue}break}if(I.child===E.child){for(E=I.child;E;){if(E===S)return uM(I),p;if(E===M)return uM(I),g;E=E.sibling}throw Error(t(188))}if(S.return!==M.return)S=I,M=E;else{for(var j=!1,q=I.child;q;){if(q===S){j=!0,S=I,M=E;break}if(q===M){j=!0,M=I,S=E;break}q=q.sibling}if(!j){for(q=E.child;q;){if(q===S){j=!0,S=E,M=I;break}if(q===M){j=!0,M=E,S=I;break}q=q.sibling}if(!j)throw Error(t(189))}}if(S.alternate!==M)throw Error(t(190))}if(S.tag!==3)throw Error(t(188));return S.stateNode.current===S?p:g}function cM(p){return p=hV(p),p!==null?fM(p):null}function fM(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){var g=fM(p);if(g!==null)return g;p=p.sibling}return null}var dM=e.unstable_scheduleCallback,hM=e.unstable_cancelCallback,pV=e.unstable_shouldYield,vV=e.unstable_requestPaint,qt=e.unstable_now,gV=e.unstable_getCurrentPriorityLevel,i0=e.unstable_ImmediatePriority,pM=e.unstable_UserBlockingPriority,qh=e.unstable_NormalPriority,yV=e.unstable_LowPriority,vM=e.unstable_IdlePriority,Qh=null,Aa=null;function mV(p){if(Aa&&typeof Aa.onCommitFiberRoot=="function")try{Aa.onCommitFiberRoot(Qh,p,void 0,(p.current.flags&128)===128)}catch{}}var ia=Math.clz32?Math.clz32:_V,xV=Math.log,SV=Math.LN2;function _V(p){return p>>>=0,p===0?32:31-(xV(p)/SV|0)|0}var Jh=64,ep=4194304;function Kc(p){switch(p&-p){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function tp(p,g){var S=p.pendingLanes;if(S===0)return 0;var M=0,I=p.suspendedLanes,E=p.pingedLanes,j=S&268435455;if(j!==0){var q=j&~I;q!==0?M=Kc(q):(E&=j,E!==0&&(M=Kc(E)))}else j=S&~I,j!==0?M=Kc(j):E!==0&&(M=Kc(E));if(M===0)return 0;if(g!==0&&g!==M&&(g&I)===0&&(I=M&-M,E=g&-g,I>=E||I===16&&(E&4194240)!==0))return g;if((M&4)!==0&&(M|=S&16),g=p.entangledLanes,g!==0)for(p=p.entanglements,g&=M;0<g;)S=31-ia(g),I=1<<S,M|=p[S],g&=~I;return M}function bV(p,g){switch(p){case 1:case 2:case 4:return g+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wV(p,g){for(var S=p.suspendedLanes,M=p.pingedLanes,I=p.expirationTimes,E=p.pendingLanes;0<E;){var j=31-ia(E),q=1<<j,J=I[j];J===-1?((q&S)===0||(q&M)!==0)&&(I[j]=bV(q,g)):J<=g&&(p.expiredLanes|=q),E&=~q}}function o0(p){return p=p.pendingLanes&-1073741825,p!==0?p:p&1073741824?1073741824:0}function gM(){var p=Jh;return Jh<<=1,(Jh&4194240)===0&&(Jh=64),p}function s0(p){for(var g=[],S=0;31>S;S++)g.push(p);return g}function qc(p,g,S){p.pendingLanes|=g,g!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,g=31-ia(g),p[g]=S}function TV(p,g){var S=p.pendingLanes&~g;p.pendingLanes=g,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=g,p.mutableReadLanes&=g,p.entangledLanes&=g,g=p.entanglements;var M=p.eventTimes;for(p=p.expirationTimes;0<S;){var I=31-ia(S),E=1<<I;g[I]=0,M[I]=-1,p[I]=-1,S&=~E}}function l0(p,g){var S=p.entangledLanes|=g;for(p=p.entanglements;S;){var M=31-ia(S),I=1<<M;I&g|p[M]&g&&(p[M]|=g),S&=~I}}var kt=0;function yM(p){return p&=-p,1<p?4<p?(p&268435455)!==0?16:536870912:4:1}var mM,u0,xM,SM,_M,c0=!1,rp=[],to=null,ro=null,no=null,Qc=new Map,Jc=new Map,ao=[],CV="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function bM(p,g){switch(p){case"focusin":case"focusout":to=null;break;case"dragenter":case"dragleave":ro=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":Qc.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jc.delete(g.pointerId)}}function ef(p,g,S,M,I,E){return p===null||p.nativeEvent!==E?(p={blockedOn:g,domEventName:S,eventSystemFlags:M,nativeEvent:E,targetContainers:[I]},g!==null&&(g=vf(g),g!==null&&u0(g)),p):(p.eventSystemFlags|=M,g=p.targetContainers,I!==null&&g.indexOf(I)===-1&&g.push(I),p)}function MV(p,g,S,M,I){switch(g){case"focusin":return to=ef(to,p,g,S,M,I),!0;case"dragenter":return ro=ef(ro,p,g,S,M,I),!0;case"mouseover":return no=ef(no,p,g,S,M,I),!0;case"pointerover":var E=I.pointerId;return Qc.set(E,ef(Qc.get(E)||null,p,g,S,M,I)),!0;case"gotpointercapture":return E=I.pointerId,Jc.set(E,ef(Jc.get(E)||null,p,g,S,M,I)),!0}return!1}function wM(p){var g=fs(p.target);if(g!==null){var S=cs(g);if(S!==null){if(g=S.tag,g===13){if(g=lM(S),g!==null){p.blockedOn=g,_M(p.priority,function(){xM(S)});return}}else if(g===3&&S.stateNode.current.memoizedState.isDehydrated){p.blockedOn=S.tag===3?S.stateNode.containerInfo:null;return}}}p.blockedOn=null}function np(p){if(p.blockedOn!==null)return!1;for(var g=p.targetContainers;0<g.length;){var S=d0(p.domEventName,p.eventSystemFlags,g[0],p.nativeEvent);if(S===null){S=p.nativeEvent;var M=new S.constructor(S.type,S);Jm=M,S.target.dispatchEvent(M),Jm=null}else return g=vf(S),g!==null&&u0(g),p.blockedOn=S,!1;g.shift()}return!0}function TM(p,g,S){np(p)&&S.delete(g)}function kV(){c0=!1,to!==null&&np(to)&&(to=null),ro!==null&&np(ro)&&(ro=null),no!==null&&np(no)&&(no=null),Qc.forEach(TM),Jc.forEach(TM)}function tf(p,g){p.blockedOn===g&&(p.blockedOn=null,c0||(c0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kV)))}function rf(p){function g(I){return tf(I,p)}if(0<rp.length){tf(rp[0],p);for(var S=1;S<rp.length;S++){var M=rp[S];M.blockedOn===p&&(M.blockedOn=null)}}for(to!==null&&tf(to,p),ro!==null&&tf(ro,p),no!==null&&tf(no,p),Qc.forEach(g),Jc.forEach(g),S=0;S<ao.length;S++)M=ao[S],M.blockedOn===p&&(M.blockedOn=null);for(;0<ao.length&&(S=ao[0],S.blockedOn===null);)wM(S),S.blockedOn===null&&ao.shift()}var Wl=C.ReactCurrentBatchConfig,ap=!0;function LV(p,g,S,M){var I=kt,E=Wl.transition;Wl.transition=null;try{kt=1,f0(p,g,S,M)}finally{kt=I,Wl.transition=E}}function AV(p,g,S,M){var I=kt,E=Wl.transition;Wl.transition=null;try{kt=4,f0(p,g,S,M)}finally{kt=I,Wl.transition=E}}function f0(p,g,S,M){if(ap){var I=d0(p,g,S,M);if(I===null)A0(p,g,M,ip,S),bM(p,M);else if(MV(I,p,g,S,M))M.stopPropagation();else if(bM(p,M),g&4&&-1<CV.indexOf(p)){for(;I!==null;){var E=vf(I);if(E!==null&&mM(E),E=d0(p,g,S,M),E===null&&A0(p,g,M,ip,S),E===I)break;I=E}I!==null&&M.stopPropagation()}else A0(p,g,M,null,S)}}var ip=null;function d0(p,g,S,M){if(ip=null,p=e0(M),p=fs(p),p!==null)if(g=cs(p),g===null)p=null;else if(S=g.tag,S===13){if(p=lM(g),p!==null)return p;p=null}else if(S===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;p=null}else g!==p&&(p=null);return ip=p,null}function CM(p){switch(p){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(gV()){case i0:return 1;case pM:return 4;case qh:case yV:return 16;case vM:return 536870912;default:return 16}default:return 16}}var io=null,h0=null,op=null;function MM(){if(op)return op;var p,g=h0,S=g.length,M,I="value"in io?io.value:io.textContent,E=I.length;for(p=0;p<S&&g[p]===I[p];p++);var j=S-p;for(M=1;M<=j&&g[S-M]===I[E-M];M++);return op=I.slice(p,1<M?1-M:void 0)}function sp(p){var g=p.keyCode;return"charCode"in p?(p=p.charCode,p===0&&g===13&&(p=13)):p=g,p===10&&(p=13),32<=p||p===13?p:0}function lp(){return!0}function kM(){return!1}function yn(p){function g(S,M,I,E,j){this._reactName=S,this._targetInst=I,this.type=M,this.nativeEvent=E,this.target=j,this.currentTarget=null;for(var q in p)p.hasOwnProperty(q)&&(S=p[q],this[q]=S?S(E):E[q]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?lp:kM,this.isPropagationStopped=kM,this}return K(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var S=this.nativeEvent;S&&(S.preventDefault?S.preventDefault():typeof S.returnValue!="unknown"&&(S.returnValue=!1),this.isDefaultPrevented=lp)},stopPropagation:function(){var S=this.nativeEvent;S&&(S.stopPropagation?S.stopPropagation():typeof S.cancelBubble!="unknown"&&(S.cancelBubble=!0),this.isPropagationStopped=lp)},persist:function(){},isPersistent:lp}),g}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(p){return p.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},p0=yn(Hl),nf=K({},Hl,{view:0,detail:0}),IV=yn(nf),v0,g0,af,up=K({},nf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:m0,button:0,buttons:0,relatedTarget:function(p){return p.relatedTarget===void 0?p.fromElement===p.srcElement?p.toElement:p.fromElement:p.relatedTarget},movementX:function(p){return"movementX"in p?p.movementX:(p!==af&&(af&&p.type==="mousemove"?(v0=p.screenX-af.screenX,g0=p.screenY-af.screenY):g0=v0=0,af=p),v0)},movementY:function(p){return"movementY"in p?p.movementY:g0}}),LM=yn(up),DV=K({},up,{dataTransfer:0}),PV=yn(DV),RV=K({},nf,{relatedTarget:0}),y0=yn(RV),EV=K({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),zV=yn(EV),OV=K({},Hl,{clipboardData:function(p){return"clipboardData"in p?p.clipboardData:window.clipboardData}}),NV=yn(OV),BV=K({},Hl,{data:0}),AM=yn(BV),jV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},FV={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},VV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GV(p){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(p):(p=VV[p])?!!g[p]:!1}function m0(){return GV}var WV=K({},nf,{key:function(p){if(p.key){var g=jV[p.key]||p.key;if(g!=="Unidentified")return g}return p.type==="keypress"?(p=sp(p),p===13?"Enter":String.fromCharCode(p)):p.type==="keydown"||p.type==="keyup"?FV[p.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:m0,charCode:function(p){return p.type==="keypress"?sp(p):0},keyCode:function(p){return p.type==="keydown"||p.type==="keyup"?p.keyCode:0},which:function(p){return p.type==="keypress"?sp(p):p.type==="keydown"||p.type==="keyup"?p.keyCode:0}}),HV=yn(WV),$V=K({},up,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IM=yn($V),UV=K({},nf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:m0}),YV=yn(UV),XV=K({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZV=yn(XV),KV=K({},up,{deltaX:function(p){return"deltaX"in p?p.deltaX:"wheelDeltaX"in p?-p.wheelDeltaX:0},deltaY:function(p){return"deltaY"in p?p.deltaY:"wheelDeltaY"in p?-p.wheelDeltaY:"wheelDelta"in p?-p.wheelDelta:0},deltaZ:0,deltaMode:0}),qV=yn(KV),QV=[9,13,27,32],x0=s&&"CompositionEvent"in window,of=null;s&&"documentMode"in document&&(of=document.documentMode);var JV=s&&"TextEvent"in window&&!of,DM=s&&(!x0||of&&8<of&&11>=of),PM=" ",RM=!1;function EM(p,g){switch(p){case"keyup":return QV.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zM(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var $l=!1;function e8(p,g){switch(p){case"compositionend":return zM(g);case"keypress":return g.which!==32?null:(RM=!0,PM);case"textInput":return p=g.data,p===PM&&RM?null:p;default:return null}}function t8(p,g){if($l)return p==="compositionend"||!x0&&EM(p,g)?(p=MM(),op=h0=io=null,$l=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return DM&&g.locale!=="ko"?null:g.data;default:return null}}var r8={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function OM(p){var g=p&&p.nodeName&&p.nodeName.toLowerCase();return g==="input"?!!r8[p.type]:g==="textarea"}function NM(p,g,S,M){nM(M),g=pp(g,"onChange"),0<g.length&&(S=new p0("onChange","change",null,S,M),p.push({event:S,listeners:g}))}var sf=null,lf=null;function n8(p){tk(p,0)}function cp(p){var g=Kl(p);if(Ie(g))return p}function a8(p,g){if(p==="change")return g}var BM=!1;if(s){var S0;if(s){var _0="oninput"in document;if(!_0){var jM=document.createElement("div");jM.setAttribute("oninput","return;"),_0=typeof jM.oninput=="function"}S0=_0}else S0=!1;BM=S0&&(!document.documentMode||9<document.documentMode)}function FM(){sf&&(sf.detachEvent("onpropertychange",VM),lf=sf=null)}function VM(p){if(p.propertyName==="value"&&cp(lf)){var g=[];NM(g,lf,p,e0(p)),sM(n8,g)}}function i8(p,g,S){p==="focusin"?(FM(),sf=g,lf=S,sf.attachEvent("onpropertychange",VM)):p==="focusout"&&FM()}function o8(p){if(p==="selectionchange"||p==="keyup"||p==="keydown")return cp(lf)}function s8(p,g){if(p==="click")return cp(g)}function l8(p,g){if(p==="input"||p==="change")return cp(g)}function u8(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var oa=typeof Object.is=="function"?Object.is:u8;function uf(p,g){if(oa(p,g))return!0;if(typeof p!="object"||p===null||typeof g!="object"||g===null)return!1;var S=Object.keys(p),M=Object.keys(g);if(S.length!==M.length)return!1;for(M=0;M<S.length;M++){var I=S[M];if(!l.call(g,I)||!oa(p[I],g[I]))return!1}return!0}function GM(p){for(;p&&p.firstChild;)p=p.firstChild;return p}function WM(p,g){var S=GM(p);p=0;for(var M;S;){if(S.nodeType===3){if(M=p+S.textContent.length,p<=g&&M>=g)return{node:S,offset:g-p};p=M}e:{for(;S;){if(S.nextSibling){S=S.nextSibling;break e}S=S.parentNode}S=void 0}S=GM(S)}}function HM(p,g){return p&&g?p===g?!0:p&&p.nodeType===3?!1:g&&g.nodeType===3?HM(p,g.parentNode):"contains"in p?p.contains(g):p.compareDocumentPosition?!!(p.compareDocumentPosition(g)&16):!1:!1}function $M(){for(var p=window,g=dt();g instanceof p.HTMLIFrameElement;){try{var S=typeof g.contentWindow.location.href=="string"}catch{S=!1}if(S)p=g.contentWindow;else break;g=dt(p.document)}return g}function b0(p){var g=p&&p.nodeName&&p.nodeName.toLowerCase();return g&&(g==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||g==="textarea"||p.contentEditable==="true")}function c8(p){var g=$M(),S=p.focusedElem,M=p.selectionRange;if(g!==S&&S&&S.ownerDocument&&HM(S.ownerDocument.documentElement,S)){if(M!==null&&b0(S)){if(g=M.start,p=M.end,p===void 0&&(p=g),"selectionStart"in S)S.selectionStart=g,S.selectionEnd=Math.min(p,S.value.length);else if(p=(g=S.ownerDocument||document)&&g.defaultView||window,p.getSelection){p=p.getSelection();var I=S.textContent.length,E=Math.min(M.start,I);M=M.end===void 0?E:Math.min(M.end,I),!p.extend&&E>M&&(I=M,M=E,E=I),I=WM(S,E);var j=WM(S,M);I&&j&&(p.rangeCount!==1||p.anchorNode!==I.node||p.anchorOffset!==I.offset||p.focusNode!==j.node||p.focusOffset!==j.offset)&&(g=g.createRange(),g.setStart(I.node,I.offset),p.removeAllRanges(),E>M?(p.addRange(g),p.extend(j.node,j.offset)):(g.setEnd(j.node,j.offset),p.addRange(g)))}}for(g=[],p=S;p=p.parentNode;)p.nodeType===1&&g.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<g.length;S++)p=g[S],p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}var f8=s&&"documentMode"in document&&11>=document.documentMode,Ul=null,w0=null,cf=null,T0=!1;function UM(p,g,S){var M=S.window===S?S.document:S.nodeType===9?S:S.ownerDocument;T0||Ul==null||Ul!==dt(M)||(M=Ul,"selectionStart"in M&&b0(M)?M={start:M.selectionStart,end:M.selectionEnd}:(M=(M.ownerDocument&&M.ownerDocument.defaultView||window).getSelection(),M={anchorNode:M.anchorNode,anchorOffset:M.anchorOffset,focusNode:M.focusNode,focusOffset:M.focusOffset}),cf&&uf(cf,M)||(cf=M,M=pp(w0,"onSelect"),0<M.length&&(g=new p0("onSelect","select",null,g,S),p.push({event:g,listeners:M}),g.target=Ul)))}function fp(p,g){var S={};return S[p.toLowerCase()]=g.toLowerCase(),S["Webkit"+p]="webkit"+g,S["Moz"+p]="moz"+g,S}var Yl={animationend:fp("Animation","AnimationEnd"),animationiteration:fp("Animation","AnimationIteration"),animationstart:fp("Animation","AnimationStart"),transitionend:fp("Transition","TransitionEnd")},C0={},YM={};s&&(YM=document.createElement("div").style,"AnimationEvent"in window||(delete Yl.animationend.animation,delete Yl.animationiteration.animation,delete Yl.animationstart.animation),"TransitionEvent"in window||delete Yl.transitionend.transition);function dp(p){if(C0[p])return C0[p];if(!Yl[p])return p;var g=Yl[p],S;for(S in g)if(g.hasOwnProperty(S)&&S in YM)return C0[p]=g[S];return p}var XM=dp("animationend"),ZM=dp("animationiteration"),KM=dp("animationstart"),qM=dp("transitionend"),QM=new Map,JM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function oo(p,g){QM.set(p,g),i(g,[p])}for(var M0=0;M0<JM.length;M0++){var k0=JM[M0],d8=k0.toLowerCase(),h8=k0[0].toUpperCase()+k0.slice(1);oo(d8,"on"+h8)}oo(XM,"onAnimationEnd"),oo(ZM,"onAnimationIteration"),oo(KM,"onAnimationStart"),oo("dblclick","onDoubleClick"),oo("focusin","onFocus"),oo("focusout","onBlur"),oo(qM,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ff="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),p8=new Set("cancel close invalid load scroll toggle".split(" ").concat(ff));function ek(p,g,S){var M=p.type||"unknown-event";p.currentTarget=S,dV(M,g,void 0,p),p.currentTarget=null}function tk(p,g){g=(g&4)!==0;for(var S=0;S<p.length;S++){var M=p[S],I=M.event;M=M.listeners;e:{var E=void 0;if(g)for(var j=M.length-1;0<=j;j--){var q=M[j],J=q.instance,oe=q.currentTarget;if(q=q.listener,J!==E&&I.isPropagationStopped())break e;ek(I,q,oe),E=J}else for(j=0;j<M.length;j++){if(q=M[j],J=q.instance,oe=q.currentTarget,q=q.listener,J!==E&&I.isPropagationStopped())break e;ek(I,q,oe),E=J}}}if(Kh)throw p=a0,Kh=!1,a0=null,p}function zt(p,g){var S=g[z0];S===void 0&&(S=g[z0]=new Set);var M=p+"__bubble";S.has(M)||(rk(g,p,2,!1),S.add(M))}function L0(p,g,S){var M=0;g&&(M|=4),rk(S,p,M,g)}var hp="_reactListening"+Math.random().toString(36).slice(2);function df(p){if(!p[hp]){p[hp]=!0,n.forEach(function(S){S!=="selectionchange"&&(p8.has(S)||L0(S,!1,p),L0(S,!0,p))});var g=p.nodeType===9?p:p.ownerDocument;g===null||g[hp]||(g[hp]=!0,L0("selectionchange",!1,g))}}function rk(p,g,S,M){switch(CM(g)){case 1:var I=LV;break;case 4:I=AV;break;default:I=f0}S=I.bind(null,g,S,p),I=void 0,!n0||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(I=!0),M?I!==void 0?p.addEventListener(g,S,{capture:!0,passive:I}):p.addEventListener(g,S,!0):I!==void 0?p.addEventListener(g,S,{passive:I}):p.addEventListener(g,S,!1)}function A0(p,g,S,M,I){var E=M;if((g&1)===0&&(g&2)===0&&M!==null)e:for(;;){if(M===null)return;var j=M.tag;if(j===3||j===4){var q=M.stateNode.containerInfo;if(q===I||q.nodeType===8&&q.parentNode===I)break;if(j===4)for(j=M.return;j!==null;){var J=j.tag;if((J===3||J===4)&&(J=j.stateNode.containerInfo,J===I||J.nodeType===8&&J.parentNode===I))return;j=j.return}for(;q!==null;){if(j=fs(q),j===null)return;if(J=j.tag,J===5||J===6){M=E=j;continue e}q=q.parentNode}}M=M.return}sM(function(){var oe=E,ve=e0(S),me=[];e:{var de=QM.get(p);if(de!==void 0){var Oe=p0,Fe=p;switch(p){case"keypress":if(sp(S)===0)break e;case"keydown":case"keyup":Oe=HV;break;case"focusin":Fe="focus",Oe=y0;break;case"focusout":Fe="blur",Oe=y0;break;case"beforeblur":case"afterblur":Oe=y0;break;case"click":if(S.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=LM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=PV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=YV;break;case XM:case ZM:case KM:Oe=zV;break;case qM:Oe=ZV;break;case"scroll":Oe=IV;break;case"wheel":Oe=qV;break;case"copy":case"cut":case"paste":Oe=NV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=IM}var Ve=(g&4)!==0,Qt=!Ve&&p==="scroll",re=Ve?de!==null?de+"Capture":null:de;Ve=[];for(var te=oe,ie;te!==null;){ie=te;var _e=ie.stateNode;if(ie.tag===5&&_e!==null&&(ie=_e,re!==null&&(_e=Yc(te,re),_e!=null&&Ve.push(hf(te,_e,ie)))),Qt)break;te=te.return}0<Ve.length&&(de=new Oe(de,Fe,null,S,ve),me.push({event:de,listeners:Ve}))}}if((g&7)===0){e:{if(de=p==="mouseover"||p==="pointerover",Oe=p==="mouseout"||p==="pointerout",de&&S!==Jm&&(Fe=S.relatedTarget||S.fromElement)&&(fs(Fe)||Fe[hi]))break e;if((Oe||de)&&(de=ve.window===ve?ve:(de=ve.ownerDocument)?de.defaultView||de.parentWindow:window,Oe?(Fe=S.relatedTarget||S.toElement,Oe=oe,Fe=Fe?fs(Fe):null,Fe!==null&&(Qt=cs(Fe),Fe!==Qt||Fe.tag!==5&&Fe.tag!==6)&&(Fe=null)):(Oe=null,Fe=oe),Oe!==Fe)){if(Ve=LM,_e="onMouseLeave",re="onMouseEnter",te="mouse",(p==="pointerout"||p==="pointerover")&&(Ve=IM,_e="onPointerLeave",re="onPointerEnter",te="pointer"),Qt=Oe==null?de:Kl(Oe),ie=Fe==null?de:Kl(Fe),de=new Ve(_e,te+"leave",Oe,S,ve),de.target=Qt,de.relatedTarget=ie,_e=null,fs(ve)===oe&&(Ve=new Ve(re,te+"enter",Fe,S,ve),Ve.target=ie,Ve.relatedTarget=Qt,_e=Ve),Qt=_e,Oe&&Fe)t:{for(Ve=Oe,re=Fe,te=0,ie=Ve;ie;ie=Xl(ie))te++;for(ie=0,_e=re;_e;_e=Xl(_e))ie++;for(;0<te-ie;)Ve=Xl(Ve),te--;for(;0<ie-te;)re=Xl(re),ie--;for(;te--;){if(Ve===re||re!==null&&Ve===re.alternate)break t;Ve=Xl(Ve),re=Xl(re)}Ve=null}else Ve=null;Oe!==null&&nk(me,de,Oe,Ve,!1),Fe!==null&&Qt!==null&&nk(me,Qt,Fe,Ve,!0)}}e:{if(de=oe?Kl(oe):window,Oe=de.nodeName&&de.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&de.type==="file")var We=a8;else if(OM(de))if(BM)We=l8;else{We=o8;var Ke=i8}else(Oe=de.nodeName)&&Oe.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(We=s8);if(We&&(We=We(p,oe))){NM(me,We,S,ve);break e}Ke&&Ke(p,de,oe),p==="focusout"&&(Ke=de._wrapperState)&&Ke.controlled&&de.type==="number"&&yr(de,"number",de.value)}switch(Ke=oe?Kl(oe):window,p){case"focusin":(OM(Ke)||Ke.contentEditable==="true")&&(Ul=Ke,w0=oe,cf=null);break;case"focusout":cf=w0=Ul=null;break;case"mousedown":T0=!0;break;case"contextmenu":case"mouseup":case"dragend":T0=!1,UM(me,S,ve);break;case"selectionchange":if(f8)break;case"keydown":case"keyup":UM(me,S,ve)}var qe;if(x0)e:{switch(p){case"compositionstart":var at="onCompositionStart";break e;case"compositionend":at="onCompositionEnd";break e;case"compositionupdate":at="onCompositionUpdate";break e}at=void 0}else $l?EM(p,S)&&(at="onCompositionEnd"):p==="keydown"&&S.keyCode===229&&(at="onCompositionStart");at&&(DM&&S.locale!=="ko"&&($l||at!=="onCompositionStart"?at==="onCompositionEnd"&&$l&&(qe=MM()):(io=ve,h0="value"in io?io.value:io.textContent,$l=!0)),Ke=pp(oe,at),0<Ke.length&&(at=new AM(at,p,null,S,ve),me.push({event:at,listeners:Ke}),qe?at.data=qe:(qe=zM(S),qe!==null&&(at.data=qe)))),(qe=JV?e8(p,S):t8(p,S))&&(oe=pp(oe,"onBeforeInput"),0<oe.length&&(ve=new AM("onBeforeInput","beforeinput",null,S,ve),me.push({event:ve,listeners:oe}),ve.data=qe))}tk(me,g)})}function hf(p,g,S){return{instance:p,listener:g,currentTarget:S}}function pp(p,g){for(var S=g+"Capture",M=[];p!==null;){var I=p,E=I.stateNode;I.tag===5&&E!==null&&(I=E,E=Yc(p,S),E!=null&&M.unshift(hf(p,E,I)),E=Yc(p,g),E!=null&&M.push(hf(p,E,I))),p=p.return}return M}function Xl(p){if(p===null)return null;do p=p.return;while(p&&p.tag!==5);return p||null}function nk(p,g,S,M,I){for(var E=g._reactName,j=[];S!==null&&S!==M;){var q=S,J=q.alternate,oe=q.stateNode;if(J!==null&&J===M)break;q.tag===5&&oe!==null&&(q=oe,I?(J=Yc(S,E),J!=null&&j.unshift(hf(S,J,q))):I||(J=Yc(S,E),J!=null&&j.push(hf(S,J,q)))),S=S.return}j.length!==0&&p.push({event:g,listeners:j})}var v8=/\r\n?/g,g8=/\u0000|\uFFFD/g;function ak(p){return(typeof p=="string"?p:""+p).replace(v8,`
|
|
6
|
-
`).replace(g8,"")}function vp(p,g,S){if(g=ak(g),ak(p)!==g&&S)throw Error(t(425))}function gp(){}var I0=null,D0=null;function P0(p,g){return p==="textarea"||p==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var R0=typeof setTimeout=="function"?setTimeout:void 0,y8=typeof clearTimeout=="function"?clearTimeout:void 0,ik=typeof Promise=="function"?Promise:void 0,m8=typeof queueMicrotask=="function"?queueMicrotask:typeof ik<"u"?function(p){return ik.resolve(null).then(p).catch(x8)}:R0;function x8(p){setTimeout(function(){throw p})}function E0(p,g){var S=g,M=0;do{var I=S.nextSibling;if(p.removeChild(S),I&&I.nodeType===8)if(S=I.data,S==="/$"){if(M===0){p.removeChild(I),rf(g);return}M--}else S!=="$"&&S!=="$?"&&S!=="$!"||M++;S=I}while(S);rf(g)}function so(p){for(;p!=null;p=p.nextSibling){var g=p.nodeType;if(g===1||g===3)break;if(g===8){if(g=p.data,g==="$"||g==="$!"||g==="$?")break;if(g==="/$")return null}}return p}function ok(p){p=p.previousSibling;for(var g=0;p;){if(p.nodeType===8){var S=p.data;if(S==="$"||S==="$!"||S==="$?"){if(g===0)return p;g--}else S==="/$"&&g++}p=p.previousSibling}return null}var Zl=Math.random().toString(36).slice(2),Ia="__reactFiber$"+Zl,pf="__reactProps$"+Zl,hi="__reactContainer$"+Zl,z0="__reactEvents$"+Zl,S8="__reactListeners$"+Zl,_8="__reactHandles$"+Zl;function fs(p){var g=p[Ia];if(g)return g;for(var S=p.parentNode;S;){if(g=S[hi]||S[Ia]){if(S=g.alternate,g.child!==null||S!==null&&S.child!==null)for(p=ok(p);p!==null;){if(S=p[Ia])return S;p=ok(p)}return g}p=S,S=p.parentNode}return null}function vf(p){return p=p[Ia]||p[hi],!p||p.tag!==5&&p.tag!==6&&p.tag!==13&&p.tag!==3?null:p}function Kl(p){if(p.tag===5||p.tag===6)return p.stateNode;throw Error(t(33))}function yp(p){return p[pf]||null}var O0=[],ql=-1;function lo(p){return{current:p}}function Ot(p){0>ql||(p.current=O0[ql],O0[ql]=null,ql--)}function Rt(p,g){ql++,O0[ql]=p.current,p.current=g}var uo={},Nr=lo(uo),rn=lo(!1),ds=uo;function Ql(p,g){var S=p.type.contextTypes;if(!S)return uo;var M=p.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===g)return M.__reactInternalMemoizedMaskedChildContext;var I={},E;for(E in S)I[E]=g[E];return M&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=g,p.__reactInternalMemoizedMaskedChildContext=I),I}function nn(p){return p=p.childContextTypes,p!=null}function mp(){Ot(rn),Ot(Nr)}function sk(p,g,S){if(Nr.current!==uo)throw Error(t(168));Rt(Nr,g),Rt(rn,S)}function lk(p,g,S){var M=p.stateNode;if(g=g.childContextTypes,typeof M.getChildContext!="function")return S;M=M.getChildContext();for(var I in M)if(!(I in g))throw Error(t(108,Be(p)||"Unknown",I));return K({},S,M)}function xp(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||uo,ds=Nr.current,Rt(Nr,p),Rt(rn,rn.current),!0}function uk(p,g,S){var M=p.stateNode;if(!M)throw Error(t(169));S?(p=lk(p,g,ds),M.__reactInternalMemoizedMergedChildContext=p,Ot(rn),Ot(Nr),Rt(Nr,p)):Ot(rn),Rt(rn,S)}var pi=null,Sp=!1,N0=!1;function ck(p){pi===null?pi=[p]:pi.push(p)}function b8(p){Sp=!0,ck(p)}function co(){if(!N0&&pi!==null){N0=!0;var p=0,g=kt;try{var S=pi;for(kt=1;p<S.length;p++){var M=S[p];do M=M(!0);while(M!==null)}pi=null,Sp=!1}catch(I){throw pi!==null&&(pi=pi.slice(p+1)),dM(i0,co),I}finally{kt=g,N0=!1}}return null}var Jl=[],eu=0,_p=null,bp=0,Rn=[],En=0,hs=null,vi=1,gi="";function ps(p,g){Jl[eu++]=bp,Jl[eu++]=_p,_p=p,bp=g}function fk(p,g,S){Rn[En++]=vi,Rn[En++]=gi,Rn[En++]=hs,hs=p;var M=vi;p=gi;var I=32-ia(M)-1;M&=~(1<<I),S+=1;var E=32-ia(g)+I;if(30<E){var j=I-I%5;E=(M&(1<<j)-1).toString(32),M>>=j,I-=j,vi=1<<32-ia(g)+I|S<<I|M,gi=E+p}else vi=1<<E|S<<I|M,gi=p}function B0(p){p.return!==null&&(ps(p,1),fk(p,1,0))}function j0(p){for(;p===_p;)_p=Jl[--eu],Jl[eu]=null,bp=Jl[--eu],Jl[eu]=null;for(;p===hs;)hs=Rn[--En],Rn[En]=null,gi=Rn[--En],Rn[En]=null,vi=Rn[--En],Rn[En]=null}var mn=null,xn=null,Nt=!1,sa=null;function dk(p,g){var S=Bn(5,null,null,0);S.elementType="DELETED",S.stateNode=g,S.return=p,g=p.deletions,g===null?(p.deletions=[S],p.flags|=16):g.push(S)}function hk(p,g){switch(p.tag){case 5:var S=p.type;return g=g.nodeType!==1||S.toLowerCase()!==g.nodeName.toLowerCase()?null:g,g!==null?(p.stateNode=g,mn=p,xn=so(g.firstChild),!0):!1;case 6:return g=p.pendingProps===""||g.nodeType!==3?null:g,g!==null?(p.stateNode=g,mn=p,xn=null,!0):!1;case 13:return g=g.nodeType!==8?null:g,g!==null?(S=hs!==null?{id:vi,overflow:gi}:null,p.memoizedState={dehydrated:g,treeContext:S,retryLane:1073741824},S=Bn(18,null,null,0),S.stateNode=g,S.return=p,p.child=S,mn=p,xn=null,!0):!1;default:return!1}}function F0(p){return(p.mode&1)!==0&&(p.flags&128)===0}function V0(p){if(Nt){var g=xn;if(g){var S=g;if(!hk(p,g)){if(F0(p))throw Error(t(418));g=so(S.nextSibling);var M=mn;g&&hk(p,g)?dk(M,S):(p.flags=p.flags&-4097|2,Nt=!1,mn=p)}}else{if(F0(p))throw Error(t(418));p.flags=p.flags&-4097|2,Nt=!1,mn=p}}}function pk(p){for(p=p.return;p!==null&&p.tag!==5&&p.tag!==3&&p.tag!==13;)p=p.return;mn=p}function wp(p){if(p!==mn)return!1;if(!Nt)return pk(p),Nt=!0,!1;var g;if((g=p.tag!==3)&&!(g=p.tag!==5)&&(g=p.type,g=g!=="head"&&g!=="body"&&!P0(p.type,p.memoizedProps)),g&&(g=xn)){if(F0(p))throw vk(),Error(t(418));for(;g;)dk(p,g),g=so(g.nextSibling)}if(pk(p),p.tag===13){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(t(317));e:{for(p=p.nextSibling,g=0;p;){if(p.nodeType===8){var S=p.data;if(S==="/$"){if(g===0){xn=so(p.nextSibling);break e}g--}else S!=="$"&&S!=="$!"&&S!=="$?"||g++}p=p.nextSibling}xn=null}}else xn=mn?so(p.stateNode.nextSibling):null;return!0}function vk(){for(var p=xn;p;)p=so(p.nextSibling)}function tu(){xn=mn=null,Nt=!1}function G0(p){sa===null?sa=[p]:sa.push(p)}var w8=C.ReactCurrentBatchConfig;function gf(p,g,S){if(p=S.ref,p!==null&&typeof p!="function"&&typeof p!="object"){if(S._owner){if(S=S._owner,S){if(S.tag!==1)throw Error(t(309));var M=S.stateNode}if(!M)throw Error(t(147,p));var I=M,E=""+p;return g!==null&&g.ref!==null&&typeof g.ref=="function"&&g.ref._stringRef===E?g.ref:(g=function(j){var q=I.refs;j===null?delete q[E]:q[E]=j},g._stringRef=E,g)}if(typeof p!="string")throw Error(t(284));if(!S._owner)throw Error(t(290,p))}return p}function Tp(p,g){throw p=Object.prototype.toString.call(g),Error(t(31,p==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":p))}function gk(p){var g=p._init;return g(p._payload)}function yk(p){function g(re,te){if(p){var ie=re.deletions;ie===null?(re.deletions=[te],re.flags|=16):ie.push(te)}}function S(re,te){if(!p)return null;for(;te!==null;)g(re,te),te=te.sibling;return null}function M(re,te){for(re=new Map;te!==null;)te.key!==null?re.set(te.key,te):re.set(te.index,te),te=te.sibling;return re}function I(re,te){return re=xo(re,te),re.index=0,re.sibling=null,re}function E(re,te,ie){return re.index=ie,p?(ie=re.alternate,ie!==null?(ie=ie.index,ie<te?(re.flags|=2,te):ie):(re.flags|=2,te)):(re.flags|=1048576,te)}function j(re){return p&&re.alternate===null&&(re.flags|=2),re}function q(re,te,ie,_e){return te===null||te.tag!==6?(te=Ex(ie,re.mode,_e),te.return=re,te):(te=I(te,ie),te.return=re,te)}function J(re,te,ie,_e){var We=ie.type;return We===A?ve(re,te,ie.props.children,_e,ie.key):te!==null&&(te.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===H&&gk(We)===te.type)?(_e=I(te,ie.props),_e.ref=gf(re,te,ie),_e.return=re,_e):(_e=Xp(ie.type,ie.key,ie.props,null,re.mode,_e),_e.ref=gf(re,te,ie),_e.return=re,_e)}function oe(re,te,ie,_e){return te===null||te.tag!==4||te.stateNode.containerInfo!==ie.containerInfo||te.stateNode.implementation!==ie.implementation?(te=zx(ie,re.mode,_e),te.return=re,te):(te=I(te,ie.children||[]),te.return=re,te)}function ve(re,te,ie,_e,We){return te===null||te.tag!==7?(te=bs(ie,re.mode,_e,We),te.return=re,te):(te=I(te,ie),te.return=re,te)}function me(re,te,ie){if(typeof te=="string"&&te!==""||typeof te=="number")return te=Ex(""+te,re.mode,ie),te.return=re,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case k:return ie=Xp(te.type,te.key,te.props,null,re.mode,ie),ie.ref=gf(re,null,te),ie.return=re,ie;case L:return te=zx(te,re.mode,ie),te.return=re,te;case H:var _e=te._init;return me(re,_e(te._payload),ie)}if(vn(te)||X(te))return te=bs(te,re.mode,ie,null),te.return=re,te;Tp(re,te)}return null}function de(re,te,ie,_e){var We=te!==null?te.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number")return We!==null?null:q(re,te,""+ie,_e);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case k:return ie.key===We?J(re,te,ie,_e):null;case L:return ie.key===We?oe(re,te,ie,_e):null;case H:return We=ie._init,de(re,te,We(ie._payload),_e)}if(vn(ie)||X(ie))return We!==null?null:ve(re,te,ie,_e,null);Tp(re,ie)}return null}function Oe(re,te,ie,_e,We){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return re=re.get(ie)||null,q(te,re,""+_e,We);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case k:return re=re.get(_e.key===null?ie:_e.key)||null,J(te,re,_e,We);case L:return re=re.get(_e.key===null?ie:_e.key)||null,oe(te,re,_e,We);case H:var Ke=_e._init;return Oe(re,te,ie,Ke(_e._payload),We)}if(vn(_e)||X(_e))return re=re.get(ie)||null,ve(te,re,_e,We,null);Tp(te,_e)}return null}function Fe(re,te,ie,_e){for(var We=null,Ke=null,qe=te,at=te=0,Sr=null;qe!==null&&at<ie.length;at++){qe.index>at?(Sr=qe,qe=null):Sr=qe.sibling;var _t=de(re,qe,ie[at],_e);if(_t===null){qe===null&&(qe=Sr);break}p&&qe&&_t.alternate===null&&g(re,qe),te=E(_t,te,at),Ke===null?We=_t:Ke.sibling=_t,Ke=_t,qe=Sr}if(at===ie.length)return S(re,qe),Nt&&ps(re,at),We;if(qe===null){for(;at<ie.length;at++)qe=me(re,ie[at],_e),qe!==null&&(te=E(qe,te,at),Ke===null?We=qe:Ke.sibling=qe,Ke=qe);return Nt&&ps(re,at),We}for(qe=M(re,qe);at<ie.length;at++)Sr=Oe(qe,re,at,ie[at],_e),Sr!==null&&(p&&Sr.alternate!==null&&qe.delete(Sr.key===null?at:Sr.key),te=E(Sr,te,at),Ke===null?We=Sr:Ke.sibling=Sr,Ke=Sr);return p&&qe.forEach(function(So){return g(re,So)}),Nt&&ps(re,at),We}function Ve(re,te,ie,_e){var We=X(ie);if(typeof We!="function")throw Error(t(150));if(ie=We.call(ie),ie==null)throw Error(t(151));for(var Ke=We=null,qe=te,at=te=0,Sr=null,_t=ie.next();qe!==null&&!_t.done;at++,_t=ie.next()){qe.index>at?(Sr=qe,qe=null):Sr=qe.sibling;var So=de(re,qe,_t.value,_e);if(So===null){qe===null&&(qe=Sr);break}p&&qe&&So.alternate===null&&g(re,qe),te=E(So,te,at),Ke===null?We=So:Ke.sibling=So,Ke=So,qe=Sr}if(_t.done)return S(re,qe),Nt&&ps(re,at),We;if(qe===null){for(;!_t.done;at++,_t=ie.next())_t=me(re,_t.value,_e),_t!==null&&(te=E(_t,te,at),Ke===null?We=_t:Ke.sibling=_t,Ke=_t);return Nt&&ps(re,at),We}for(qe=M(re,qe);!_t.done;at++,_t=ie.next())_t=Oe(qe,re,at,_t.value,_e),_t!==null&&(p&&_t.alternate!==null&&qe.delete(_t.key===null?at:_t.key),te=E(_t,te,at),Ke===null?We=_t:Ke.sibling=_t,Ke=_t);return p&&qe.forEach(function(rG){return g(re,rG)}),Nt&&ps(re,at),We}function Qt(re,te,ie,_e){if(typeof ie=="object"&&ie!==null&&ie.type===A&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case k:e:{for(var We=ie.key,Ke=te;Ke!==null;){if(Ke.key===We){if(We=ie.type,We===A){if(Ke.tag===7){S(re,Ke.sibling),te=I(Ke,ie.props.children),te.return=re,re=te;break e}}else if(Ke.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===H&&gk(We)===Ke.type){S(re,Ke.sibling),te=I(Ke,ie.props),te.ref=gf(re,Ke,ie),te.return=re,re=te;break e}S(re,Ke);break}else g(re,Ke);Ke=Ke.sibling}ie.type===A?(te=bs(ie.props.children,re.mode,_e,ie.key),te.return=re,re=te):(_e=Xp(ie.type,ie.key,ie.props,null,re.mode,_e),_e.ref=gf(re,te,ie),_e.return=re,re=_e)}return j(re);case L:e:{for(Ke=ie.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===ie.containerInfo&&te.stateNode.implementation===ie.implementation){S(re,te.sibling),te=I(te,ie.children||[]),te.return=re,re=te;break e}else{S(re,te);break}else g(re,te);te=te.sibling}te=zx(ie,re.mode,_e),te.return=re,re=te}return j(re);case H:return Ke=ie._init,Qt(re,te,Ke(ie._payload),_e)}if(vn(ie))return Fe(re,te,ie,_e);if(X(ie))return Ve(re,te,ie,_e);Tp(re,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"?(ie=""+ie,te!==null&&te.tag===6?(S(re,te.sibling),te=I(te,ie),te.return=re,re=te):(S(re,te),te=Ex(ie,re.mode,_e),te.return=re,re=te),j(re)):S(re,te)}return Qt}var ru=yk(!0),mk=yk(!1),Cp=lo(null),Mp=null,nu=null,W0=null;function H0(){W0=nu=Mp=null}function $0(p){var g=Cp.current;Ot(Cp),p._currentValue=g}function U0(p,g,S){for(;p!==null;){var M=p.alternate;if((p.childLanes&g)!==g?(p.childLanes|=g,M!==null&&(M.childLanes|=g)):M!==null&&(M.childLanes&g)!==g&&(M.childLanes|=g),p===S)break;p=p.return}}function au(p,g){Mp=p,W0=nu=null,p=p.dependencies,p!==null&&p.firstContext!==null&&((p.lanes&g)!==0&&(an=!0),p.firstContext=null)}function zn(p){var g=p._currentValue;if(W0!==p)if(p={context:p,memoizedValue:g,next:null},nu===null){if(Mp===null)throw Error(t(308));nu=p,Mp.dependencies={lanes:0,firstContext:p}}else nu=nu.next=p;return g}var vs=null;function Y0(p){vs===null?vs=[p]:vs.push(p)}function xk(p,g,S,M){var I=g.interleaved;return I===null?(S.next=S,Y0(g)):(S.next=I.next,I.next=S),g.interleaved=S,yi(p,M)}function yi(p,g){p.lanes|=g;var S=p.alternate;for(S!==null&&(S.lanes|=g),S=p,p=p.return;p!==null;)p.childLanes|=g,S=p.alternate,S!==null&&(S.childLanes|=g),S=p,p=p.return;return S.tag===3?S.stateNode:null}var fo=!1;function X0(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sk(p,g){p=p.updateQueue,g.updateQueue===p&&(g.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,effects:p.effects})}function mi(p,g){return{eventTime:p,lane:g,tag:0,payload:null,callback:null,next:null}}function ho(p,g,S){var M=p.updateQueue;if(M===null)return null;if(M=M.shared,(xt&2)!==0){var I=M.pending;return I===null?g.next=g:(g.next=I.next,I.next=g),M.pending=g,yi(p,S)}return I=M.interleaved,I===null?(g.next=g,Y0(M)):(g.next=I.next,I.next=g),M.interleaved=g,yi(p,S)}function kp(p,g,S){if(g=g.updateQueue,g!==null&&(g=g.shared,(S&4194240)!==0)){var M=g.lanes;M&=p.pendingLanes,S|=M,g.lanes=S,l0(p,S)}}function _k(p,g){var S=p.updateQueue,M=p.alternate;if(M!==null&&(M=M.updateQueue,S===M)){var I=null,E=null;if(S=S.firstBaseUpdate,S!==null){do{var j={eventTime:S.eventTime,lane:S.lane,tag:S.tag,payload:S.payload,callback:S.callback,next:null};E===null?I=E=j:E=E.next=j,S=S.next}while(S!==null);E===null?I=E=g:E=E.next=g}else I=E=g;S={baseState:M.baseState,firstBaseUpdate:I,lastBaseUpdate:E,shared:M.shared,effects:M.effects},p.updateQueue=S;return}p=S.lastBaseUpdate,p===null?S.firstBaseUpdate=g:p.next=g,S.lastBaseUpdate=g}function Lp(p,g,S,M){var I=p.updateQueue;fo=!1;var E=I.firstBaseUpdate,j=I.lastBaseUpdate,q=I.shared.pending;if(q!==null){I.shared.pending=null;var J=q,oe=J.next;J.next=null,j===null?E=oe:j.next=oe,j=J;var ve=p.alternate;ve!==null&&(ve=ve.updateQueue,q=ve.lastBaseUpdate,q!==j&&(q===null?ve.firstBaseUpdate=oe:q.next=oe,ve.lastBaseUpdate=J))}if(E!==null){var me=I.baseState;j=0,ve=oe=J=null,q=E;do{var de=q.lane,Oe=q.eventTime;if((M&de)===de){ve!==null&&(ve=ve.next={eventTime:Oe,lane:0,tag:q.tag,payload:q.payload,callback:q.callback,next:null});e:{var Fe=p,Ve=q;switch(de=g,Oe=S,Ve.tag){case 1:if(Fe=Ve.payload,typeof Fe=="function"){me=Fe.call(Oe,me,de);break e}me=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Ve.payload,de=typeof Fe=="function"?Fe.call(Oe,me,de):Fe,de==null)break e;me=K({},me,de);break e;case 2:fo=!0}}q.callback!==null&&q.lane!==0&&(p.flags|=64,de=I.effects,de===null?I.effects=[q]:de.push(q))}else Oe={eventTime:Oe,lane:de,tag:q.tag,payload:q.payload,callback:q.callback,next:null},ve===null?(oe=ve=Oe,J=me):ve=ve.next=Oe,j|=de;if(q=q.next,q===null){if(q=I.shared.pending,q===null)break;de=q,q=de.next,de.next=null,I.lastBaseUpdate=de,I.shared.pending=null}}while(!0);if(ve===null&&(J=me),I.baseState=J,I.firstBaseUpdate=oe,I.lastBaseUpdate=ve,g=I.shared.interleaved,g!==null){I=g;do j|=I.lane,I=I.next;while(I!==g)}else E===null&&(I.shared.lanes=0);ms|=j,p.lanes=j,p.memoizedState=me}}function bk(p,g,S){if(p=g.effects,g.effects=null,p!==null)for(g=0;g<p.length;g++){var M=p[g],I=M.callback;if(I!==null){if(M.callback=null,M=S,typeof I!="function")throw Error(t(191,I));I.call(M)}}}var yf={},Da=lo(yf),mf=lo(yf),xf=lo(yf);function gs(p){if(p===yf)throw Error(t(174));return p}function Z0(p,g){switch(Rt(xf,g),Rt(mf,p),Rt(Da,yf),p=g.nodeType,p){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:Km(null,"");break;default:p=p===8?g.parentNode:g,g=p.namespaceURI||null,p=p.tagName,g=Km(g,p)}Ot(Da),Rt(Da,g)}function iu(){Ot(Da),Ot(mf),Ot(xf)}function wk(p){gs(xf.current);var g=gs(Da.current),S=Km(g,p.type);g!==S&&(Rt(mf,p),Rt(Da,S))}function K0(p){mf.current===p&&(Ot(Da),Ot(mf))}var jt=lo(0);function Ap(p){for(var g=p;g!==null;){if(g.tag===13){var S=g.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||S.data==="$?"||S.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===p)break;for(;g.sibling===null;){if(g.return===null||g.return===p)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var q0=[];function Q0(){for(var p=0;p<q0.length;p++)q0[p]._workInProgressVersionPrimary=null;q0.length=0}var Ip=C.ReactCurrentDispatcher,J0=C.ReactCurrentBatchConfig,ys=0,Ft=null,ur=null,mr=null,Dp=!1,Sf=!1,_f=0,T8=0;function Br(){throw Error(t(321))}function ex(p,g){if(g===null)return!1;for(var S=0;S<g.length&&S<p.length;S++)if(!oa(p[S],g[S]))return!1;return!0}function tx(p,g,S,M,I,E){if(ys=E,Ft=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,Ip.current=p===null||p.memoizedState===null?L8:A8,p=S(M,I),Sf){E=0;do{if(Sf=!1,_f=0,25<=E)throw Error(t(301));E+=1,mr=ur=null,g.updateQueue=null,Ip.current=I8,p=S(M,I)}while(Sf)}if(Ip.current=Ep,g=ur!==null&&ur.next!==null,ys=0,mr=ur=Ft=null,Dp=!1,g)throw Error(t(300));return p}function rx(){var p=_f!==0;return _f=0,p}function Pa(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mr===null?Ft.memoizedState=mr=p:mr=mr.next=p,mr}function On(){if(ur===null){var p=Ft.alternate;p=p!==null?p.memoizedState:null}else p=ur.next;var g=mr===null?Ft.memoizedState:mr.next;if(g!==null)mr=g,ur=p;else{if(p===null)throw Error(t(310));ur=p,p={memoizedState:ur.memoizedState,baseState:ur.baseState,baseQueue:ur.baseQueue,queue:ur.queue,next:null},mr===null?Ft.memoizedState=mr=p:mr=mr.next=p}return mr}function bf(p,g){return typeof g=="function"?g(p):g}function nx(p){var g=On(),S=g.queue;if(S===null)throw Error(t(311));S.lastRenderedReducer=p;var M=ur,I=M.baseQueue,E=S.pending;if(E!==null){if(I!==null){var j=I.next;I.next=E.next,E.next=j}M.baseQueue=I=E,S.pending=null}if(I!==null){E=I.next,M=M.baseState;var q=j=null,J=null,oe=E;do{var ve=oe.lane;if((ys&ve)===ve)J!==null&&(J=J.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),M=oe.hasEagerState?oe.eagerState:p(M,oe.action);else{var me={lane:ve,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};J===null?(q=J=me,j=M):J=J.next=me,Ft.lanes|=ve,ms|=ve}oe=oe.next}while(oe!==null&&oe!==E);J===null?j=M:J.next=q,oa(M,g.memoizedState)||(an=!0),g.memoizedState=M,g.baseState=j,g.baseQueue=J,S.lastRenderedState=M}if(p=S.interleaved,p!==null){I=p;do E=I.lane,Ft.lanes|=E,ms|=E,I=I.next;while(I!==p)}else I===null&&(S.lanes=0);return[g.memoizedState,S.dispatch]}function ax(p){var g=On(),S=g.queue;if(S===null)throw Error(t(311));S.lastRenderedReducer=p;var M=S.dispatch,I=S.pending,E=g.memoizedState;if(I!==null){S.pending=null;var j=I=I.next;do E=p(E,j.action),j=j.next;while(j!==I);oa(E,g.memoizedState)||(an=!0),g.memoizedState=E,g.baseQueue===null&&(g.baseState=E),S.lastRenderedState=E}return[E,M]}function Tk(){}function Ck(p,g){var S=Ft,M=On(),I=g(),E=!oa(M.memoizedState,I);if(E&&(M.memoizedState=I,an=!0),M=M.queue,ix(Lk.bind(null,S,M,p),[p]),M.getSnapshot!==g||E||mr!==null&&mr.memoizedState.tag&1){if(S.flags|=2048,wf(9,kk.bind(null,S,M,I,g),void 0,null),xr===null)throw Error(t(349));(ys&30)!==0||Mk(S,g,I)}return I}function Mk(p,g,S){p.flags|=16384,p={getSnapshot:g,value:S},g=Ft.updateQueue,g===null?(g={lastEffect:null,stores:null},Ft.updateQueue=g,g.stores=[p]):(S=g.stores,S===null?g.stores=[p]:S.push(p))}function kk(p,g,S,M){g.value=S,g.getSnapshot=M,Ak(g)&&Ik(p)}function Lk(p,g,S){return S(function(){Ak(g)&&Ik(p)})}function Ak(p){var g=p.getSnapshot;p=p.value;try{var S=g();return!oa(p,S)}catch{return!0}}function Ik(p){var g=yi(p,1);g!==null&&fa(g,p,1,-1)}function Dk(p){var g=Pa();return typeof p=="function"&&(p=p()),g.memoizedState=g.baseState=p,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bf,lastRenderedState:p},g.queue=p,p=p.dispatch=k8.bind(null,Ft,p),[g.memoizedState,p]}function wf(p,g,S,M){return p={tag:p,create:g,destroy:S,deps:M,next:null},g=Ft.updateQueue,g===null?(g={lastEffect:null,stores:null},Ft.updateQueue=g,g.lastEffect=p.next=p):(S=g.lastEffect,S===null?g.lastEffect=p.next=p:(M=S.next,S.next=p,p.next=M,g.lastEffect=p)),p}function Pk(){return On().memoizedState}function Pp(p,g,S,M){var I=Pa();Ft.flags|=p,I.memoizedState=wf(1|g,S,void 0,M===void 0?null:M)}function Rp(p,g,S,M){var I=On();M=M===void 0?null:M;var E=void 0;if(ur!==null){var j=ur.memoizedState;if(E=j.destroy,M!==null&&ex(M,j.deps)){I.memoizedState=wf(g,S,E,M);return}}Ft.flags|=p,I.memoizedState=wf(1|g,S,E,M)}function Rk(p,g){return Pp(8390656,8,p,g)}function ix(p,g){return Rp(2048,8,p,g)}function Ek(p,g){return Rp(4,2,p,g)}function zk(p,g){return Rp(4,4,p,g)}function Ok(p,g){if(typeof g=="function")return p=p(),g(p),function(){g(null)};if(g!=null)return p=p(),g.current=p,function(){g.current=null}}function Nk(p,g,S){return S=S!=null?S.concat([p]):null,Rp(4,4,Ok.bind(null,g,p),S)}function ox(){}function Bk(p,g){var S=On();g=g===void 0?null:g;var M=S.memoizedState;return M!==null&&g!==null&&ex(g,M[1])?M[0]:(S.memoizedState=[p,g],p)}function jk(p,g){var S=On();g=g===void 0?null:g;var M=S.memoizedState;return M!==null&&g!==null&&ex(g,M[1])?M[0]:(p=p(),S.memoizedState=[p,g],p)}function Fk(p,g,S){return(ys&21)===0?(p.baseState&&(p.baseState=!1,an=!0),p.memoizedState=S):(oa(S,g)||(S=gM(),Ft.lanes|=S,ms|=S,p.baseState=!0),g)}function C8(p,g){var S=kt;kt=S!==0&&4>S?S:4,p(!0);var M=J0.transition;J0.transition={};try{p(!1),g()}finally{kt=S,J0.transition=M}}function Vk(){return On().memoizedState}function M8(p,g,S){var M=yo(p);if(S={lane:M,action:S,hasEagerState:!1,eagerState:null,next:null},Gk(p))Wk(g,S);else if(S=xk(p,g,S,M),S!==null){var I=Xr();fa(S,p,M,I),Hk(S,g,M)}}function k8(p,g,S){var M=yo(p),I={lane:M,action:S,hasEagerState:!1,eagerState:null,next:null};if(Gk(p))Wk(g,I);else{var E=p.alternate;if(p.lanes===0&&(E===null||E.lanes===0)&&(E=g.lastRenderedReducer,E!==null))try{var j=g.lastRenderedState,q=E(j,S);if(I.hasEagerState=!0,I.eagerState=q,oa(q,j)){var J=g.interleaved;J===null?(I.next=I,Y0(g)):(I.next=J.next,J.next=I),g.interleaved=I;return}}catch{}S=xk(p,g,I,M),S!==null&&(I=Xr(),fa(S,p,M,I),Hk(S,g,M))}}function Gk(p){var g=p.alternate;return p===Ft||g!==null&&g===Ft}function Wk(p,g){Sf=Dp=!0;var S=p.pending;S===null?g.next=g:(g.next=S.next,S.next=g),p.pending=g}function Hk(p,g,S){if((S&4194240)!==0){var M=g.lanes;M&=p.pendingLanes,S|=M,g.lanes=S,l0(p,S)}}var Ep={readContext:zn,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},L8={readContext:zn,useCallback:function(p,g){return Pa().memoizedState=[p,g===void 0?null:g],p},useContext:zn,useEffect:Rk,useImperativeHandle:function(p,g,S){return S=S!=null?S.concat([p]):null,Pp(4194308,4,Ok.bind(null,g,p),S)},useLayoutEffect:function(p,g){return Pp(4194308,4,p,g)},useInsertionEffect:function(p,g){return Pp(4,2,p,g)},useMemo:function(p,g){var S=Pa();return g=g===void 0?null:g,p=p(),S.memoizedState=[p,g],p},useReducer:function(p,g,S){var M=Pa();return g=S!==void 0?S(g):g,M.memoizedState=M.baseState=g,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:g},M.queue=p,p=p.dispatch=M8.bind(null,Ft,p),[M.memoizedState,p]},useRef:function(p){var g=Pa();return p={current:p},g.memoizedState=p},useState:Dk,useDebugValue:ox,useDeferredValue:function(p){return Pa().memoizedState=p},useTransition:function(){var p=Dk(!1),g=p[0];return p=C8.bind(null,p[1]),Pa().memoizedState=p,[g,p]},useMutableSource:function(){},useSyncExternalStore:function(p,g,S){var M=Ft,I=Pa();if(Nt){if(S===void 0)throw Error(t(407));S=S()}else{if(S=g(),xr===null)throw Error(t(349));(ys&30)!==0||Mk(M,g,S)}I.memoizedState=S;var E={value:S,getSnapshot:g};return I.queue=E,Rk(Lk.bind(null,M,E,p),[p]),M.flags|=2048,wf(9,kk.bind(null,M,E,S,g),void 0,null),S},useId:function(){var p=Pa(),g=xr.identifierPrefix;if(Nt){var S=gi,M=vi;S=(M&~(1<<32-ia(M)-1)).toString(32)+S,g=":"+g+"R"+S,S=_f++,0<S&&(g+="H"+S.toString(32)),g+=":"}else S=T8++,g=":"+g+"r"+S.toString(32)+":";return p.memoizedState=g},unstable_isNewReconciler:!1},A8={readContext:zn,useCallback:Bk,useContext:zn,useEffect:ix,useImperativeHandle:Nk,useInsertionEffect:Ek,useLayoutEffect:zk,useMemo:jk,useReducer:nx,useRef:Pk,useState:function(){return nx(bf)},useDebugValue:ox,useDeferredValue:function(p){var g=On();return Fk(g,ur.memoizedState,p)},useTransition:function(){var p=nx(bf)[0],g=On().memoizedState;return[p,g]},useMutableSource:Tk,useSyncExternalStore:Ck,useId:Vk,unstable_isNewReconciler:!1},I8={readContext:zn,useCallback:Bk,useContext:zn,useEffect:ix,useImperativeHandle:Nk,useInsertionEffect:Ek,useLayoutEffect:zk,useMemo:jk,useReducer:ax,useRef:Pk,useState:function(){return ax(bf)},useDebugValue:ox,useDeferredValue:function(p){var g=On();return ur===null?g.memoizedState=p:Fk(g,ur.memoizedState,p)},useTransition:function(){var p=ax(bf)[0],g=On().memoizedState;return[p,g]},useMutableSource:Tk,useSyncExternalStore:Ck,useId:Vk,unstable_isNewReconciler:!1};function la(p,g){if(p&&p.defaultProps){g=K({},g),p=p.defaultProps;for(var S in p)g[S]===void 0&&(g[S]=p[S]);return g}return g}function sx(p,g,S,M){g=p.memoizedState,S=S(M,g),S=S==null?g:K({},g,S),p.memoizedState=S,p.lanes===0&&(p.updateQueue.baseState=S)}var zp={isMounted:function(p){return(p=p._reactInternals)?cs(p)===p:!1},enqueueSetState:function(p,g,S){p=p._reactInternals;var M=Xr(),I=yo(p),E=mi(M,I);E.payload=g,S!=null&&(E.callback=S),g=ho(p,E,I),g!==null&&(fa(g,p,I,M),kp(g,p,I))},enqueueReplaceState:function(p,g,S){p=p._reactInternals;var M=Xr(),I=yo(p),E=mi(M,I);E.tag=1,E.payload=g,S!=null&&(E.callback=S),g=ho(p,E,I),g!==null&&(fa(g,p,I,M),kp(g,p,I))},enqueueForceUpdate:function(p,g){p=p._reactInternals;var S=Xr(),M=yo(p),I=mi(S,M);I.tag=2,g!=null&&(I.callback=g),g=ho(p,I,M),g!==null&&(fa(g,p,M,S),kp(g,p,M))}};function $k(p,g,S,M,I,E,j){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate(M,E,j):g.prototype&&g.prototype.isPureReactComponent?!uf(S,M)||!uf(I,E):!0}function Uk(p,g,S){var M=!1,I=uo,E=g.contextType;return typeof E=="object"&&E!==null?E=zn(E):(I=nn(g)?ds:Nr.current,M=g.contextTypes,E=(M=M!=null)?Ql(p,I):uo),g=new g(S,E),p.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=zp,p.stateNode=g,g._reactInternals=p,M&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=I,p.__reactInternalMemoizedMaskedChildContext=E),g}function Yk(p,g,S,M){p=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(S,M),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(S,M),g.state!==p&&zp.enqueueReplaceState(g,g.state,null)}function lx(p,g,S,M){var I=p.stateNode;I.props=S,I.state=p.memoizedState,I.refs={},X0(p);var E=g.contextType;typeof E=="object"&&E!==null?I.context=zn(E):(E=nn(g)?ds:Nr.current,I.context=Ql(p,E)),I.state=p.memoizedState,E=g.getDerivedStateFromProps,typeof E=="function"&&(sx(p,g,E,S),I.state=p.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(g=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),g!==I.state&&zp.enqueueReplaceState(I,I.state,null),Lp(p,S,I,M),I.state=p.memoizedState),typeof I.componentDidMount=="function"&&(p.flags|=4194308)}function ou(p,g){try{var S="",M=g;do S+=fe(M),M=M.return;while(M);var I=S}catch(E){I=`
|
|
7
|
-
Error generating stack: `+E.message+`
|
|
8
|
-
`+E.stack}return{value:p,source:g,stack:I,digest:null}}function ux(p,g,S){return{value:p,source:null,stack:S??null,digest:g??null}}function cx(p,g){try{console.error(g.value)}catch(S){setTimeout(function(){throw S})}}var D8=typeof WeakMap=="function"?WeakMap:Map;function Xk(p,g,S){S=mi(-1,S),S.tag=3,S.payload={element:null};var M=g.value;return S.callback=function(){Gp||(Gp=!0,Mx=M),cx(p,g)},S}function Zk(p,g,S){S=mi(-1,S),S.tag=3;var M=p.type.getDerivedStateFromError;if(typeof M=="function"){var I=g.value;S.payload=function(){return M(I)},S.callback=function(){cx(p,g)}}var E=p.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(S.callback=function(){cx(p,g),typeof M!="function"&&(vo===null?vo=new Set([this]):vo.add(this));var j=g.stack;this.componentDidCatch(g.value,{componentStack:j!==null?j:""})}),S}function Kk(p,g,S){var M=p.pingCache;if(M===null){M=p.pingCache=new D8;var I=new Set;M.set(g,I)}else I=M.get(g),I===void 0&&(I=new Set,M.set(g,I));I.has(S)||(I.add(S),p=$8.bind(null,p,g,S),g.then(p,p))}function qk(p){do{var g;if((g=p.tag===13)&&(g=p.memoizedState,g=g!==null?g.dehydrated!==null:!0),g)return p;p=p.return}while(p!==null);return null}function Qk(p,g,S,M,I){return(p.mode&1)===0?(p===g?p.flags|=65536:(p.flags|=128,S.flags|=131072,S.flags&=-52805,S.tag===1&&(S.alternate===null?S.tag=17:(g=mi(-1,1),g.tag=2,ho(S,g,1))),S.lanes|=1),p):(p.flags|=65536,p.lanes=I,p)}var P8=C.ReactCurrentOwner,an=!1;function Yr(p,g,S,M){g.child=p===null?mk(g,null,S,M):ru(g,p.child,S,M)}function Jk(p,g,S,M,I){S=S.render;var E=g.ref;return au(g,I),M=tx(p,g,S,M,E,I),S=rx(),p!==null&&!an?(g.updateQueue=p.updateQueue,g.flags&=-2053,p.lanes&=~I,xi(p,g,I)):(Nt&&S&&B0(g),g.flags|=1,Yr(p,g,M,I),g.child)}function eL(p,g,S,M,I){if(p===null){var E=S.type;return typeof E=="function"&&!Rx(E)&&E.defaultProps===void 0&&S.compare===null&&S.defaultProps===void 0?(g.tag=15,g.type=E,tL(p,g,E,M,I)):(p=Xp(S.type,null,M,g,g.mode,I),p.ref=g.ref,p.return=g,g.child=p)}if(E=p.child,(p.lanes&I)===0){var j=E.memoizedProps;if(S=S.compare,S=S!==null?S:uf,S(j,M)&&p.ref===g.ref)return xi(p,g,I)}return g.flags|=1,p=xo(E,M),p.ref=g.ref,p.return=g,g.child=p}function tL(p,g,S,M,I){if(p!==null){var E=p.memoizedProps;if(uf(E,M)&&p.ref===g.ref)if(an=!1,g.pendingProps=M=E,(p.lanes&I)!==0)(p.flags&131072)!==0&&(an=!0);else return g.lanes=p.lanes,xi(p,g,I)}return fx(p,g,S,M,I)}function rL(p,g,S){var M=g.pendingProps,I=M.children,E=p!==null?p.memoizedState:null;if(M.mode==="hidden")if((g.mode&1)===0)g.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(lu,Sn),Sn|=S;else{if((S&1073741824)===0)return p=E!==null?E.baseLanes|S:S,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:p,cachePool:null,transitions:null},g.updateQueue=null,Rt(lu,Sn),Sn|=p,null;g.memoizedState={baseLanes:0,cachePool:null,transitions:null},M=E!==null?E.baseLanes:S,Rt(lu,Sn),Sn|=M}else E!==null?(M=E.baseLanes|S,g.memoizedState=null):M=S,Rt(lu,Sn),Sn|=M;return Yr(p,g,I,S),g.child}function nL(p,g){var S=g.ref;(p===null&&S!==null||p!==null&&p.ref!==S)&&(g.flags|=512,g.flags|=2097152)}function fx(p,g,S,M,I){var E=nn(S)?ds:Nr.current;return E=Ql(g,E),au(g,I),S=tx(p,g,S,M,E,I),M=rx(),p!==null&&!an?(g.updateQueue=p.updateQueue,g.flags&=-2053,p.lanes&=~I,xi(p,g,I)):(Nt&&M&&B0(g),g.flags|=1,Yr(p,g,S,I),g.child)}function aL(p,g,S,M,I){if(nn(S)){var E=!0;xp(g)}else E=!1;if(au(g,I),g.stateNode===null)Np(p,g),Uk(g,S,M),lx(g,S,M,I),M=!0;else if(p===null){var j=g.stateNode,q=g.memoizedProps;j.props=q;var J=j.context,oe=S.contextType;typeof oe=="object"&&oe!==null?oe=zn(oe):(oe=nn(S)?ds:Nr.current,oe=Ql(g,oe));var ve=S.getDerivedStateFromProps,me=typeof ve=="function"||typeof j.getSnapshotBeforeUpdate=="function";me||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(q!==M||J!==oe)&&Yk(g,j,M,oe),fo=!1;var de=g.memoizedState;j.state=de,Lp(g,M,j,I),J=g.memoizedState,q!==M||de!==J||rn.current||fo?(typeof ve=="function"&&(sx(g,S,ve,M),J=g.memoizedState),(q=fo||$k(g,S,q,M,de,J,oe))?(me||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(g.flags|=4194308)):(typeof j.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=M,g.memoizedState=J),j.props=M,j.state=J,j.context=oe,M=q):(typeof j.componentDidMount=="function"&&(g.flags|=4194308),M=!1)}else{j=g.stateNode,Sk(p,g),q=g.memoizedProps,oe=g.type===g.elementType?q:la(g.type,q),j.props=oe,me=g.pendingProps,de=j.context,J=S.contextType,typeof J=="object"&&J!==null?J=zn(J):(J=nn(S)?ds:Nr.current,J=Ql(g,J));var Oe=S.getDerivedStateFromProps;(ve=typeof Oe=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(q!==me||de!==J)&&Yk(g,j,M,J),fo=!1,de=g.memoizedState,j.state=de,Lp(g,M,j,I);var Fe=g.memoizedState;q!==me||de!==Fe||rn.current||fo?(typeof Oe=="function"&&(sx(g,S,Oe,M),Fe=g.memoizedState),(oe=fo||$k(g,S,oe,M,de,Fe,J)||!1)?(ve||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(M,Fe,J),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(M,Fe,J)),typeof j.componentDidUpdate=="function"&&(g.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof j.componentDidUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=1024),g.memoizedProps=M,g.memoizedState=Fe),j.props=M,j.state=Fe,j.context=J,M=oe):(typeof j.componentDidUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=1024),M=!1)}return dx(p,g,S,M,E,I)}function dx(p,g,S,M,I,E){nL(p,g);var j=(g.flags&128)!==0;if(!M&&!j)return I&&uk(g,S,!1),xi(p,g,E);M=g.stateNode,P8.current=g;var q=j&&typeof S.getDerivedStateFromError!="function"?null:M.render();return g.flags|=1,p!==null&&j?(g.child=ru(g,p.child,null,E),g.child=ru(g,null,q,E)):Yr(p,g,q,E),g.memoizedState=M.state,I&&uk(g,S,!0),g.child}function iL(p){var g=p.stateNode;g.pendingContext?sk(p,g.pendingContext,g.pendingContext!==g.context):g.context&&sk(p,g.context,!1),Z0(p,g.containerInfo)}function oL(p,g,S,M,I){return tu(),G0(I),g.flags|=256,Yr(p,g,S,M),g.child}var hx={dehydrated:null,treeContext:null,retryLane:0};function px(p){return{baseLanes:p,cachePool:null,transitions:null}}function sL(p,g,S){var M=g.pendingProps,I=jt.current,E=!1,j=(g.flags&128)!==0,q;if((q=j)||(q=p!==null&&p.memoizedState===null?!1:(I&2)!==0),q?(E=!0,g.flags&=-129):(p===null||p.memoizedState!==null)&&(I|=1),Rt(jt,I&1),p===null)return V0(g),p=g.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?((g.mode&1)===0?g.lanes=1:p.data==="$!"?g.lanes=8:g.lanes=1073741824,null):(j=M.children,p=M.fallback,E?(M=g.mode,E=g.child,j={mode:"hidden",children:j},(M&1)===0&&E!==null?(E.childLanes=0,E.pendingProps=j):E=Zp(j,M,0,null),p=bs(p,M,S,null),E.return=g,p.return=g,E.sibling=p,g.child=E,g.child.memoizedState=px(S),g.memoizedState=hx,p):vx(g,j));if(I=p.memoizedState,I!==null&&(q=I.dehydrated,q!==null))return R8(p,g,j,M,q,I,S);if(E){E=M.fallback,j=g.mode,I=p.child,q=I.sibling;var J={mode:"hidden",children:M.children};return(j&1)===0&&g.child!==I?(M=g.child,M.childLanes=0,M.pendingProps=J,g.deletions=null):(M=xo(I,J),M.subtreeFlags=I.subtreeFlags&14680064),q!==null?E=xo(q,E):(E=bs(E,j,S,null),E.flags|=2),E.return=g,M.return=g,M.sibling=E,g.child=M,M=E,E=g.child,j=p.child.memoizedState,j=j===null?px(S):{baseLanes:j.baseLanes|S,cachePool:null,transitions:j.transitions},E.memoizedState=j,E.childLanes=p.childLanes&~S,g.memoizedState=hx,M}return E=p.child,p=E.sibling,M=xo(E,{mode:"visible",children:M.children}),(g.mode&1)===0&&(M.lanes=S),M.return=g,M.sibling=null,p!==null&&(S=g.deletions,S===null?(g.deletions=[p],g.flags|=16):S.push(p)),g.child=M,g.memoizedState=null,M}function vx(p,g){return g=Zp({mode:"visible",children:g},p.mode,0,null),g.return=p,p.child=g}function Op(p,g,S,M){return M!==null&&G0(M),ru(g,p.child,null,S),p=vx(g,g.pendingProps.children),p.flags|=2,g.memoizedState=null,p}function R8(p,g,S,M,I,E,j){if(S)return g.flags&256?(g.flags&=-257,M=ux(Error(t(422))),Op(p,g,j,M)):g.memoizedState!==null?(g.child=p.child,g.flags|=128,null):(E=M.fallback,I=g.mode,M=Zp({mode:"visible",children:M.children},I,0,null),E=bs(E,I,j,null),E.flags|=2,M.return=g,E.return=g,M.sibling=E,g.child=M,(g.mode&1)!==0&&ru(g,p.child,null,j),g.child.memoizedState=px(j),g.memoizedState=hx,E);if((g.mode&1)===0)return Op(p,g,j,null);if(I.data==="$!"){if(M=I.nextSibling&&I.nextSibling.dataset,M)var q=M.dgst;return M=q,E=Error(t(419)),M=ux(E,M,void 0),Op(p,g,j,M)}if(q=(j&p.childLanes)!==0,an||q){if(M=xr,M!==null){switch(j&-j){case 4:I=2;break;case 16:I=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:I=32;break;case 536870912:I=268435456;break;default:I=0}I=(I&(M.suspendedLanes|j))!==0?0:I,I!==0&&I!==E.retryLane&&(E.retryLane=I,yi(p,I),fa(M,p,I,-1))}return Px(),M=ux(Error(t(421))),Op(p,g,j,M)}return I.data==="$?"?(g.flags|=128,g.child=p.child,g=U8.bind(null,p),I._reactRetry=g,null):(p=E.treeContext,xn=so(I.nextSibling),mn=g,Nt=!0,sa=null,p!==null&&(Rn[En++]=vi,Rn[En++]=gi,Rn[En++]=hs,vi=p.id,gi=p.overflow,hs=g),g=vx(g,M.children),g.flags|=4096,g)}function lL(p,g,S){p.lanes|=g;var M=p.alternate;M!==null&&(M.lanes|=g),U0(p.return,g,S)}function gx(p,g,S,M,I){var E=p.memoizedState;E===null?p.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:M,tail:S,tailMode:I}:(E.isBackwards=g,E.rendering=null,E.renderingStartTime=0,E.last=M,E.tail=S,E.tailMode=I)}function uL(p,g,S){var M=g.pendingProps,I=M.revealOrder,E=M.tail;if(Yr(p,g,M.children,S),M=jt.current,(M&2)!==0)M=M&1|2,g.flags|=128;else{if(p!==null&&(p.flags&128)!==0)e:for(p=g.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&lL(p,S,g);else if(p.tag===19)lL(p,S,g);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===g)break e;for(;p.sibling===null;){if(p.return===null||p.return===g)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}M&=1}if(Rt(jt,M),(g.mode&1)===0)g.memoizedState=null;else switch(I){case"forwards":for(S=g.child,I=null;S!==null;)p=S.alternate,p!==null&&Ap(p)===null&&(I=S),S=S.sibling;S=I,S===null?(I=g.child,g.child=null):(I=S.sibling,S.sibling=null),gx(g,!1,I,S,E);break;case"backwards":for(S=null,I=g.child,g.child=null;I!==null;){if(p=I.alternate,p!==null&&Ap(p)===null){g.child=I;break}p=I.sibling,I.sibling=S,S=I,I=p}gx(g,!0,S,null,E);break;case"together":gx(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function Np(p,g){(g.mode&1)===0&&p!==null&&(p.alternate=null,g.alternate=null,g.flags|=2)}function xi(p,g,S){if(p!==null&&(g.dependencies=p.dependencies),ms|=g.lanes,(S&g.childLanes)===0)return null;if(p!==null&&g.child!==p.child)throw Error(t(153));if(g.child!==null){for(p=g.child,S=xo(p,p.pendingProps),g.child=S,S.return=g;p.sibling!==null;)p=p.sibling,S=S.sibling=xo(p,p.pendingProps),S.return=g;S.sibling=null}return g.child}function E8(p,g,S){switch(g.tag){case 3:iL(g),tu();break;case 5:wk(g);break;case 1:nn(g.type)&&xp(g);break;case 4:Z0(g,g.stateNode.containerInfo);break;case 10:var M=g.type._context,I=g.memoizedProps.value;Rt(Cp,M._currentValue),M._currentValue=I;break;case 13:if(M=g.memoizedState,M!==null)return M.dehydrated!==null?(Rt(jt,jt.current&1),g.flags|=128,null):(S&g.child.childLanes)!==0?sL(p,g,S):(Rt(jt,jt.current&1),p=xi(p,g,S),p!==null?p.sibling:null);Rt(jt,jt.current&1);break;case 19:if(M=(S&g.childLanes)!==0,(p.flags&128)!==0){if(M)return uL(p,g,S);g.flags|=128}if(I=g.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Rt(jt,jt.current),M)break;return null;case 22:case 23:return g.lanes=0,rL(p,g,S)}return xi(p,g,S)}var cL,yx,fL,dL;cL=function(p,g){for(var S=g.child;S!==null;){if(S.tag===5||S.tag===6)p.appendChild(S.stateNode);else if(S.tag!==4&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===g)break;for(;S.sibling===null;){if(S.return===null||S.return===g)return;S=S.return}S.sibling.return=S.return,S=S.sibling}},yx=function(){},fL=function(p,g,S,M){var I=p.memoizedProps;if(I!==M){p=g.stateNode,gs(Da.current);var E=null;switch(S){case"input":I=ke(p,I),M=ke(p,M),E=[];break;case"select":I=K({},I,{value:void 0}),M=K({},M,{value:void 0}),E=[];break;case"textarea":I=us(p,I),M=us(p,M),E=[];break;default:typeof I.onClick!="function"&&typeof M.onClick=="function"&&(p.onclick=gp)}qm(S,M);var j;S=null;for(oe in I)if(!M.hasOwnProperty(oe)&&I.hasOwnProperty(oe)&&I[oe]!=null)if(oe==="style"){var q=I[oe];for(j in q)q.hasOwnProperty(j)&&(S||(S={}),S[j]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(a.hasOwnProperty(oe)?E||(E=[]):(E=E||[]).push(oe,null));for(oe in M){var J=M[oe];if(q=I?.[oe],M.hasOwnProperty(oe)&&J!==q&&(J!=null||q!=null))if(oe==="style")if(q){for(j in q)!q.hasOwnProperty(j)||J&&J.hasOwnProperty(j)||(S||(S={}),S[j]="");for(j in J)J.hasOwnProperty(j)&&q[j]!==J[j]&&(S||(S={}),S[j]=J[j])}else S||(E||(E=[]),E.push(oe,S)),S=J;else oe==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,q=q?q.__html:void 0,J!=null&&q!==J&&(E=E||[]).push(oe,J)):oe==="children"?typeof J!="string"&&typeof J!="number"||(E=E||[]).push(oe,""+J):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(a.hasOwnProperty(oe)?(J!=null&&oe==="onScroll"&&zt("scroll",p),E||q===J||(E=[])):(E=E||[]).push(oe,J))}S&&(E=E||[]).push("style",S);var oe=E;(g.updateQueue=oe)&&(g.flags|=4)}},dL=function(p,g,S,M){S!==M&&(g.flags|=4)};function Tf(p,g){if(!Nt)switch(p.tailMode){case"hidden":g=p.tail;for(var S=null;g!==null;)g.alternate!==null&&(S=g),g=g.sibling;S===null?p.tail=null:S.sibling=null;break;case"collapsed":S=p.tail;for(var M=null;S!==null;)S.alternate!==null&&(M=S),S=S.sibling;M===null?g||p.tail===null?p.tail=null:p.tail.sibling=null:M.sibling=null}}function jr(p){var g=p.alternate!==null&&p.alternate.child===p.child,S=0,M=0;if(g)for(var I=p.child;I!==null;)S|=I.lanes|I.childLanes,M|=I.subtreeFlags&14680064,M|=I.flags&14680064,I.return=p,I=I.sibling;else for(I=p.child;I!==null;)S|=I.lanes|I.childLanes,M|=I.subtreeFlags,M|=I.flags,I.return=p,I=I.sibling;return p.subtreeFlags|=M,p.childLanes=S,g}function z8(p,g,S){var M=g.pendingProps;switch(j0(g),g.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jr(g),null;case 1:return nn(g.type)&&mp(),jr(g),null;case 3:return M=g.stateNode,iu(),Ot(rn),Ot(Nr),Q0(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(p===null||p.child===null)&&(wp(g)?g.flags|=4:p===null||p.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,sa!==null&&(Ax(sa),sa=null))),yx(p,g),jr(g),null;case 5:K0(g);var I=gs(xf.current);if(S=g.type,p!==null&&g.stateNode!=null)fL(p,g,S,M,I),p.ref!==g.ref&&(g.flags|=512,g.flags|=2097152);else{if(!M){if(g.stateNode===null)throw Error(t(166));return jr(g),null}if(p=gs(Da.current),wp(g)){M=g.stateNode,S=g.type;var E=g.memoizedProps;switch(M[Ia]=g,M[pf]=E,p=(g.mode&1)!==0,S){case"dialog":zt("cancel",M),zt("close",M);break;case"iframe":case"object":case"embed":zt("load",M);break;case"video":case"audio":for(I=0;I<ff.length;I++)zt(ff[I],M);break;case"source":zt("error",M);break;case"img":case"image":case"link":zt("error",M),zt("load",M);break;case"details":zt("toggle",M);break;case"input":$e(M,E),zt("invalid",M);break;case"select":M._wrapperState={wasMultiple:!!E.multiple},zt("invalid",M);break;case"textarea":Z2(M,E),zt("invalid",M)}qm(S,E),I=null;for(var j in E)if(E.hasOwnProperty(j)){var q=E[j];j==="children"?typeof q=="string"?M.textContent!==q&&(E.suppressHydrationWarning!==!0&&vp(M.textContent,q,p),I=["children",q]):typeof q=="number"&&M.textContent!==""+q&&(E.suppressHydrationWarning!==!0&&vp(M.textContent,q,p),I=["children",""+q]):a.hasOwnProperty(j)&&q!=null&&j==="onScroll"&&zt("scroll",M)}switch(S){case"input":xe(M),Or(M,E,!0);break;case"textarea":xe(M),q2(M);break;case"select":case"option":break;default:typeof E.onClick=="function"&&(M.onclick=gp)}M=I,g.updateQueue=M,M!==null&&(g.flags|=4)}else{j=I.nodeType===9?I:I.ownerDocument,p==="http://www.w3.org/1999/xhtml"&&(p=Q2(S)),p==="http://www.w3.org/1999/xhtml"?S==="script"?(p=j.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild)):typeof M.is=="string"?p=j.createElement(S,{is:M.is}):(p=j.createElement(S),S==="select"&&(j=p,M.multiple?j.multiple=!0:M.size&&(j.size=M.size))):p=j.createElementNS(p,S),p[Ia]=g,p[pf]=M,cL(p,g,!1,!1),g.stateNode=p;e:{switch(j=Qm(S,M),S){case"dialog":zt("cancel",p),zt("close",p),I=M;break;case"iframe":case"object":case"embed":zt("load",p),I=M;break;case"video":case"audio":for(I=0;I<ff.length;I++)zt(ff[I],p);I=M;break;case"source":zt("error",p),I=M;break;case"img":case"image":case"link":zt("error",p),zt("load",p),I=M;break;case"details":zt("toggle",p),I=M;break;case"input":$e(p,M),I=ke(p,M),zt("invalid",p);break;case"option":I=M;break;case"select":p._wrapperState={wasMultiple:!!M.multiple},I=K({},M,{value:void 0}),zt("invalid",p);break;case"textarea":Z2(p,M),I=us(p,M),zt("invalid",p);break;default:I=M}qm(S,I),q=I;for(E in q)if(q.hasOwnProperty(E)){var J=q[E];E==="style"?tM(p,J):E==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&J2(p,J)):E==="children"?typeof J=="string"?(S!=="textarea"||J!=="")&&$c(p,J):typeof J=="number"&&$c(p,""+J):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(a.hasOwnProperty(E)?J!=null&&E==="onScroll"&&zt("scroll",p):J!=null&&T(p,E,J,j))}switch(S){case"input":xe(p),Or(p,M,!1);break;case"textarea":xe(p),q2(p);break;case"option":M.value!=null&&p.setAttribute("value",""+ye(M.value));break;case"select":p.multiple=!!M.multiple,E=M.value,E!=null?gn(p,!!M.multiple,E,!1):M.defaultValue!=null&&gn(p,!!M.multiple,M.defaultValue,!0);break;default:typeof I.onClick=="function"&&(p.onclick=gp)}switch(S){case"button":case"input":case"select":case"textarea":M=!!M.autoFocus;break e;case"img":M=!0;break e;default:M=!1}}M&&(g.flags|=4)}g.ref!==null&&(g.flags|=512,g.flags|=2097152)}return jr(g),null;case 6:if(p&&g.stateNode!=null)dL(p,g,p.memoizedProps,M);else{if(typeof M!="string"&&g.stateNode===null)throw Error(t(166));if(S=gs(xf.current),gs(Da.current),wp(g)){if(M=g.stateNode,S=g.memoizedProps,M[Ia]=g,(E=M.nodeValue!==S)&&(p=mn,p!==null))switch(p.tag){case 3:vp(M.nodeValue,S,(p.mode&1)!==0);break;case 5:p.memoizedProps.suppressHydrationWarning!==!0&&vp(M.nodeValue,S,(p.mode&1)!==0)}E&&(g.flags|=4)}else M=(S.nodeType===9?S:S.ownerDocument).createTextNode(M),M[Ia]=g,g.stateNode=M}return jr(g),null;case 13:if(Ot(jt),M=g.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(Nt&&xn!==null&&(g.mode&1)!==0&&(g.flags&128)===0)vk(),tu(),g.flags|=98560,E=!1;else if(E=wp(g),M!==null&&M.dehydrated!==null){if(p===null){if(!E)throw Error(t(318));if(E=g.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(t(317));E[Ia]=g}else tu(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;jr(g),E=!1}else sa!==null&&(Ax(sa),sa=null),E=!0;if(!E)return g.flags&65536?g:null}return(g.flags&128)!==0?(g.lanes=S,g):(M=M!==null,M!==(p!==null&&p.memoizedState!==null)&&M&&(g.child.flags|=8192,(g.mode&1)!==0&&(p===null||(jt.current&1)!==0?cr===0&&(cr=3):Px())),g.updateQueue!==null&&(g.flags|=4),jr(g),null);case 4:return iu(),yx(p,g),p===null&&df(g.stateNode.containerInfo),jr(g),null;case 10:return $0(g.type._context),jr(g),null;case 17:return nn(g.type)&&mp(),jr(g),null;case 19:if(Ot(jt),E=g.memoizedState,E===null)return jr(g),null;if(M=(g.flags&128)!==0,j=E.rendering,j===null)if(M)Tf(E,!1);else{if(cr!==0||p!==null&&(p.flags&128)!==0)for(p=g.child;p!==null;){if(j=Ap(p),j!==null){for(g.flags|=128,Tf(E,!1),M=j.updateQueue,M!==null&&(g.updateQueue=M,g.flags|=4),g.subtreeFlags=0,M=S,S=g.child;S!==null;)E=S,p=M,E.flags&=14680066,j=E.alternate,j===null?(E.childLanes=0,E.lanes=p,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=j.childLanes,E.lanes=j.lanes,E.child=j.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=j.memoizedProps,E.memoizedState=j.memoizedState,E.updateQueue=j.updateQueue,E.type=j.type,p=j.dependencies,E.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext}),S=S.sibling;return Rt(jt,jt.current&1|2),g.child}p=p.sibling}E.tail!==null&&qt()>uu&&(g.flags|=128,M=!0,Tf(E,!1),g.lanes=4194304)}else{if(!M)if(p=Ap(j),p!==null){if(g.flags|=128,M=!0,S=p.updateQueue,S!==null&&(g.updateQueue=S,g.flags|=4),Tf(E,!0),E.tail===null&&E.tailMode==="hidden"&&!j.alternate&&!Nt)return jr(g),null}else 2*qt()-E.renderingStartTime>uu&&S!==1073741824&&(g.flags|=128,M=!0,Tf(E,!1),g.lanes=4194304);E.isBackwards?(j.sibling=g.child,g.child=j):(S=E.last,S!==null?S.sibling=j:g.child=j,E.last=j)}return E.tail!==null?(g=E.tail,E.rendering=g,E.tail=g.sibling,E.renderingStartTime=qt(),g.sibling=null,S=jt.current,Rt(jt,M?S&1|2:S&1),g):(jr(g),null);case 22:case 23:return Dx(),M=g.memoizedState!==null,p!==null&&p.memoizedState!==null!==M&&(g.flags|=8192),M&&(g.mode&1)!==0?(Sn&1073741824)!==0&&(jr(g),g.subtreeFlags&6&&(g.flags|=8192)):jr(g),null;case 24:return null;case 25:return null}throw Error(t(156,g.tag))}function O8(p,g){switch(j0(g),g.tag){case 1:return nn(g.type)&&mp(),p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 3:return iu(),Ot(rn),Ot(Nr),Q0(),p=g.flags,(p&65536)!==0&&(p&128)===0?(g.flags=p&-65537|128,g):null;case 5:return K0(g),null;case 13:if(Ot(jt),p=g.memoizedState,p!==null&&p.dehydrated!==null){if(g.alternate===null)throw Error(t(340));tu()}return p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 19:return Ot(jt),null;case 4:return iu(),null;case 10:return $0(g.type._context),null;case 22:case 23:return Dx(),null;case 24:return null;default:return null}}var Bp=!1,Fr=!1,N8=typeof WeakSet=="function"?WeakSet:Set,je=null;function su(p,g){var S=p.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(M){Ht(p,g,M)}else S.current=null}function mx(p,g,S){try{S()}catch(M){Ht(p,g,M)}}var hL=!1;function B8(p,g){if(I0=ap,p=$M(),b0(p)){if("selectionStart"in p)var S={start:p.selectionStart,end:p.selectionEnd};else e:{S=(S=p.ownerDocument)&&S.defaultView||window;var M=S.getSelection&&S.getSelection();if(M&&M.rangeCount!==0){S=M.anchorNode;var I=M.anchorOffset,E=M.focusNode;M=M.focusOffset;try{S.nodeType,E.nodeType}catch{S=null;break e}var j=0,q=-1,J=-1,oe=0,ve=0,me=p,de=null;t:for(;;){for(var Oe;me!==S||I!==0&&me.nodeType!==3||(q=j+I),me!==E||M!==0&&me.nodeType!==3||(J=j+M),me.nodeType===3&&(j+=me.nodeValue.length),(Oe=me.firstChild)!==null;)de=me,me=Oe;for(;;){if(me===p)break t;if(de===S&&++oe===I&&(q=j),de===E&&++ve===M&&(J=j),(Oe=me.nextSibling)!==null)break;me=de,de=me.parentNode}me=Oe}S=q===-1||J===-1?null:{start:q,end:J}}else S=null}S=S||{start:0,end:0}}else S=null;for(D0={focusedElem:p,selectionRange:S},ap=!1,je=g;je!==null;)if(g=je,p=g.child,(g.subtreeFlags&1028)!==0&&p!==null)p.return=g,je=p;else for(;je!==null;){g=je;try{var Fe=g.alternate;if((g.flags&1024)!==0)switch(g.tag){case 0:case 11:case 15:break;case 1:if(Fe!==null){var Ve=Fe.memoizedProps,Qt=Fe.memoizedState,re=g.stateNode,te=re.getSnapshotBeforeUpdate(g.elementType===g.type?Ve:la(g.type,Ve),Qt);re.__reactInternalSnapshotBeforeUpdate=te}break;case 3:var ie=g.stateNode.containerInfo;ie.nodeType===1?ie.textContent="":ie.nodeType===9&&ie.documentElement&&ie.removeChild(ie.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(_e){Ht(g,g.return,_e)}if(p=g.sibling,p!==null){p.return=g.return,je=p;break}je=g.return}return Fe=hL,hL=!1,Fe}function Cf(p,g,S){var M=g.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var I=M=M.next;do{if((I.tag&p)===p){var E=I.destroy;I.destroy=void 0,E!==void 0&&mx(g,S,E)}I=I.next}while(I!==M)}}function jp(p,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var S=g=g.next;do{if((S.tag&p)===p){var M=S.create;S.destroy=M()}S=S.next}while(S!==g)}}function xx(p){var g=p.ref;if(g!==null){var S=p.stateNode;switch(p.tag){case 5:p=S;break;default:p=S}typeof g=="function"?g(p):g.current=p}}function pL(p){var g=p.alternate;g!==null&&(p.alternate=null,pL(g)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(g=p.stateNode,g!==null&&(delete g[Ia],delete g[pf],delete g[z0],delete g[S8],delete g[_8])),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function vL(p){return p.tag===5||p.tag===3||p.tag===4}function gL(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||vL(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function Sx(p,g,S){var M=p.tag;if(M===5||M===6)p=p.stateNode,g?S.nodeType===8?S.parentNode.insertBefore(p,g):S.insertBefore(p,g):(S.nodeType===8?(g=S.parentNode,g.insertBefore(p,S)):(g=S,g.appendChild(p)),S=S._reactRootContainer,S!=null||g.onclick!==null||(g.onclick=gp));else if(M!==4&&(p=p.child,p!==null))for(Sx(p,g,S),p=p.sibling;p!==null;)Sx(p,g,S),p=p.sibling}function _x(p,g,S){var M=p.tag;if(M===5||M===6)p=p.stateNode,g?S.insertBefore(p,g):S.appendChild(p);else if(M!==4&&(p=p.child,p!==null))for(_x(p,g,S),p=p.sibling;p!==null;)_x(p,g,S),p=p.sibling}var kr=null,ua=!1;function po(p,g,S){for(S=S.child;S!==null;)yL(p,g,S),S=S.sibling}function yL(p,g,S){if(Aa&&typeof Aa.onCommitFiberUnmount=="function")try{Aa.onCommitFiberUnmount(Qh,S)}catch{}switch(S.tag){case 5:Fr||su(S,g);case 6:var M=kr,I=ua;kr=null,po(p,g,S),kr=M,ua=I,kr!==null&&(ua?(p=kr,S=S.stateNode,p.nodeType===8?p.parentNode.removeChild(S):p.removeChild(S)):kr.removeChild(S.stateNode));break;case 18:kr!==null&&(ua?(p=kr,S=S.stateNode,p.nodeType===8?E0(p.parentNode,S):p.nodeType===1&&E0(p,S),rf(p)):E0(kr,S.stateNode));break;case 4:M=kr,I=ua,kr=S.stateNode.containerInfo,ua=!0,po(p,g,S),kr=M,ua=I;break;case 0:case 11:case 14:case 15:if(!Fr&&(M=S.updateQueue,M!==null&&(M=M.lastEffect,M!==null))){I=M=M.next;do{var E=I,j=E.destroy;E=E.tag,j!==void 0&&((E&2)!==0||(E&4)!==0)&&mx(S,g,j),I=I.next}while(I!==M)}po(p,g,S);break;case 1:if(!Fr&&(su(S,g),M=S.stateNode,typeof M.componentWillUnmount=="function"))try{M.props=S.memoizedProps,M.state=S.memoizedState,M.componentWillUnmount()}catch(q){Ht(S,g,q)}po(p,g,S);break;case 21:po(p,g,S);break;case 22:S.mode&1?(Fr=(M=Fr)||S.memoizedState!==null,po(p,g,S),Fr=M):po(p,g,S);break;default:po(p,g,S)}}function mL(p){var g=p.updateQueue;if(g!==null){p.updateQueue=null;var S=p.stateNode;S===null&&(S=p.stateNode=new N8),g.forEach(function(M){var I=Y8.bind(null,p,M);S.has(M)||(S.add(M),M.then(I,I))})}}function ca(p,g){var S=g.deletions;if(S!==null)for(var M=0;M<S.length;M++){var I=S[M];try{var E=p,j=g,q=j;e:for(;q!==null;){switch(q.tag){case 5:kr=q.stateNode,ua=!1;break e;case 3:kr=q.stateNode.containerInfo,ua=!0;break e;case 4:kr=q.stateNode.containerInfo,ua=!0;break e}q=q.return}if(kr===null)throw Error(t(160));yL(E,j,I),kr=null,ua=!1;var J=I.alternate;J!==null&&(J.return=null),I.return=null}catch(oe){Ht(I,g,oe)}}if(g.subtreeFlags&12854)for(g=g.child;g!==null;)xL(g,p),g=g.sibling}function xL(p,g){var S=p.alternate,M=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:if(ca(g,p),Ra(p),M&4){try{Cf(3,p,p.return),jp(3,p)}catch(Ve){Ht(p,p.return,Ve)}try{Cf(5,p,p.return)}catch(Ve){Ht(p,p.return,Ve)}}break;case 1:ca(g,p),Ra(p),M&512&&S!==null&&su(S,S.return);break;case 5:if(ca(g,p),Ra(p),M&512&&S!==null&&su(S,S.return),p.flags&32){var I=p.stateNode;try{$c(I,"")}catch(Ve){Ht(p,p.return,Ve)}}if(M&4&&(I=p.stateNode,I!=null)){var E=p.memoizedProps,j=S!==null?S.memoizedProps:E,q=p.type,J=p.updateQueue;if(p.updateQueue=null,J!==null)try{q==="input"&&E.type==="radio"&&E.name!=null&&tt(I,E),Qm(q,j);var oe=Qm(q,E);for(j=0;j<J.length;j+=2){var ve=J[j],me=J[j+1];ve==="style"?tM(I,me):ve==="dangerouslySetInnerHTML"?J2(I,me):ve==="children"?$c(I,me):T(I,ve,me,oe)}switch(q){case"input":bt(I,E);break;case"textarea":K2(I,E);break;case"select":var de=I._wrapperState.wasMultiple;I._wrapperState.wasMultiple=!!E.multiple;var Oe=E.value;Oe!=null?gn(I,!!E.multiple,Oe,!1):de!==!!E.multiple&&(E.defaultValue!=null?gn(I,!!E.multiple,E.defaultValue,!0):gn(I,!!E.multiple,E.multiple?[]:"",!1))}I[pf]=E}catch(Ve){Ht(p,p.return,Ve)}}break;case 6:if(ca(g,p),Ra(p),M&4){if(p.stateNode===null)throw Error(t(162));I=p.stateNode,E=p.memoizedProps;try{I.nodeValue=E}catch(Ve){Ht(p,p.return,Ve)}}break;case 3:if(ca(g,p),Ra(p),M&4&&S!==null&&S.memoizedState.isDehydrated)try{rf(g.containerInfo)}catch(Ve){Ht(p,p.return,Ve)}break;case 4:ca(g,p),Ra(p);break;case 13:ca(g,p),Ra(p),I=p.child,I.flags&8192&&(E=I.memoizedState!==null,I.stateNode.isHidden=E,!E||I.alternate!==null&&I.alternate.memoizedState!==null||(Cx=qt())),M&4&&mL(p);break;case 22:if(ve=S!==null&&S.memoizedState!==null,p.mode&1?(Fr=(oe=Fr)||ve,ca(g,p),Fr=oe):ca(g,p),Ra(p),M&8192){if(oe=p.memoizedState!==null,(p.stateNode.isHidden=oe)&&!ve&&(p.mode&1)!==0)for(je=p,ve=p.child;ve!==null;){for(me=je=ve;je!==null;){switch(de=je,Oe=de.child,de.tag){case 0:case 11:case 14:case 15:Cf(4,de,de.return);break;case 1:su(de,de.return);var Fe=de.stateNode;if(typeof Fe.componentWillUnmount=="function"){M=de,S=de.return;try{g=M,Fe.props=g.memoizedProps,Fe.state=g.memoizedState,Fe.componentWillUnmount()}catch(Ve){Ht(M,S,Ve)}}break;case 5:su(de,de.return);break;case 22:if(de.memoizedState!==null){bL(me);continue}}Oe!==null?(Oe.return=de,je=Oe):bL(me)}ve=ve.sibling}e:for(ve=null,me=p;;){if(me.tag===5){if(ve===null){ve=me;try{I=me.stateNode,oe?(E=I.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none"):(q=me.stateNode,J=me.memoizedProps.style,j=J!=null&&J.hasOwnProperty("display")?J.display:null,q.style.display=eM("display",j))}catch(Ve){Ht(p,p.return,Ve)}}}else if(me.tag===6){if(ve===null)try{me.stateNode.nodeValue=oe?"":me.memoizedProps}catch(Ve){Ht(p,p.return,Ve)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===p)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===p)break e;for(;me.sibling===null;){if(me.return===null||me.return===p)break e;ve===me&&(ve=null),me=me.return}ve===me&&(ve=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:ca(g,p),Ra(p),M&4&&mL(p);break;case 21:break;default:ca(g,p),Ra(p)}}function Ra(p){var g=p.flags;if(g&2){try{e:{for(var S=p.return;S!==null;){if(vL(S)){var M=S;break e}S=S.return}throw Error(t(160))}switch(M.tag){case 5:var I=M.stateNode;M.flags&32&&($c(I,""),M.flags&=-33);var E=gL(p);_x(p,E,I);break;case 3:case 4:var j=M.stateNode.containerInfo,q=gL(p);Sx(p,q,j);break;default:throw Error(t(161))}}catch(J){Ht(p,p.return,J)}p.flags&=-3}g&4096&&(p.flags&=-4097)}function j8(p,g,S){je=p,SL(p)}function SL(p,g,S){for(var M=(p.mode&1)!==0;je!==null;){var I=je,E=I.child;if(I.tag===22&&M){var j=I.memoizedState!==null||Bp;if(!j){var q=I.alternate,J=q!==null&&q.memoizedState!==null||Fr;q=Bp;var oe=Fr;if(Bp=j,(Fr=J)&&!oe)for(je=I;je!==null;)j=je,J=j.child,j.tag===22&&j.memoizedState!==null?wL(I):J!==null?(J.return=j,je=J):wL(I);for(;E!==null;)je=E,SL(E),E=E.sibling;je=I,Bp=q,Fr=oe}_L(p)}else(I.subtreeFlags&8772)!==0&&E!==null?(E.return=I,je=E):_L(p)}}function _L(p){for(;je!==null;){var g=je;if((g.flags&8772)!==0){var S=g.alternate;try{if((g.flags&8772)!==0)switch(g.tag){case 0:case 11:case 15:Fr||jp(5,g);break;case 1:var M=g.stateNode;if(g.flags&4&&!Fr)if(S===null)M.componentDidMount();else{var I=g.elementType===g.type?S.memoizedProps:la(g.type,S.memoizedProps);M.componentDidUpdate(I,S.memoizedState,M.__reactInternalSnapshotBeforeUpdate)}var E=g.updateQueue;E!==null&&bk(g,E,M);break;case 3:var j=g.updateQueue;if(j!==null){if(S=null,g.child!==null)switch(g.child.tag){case 5:S=g.child.stateNode;break;case 1:S=g.child.stateNode}bk(g,j,S)}break;case 5:var q=g.stateNode;if(S===null&&g.flags&4){S=q;var J=g.memoizedProps;switch(g.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&S.focus();break;case"img":J.src&&(S.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(g.memoizedState===null){var oe=g.alternate;if(oe!==null){var ve=oe.memoizedState;if(ve!==null){var me=ve.dehydrated;me!==null&&rf(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Fr||g.flags&512&&xx(g)}catch(de){Ht(g,g.return,de)}}if(g===p){je=null;break}if(S=g.sibling,S!==null){S.return=g.return,je=S;break}je=g.return}}function bL(p){for(;je!==null;){var g=je;if(g===p){je=null;break}var S=g.sibling;if(S!==null){S.return=g.return,je=S;break}je=g.return}}function wL(p){for(;je!==null;){var g=je;try{switch(g.tag){case 0:case 11:case 15:var S=g.return;try{jp(4,g)}catch(J){Ht(g,S,J)}break;case 1:var M=g.stateNode;if(typeof M.componentDidMount=="function"){var I=g.return;try{M.componentDidMount()}catch(J){Ht(g,I,J)}}var E=g.return;try{xx(g)}catch(J){Ht(g,E,J)}break;case 5:var j=g.return;try{xx(g)}catch(J){Ht(g,j,J)}}}catch(J){Ht(g,g.return,J)}if(g===p){je=null;break}var q=g.sibling;if(q!==null){q.return=g.return,je=q;break}je=g.return}}var F8=Math.ceil,Fp=C.ReactCurrentDispatcher,bx=C.ReactCurrentOwner,Nn=C.ReactCurrentBatchConfig,xt=0,xr=null,nr=null,Lr=0,Sn=0,lu=lo(0),cr=0,Mf=null,ms=0,Vp=0,Tx=0,kf=null,on=null,Cx=0,uu=1/0,Si=null,Gp=!1,Mx=null,vo=null,Wp=!1,go=null,Hp=0,Lf=0,kx=null,$p=-1,Up=0;function Xr(){return(xt&6)!==0?qt():$p!==-1?$p:$p=qt()}function yo(p){return(p.mode&1)===0?1:(xt&2)!==0&&Lr!==0?Lr&-Lr:w8.transition!==null?(Up===0&&(Up=gM()),Up):(p=kt,p!==0||(p=window.event,p=p===void 0?16:CM(p.type)),p)}function fa(p,g,S,M){if(50<Lf)throw Lf=0,kx=null,Error(t(185));qc(p,S,M),((xt&2)===0||p!==xr)&&(p===xr&&((xt&2)===0&&(Vp|=S),cr===4&&mo(p,Lr)),sn(p,M),S===1&&xt===0&&(g.mode&1)===0&&(uu=qt()+500,Sp&&co()))}function sn(p,g){var S=p.callbackNode;wV(p,g);var M=tp(p,p===xr?Lr:0);if(M===0)S!==null&&hM(S),p.callbackNode=null,p.callbackPriority=0;else if(g=M&-M,p.callbackPriority!==g){if(S!=null&&hM(S),g===1)p.tag===0?b8(CL.bind(null,p)):ck(CL.bind(null,p)),m8(function(){(xt&6)===0&&co()}),S=null;else{switch(yM(M)){case 1:S=i0;break;case 4:S=pM;break;case 16:S=qh;break;case 536870912:S=vM;break;default:S=qh}S=RL(S,TL.bind(null,p))}p.callbackPriority=g,p.callbackNode=S}}function TL(p,g){if($p=-1,Up=0,(xt&6)!==0)throw Error(t(327));var S=p.callbackNode;if(cu()&&p.callbackNode!==S)return null;var M=tp(p,p===xr?Lr:0);if(M===0)return null;if((M&30)!==0||(M&p.expiredLanes)!==0||g)g=Yp(p,M);else{g=M;var I=xt;xt|=2;var E=kL();(xr!==p||Lr!==g)&&(Si=null,uu=qt()+500,Ss(p,g));do try{W8();break}catch(q){ML(p,q)}while(!0);H0(),Fp.current=E,xt=I,nr!==null?g=0:(xr=null,Lr=0,g=cr)}if(g!==0){if(g===2&&(I=o0(p),I!==0&&(M=I,g=Lx(p,I))),g===1)throw S=Mf,Ss(p,0),mo(p,M),sn(p,qt()),S;if(g===6)mo(p,M);else{if(I=p.current.alternate,(M&30)===0&&!V8(I)&&(g=Yp(p,M),g===2&&(E=o0(p),E!==0&&(M=E,g=Lx(p,E))),g===1))throw S=Mf,Ss(p,0),mo(p,M),sn(p,qt()),S;switch(p.finishedWork=I,p.finishedLanes=M,g){case 0:case 1:throw Error(t(345));case 2:_s(p,on,Si);break;case 3:if(mo(p,M),(M&130023424)===M&&(g=Cx+500-qt(),10<g)){if(tp(p,0)!==0)break;if(I=p.suspendedLanes,(I&M)!==M){Xr(),p.pingedLanes|=p.suspendedLanes&I;break}p.timeoutHandle=R0(_s.bind(null,p,on,Si),g);break}_s(p,on,Si);break;case 4:if(mo(p,M),(M&4194240)===M)break;for(g=p.eventTimes,I=-1;0<M;){var j=31-ia(M);E=1<<j,j=g[j],j>I&&(I=j),M&=~E}if(M=I,M=qt()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*F8(M/1960))-M,10<M){p.timeoutHandle=R0(_s.bind(null,p,on,Si),M);break}_s(p,on,Si);break;case 5:_s(p,on,Si);break;default:throw Error(t(329))}}}return sn(p,qt()),p.callbackNode===S?TL.bind(null,p):null}function Lx(p,g){var S=kf;return p.current.memoizedState.isDehydrated&&(Ss(p,g).flags|=256),p=Yp(p,g),p!==2&&(g=on,on=S,g!==null&&Ax(g)),p}function Ax(p){on===null?on=p:on.push.apply(on,p)}function V8(p){for(var g=p;;){if(g.flags&16384){var S=g.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var M=0;M<S.length;M++){var I=S[M],E=I.getSnapshot;I=I.value;try{if(!oa(E(),I))return!1}catch{return!1}}}if(S=g.child,g.subtreeFlags&16384&&S!==null)S.return=g,g=S;else{if(g===p)break;for(;g.sibling===null;){if(g.return===null||g.return===p)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function mo(p,g){for(g&=~Tx,g&=~Vp,p.suspendedLanes|=g,p.pingedLanes&=~g,p=p.expirationTimes;0<g;){var S=31-ia(g),M=1<<S;p[S]=-1,g&=~M}}function CL(p){if((xt&6)!==0)throw Error(t(327));cu();var g=tp(p,0);if((g&1)===0)return sn(p,qt()),null;var S=Yp(p,g);if(p.tag!==0&&S===2){var M=o0(p);M!==0&&(g=M,S=Lx(p,M))}if(S===1)throw S=Mf,Ss(p,0),mo(p,g),sn(p,qt()),S;if(S===6)throw Error(t(345));return p.finishedWork=p.current.alternate,p.finishedLanes=g,_s(p,on,Si),sn(p,qt()),null}function Ix(p,g){var S=xt;xt|=1;try{return p(g)}finally{xt=S,xt===0&&(uu=qt()+500,Sp&&co())}}function xs(p){go!==null&&go.tag===0&&(xt&6)===0&&cu();var g=xt;xt|=1;var S=Nn.transition,M=kt;try{if(Nn.transition=null,kt=1,p)return p()}finally{kt=M,Nn.transition=S,xt=g,(xt&6)===0&&co()}}function Dx(){Sn=lu.current,Ot(lu)}function Ss(p,g){p.finishedWork=null,p.finishedLanes=0;var S=p.timeoutHandle;if(S!==-1&&(p.timeoutHandle=-1,y8(S)),nr!==null)for(S=nr.return;S!==null;){var M=S;switch(j0(M),M.tag){case 1:M=M.type.childContextTypes,M!=null&&mp();break;case 3:iu(),Ot(rn),Ot(Nr),Q0();break;case 5:K0(M);break;case 4:iu();break;case 13:Ot(jt);break;case 19:Ot(jt);break;case 10:$0(M.type._context);break;case 22:case 23:Dx()}S=S.return}if(xr=p,nr=p=xo(p.current,null),Lr=Sn=g,cr=0,Mf=null,Tx=Vp=ms=0,on=kf=null,vs!==null){for(g=0;g<vs.length;g++)if(S=vs[g],M=S.interleaved,M!==null){S.interleaved=null;var I=M.next,E=S.pending;if(E!==null){var j=E.next;E.next=I,M.next=j}S.pending=M}vs=null}return p}function ML(p,g){do{var S=nr;try{if(H0(),Ip.current=Ep,Dp){for(var M=Ft.memoizedState;M!==null;){var I=M.queue;I!==null&&(I.pending=null),M=M.next}Dp=!1}if(ys=0,mr=ur=Ft=null,Sf=!1,_f=0,bx.current=null,S===null||S.return===null){cr=1,Mf=g,nr=null;break}e:{var E=p,j=S.return,q=S,J=g;if(g=Lr,q.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var oe=J,ve=q,me=ve.tag;if((ve.mode&1)===0&&(me===0||me===11||me===15)){var de=ve.alternate;de?(ve.updateQueue=de.updateQueue,ve.memoizedState=de.memoizedState,ve.lanes=de.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var Oe=qk(j);if(Oe!==null){Oe.flags&=-257,Qk(Oe,j,q,E,g),Oe.mode&1&&Kk(E,oe,g),g=Oe,J=oe;var Fe=g.updateQueue;if(Fe===null){var Ve=new Set;Ve.add(J),g.updateQueue=Ve}else Fe.add(J);break e}else{if((g&1)===0){Kk(E,oe,g),Px();break e}J=Error(t(426))}}else if(Nt&&q.mode&1){var Qt=qk(j);if(Qt!==null){(Qt.flags&65536)===0&&(Qt.flags|=256),Qk(Qt,j,q,E,g),G0(ou(J,q));break e}}E=J=ou(J,q),cr!==4&&(cr=2),kf===null?kf=[E]:kf.push(E),E=j;do{switch(E.tag){case 3:E.flags|=65536,g&=-g,E.lanes|=g;var re=Xk(E,J,g);_k(E,re);break e;case 1:q=J;var te=E.type,ie=E.stateNode;if((E.flags&128)===0&&(typeof te.getDerivedStateFromError=="function"||ie!==null&&typeof ie.componentDidCatch=="function"&&(vo===null||!vo.has(ie)))){E.flags|=65536,g&=-g,E.lanes|=g;var _e=Zk(E,q,g);_k(E,_e);break e}}E=E.return}while(E!==null)}AL(S)}catch(We){g=We,nr===S&&S!==null&&(nr=S=S.return);continue}break}while(!0)}function kL(){var p=Fp.current;return Fp.current=Ep,p===null?Ep:p}function Px(){(cr===0||cr===3||cr===2)&&(cr=4),xr===null||(ms&268435455)===0&&(Vp&268435455)===0||mo(xr,Lr)}function Yp(p,g){var S=xt;xt|=2;var M=kL();(xr!==p||Lr!==g)&&(Si=null,Ss(p,g));do try{G8();break}catch(I){ML(p,I)}while(!0);if(H0(),xt=S,Fp.current=M,nr!==null)throw Error(t(261));return xr=null,Lr=0,cr}function G8(){for(;nr!==null;)LL(nr)}function W8(){for(;nr!==null&&!pV();)LL(nr)}function LL(p){var g=PL(p.alternate,p,Sn);p.memoizedProps=p.pendingProps,g===null?AL(p):nr=g,bx.current=null}function AL(p){var g=p;do{var S=g.alternate;if(p=g.return,(g.flags&32768)===0){if(S=z8(S,g,Sn),S!==null){nr=S;return}}else{if(S=O8(S,g),S!==null){S.flags&=32767,nr=S;return}if(p!==null)p.flags|=32768,p.subtreeFlags=0,p.deletions=null;else{cr=6,nr=null;return}}if(g=g.sibling,g!==null){nr=g;return}nr=g=p}while(g!==null);cr===0&&(cr=5)}function _s(p,g,S){var M=kt,I=Nn.transition;try{Nn.transition=null,kt=1,H8(p,g,S,M)}finally{Nn.transition=I,kt=M}return null}function H8(p,g,S,M){do cu();while(go!==null);if((xt&6)!==0)throw Error(t(327));S=p.finishedWork;var I=p.finishedLanes;if(S===null)return null;if(p.finishedWork=null,p.finishedLanes=0,S===p.current)throw Error(t(177));p.callbackNode=null,p.callbackPriority=0;var E=S.lanes|S.childLanes;if(TV(p,E),p===xr&&(nr=xr=null,Lr=0),(S.subtreeFlags&2064)===0&&(S.flags&2064)===0||Wp||(Wp=!0,RL(qh,function(){return cu(),null})),E=(S.flags&15990)!==0,(S.subtreeFlags&15990)!==0||E){E=Nn.transition,Nn.transition=null;var j=kt;kt=1;var q=xt;xt|=4,bx.current=null,B8(p,S),xL(S,p),c8(D0),ap=!!I0,D0=I0=null,p.current=S,j8(S),vV(),xt=q,kt=j,Nn.transition=E}else p.current=S;if(Wp&&(Wp=!1,go=p,Hp=I),E=p.pendingLanes,E===0&&(vo=null),mV(S.stateNode),sn(p,qt()),g!==null)for(M=p.onRecoverableError,S=0;S<g.length;S++)I=g[S],M(I.value,{componentStack:I.stack,digest:I.digest});if(Gp)throw Gp=!1,p=Mx,Mx=null,p;return(Hp&1)!==0&&p.tag!==0&&cu(),E=p.pendingLanes,(E&1)!==0?p===kx?Lf++:(Lf=0,kx=p):Lf=0,co(),null}function cu(){if(go!==null){var p=yM(Hp),g=Nn.transition,S=kt;try{if(Nn.transition=null,kt=16>p?16:p,go===null)var M=!1;else{if(p=go,go=null,Hp=0,(xt&6)!==0)throw Error(t(331));var I=xt;for(xt|=4,je=p.current;je!==null;){var E=je,j=E.child;if((je.flags&16)!==0){var q=E.deletions;if(q!==null){for(var J=0;J<q.length;J++){var oe=q[J];for(je=oe;je!==null;){var ve=je;switch(ve.tag){case 0:case 11:case 15:Cf(8,ve,E)}var me=ve.child;if(me!==null)me.return=ve,je=me;else for(;je!==null;){ve=je;var de=ve.sibling,Oe=ve.return;if(pL(ve),ve===oe){je=null;break}if(de!==null){de.return=Oe,je=de;break}je=Oe}}}var Fe=E.alternate;if(Fe!==null){var Ve=Fe.child;if(Ve!==null){Fe.child=null;do{var Qt=Ve.sibling;Ve.sibling=null,Ve=Qt}while(Ve!==null)}}je=E}}if((E.subtreeFlags&2064)!==0&&j!==null)j.return=E,je=j;else e:for(;je!==null;){if(E=je,(E.flags&2048)!==0)switch(E.tag){case 0:case 11:case 15:Cf(9,E,E.return)}var re=E.sibling;if(re!==null){re.return=E.return,je=re;break e}je=E.return}}var te=p.current;for(je=te;je!==null;){j=je;var ie=j.child;if((j.subtreeFlags&2064)!==0&&ie!==null)ie.return=j,je=ie;else e:for(j=te;je!==null;){if(q=je,(q.flags&2048)!==0)try{switch(q.tag){case 0:case 11:case 15:jp(9,q)}}catch(We){Ht(q,q.return,We)}if(q===j){je=null;break e}var _e=q.sibling;if(_e!==null){_e.return=q.return,je=_e;break e}je=q.return}}if(xt=I,co(),Aa&&typeof Aa.onPostCommitFiberRoot=="function")try{Aa.onPostCommitFiberRoot(Qh,p)}catch{}M=!0}return M}finally{kt=S,Nn.transition=g}}return!1}function IL(p,g,S){g=ou(S,g),g=Xk(p,g,1),p=ho(p,g,1),g=Xr(),p!==null&&(qc(p,1,g),sn(p,g))}function Ht(p,g,S){if(p.tag===3)IL(p,p,S);else for(;g!==null;){if(g.tag===3){IL(g,p,S);break}else if(g.tag===1){var M=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(vo===null||!vo.has(M))){p=ou(S,p),p=Zk(g,p,1),g=ho(g,p,1),p=Xr(),g!==null&&(qc(g,1,p),sn(g,p));break}}g=g.return}}function $8(p,g,S){var M=p.pingCache;M!==null&&M.delete(g),g=Xr(),p.pingedLanes|=p.suspendedLanes&S,xr===p&&(Lr&S)===S&&(cr===4||cr===3&&(Lr&130023424)===Lr&&500>qt()-Cx?Ss(p,0):Tx|=S),sn(p,g)}function DL(p,g){g===0&&((p.mode&1)===0?g=1:(g=ep,ep<<=1,(ep&130023424)===0&&(ep=4194304)));var S=Xr();p=yi(p,g),p!==null&&(qc(p,g,S),sn(p,S))}function U8(p){var g=p.memoizedState,S=0;g!==null&&(S=g.retryLane),DL(p,S)}function Y8(p,g){var S=0;switch(p.tag){case 13:var M=p.stateNode,I=p.memoizedState;I!==null&&(S=I.retryLane);break;case 19:M=p.stateNode;break;default:throw Error(t(314))}M!==null&&M.delete(g),DL(p,S)}var PL;PL=function(p,g,S){if(p!==null)if(p.memoizedProps!==g.pendingProps||rn.current)an=!0;else{if((p.lanes&S)===0&&(g.flags&128)===0)return an=!1,E8(p,g,S);an=(p.flags&131072)!==0}else an=!1,Nt&&(g.flags&1048576)!==0&&fk(g,bp,g.index);switch(g.lanes=0,g.tag){case 2:var M=g.type;Np(p,g),p=g.pendingProps;var I=Ql(g,Nr.current);au(g,S),I=tx(null,g,M,p,I,S);var E=rx();return g.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,nn(M)?(E=!0,xp(g)):E=!1,g.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,X0(g),I.updater=zp,g.stateNode=I,I._reactInternals=g,lx(g,M,p,S),g=dx(null,g,M,!0,E,S)):(g.tag=0,Nt&&E&&B0(g),Yr(null,g,I,S),g=g.child),g;case 16:M=g.elementType;e:{switch(Np(p,g),p=g.pendingProps,I=M._init,M=I(M._payload),g.type=M,I=g.tag=Z8(M),p=la(M,p),I){case 0:g=fx(null,g,M,p,S);break e;case 1:g=aL(null,g,M,p,S);break e;case 11:g=Jk(null,g,M,p,S);break e;case 14:g=eL(null,g,M,la(M.type,p),S);break e}throw Error(t(306,M,""))}return g;case 0:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),fx(p,g,M,I,S);case 1:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),aL(p,g,M,I,S);case 3:e:{if(iL(g),p===null)throw Error(t(387));M=g.pendingProps,E=g.memoizedState,I=E.element,Sk(p,g),Lp(g,M,null,S);var j=g.memoizedState;if(M=j.element,E.isDehydrated)if(E={element:M,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},g.updateQueue.baseState=E,g.memoizedState=E,g.flags&256){I=ou(Error(t(423)),g),g=oL(p,g,M,S,I);break e}else if(M!==I){I=ou(Error(t(424)),g),g=oL(p,g,M,S,I);break e}else for(xn=so(g.stateNode.containerInfo.firstChild),mn=g,Nt=!0,sa=null,S=mk(g,null,M,S),g.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(tu(),M===I){g=xi(p,g,S);break e}Yr(p,g,M,S)}g=g.child}return g;case 5:return wk(g),p===null&&V0(g),M=g.type,I=g.pendingProps,E=p!==null?p.memoizedProps:null,j=I.children,P0(M,I)?j=null:E!==null&&P0(M,E)&&(g.flags|=32),nL(p,g),Yr(p,g,j,S),g.child;case 6:return p===null&&V0(g),null;case 13:return sL(p,g,S);case 4:return Z0(g,g.stateNode.containerInfo),M=g.pendingProps,p===null?g.child=ru(g,null,M,S):Yr(p,g,M,S),g.child;case 11:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),Jk(p,g,M,I,S);case 7:return Yr(p,g,g.pendingProps,S),g.child;case 8:return Yr(p,g,g.pendingProps.children,S),g.child;case 12:return Yr(p,g,g.pendingProps.children,S),g.child;case 10:e:{if(M=g.type._context,I=g.pendingProps,E=g.memoizedProps,j=I.value,Rt(Cp,M._currentValue),M._currentValue=j,E!==null)if(oa(E.value,j)){if(E.children===I.children&&!rn.current){g=xi(p,g,S);break e}}else for(E=g.child,E!==null&&(E.return=g);E!==null;){var q=E.dependencies;if(q!==null){j=E.child;for(var J=q.firstContext;J!==null;){if(J.context===M){if(E.tag===1){J=mi(-1,S&-S),J.tag=2;var oe=E.updateQueue;if(oe!==null){oe=oe.shared;var ve=oe.pending;ve===null?J.next=J:(J.next=ve.next,ve.next=J),oe.pending=J}}E.lanes|=S,J=E.alternate,J!==null&&(J.lanes|=S),U0(E.return,S,g),q.lanes|=S;break}J=J.next}}else if(E.tag===10)j=E.type===g.type?null:E.child;else if(E.tag===18){if(j=E.return,j===null)throw Error(t(341));j.lanes|=S,q=j.alternate,q!==null&&(q.lanes|=S),U0(j,S,g),j=E.sibling}else j=E.child;if(j!==null)j.return=E;else for(j=E;j!==null;){if(j===g){j=null;break}if(E=j.sibling,E!==null){E.return=j.return,j=E;break}j=j.return}E=j}Yr(p,g,I.children,S),g=g.child}return g;case 9:return I=g.type,M=g.pendingProps.children,au(g,S),I=zn(I),M=M(I),g.flags|=1,Yr(p,g,M,S),g.child;case 14:return M=g.type,I=la(M,g.pendingProps),I=la(M.type,I),eL(p,g,M,I,S);case 15:return tL(p,g,g.type,g.pendingProps,S);case 17:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),Np(p,g),g.tag=1,nn(M)?(p=!0,xp(g)):p=!1,au(g,S),Uk(g,M,I),lx(g,M,I,S),dx(null,g,M,!0,p,S);case 19:return uL(p,g,S);case 22:return rL(p,g,S)}throw Error(t(156,g.tag))};function RL(p,g){return dM(p,g)}function X8(p,g,S,M){this.tag=p,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bn(p,g,S,M){return new X8(p,g,S,M)}function Rx(p){return p=p.prototype,!(!p||!p.isReactComponent)}function Z8(p){if(typeof p=="function")return Rx(p)?1:0;if(p!=null){if(p=p.$$typeof,p===B)return 11;if(p===$)return 14}return 2}function xo(p,g){var S=p.alternate;return S===null?(S=Bn(p.tag,g,p.key,p.mode),S.elementType=p.elementType,S.type=p.type,S.stateNode=p.stateNode,S.alternate=p,p.alternate=S):(S.pendingProps=g,S.type=p.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=p.flags&14680064,S.childLanes=p.childLanes,S.lanes=p.lanes,S.child=p.child,S.memoizedProps=p.memoizedProps,S.memoizedState=p.memoizedState,S.updateQueue=p.updateQueue,g=p.dependencies,S.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},S.sibling=p.sibling,S.index=p.index,S.ref=p.ref,S}function Xp(p,g,S,M,I,E){var j=2;if(M=p,typeof p=="function")Rx(p)&&(j=1);else if(typeof p=="string")j=5;else e:switch(p){case A:return bs(S.children,I,E,g);case D:j=8,I|=8;break;case P:return p=Bn(12,S,g,I|2),p.elementType=P,p.lanes=E,p;case N:return p=Bn(13,S,g,I),p.elementType=N,p.lanes=E,p;case W:return p=Bn(19,S,g,I),p.elementType=W,p.lanes=E,p;case U:return Zp(S,I,E,g);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case R:j=10;break e;case z:j=9;break e;case B:j=11;break e;case $:j=14;break e;case H:j=16,M=null;break e}throw Error(t(130,p==null?p:typeof p,""))}return g=Bn(j,S,g,I),g.elementType=p,g.type=M,g.lanes=E,g}function bs(p,g,S,M){return p=Bn(7,p,M,g),p.lanes=S,p}function Zp(p,g,S,M){return p=Bn(22,p,M,g),p.elementType=U,p.lanes=S,p.stateNode={isHidden:!1},p}function Ex(p,g,S){return p=Bn(6,p,null,g),p.lanes=S,p}function zx(p,g,S){return g=Bn(4,p.children!==null?p.children:[],p.key,g),g.lanes=S,g.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},g}function K8(p,g,S,M,I){this.tag=g,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=s0(0),this.expirationTimes=s0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=s0(0),this.identifierPrefix=M,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function Ox(p,g,S,M,I,E,j,q,J){return p=new K8(p,g,S,q,J),g===1?(g=1,E===!0&&(g|=8)):g=0,E=Bn(3,null,null,g),p.current=E,E.stateNode=p,E.memoizedState={element:M,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},X0(E),p}function q8(p,g,S){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:M==null?null:""+M,children:p,containerInfo:g,implementation:S}}function EL(p){if(!p)return uo;p=p._reactInternals;e:{if(cs(p)!==p||p.tag!==1)throw Error(t(170));var g=p;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(nn(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(t(171))}if(p.tag===1){var S=p.type;if(nn(S))return lk(p,S,g)}return g}function zL(p,g,S,M,I,E,j,q,J){return p=Ox(S,M,!0,p,I,E,j,q,J),p.context=EL(null),S=p.current,M=Xr(),I=yo(S),E=mi(M,I),E.callback=g??null,ho(S,E,I),p.current.lanes=I,qc(p,I,M),sn(p,M),p}function Kp(p,g,S,M){var I=g.current,E=Xr(),j=yo(I);return S=EL(S),g.context===null?g.context=S:g.pendingContext=S,g=mi(E,j),g.payload={element:p},M=M===void 0?null:M,M!==null&&(g.callback=M),p=ho(I,g,j),p!==null&&(fa(p,I,j,E),kp(p,I,j)),j}function qp(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return p.child.stateNode;default:return p.child.stateNode}}function OL(p,g){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var S=p.retryLane;p.retryLane=S!==0&&S<g?S:g}}function Nx(p,g){OL(p,g),(p=p.alternate)&&OL(p,g)}function Q8(){return null}var NL=typeof reportError=="function"?reportError:function(p){console.error(p)};function Bx(p){this._internalRoot=p}Qp.prototype.render=Bx.prototype.render=function(p){var g=this._internalRoot;if(g===null)throw Error(t(409));Kp(p,g,null,null)},Qp.prototype.unmount=Bx.prototype.unmount=function(){var p=this._internalRoot;if(p!==null){this._internalRoot=null;var g=p.containerInfo;xs(function(){Kp(null,p,null,null)}),g[hi]=null}};function Qp(p){this._internalRoot=p}Qp.prototype.unstable_scheduleHydration=function(p){if(p){var g=SM();p={blockedOn:null,target:p,priority:g};for(var S=0;S<ao.length&&g!==0&&g<ao[S].priority;S++);ao.splice(S,0,p),S===0&&wM(p)}};function jx(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)}function Jp(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11&&(p.nodeType!==8||p.nodeValue!==" react-mount-point-unstable "))}function BL(){}function J8(p,g,S,M,I){if(I){if(typeof M=="function"){var E=M;M=function(){var oe=qp(j);E.call(oe)}}var j=zL(g,M,p,0,null,!1,!1,"",BL);return p._reactRootContainer=j,p[hi]=j.current,df(p.nodeType===8?p.parentNode:p),xs(),j}for(;I=p.lastChild;)p.removeChild(I);if(typeof M=="function"){var q=M;M=function(){var oe=qp(J);q.call(oe)}}var J=Ox(p,0,!1,null,null,!1,!1,"",BL);return p._reactRootContainer=J,p[hi]=J.current,df(p.nodeType===8?p.parentNode:p),xs(function(){Kp(g,J,S,M)}),J}function ev(p,g,S,M,I){var E=S._reactRootContainer;if(E){var j=E;if(typeof I=="function"){var q=I;I=function(){var J=qp(j);q.call(J)}}Kp(g,j,p,I)}else j=J8(S,g,p,I,M);return qp(j)}mM=function(p){switch(p.tag){case 3:var g=p.stateNode;if(g.current.memoizedState.isDehydrated){var S=Kc(g.pendingLanes);S!==0&&(l0(g,S|1),sn(g,qt()),(xt&6)===0&&(uu=qt()+500,co()))}break;case 13:xs(function(){var M=yi(p,1);if(M!==null){var I=Xr();fa(M,p,1,I)}}),Nx(p,1)}},u0=function(p){if(p.tag===13){var g=yi(p,134217728);if(g!==null){var S=Xr();fa(g,p,134217728,S)}Nx(p,134217728)}},xM=function(p){if(p.tag===13){var g=yo(p),S=yi(p,g);if(S!==null){var M=Xr();fa(S,p,g,M)}Nx(p,g)}},SM=function(){return kt},_M=function(p,g){var S=kt;try{return kt=p,g()}finally{kt=S}},t0=function(p,g,S){switch(g){case"input":if(bt(p,S),g=S.name,S.type==="radio"&&g!=null){for(S=p;S.parentNode;)S=S.parentNode;for(S=S.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]'),g=0;g<S.length;g++){var M=S[g];if(M!==p&&M.form===p.form){var I=yp(M);if(!I)throw Error(t(90));Ie(M),bt(M,I)}}}break;case"textarea":K2(p,S);break;case"select":g=S.value,g!=null&&gn(p,!!S.multiple,g,!1)}},iM=Ix,oM=xs;var eG={usingClientEntryPoint:!1,Events:[vf,Kl,yp,nM,aM,Ix]},Af={findFiberByHostInstance:fs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tG={bundleType:Af.bundleType,version:Af.version,rendererPackageName:Af.rendererPackageName,rendererConfig:Af.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(p){return p=cM(p),p===null?null:p.stateNode},findFiberByHostInstance:Af.findFiberByHostInstance||Q8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tv.isDisabled&&tv.supportsFiber)try{Qh=tv.inject(tG),Aa=tv}catch{}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eG,ln.createPortal=function(p,g){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jx(g))throw Error(t(200));return q8(p,g,null,S)},ln.createRoot=function(p,g){if(!jx(p))throw Error(t(299));var S=!1,M="",I=NL;return g!=null&&(g.unstable_strictMode===!0&&(S=!0),g.identifierPrefix!==void 0&&(M=g.identifierPrefix),g.onRecoverableError!==void 0&&(I=g.onRecoverableError)),g=Ox(p,1,!1,null,null,S,!1,M,I),p[hi]=g.current,df(p.nodeType===8?p.parentNode:p),new Bx(g)},ln.findDOMNode=function(p){if(p==null)return null;if(p.nodeType===1)return p;var g=p._reactInternals;if(g===void 0)throw typeof p.render=="function"?Error(t(188)):(p=Object.keys(p).join(","),Error(t(268,p)));return p=cM(g),p=p===null?null:p.stateNode,p},ln.flushSync=function(p){return xs(p)},ln.hydrate=function(p,g,S){if(!Jp(g))throw Error(t(200));return ev(null,p,g,!0,S)},ln.hydrateRoot=function(p,g,S){if(!jx(p))throw Error(t(405));var M=S!=null&&S.hydratedSources||null,I=!1,E="",j=NL;if(S!=null&&(S.unstable_strictMode===!0&&(I=!0),S.identifierPrefix!==void 0&&(E=S.identifierPrefix),S.onRecoverableError!==void 0&&(j=S.onRecoverableError)),g=zL(g,null,p,1,S??null,I,!1,E,j),p[hi]=g.current,df(p),M)for(p=0;p<M.length;p++)S=M[p],I=S._getVersion,I=I(S._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[S,I]:g.mutableSourceEagerHydrationData.push(S,I);return new Qp(g)},ln.render=function(p,g,S){if(!Jp(g))throw Error(t(200));return ev(null,p,g,!1,S)},ln.unmountComponentAtNode=function(p){if(!Jp(p))throw Error(t(40));return p._reactRootContainer?(xs(function(){ev(null,null,p,!1,function(){p._reactRootContainer=null,p[hi]=null})}),!0):!1},ln.unstable_batchedUpdates=Ix,ln.unstable_renderSubtreeIntoContainer=function(p,g,S,M){if(!Jp(S))throw Error(t(200));if(p==null||p._reactInternals===void 0)throw Error(t(38));return ev(p,g,S,!1,M)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var UL;function uG(){if(UL)return Gx.exports;UL=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Gx.exports=lG(),Gx.exports}var YL;function cG(){if(YL)return rv;YL=1;var r=uG();return rv.createRoot=r.createRoot,rv.hydrateRoot=r.hydrateRoot,rv}var fG=cG();const dG=Vw(fG),_={bgPrimary:"#ffffff",bgSecondary:"#f8f9fa",bgTertiary:"#f1f3f4",bgCard:"#ffffff",bgHover:"#f1f3f4",bgSelected:"#e8f0fe",bgUnpaired:"#f5f5f4",surface:"#f8f9fa",textPrimary:"#202124",textSecondary:"#5f6368",textTertiary:"#80868b",textInverse:"#ffffff",text:"#202124",textMuted:"#5f6368",borderLight:"#dadce0",borderMedium:"#bdc1c6",borderDark:"#9aa0a6",accent:"#4a5568",accentBlue:"#2d3748",accentBlueHover:"#1a202c",accentGreen:"#38a169",accentOrange:"#78716c",accentPink:"#c53030",accentPurple:"#4a5568",success:"#38a169",warning:"#d69e2e",error:"#c53030",errorBg:"#fef2f2",info:"#4a5568",buttonPrimary:"#2d3748",buttonPrimaryHover:"#1a202c",buttonSecondary:"#f1f3f4",buttonSecondaryHover:"#e8eaed",buttonDanger:"#ea4335",buttonDangerHover:"#d33b2c",shadowSm:"rgba(60, 64, 67, 0.08)",shadowMd:"rgba(60, 64, 67, 0.12)",shadowLg:"rgba(60, 64, 67, 0.16)"};function nc(r,e){const t=r.replace("#",""),n=Number.parseInt(t.substring(0,2),16),a=Number.parseInt(t.substring(2,4),16),i=Number.parseInt(t.substring(4,6),16);return`rgba(${n}, ${a}, ${i}, ${e})`}const F={body:"'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",mono:"'Roboto Mono', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace"};function hG({logs:r,filteredLogs:e,logEndRef:t,getLogColor:n}){return w.jsx("div",{style:{flex:1,overflow:"auto",padding:"16px",fontFamily:F.mono,fontSize:"12px",background:_.bgCard},children:e.length===0?w.jsx("div",{style:{color:_.textSecondary,padding:"40px",textAlign:"center",fontFamily:F.body},children:r.length===0?"No logs available. Start the MCP Shark server to see logs here.":"No logs match the current filter."}):w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:t}),e.map((a,i)=>w.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px 16px",borderBottom:`1px solid ${_.borderLight}`,background:_.bgCard,transition:"background-color 0.15s ease"},onMouseEnter:o=>{o.currentTarget.style.background=_.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=_.bgCard},children:[w.jsx("span",{style:{color:_.textTertiary,minWidth:"140px",flexShrink:0,fontFamily:F.mono,fontSize:"11px"},children:new Date(a.timestamp).toLocaleTimeString()}),w.jsx("span",{style:{color:_.textTertiary,minWidth:"70px",flexShrink:0,textTransform:"uppercase",fontFamily:F.body,fontSize:"10px",fontWeight:"600",letterSpacing:"0.05em"},children:a.type}),w.jsx("span",{style:{color:n(a.type),whiteSpace:"pre-wrap",wordBreak:"break-word",flex:1,fontFamily:F.mono,fontSize:"12px",lineHeight:"1.5"},children:a.line})]},`${a.timestamp}-${i}`))]})})}var pG={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const ut=(r,e,t,n)=>{const a=Z.forwardRef(({color:i="currentColor",size:o=24,stroke:s=2,title:l,className:u,children:c,...f},d)=>Z.createElement("svg",{ref:d,...pG[r],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),strokeWidth:s,stroke:i,...f},[l&&Z.createElement("title",{key:"svg-title"},l),...n.map(([h,v])=>Z.createElement(h,v)),...Array.isArray(c)?c:[c]]));return a.displayName=`${t}`,a};const vG=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],gG=ut("outline","alert-circle","AlertCircle",vG);const yG=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],ac=ut("outline","alert-triangle","AlertTriangle",yG);const mG=[["path",{d:"M4 13h5",key:"svg-0"}],["path",{d:"M12 16v-8h3a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-3",key:"svg-1"}],["path",{d:"M20 8v8",key:"svg-2"}],["path",{d:"M9 16v-5.5a2.5 2.5 0 0 0 -5 0v5.5",key:"svg-3"}]],xG=ut("outline","api","Api",mG);const SG=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]],Vg=ut("outline","arrow-right","ArrowRight",SG);const _G=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],bG=ut("outline","bell","Bell",_G);const wG=[["path",{d:"M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M8 16h8",key:"svg-1"}],["path",{d:"M8.322 12.582l7.956 .836",key:"svg-2"}],["path",{d:"M8.787 9.168l7.826 1.664",key:"svg-3"}],["path",{d:"M10.096 5.764l7.608 2.472",key:"svg-4"}]],TG=ut("outline","brand-stackoverflow","BrandStackoverflow",wG);const CG=[["path",{d:"M9 9v-1a3 3 0 0 1 6 0v1",key:"svg-0"}],["path",{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3",key:"svg-1"}],["path",{d:"M3 13l4 0",key:"svg-2"}],["path",{d:"M17 13l4 0",key:"svg-3"}],["path",{d:"M12 20l0 -6",key:"svg-4"}],["path",{d:"M4 19l3.35 -2",key:"svg-5"}],["path",{d:"M20 19l-3.35 -2",key:"svg-6"}],["path",{d:"M4 7l3.75 2.4",key:"svg-7"}],["path",{d:"M20 7l-3.75 2.4",key:"svg-8"}]],MG=ut("outline","bug","Bug",CG);const kG=[["path",{d:"M4 4h6v6h-6z",key:"svg-0"}],["path",{d:"M14 4h6v6h-6z",key:"svg-1"}],["path",{d:"M4 14h6v6h-6z",key:"svg-2"}],["path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}]],LG=ut("outline","category","Category",kG);const AG=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],IG=ut("outline","chart-bar","ChartBar",AG);const DG=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],aN=ut("outline","check","Check",DG);const PG=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],ui=ut("outline","chevron-down","ChevronDown",PG);const RG=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],Dl=ut("outline","chevron-right","ChevronRight",RG);const EG=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Ww=ut("outline","clock","Clock",EG);const zG=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M14 4l-4 16",key:"svg-2"}]],rs=ut("outline","code","Code",zG);const OG=[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],NG=ut("outline","database","Database",OG);const BG=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],iN=ut("outline","download","Download",BG);const jG=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],oN=ut("outline","external-link","ExternalLink",jG);const FG=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],Hw=ut("outline","eye","Eye",FG);const VG=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],GG=ut("outline","file-text","FileText",VG);const WG=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 11v6",key:"svg-2"}],["path",{d:"M9.5 13.5l2.5 -2.5l2.5 2.5",key:"svg-3"}]],HG=ut("outline","file-upload","FileUpload",WG);const $G=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],UG=ut("outline","history","History",$G);const YG=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],XL=ut("outline","info-circle","InfoCircle",YG);const XG=[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]],sN=ut("outline","list","List",XG);const ZG=[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]],C_=ut("outline","loader-2","Loader2",ZG);const KG=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],lN=ut("outline","menu-2","Menu2",KG);const qG=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z",key:"svg-2"}]],QG=ut("outline","message","Message",qG);const JG=[["path",{d:"M6 9a6 6 0 1 0 12 0a6 6 0 0 0 -12 0",key:"svg-0"}],["path",{d:"M12 3c1.333 .333 2 2.333 2 6s-.667 5.667 -2 6",key:"svg-1"}],["path",{d:"M12 3c-1.333 .333 -2 2.333 -2 6s.667 5.667 2 6",key:"svg-2"}],["path",{d:"M6 9h12",key:"svg-3"}],["path",{d:"M3 20h7",key:"svg-4"}],["path",{d:"M14 20h7",key:"svg-5"}],["path",{d:"M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M12 15v3",key:"svg-7"}]],rm=ut("outline","network","Network",JG);const eW=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}],["path",{d:"M16 5.25l-8 4.5",key:"svg-4"}]],ZL=ut("outline","package","Package",eW);const tW=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],rW=ut("outline","plus","Plus",tW);const nW=[["path",{d:"M7 6a7.75 7.75 0 1 0 10 0",key:"svg-0"}],["path",{d:"M12 4l0 8",key:"svg-1"}]],aW=ut("outline","power","Power",nW);const iW=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],Hd=ut("outline","refresh","Refresh",iW);const oW=[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],sW=ut("outline","restore","Restore",oW);const lW=[["path",{d:"M6 4m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],uW=ut("outline","robot","Robot",lW);const cW=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],$w=ut("outline","search","Search",cW);const fW=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],Zu=ut("outline","server","Server",fW);const dW=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],M_=ut("outline","settings","Settings",dW);const hW=[["path",{d:"M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]],nm=ut("outline","shield-check","ShieldCheck",hW);const pW=[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}],["path",{d:"M12 11m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 12l0 2.5",key:"svg-2"}]],vW=ut("outline","shield-lock","ShieldLock",pW);const gW=[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}]],Uw=ut("outline","shield","Shield",gW);const yW=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z",key:"svg-0"}]],mW=ut("outline","sparkles","Sparkles",yW);const xW=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],am=ut("outline","tool","Tool",xW);const SW=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],wc=ut("outline","trash","Trash",SW);const _W=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],bW=ut("outline","user","User",_W);const wW=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],im=ut("outline","x","X",wW);function TW({filter:r,setFilter:e,logType:t,setLogType:n,autoScroll:a,setAutoScroll:i,onClearLogs:o,onExportLogs:s,filteredCount:l,totalCount:u}){return w.jsxs("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${_.borderLight}`,background:_.bgCard,display:"flex",gap:"10px",alignItems:"center",flexWrap:"wrap",boxShadow:`0 1px 3px ${_.shadowSm}`},children:[w.jsxs("div",{style:{position:"relative",width:"300px"},children:[w.jsx($w,{size:16,stroke:1.5,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:_.textTertiary,pointerEvents:"none"}}),w.jsx("input",{type:"text",placeholder:"Filter logs...",value:r,onChange:c=>e(c.target.value),style:{padding:"8px 12px 8px 36px",background:_.bgCard,border:`1px solid ${_.borderLight}`,color:_.textPrimary,fontSize:"13px",fontFamily:F.body,width:"100%",borderRadius:"8px",transition:"all 0.2s"},onFocus:c=>{c.currentTarget.style.borderColor=_.accentBlue,c.currentTarget.style.boxShadow=`0 0 0 3px ${_.accentBlue}20`},onBlur:c=>{c.currentTarget.style.borderColor=_.borderLight,c.currentTarget.style.boxShadow="none"}})]}),w.jsxs("select",{value:t,onChange:c=>n(c.target.value),style:{padding:"8px 12px",background:_.bgCard,border:`1px solid ${_.borderLight}`,color:_.textPrimary,fontSize:"13px",fontFamily:F.body,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s"},onFocus:c=>{c.currentTarget.style.borderColor=_.accentBlue,c.currentTarget.style.boxShadow=`0 0 0 3px ${_.accentBlue}20`},onBlur:c=>{c.currentTarget.style.borderColor=_.borderLight,c.currentTarget.style.boxShadow="none"},children:[w.jsx("option",{value:"all",children:"All Types"}),w.jsx("option",{value:"stdout",children:"Stdout"}),w.jsx("option",{value:"stderr",children:"Stderr"}),w.jsx("option",{value:"error",children:"Errors"}),w.jsx("option",{value:"exit",children:"Exit"})]}),w.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px",color:_.textPrimary,fontSize:"13px",fontFamily:F.body,cursor:"pointer"},children:[w.jsx("input",{type:"checkbox",checked:a,onChange:c=>i(c.target.checked),style:{cursor:"pointer"}}),"Auto-scroll"]}),w.jsxs("button",{type:"button",onClick:o,style:{padding:"8px 14px",background:_.buttonDanger,border:"none",color:_.textInverse,fontSize:"12px",fontFamily:F.body,fontWeight:"500",cursor:"pointer",borderRadius:"8px",transition:"all 0.2s",boxShadow:`0 2px 4px ${_.shadowSm}`,display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:c=>{c.currentTarget.style.background=_.buttonDangerHover,c.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:c=>{c.currentTarget.style.background=_.buttonDanger,c.currentTarget.style.transform="translateY(0)"},children:[w.jsx(wc,{size:14,stroke:1.5}),"Clear Logs"]}),w.jsxs("button",{type:"button",onClick:s,style:{padding:"8px 14px",background:_.buttonPrimary,border:"none",color:_.textInverse,fontSize:"12px",fontFamily:F.body,fontWeight:"500",cursor:"pointer",borderRadius:"8px",transition:"all 0.2s",boxShadow:`0 2px 4px ${_.shadowSm}`,display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:c=>{c.currentTarget.style.background=_.buttonPrimaryHover,c.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:c=>{c.currentTarget.style.background=_.buttonPrimary,c.currentTarget.style.transform="translateY(0)"},children:[w.jsx(iN,{size:14,stroke:1.5}),"Export Logs"]}),w.jsxs("div",{style:{marginLeft:"auto",color:_.textSecondary,fontSize:"12px",fontFamily:F.body},children:[l," / ",u," lines"]})]})}function CW(){const[r,e]=Z.useState([]),[t,n]=Z.useState(!0),[a,i]=Z.useState(""),[o,s]=Z.useState("all"),l=Z.useRef(null),u=Z.useRef(null);Z.useEffect(()=>{t&&l.current&&l.current.scrollIntoView({behavior:"smooth",block:"start"})},[t]),Z.useEffect(()=>{(async()=>{try{const b=await(await fetch("/api/composite/logs?limit=5000")).json();e(b)}catch(x){console.error("Failed to load logs:",x)}})();const y=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,m=new WebSocket(y);return u.current=m,m.onopen=()=>{console.log("WebSocket connected for logs")},m.onerror=x=>{console.error("WebSocket error:",x)},m.onmessage=x=>{try{const b=JSON.parse(x.data);b.type==="log"&&e(T=>[b.data,...T].slice(0,5e3))}catch(b){console.error("Failed to parse WebSocket message:",b)}},m.onclose=()=>{console.log("WebSocket closed, attempting to reconnect..."),setTimeout(()=>{u.current?.readyState===WebSocket.CLOSED&&console.log("WebSocket reconnection needed")},3e3)},()=>{(m.readyState===WebSocket.OPEN||m.readyState===WebSocket.CONNECTING)&&m.close()}},[]);const c=async()=>{try{await fetch("/api/composite/logs/clear",{method:"POST"}),e([])}catch(v){console.error("Failed to clear logs:",v)}},f=v=>{switch(v){case"stderr":case"error":return _.error;case"stdout":return _.textPrimary;case"exit":return _.accentOrange;default:return _.textSecondary}},d=r.filter(v=>!(o!=="all"&&v.type!==o||a&&!v.line.toLowerCase().includes(a.toLowerCase()))),h=async()=>{try{const y=await(await fetch("/api/composite/logs/export")).blob(),m=window.URL.createObjectURL(y),x=document.createElement("a");x.href=m,x.download=`mcp-shark-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,document.body.appendChild(x),x.click(),window.URL.revokeObjectURL(m),document.body.removeChild(x)}catch(v){console.error("Failed to export logs:",v)}};return w.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",width:"100%",background:_.bgPrimary,overflow:"hidden"},children:[w.jsx(TW,{filter:a,setFilter:i,logType:o,setLogType:s,autoScroll:t,setAutoScroll:n,onClearLogs:c,onExportLogs:h,filteredCount:d.length,totalCount:r.length}),w.jsx(hG,{logs:r,filteredLogs:d,logEndRef:l,getLogColor:f})]})}function Ch({isOpen:r,onClose:e,onConfirm:t,title:n,message:a,confirmText:i="Confirm",cancelText:o="Cancel",danger:s=!1}){return r?w.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,border:"none",margin:0,width:"100%",height:"100%"},onClick:e,onKeyDown:l=>{l.key==="Escape"&&e()},children:w.jsxs("div",{role:"document",style:{background:_.bgCard,borderRadius:"12px",padding:"24px",maxWidth:"500px",width:"90%",boxShadow:`0 4px 20px ${_.shadowLg}`,fontFamily:F.body},onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),children:[w.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:"18px",fontWeight:"600",color:_.textPrimary},children:n}),w.jsx("p",{style:{margin:"0 0 24px 0",fontSize:"14px",color:_.textSecondary,lineHeight:"1.5"},children:a}),w.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[w.jsx("button",{type:"button",onClick:e,style:{padding:"10px 20px",background:_.buttonSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",color:_.textPrimary,fontSize:"14px",fontWeight:"500",fontFamily:F.body,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:l=>{l.currentTarget.style.background=_.buttonSecondaryHover},onMouseLeave:l=>{l.currentTarget.style.background=_.buttonSecondary},children:o}),w.jsx("button",{type:"button",onClick:()=>{t(),e()},style:{padding:"10px 20px",background:s?_.buttonDanger:_.buttonPrimary,border:"none",borderRadius:"8px",color:_.textInverse,fontSize:"14px",fontWeight:"500",fontFamily:F.body,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:l=>{l.currentTarget.style.background=s?_.buttonDangerHover:_.buttonPrimaryHover},onMouseLeave:l=>{l.currentTarget.style.background=s?_.buttonDanger:_.buttonPrimary},children:i})]})]})}):null}function MW({backups:r,loadingBackups:e,onRefresh:t,onRestore:n,onView:a,onDelete:i}){const[o,s]=Z.useState(!1),[l,u]=Z.useState(null);return r.length===0?null:w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"20px",boxShadow:`0 2px 4px ${_.shadowSm}`},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},children:[w.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body},children:"Backup Files"}),w.jsxs("button",{type:"button",onClick:t,disabled:e,style:{padding:"4px 8px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,cursor:e?"not-allowed":"pointer",fontSize:"11px",borderRadius:"8px",opacity:e?.5:1},title:"Refresh backups",children:[w.jsx(Hd,{size:14,stroke:1.5,style:{marginRight:"4px"}}),e?"Loading...":"Refresh"]})]}),w.jsx("p",{style:{fontSize:"12px",color:_.textSecondary,marginBottom:"12px",lineHeight:"1.4"},children:"View, restore, or delete backups of your MCP configuration files. Backups are created automatically when starting MCP Shark."}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((c,f)=>w.jsxs("div",{style:{padding:"12px",background:_.bgPrimary,border:`1px solid ${_.borderMedium}`,borderRadius:"8px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsxs("div",{style:{flex:1},children:[w.jsx("div",{style:{color:_.textPrimary,fontSize:"12px",fontWeight:"500",marginBottom:"4px"},children:c.displayPath}),w.jsxs("div",{style:{color:_.textTertiary,fontSize:"11px",fontFamily:F.body},children:["Created: ",new Date(c.modifiedAt||c.createdAt).toLocaleString()," • Size:"," ",(c.size/1024).toFixed(2)," KB"]})]}),w.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[w.jsxs("button",{type:"button",onClick:()=>a(c.backupPath),style:{padding:"6px 12px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,cursor:"pointer",fontSize:"12px",borderRadius:"8px",fontWeight:"500"},onMouseEnter:d=>{d.currentTarget.style.background=_.bgCard,d.currentTarget.style.borderColor=_.borderLight},onMouseLeave:d=>{d.currentTarget.style.background="transparent",d.currentTarget.style.borderColor=_.borderMedium},title:"View backup content",children:[w.jsx(Hw,{size:14,stroke:1.5,style:{marginRight:"4px"}}),"View"]}),w.jsxs("button",{type:"button",onClick:()=>{u(c.backupPath),s(!0)},style:{padding:"6px 12px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.error,cursor:"pointer",fontSize:"12px",borderRadius:"8px",fontWeight:"500",fontFamily:F.body,display:"flex",alignItems:"center",gap:"4px"},onMouseEnter:d=>{d.currentTarget.style.background=nc(_.error,.15),d.currentTarget.style.borderColor=_.error},onMouseLeave:d=>{d.currentTarget.style.background="transparent",d.currentTarget.style.borderColor=_.borderMedium},title:"Delete backup",children:[w.jsx(wc,{size:14,stroke:1.5}),"Delete"]}),w.jsxs("button",{type:"button",onClick:()=>n(c.backupPath,c.originalPath),style:{padding:"6px 12px",background:_.buttonPrimary,border:`1px solid ${_.buttonPrimary}`,color:_.textInverse,cursor:"pointer",fontSize:"12px",borderRadius:"8px",fontWeight:"500",fontFamily:F.body,display:"flex",alignItems:"center",gap:"4px"},onMouseEnter:d=>{d.currentTarget.style.background=_.buttonPrimaryHover},onMouseLeave:d=>{d.currentTarget.style.background=_.buttonPrimary},title:"Restore this backup",children:[w.jsx(sW,{size:14,stroke:1.5}),"Restore"]})]})]},c.backupPath||`backup-${f}`))}),w.jsx(Ch,{isOpen:o,onClose:()=>{s(!1),u(null)},onConfirm:()=>{l&&i(l),s(!1),u(null)},title:"Delete Backup",message:"Are you sure you want to delete this backup? This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",danger:!0})]})}function kW({detectedPaths:r,detecting:e,onDetect:t,onSelect:n,onView:a}){return r.length===0?null:w.jsxs("div",{style:{marginBottom:"8px"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[w.jsx("div",{style:{fontSize:"13px",color:_.textPrimary,fontWeight:"600",fontFamily:F.body},children:"Detected Configuration Files:"}),w.jsx("button",{type:"button",onClick:t,disabled:e,title:"Refresh detection",style:{padding:"4px 8px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,cursor:e?"not-allowed":"pointer",fontSize:"11px",borderRadius:"8px",opacity:e?.5:1,display:"flex",alignItems:"center",gap:"4px"},children:e?w.jsxs(w.Fragment,{children:[w.jsx(Hd,{size:12,stroke:1.5,style:{animation:"spin 1s linear infinite"}}),w.jsx("span",{children:"Detecting..."})]}):w.jsxs(w.Fragment,{children:[w.jsx(Hd,{size:12,stroke:1.5}),w.jsx("span",{children:"Refresh"})]})})]}),w.jsx("div",{"data-tour":"detected-editors",style:{display:"flex",flexDirection:"column",gap:"6px"},children:r.map((i,o)=>w.jsxs("button",{type:"button","data-tour":o===0?"first-detected-editor":void 0,onClick:()=>n(i.path),onDoubleClick:()=>{i.exists&&a(i.path)},style:{padding:"8px 12px",background:i.exists?`${_.accentBlue}20`:_.bgSecondary,border:`1px solid ${i.exists?_.accentBlue:_.borderMedium}`,color:_.textPrimary,cursor:"pointer",fontSize:"12px",borderRadius:"8px",textAlign:"left",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"all 0.2s"},onMouseEnter:s=>{s.currentTarget.style.background=i.exists?`${_.accentBlue}30`:_.bgHover},onMouseLeave:s=>{s.currentTarget.style.background=i.exists?`${_.accentBlue}20`:_.bgSecondary},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx("span",{style:{display:"inline-flex",alignItems:"center"},children:i.editor==="Cursor"?w.jsx(rs,{size:14,stroke:1.5}):w.jsx(Ww,{size:14,stroke:1.5})}),w.jsxs("div",{children:[w.jsx("div",{style:{fontWeight:"500"},children:i.editor}),w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:i.displayPath})]})]}),w.jsx("div",{style:{display:"flex",gap:"6px",alignItems:"center"},children:i.exists&&w.jsxs(w.Fragment,{children:[w.jsx("span",{style:{fontSize:"10px",padding:"2px 6px",background:_.success,color:_.textInverse,borderRadius:"6px",fontWeight:"500"},children:"Found"}),w.jsxs("button",{type:"button",onClick:s=>{s.stopPropagation(),a(i.path)},title:"View file content",style:{fontSize:"10px",padding:"2px 6px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px"},children:[w.jsx(Hw,{size:10,stroke:1.5}),w.jsx("span",{children:"View"})]})]})})]},`${i.editor}-${i.path}-${o}`))})]})}function LW({filePath:r,fileContent:e,updatePath:t,onFileSelect:n,onPathChange:a,onUpdatePathChange:i}){return w.jsxs(w.Fragment,{children:[w.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[w.jsxs("label",{"data-tour":"select-file",style:{padding:"8px 16px",background:_.buttonPrimary,border:`1px solid ${_.buttonPrimary}`,color:_.textInverse,cursor:"pointer",fontSize:"13px",borderRadius:"8px",fontWeight:"500",whiteSpace:"nowrap",transition:"background 0.2s"},onMouseEnter:o=>{o.currentTarget.style.background=_.buttonPrimaryHover},onMouseLeave:o=>{o.currentTarget.style.background=_.buttonPrimary},children:[w.jsx(HG,{size:14,stroke:1.5,style:{marginRight:"6px",display:"inline-block"}}),"Select File",w.jsx("input",{type:"file",accept:".json",onChange:n,style:{display:"none"}})]}),w.jsx("span",{style:{color:_.textTertiary,fontSize:"13px",fontWeight:"500",fontFamily:F.body},children:"OR"}),w.jsx("input",{type:"text",placeholder:"Enter file path (e.g., ~/.cursor/mcp.json)",value:r,onChange:a,style:{flex:1,padding:"8px 12px",background:_.bgCard,border:`1px solid ${_.borderMedium}`,color:_.textPrimary,fontSize:"13px",borderRadius:"8px"}})]}),e&&!r&&w.jsxs("div",{children:[w.jsx("label",{htmlFor:"update-path-input",style:{display:"block",fontSize:"12px",color:_.textSecondary,marginBottom:"6px"},children:"Optional: File Path to Update"}),w.jsx("input",{id:"update-path-input",type:"text",placeholder:"Enter file path to update (e.g., ~/.cursor/mcp.json)",value:t,onChange:i,style:{width:"100%",padding:"8px 12px",background:_.bgCard,border:`1px solid ${_.borderMedium}`,color:_.textPrimary,fontSize:"13px",borderRadius:"8px"}}),w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,marginTop:"6px",fontFamily:F.body},children:"Provide the file path if you want to update the original config file (backup will be created)"})]}),e&&w.jsxs("div",{style:{marginTop:"8px"},children:[w.jsx("div",{style:{color:_.textSecondary,fontSize:"12px",marginBottom:"6px",fontWeight:"500"},children:"File Content Preview"}),w.jsx("pre",{style:{background:_.bgCard,padding:"12px",borderRadius:"8px",fontSize:"12px",fontFamily:"monospace",color:_.textPrimary,maxHeight:"200px",overflow:"auto",border:`1px solid ${_.borderLight}`,lineHeight:"1.5"},children:e})]})]})}function AW({services:r,selectedServices:e,onSelectionChange:t}){return r.length===0?null:w.jsxs("div",{style:{marginTop:"16px"},children:[w.jsxs("div",{style:{marginBottom:"12px"},children:[w.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"8px",color:_.textPrimary,fontFamily:F.body},children:"Select Services"}),w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,lineHeight:"1.5",fontFamily:F.body},children:"Choose which services to include in the MCP Shark server. Only selected services will be available."})]}),w.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"12px",flexWrap:"wrap"},children:[w.jsx("button",{type:"button",onClick:()=>{t(new Set(r.map(n=>n.name)))},style:{padding:"4px 12px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,cursor:"pointer",fontSize:"12px",borderRadius:"8px"},children:"Select All"}),w.jsx("button",{type:"button",onClick:()=>{t(new Set)},style:{padding:"4px 12px",background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,cursor:"pointer",fontSize:"12px",borderRadius:"8px"},children:"Deselect All"}),w.jsxs("div",{style:{marginLeft:"auto",fontSize:"12px",color:_.textSecondary,display:"flex",alignItems:"center"},children:[e.size," of ",r.length," selected"]})]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",maxHeight:"300px",overflowY:"auto",padding:"8px",background:_.bgPrimary,borderRadius:"4px",border:`1px solid ${_.borderLight}`},children:r.map(n=>{const a=e.has(n.name);return w.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"10px",background:a?_.bgSelected:"transparent",border:`1px solid ${a?_.accentBlue:_.borderMedium}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:i=>{a||(i.currentTarget.style.background=_.bgHover)},onMouseLeave:i=>{a||(i.currentTarget.style.background="transparent")},children:[w.jsx("input",{type:"checkbox",checked:a,onChange:i=>{const o=new Set(e);i.target.checked?o.add(n.name):o.delete(n.name),t(o)},style:{width:"18px",height:"18px",cursor:"pointer"}}),w.jsxs("div",{style:{flex:1},children:[w.jsx("div",{style:{fontWeight:"500",color:_.textPrimary,fontSize:"13px",marginBottom:"4px"},children:n.name}),w.jsxs("div",{style:{fontSize:"11px",color:_.textSecondary,display:"flex",gap:"12px",flexWrap:"wrap"},children:[w.jsx("span",{style:{padding:"2px 6px",background:n.type==="http"?"#0e639c":"#4a9e5f",color:_.textInverse,borderRadius:"6px",fontSize:"10px",fontWeight:"500"},children:n.type.toUpperCase()}),n.url&&w.jsx("span",{style:{fontFamily:"monospace",fontSize:"11px"},children:n.url}),n.command&&w.jsxs("span",{style:{fontFamily:"monospace",fontSize:"11px"},children:[n.command," ",n.args?.join(" ")||""]})]})]})]},n.name)})}),e.size===0&&w.jsx("div",{style:{marginTop:"8px",padding:"8px 12px",background:nc(_.error,.15),border:`1px solid ${_.error}`,borderRadius:"8px",color:_.error,fontSize:"12px"},children:"⚠️ Please select at least one service to start the server"})]})}function IW({detectedPaths:r,detecting:e,onDetect:t,onPathSelect:n,onViewConfig:a,filePath:i,fileContent:o,updatePath:s,onFileSelect:l,onPathChange:u,onUpdatePathChange:c,services:f,selectedServices:d,onSelectionChange:h}){return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"20px",boxShadow:`0 2px 4px ${_.shadowSm}`},children:[w.jsxs("div",{style:{marginBottom:"16px"},children:[w.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"8px",color:_.textPrimary,fontFamily:F.body},children:"Configuration File"}),w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,lineHeight:"1.5",fontFamily:F.body},children:"Select your MCP configuration file or provide a file path. The file will be converted to MCP Shark format and used to start the server."})]}),w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[w.jsx(kW,{detectedPaths:r,detecting:e,onDetect:t,onSelect:n,onView:a}),w.jsx(LW,{filePath:i,fileContent:o,updatePath:s,onFileSelect:l,onPathChange:u,onUpdatePathChange:c}),w.jsx(AW,{services:f,selectedServices:d,onSelectionChange:h})]})]})}function DW({viewingConfig:r,configContent:e,loadingConfig:t,onClose:n,viewingBackup:a,backupContent:i,loadingBackup:o}){const s=a!==null;if(!(r!==null)&&!s)return null;const u=s?i:e,c=s?o:t,f=s?"Backup File":"MCP Configuration File";return w.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"20px",border:"none",margin:0,width:"100%",height:"100%"},onClick:n,onKeyDown:d=>{d.key==="Escape"&&n()},children:w.jsxs("div",{role:"document",style:{background:_.bgPrimary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",width:"100%",maxWidth:"800px",maxHeight:"90vh",display:"flex",flexDirection:"column",overflow:"hidden"},onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),children:[w.jsxs("div",{style:{padding:"16px",borderBottom:"1px solid #333",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsxs("div",{children:[w.jsx("h3",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"4px",color:_.textPrimary},children:f}),u&&w.jsxs("div",{style:{fontSize:"12px",color:"#858585"},children:[u.displayPath,s&&u.createdAt&&w.jsxs("span",{style:{marginLeft:"12px",color:"#666"},children:["Created: ",new Date(u.createdAt).toLocaleString()]})]})]}),w.jsx("button",{type:"button",onClick:n,style:{background:"transparent",border:"none",color:_.textPrimary,cursor:"pointer",fontSize:"24px",padding:"0",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]}),w.jsx("div",{style:{flex:1,overflow:"auto",padding:"20px"},children:c?w.jsx("div",{style:{color:"#858585",textAlign:"center",padding:"40px"},children:"Loading..."}):u?w.jsx("pre",{style:{background:_.bgPrimary,padding:"16px",borderRadius:"4px",fontSize:"13px",fontFamily:"monospace",color:_.textPrimary,overflow:"auto",border:`1px solid ${_.borderLight}`,lineHeight:"1.6",margin:0},children:u.content}):w.jsx("div",{style:{color:"#f48771",textAlign:"center",padding:"40px"},children:"Failed to load file content"})})]})})}function PW({message:r,error:e}){return!r&&!e?null:w.jsx("div",{style:{marginBottom:"20px",padding:"12px 16px",background:nc(r?_.info:_.error,.15),border:`1px solid ${r?_.info:_.error}`,borderRadius:"8px",color:r?_.textPrimary:_.error,fontSize:"13px",lineHeight:"1.6",fontFamily:F.body,boxShadow:`0 2px 4px ${_.shadowSm}`},children:r||e})}function RW({status:r,loading:e,onStart:t,onStop:n,canStart:a}){return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"20px",boxShadow:`0 2px 4px ${_.shadowSm}`},children:[w.jsx("div",{style:{marginBottom:"16px"},children:w.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"8px",color:_.textPrimary,fontFamily:F.body},children:"Server Control"})}),w.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center",flexWrap:"wrap"},children:[r.running?w.jsx("button",{type:"button",onClick:n,disabled:e,style:{padding:"10px 20px",background:_.buttonDanger,border:`1px solid ${_.buttonDanger}`,color:_.textInverse,cursor:e?"not-allowed":"pointer",fontSize:"13px",fontFamily:F.body,fontWeight:"500",borderRadius:"8px",opacity:e?.5:1,transition:"all 0.2s",boxShadow:`0 2px 4px ${_.shadowSm}`},onMouseEnter:i=>{e||(i.currentTarget.style.background=_.buttonDangerHover,i.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:i=>{i.currentTarget.style.background=_.buttonDanger,i.currentTarget.style.transform="translateY(0)"},children:e?"Stopping...":"Stop MCP Shark"}):w.jsx("button",{type:"button","data-tour":"start-button",onClick:t,disabled:e||!a,style:{padding:"10px 20px",background:_.buttonPrimary,border:`1px solid ${_.buttonPrimary}`,color:_.textInverse,cursor:e||!a?"not-allowed":"pointer",fontSize:"13px",fontFamily:F.body,fontWeight:"500",borderRadius:"8px",opacity:e||!a?.5:1,transition:"all 0.2s",boxShadow:`0 2px 4px ${_.shadowSm}`},onMouseEnter:i=>{!e&&a&&(i.currentTarget.style.background=_.buttonPrimaryHover,i.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:i=>{i.currentTarget.style.background=_.buttonPrimary,i.currentTarget.style.transform="translateY(0)"},children:e?"Processing...":"Start MCP Shark"}),w.jsxs("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"10px",padding:"8px 16px",background:_.bgPrimary,border:`1px solid ${_.borderLight}`,borderRadius:"8px"},children:[w.jsx("div",{style:{width:"10px",height:"10px",borderRadius:"50%",background:r.running?_.success:_.textTertiary,boxShadow:r.running?`0 0 8px ${_.success}80`:"none",transition:"all 0.3s"}}),w.jsx("span",{style:{color:_.textPrimary,fontSize:"13px",fontWeight:"500",fontFamily:F.body},children:r.running?r.pid?`Running (PID: ${r.pid})`:"Running":"Stopped"})]})]})]})}function EW(){return w.jsxs("div",{style:{marginBottom:"24px"},children:[w.jsx("h2",{style:{fontSize:"24px",fontWeight:"700",marginBottom:"12px",color:_.textPrimary,fontFamily:F.body},children:"MCP Shark Server Setup"}),w.jsx("p",{style:{fontSize:"15px",color:_.textSecondary,lineHeight:"1.6",fontFamily:F.body},children:"Convert your MCP configuration file and start the MCP Shark server to aggregate multiple MCP servers into a single endpoint."})]})}function zW({filePath:r,updatePath:e}){return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"24px",boxShadow:`0 2px 4px ${_.shadowSm}`},children:[w.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"12px",color:_.textPrimary,fontFamily:F.body},children:"What This Does"}),w.jsxs("ul",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",color:_.textSecondary,lineHeight:"1.8",fontFamily:F.body},children:[w.jsxs("li",{children:["Converts your MCP config (",w.jsx("code",{style:{color:_.accentOrange,fontFamily:F.mono},children:"mcpServers"}),") to MCP Shark format (",w.jsx("code",{style:{color:_.accentOrange,fontFamily:F.mono},children:"servers"}),")"]}),w.jsxs("li",{children:["Starts the MCP Shark server on"," ",w.jsx("code",{style:{color:_.accentBlue,fontFamily:F.mono},children:"http://localhost:9851/mcp"})]}),w.jsx("li",{children:r||e?"Updates your original config file to point to the MCP Shark server (creates a backup first)":"Note: Provide a file path to update your original config file automatically"}),(r||e)&&w.jsx("li",{style:{color:_.success,marginTop:"4px",fontWeight:"500"},children:"✓ Original config will be automatically restored when you stop the server or close the UI"})]})]})}function OW(){const[r,e]=Z.useState([]),[t,n]=Z.useState(!0),[a,i]=Z.useState([]),[o,s]=Z.useState(!1),[l,u]=Z.useState(null),[c,f]=Z.useState(null),[d,h]=Z.useState(!1),[v,y]=Z.useState(null),[m,x]=Z.useState(null),[b,T]=Z.useState(!1),C=Z.useCallback(async()=>{n(!0);try{const R=await(await fetch("/api/config/detect")).json();e(R.detected||[])}catch(P){console.error("Failed to detect config paths:",P)}finally{n(!1)}},[]),k=Z.useCallback(async()=>{s(!0);try{const R=await(await fetch("/api/config/backups")).json();i(R.backups||[])}catch(P){console.error("Failed to load backups:",P)}finally{s(!1)}},[]),L=async P=>{h(!0),u(P);try{const R=await fetch(`/api/config/read?filePath=${encodeURIComponent(P)}`),z=await R.json();R.ok?f(z):f(null)}catch{f(null)}finally{h(!1)}},A=async P=>{T(!0),y(P);try{const R=await fetch(`/api/config/backup/view?backupPath=${encodeURIComponent(P)}`),z=await R.json();R.ok?x(z):x(null)}catch{x(null)}finally{T(!1)}},D=async P=>{try{return(await fetch("/api/config/backup/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backupPath:P})})).ok?(await k(),!0):!1}catch(R){return console.error("Failed to delete backup:",R),!1}};return Z.useEffect(()=>{C(),k()},[C,k]),{detectedPaths:r,detecting:t,detectConfigPaths:C,backups:a,loadingBackups:o,loadBackups:k,viewingConfig:l,configContent:c,loadingConfig:d,handleViewConfig:L,setViewingConfig:u,setConfigContent:f,viewingBackup:v,backupContent:m,loadingBackup:b,handleViewBackup:A,handleDeleteBackup:D,setViewingBackup:y,setBackupContent:x}}function NW(r,e){const[t,n]=Z.useState([]),[a,i]=Z.useState(new Set),[o,s]=Z.useState(!1),l=Z.useCallback(async()=>{if(!r&&!e){n([]),i(new Set);return}s(!0);try{const c=await fetch("/api/config/services",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r?{fileContent:r}:{filePath:e})}),f=await c.json();c.ok&&f.services?(n(f.services),i(new Set(f.services.map(d=>d.name)))):(n([]),i(new Set))}catch(u){console.error("Failed to extract services:",u),n([]),i(new Set)}finally{s(!1)}},[r,e]);return Z.useEffect(()=>{r||e?l():(n([]),i(new Set))},[r,e,l]),{services:t,selectedServices:a,setSelectedServices:i,loadingServices:o}}function BW(){const[r,e]=Z.useState(""),[t,n]=Z.useState(""),[a,i]=Z.useState(""),[o,s]=Z.useState({running:!1,pid:null}),[l,u]=Z.useState(!1),[c,f]=Z.useState(null),[d,h]=Z.useState(null),[v,y]=Z.useState(!1),[m,x]=Z.useState({backupPath:null,originalPath:null}),{services:b,selectedServices:T,setSelectedServices:C}=NW(r,t),{detectedPaths:k,detecting:L,detectConfigPaths:A,backups:D,loadingBackups:P,loadBackups:R,viewingConfig:z,configContent:B,loadingConfig:N,handleViewConfig:W,setViewingConfig:$,setConfigContent:H,viewingBackup:U,backupContent:G,loadingBackup:X,handleViewBackup:K,handleDeleteBackup:V,setViewingBackup:Y,setBackupContent:ne}=OW();Z.useEffect(()=>{Be();const ke=setInterval(Be,2e3);return()=>clearInterval(ke)},[]);const ue=(ke,$e)=>{x({backupPath:ke,originalPath:$e}),y(!0)},fe=async()=>{const{backupPath:ke,originalPath:$e}=m;y(!1);try{const tt=await fetch("/api/config/restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backupPath:ke,originalPath:$e})}),bt=await tt.json();tt.ok?(f(bt.message||"Config restored successfully"),h(null),R(),A()):(h(bt.error||"Failed to restore backup"),f(null))}catch(tt){h(tt.message||"Failed to restore backup"),f(null)}},Ce=async ke=>{await V(ke)?(f("Backup deleted successfully"),h(null)):(h("Failed to delete backup"),f(null))},Be=async()=>{try{const $e=await(await fetch("/api/composite/status")).json();s($e)}catch(ke){console.error("Failed to fetch status:",ke)}},ye=ke=>{const $e=ke.target.files[0];if($e){const tt=new FileReader;tt.onload=bt=>{e(bt.target.result)},tt.readAsText($e)}},ce=ke=>{const $e=ke.target.value;n($e),$e&&e("")},we=ke=>{i(ke.target.value)},xe=async()=>{u(!0),h(null),f(null);try{const ke=r?{fileContent:r,filePath:a||null}:{filePath:t};T.size>0&&(ke.selectedServices=Array.from(T));const $e=await fetch("/api/composite/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)}),tt=await $e.json();if($e.ok){const bt=tt.message||"MCP Shark server started successfully";f(tt.backupPath?`${bt} (Backup saved to ${tt.backupPath})`:bt),e(""),n(""),i(""),C(new Set),setTimeout(Be,1e3)}else h(tt.error||"Failed to setup MCP Shark server")}catch(ke){h(ke.message||"Failed to setup MCP Shark server")}finally{u(!1)}},Ie=async()=>{u(!0),h(null),f(null);try{const ke=await fetch("/api/composite/stop",{method:"POST"}),$e=await ke.json();if(ke.ok){const tt=$e.message||"MCP Shark server stopped";f($e.message?.includes("restored")?"MCP Shark server stopped and original config file restored":tt),setTimeout(Be,1e3)}else h($e.error||"Failed to stop MCP Shark server")}catch(ke){h(ke.message||"Failed to stop MCP Shark server")}finally{u(!1)}},dt=(r||t)&&(b.length===0||T.size>0);return w.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",background:_.bgPrimary,overflow:"auto"},children:[w.jsxs("div",{style:{width:"100%",maxWidth:"1200px",margin:"0 auto",padding:"32px",minHeight:"100%",boxSizing:"border-box"},children:[w.jsx(EW,{}),w.jsx(IW,{detectedPaths:k,detecting:L,onDetect:A,onPathSelect:ke=>{n(ke),e(""),i(ke)},onViewConfig:W,filePath:t,fileContent:r,updatePath:a,onFileSelect:ye,onPathChange:ce,onUpdatePathChange:we,services:b,selectedServices:T,onSelectionChange:C}),w.jsx(RW,{status:o,loading:l,onStart:xe,onStop:Ie,canStart:dt}),w.jsx(PW,{message:c,error:d}),w.jsx(MW,{backups:D,loadingBackups:P,onRefresh:R,onRestore:ue,onView:K,onDelete:Ce}),w.jsx(zW,{filePath:t,updatePath:a})]}),w.jsx(Ch,{isOpen:v,onClose:()=>y(!1),onConfirm:fe,title:"Restore Backup",message:"Are you sure you want to restore this backup? This will overwrite the current config file.",confirmText:"Restore",cancelText:"Cancel",danger:!1}),w.jsx(DW,{viewingConfig:z,configContent:B,loadingConfig:N,viewingBackup:U,backupContent:G,loadingBackup:X,onClose:()=>{$(null),H(null),Y(null),ne(null)}})]})}function jW({elementRect:r,_onClick:e}){if(!r)return w.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.8)"}});const t=8,n=3;return w.jsxs(w.Fragment,{children:[r.top>0&&w.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,height:`${r.top-t}px`,background:"rgba(0, 0, 0, 0.8)",zIndex:9999}}),r.bottom<window.innerHeight&&w.jsx("div",{style:{position:"fixed",bottom:0,left:0,right:0,height:`${window.innerHeight-r.bottom-t}px`,background:"rgba(0, 0, 0, 0.8)",zIndex:9999}}),r.left>0&&w.jsx("div",{style:{position:"fixed",top:`${Math.max(0,r.top-t)}px`,left:0,width:`${r.left-t}px`,height:`${r.height+t*2}px`,background:"rgba(0, 0, 0, 0.8)",zIndex:9999}}),r.right<window.innerWidth&&w.jsx("div",{style:{position:"fixed",top:`${Math.max(0,r.top-t)}px`,right:0,width:`${window.innerWidth-r.right-t}px`,height:`${r.height+t*2}px`,background:"rgba(0, 0, 0, 0.8)",zIndex:9999}}),w.jsx("div",{style:{position:"fixed",left:r.left-t-n,top:r.top-t-n,width:r.width+(t+n)*2,height:r.height+(t+n)*2,border:`${n}px solid #4ec9b0`,borderRadius:"8px",boxShadow:"0 0 0 2px rgba(78, 201, 176, 0.3), 0 0 20px rgba(78, 201, 176, 0.5), 0 0 40px rgba(78, 201, 176, 0.3), inset 0 0 20px rgba(78, 201, 176, 0.1)",zIndex:1e4,pointerEvents:"none",animation:"pulse 2s ease-in-out infinite"}}),w.jsx("style",{children:`
|
|
9
|
-
@keyframes pulse {
|
|
10
|
-
0%, 100% {
|
|
11
|
-
box-shadow:
|
|
12
|
-
0 0 0 2px rgba(78, 201, 176, 0.3),
|
|
13
|
-
0 0 20px rgba(78, 201, 176, 0.5),
|
|
14
|
-
0 0 40px rgba(78, 201, 176, 0.3),
|
|
15
|
-
inset 0 0 20px rgba(78, 201, 176, 0.1);
|
|
16
|
-
}
|
|
17
|
-
50% {
|
|
18
|
-
box-shadow:
|
|
19
|
-
0 0 0 3px rgba(78, 201, 176, 0.4),
|
|
20
|
-
0 0 30px rgba(78, 201, 176, 0.7),
|
|
21
|
-
0 0 60px rgba(78, 201, 176, 0.5),
|
|
22
|
-
inset 0 0 30px rgba(78, 201, 176, 0.2);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
`})]})}const FW=({size:r=16,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Close icon",children:[w.jsx("title",{children:"Close icon"}),w.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),VW=({size:r=16,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Chevron right icon",children:[w.jsx("title",{children:"Chevron right icon"}),w.jsx("polyline",{points:"9 18 15 12 9 6"})]}),GW=({size:r=16,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Chevron left icon",children:[w.jsx("title",{children:"Chevron left icon"}),w.jsx("polyline",{points:"15 18 9 12 15 6"})]});function WW({currentStep:r,totalSteps:e,onNext:t,onPrevious:n,onSkip:a}){return w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px",pointerEvents:"none"},children:[w.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),a()},onMouseDown:i=>i.stopPropagation(),style:{background:"transparent",border:`1px solid ${_.borderMedium}`,color:_.textSecondary,padding:"8px 16px",borderRadius:"8px",cursor:"pointer",fontSize:"13px",fontFamily:F.body,flex:1,pointerEvents:"auto"},onMouseEnter:i=>{i.currentTarget.style.background=_.bgHover,i.currentTarget.style.color=_.textPrimary,i.currentTarget.style.borderColor=_.borderMedium},onMouseLeave:i=>{i.currentTarget.style.background="transparent",i.currentTarget.style.color=_.textSecondary,i.currentTarget.style.borderColor=_.borderMedium},children:"Skip Tour"}),w.jsxs("div",{style:{display:"flex",gap:"8px",pointerEvents:"auto"},children:[r>0&&w.jsxs("button",{type:"button",onClick:i=>{i.stopPropagation(),n()},onMouseDown:i=>i.stopPropagation(),style:{background:_.buttonSecondary,border:`1px solid ${_.borderMedium}`,color:_.textPrimary,padding:"8px 12px",borderRadius:"8px",cursor:"pointer",fontSize:"13px",fontFamily:F.body,display:"flex",alignItems:"center",gap:"4px"},onMouseEnter:i=>{i.currentTarget.style.background=_.buttonSecondaryHover},onMouseLeave:i=>{i.currentTarget.style.background=_.buttonSecondary},children:[w.jsx(GW,{size:14}),"Previous"]}),w.jsxs("button",{type:"button",onClick:i=>{i.stopPropagation(),t()},onMouseDown:i=>i.stopPropagation(),style:{background:_.buttonPrimary,border:"none",color:_.textInverse,padding:"8px 16px",borderRadius:"8px",cursor:"pointer",fontSize:"13px",fontFamily:F.body,display:"flex",alignItems:"center",gap:"4px",fontWeight:"500"},onMouseEnter:i=>{i.currentTarget.style.background=_.buttonPrimaryHover},onMouseLeave:i=>{i.currentTarget.style.background=_.buttonPrimary},children:[r===e-1?"Finish":"Next",r<e-1&&w.jsx(VW,{size:14})]})]})]})}function HW({step:r,currentStep:e,totalSteps:t,isDragging:n,onSkip:a}){return w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"12px"},children:[w.jsxs("div",{style:{flex:1,pointerEvents:"none"},children:[w.jsx("h3",{style:{margin:0,color:_.accentBlue,fontSize:"16px",fontWeight:"600",fontFamily:F.body},children:r.title}),w.jsxs("p",{style:{margin:"4px 0 0 0",color:_.textTertiary,fontSize:"12px",fontFamily:F.body},children:["Step ",e+1," of ",t,n&&w.jsx("span",{style:{marginLeft:"8px",fontSize:"11px"},children:"• Dragging"})]})]}),w.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),a()},onMouseDown:i=>i.stopPropagation(),style:{background:"transparent",border:"none",color:_.textTertiary,cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",borderRadius:"8px",marginLeft:"12px",pointerEvents:"auto"},onMouseEnter:i=>{i.currentTarget.style.background=_.bgHover,i.currentTarget.style.color=_.textPrimary},onMouseLeave:i=>{i.currentTarget.style.background="transparent",i.currentTarget.style.color=_.textTertiary},title:"Skip tour",children:w.jsx(FW,{size:18})})]})}function $W(r,e,t){const[n,a]=Z.useState({x:0,y:0}),[i,o]=Z.useState(!1),[s,l]=Z.useState({x:0,y:0});Z.useEffect(()=>{a({x:0,y:0})},[]);const u=(f,d)=>{if(f.preventDefault(),f.stopPropagation(),d.current){const h=d.current.getBoundingClientRect();l({x:f.clientX-h.left,y:f.clientY-h.top}),o(!0)}};return Z.useEffect(()=>{if(!i)return;const f=h=>{a({x:h.clientX-s.x,y:h.clientY-s.y})},d=()=>{o(!1)};return window.addEventListener("mousemove",f),window.addEventListener("mouseup",d),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}},[i,s]),{position:(()=>{if(!r)return{left:0,top:0,transform:"none"};const f=350,d=200,h=20;if(n.x!==0||n.y!==0){const T=Math.max(10,Math.min(n.x,window.innerWidth-f-10)),C=Math.max(10,Math.min(n.y,window.innerHeight-d-10));return{left:T,top:C,transform:"none"}}const v=e.position||"bottom",m=((T,C,k,L,A)=>{if(T==="left"){const R=C.left-k-A;return{left:R<10?C.right+A:R,top:C.top+C.height/2,transform:"translateY(-50%)"}}if(T==="right"){const R=C.right+A;return{left:R+k>window.innerWidth-10?C.left-k-A:R,top:C.top+C.height/2,transform:"translateY(-50%)"}}if(T==="top"){const R=C.top-L-A,z=R<10?C.bottom+A:R;return{left:C.left+C.width/2,top:z,transform:"translate(-50%, 0)"}}const D=C.bottom+A,P=D+L>window.innerHeight-10?C.top-L-A:D;return{left:C.left+C.width/2,top:P,transform:"translate(-50%, 0)"}})(v,r,f,d,h),x=Math.max(10,Math.min(m.left,window.innerWidth-f-10)),b=Math.max(10,Math.min(m.top,window.innerHeight-d-10));return{left:x,top:b,transform:m.transform}})(),isDragging:i,handleMouseDown:u}}function UW({elementRect:r,step:e,currentStep:t,totalSteps:n,onNext:a,onPrevious:i,onSkip:o}){const s=Z.useRef(null),{position:l,isDragging:u,handleMouseDown:c}=$W(r,e);return r?w.jsxs("button",{type:"button",ref:s,onMouseDown:f=>c(f,s),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),c(f,s))},"aria-label":"Draggable tooltip",style:{position:"fixed",left:`${l.left}px`,top:`${l.top}px`,transform:l.transform,background:_.bgCard,border:`2px solid ${_.accentBlue}`,borderRadius:"12px",padding:"20px",maxWidth:"350px",minWidth:"300px",boxShadow:`0 4px 20px ${_.shadowLg}`,zIndex:10001,pointerEvents:"auto",cursor:u?"grabbing":"grab",userSelect:"none"},onClick:f=>{const d=f.target;d.tagName!=="BUTTON"&&d.tagName!=="INPUT"&&!d.closest("button")&&f.stopPropagation()},children:[w.jsx(HW,{step:e,currentStep:t,totalSteps:n,isDragging:u,onSkip:o}),w.jsx("div",{style:{color:_.textPrimary,fontSize:"14px",lineHeight:"1.6",marginBottom:"20px",pointerEvents:"none",fontFamily:F.body},children:e.content}),w.jsx(WW,{currentStep:t,totalSteps:n,onNext:a,onPrevious:i,onSkip:o})]}):null}function YW({steps:r,onComplete:e,onSkip:t,onStepChange:n}){const[a,i]=Z.useState(0),[o,s]=Z.useState(null),[l,u]=Z.useState(null),c=Z.useRef(null);Z.useEffect(()=>{if(!o)return;const m=()=>{if(o){const b=o.getBoundingClientRect();u(b)}};m();const x={passive:!0,capture:!0};return window.addEventListener("scroll",m,x),window.addEventListener("resize",m,{passive:!0}),()=>{window.removeEventListener("scroll",m,x),window.removeEventListener("resize",m,{passive:!0})}},[o]),Z.useEffect(()=>{if(r.length===0)return;const m=r[a];if(!m)return;n&&n(a);const x=setTimeout(()=>{const b=document.querySelector(m.target);b?(s(b),b.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),setTimeout(()=>{const T=b.getBoundingClientRect();u(T)},300)):(s(null),u(null))},200);return()=>clearTimeout(x)},[a,r,n]);const f=()=>{if(a<r.length-1){const m=a+1;i(m),n&&n(m)}else h()},d=()=>{if(a>0){const m=a-1;i(m),n&&n(m)}},h=async()=>{try{await fetch("/api/help/dismiss",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tourCompleted:!0})})}catch(m){console.error("Failed to save tour state:",m)}e()},v=()=>{h(),t&&t()};if(r.length===0||a>=r.length)return null;const y=r[a];return w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:c,role:"presentation",style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:9998,pointerEvents:"auto"},onClick:v,onKeyDown:m=>{m.key==="Escape"&&v()},children:w.jsx(jW,{elementRect:l})}),l&&w.jsx(UW,{elementRect:l,step:y,currentStep:a,totalSteps:r.length,onNext:f,onPrevious:d,onSkip:v})]})}function XW({engineStatus:r,rules:e=[]}){const[t,n]=Z.useState(!0),a=e.filter(i=>i.enabled);return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"16px",marginBottom:"24px"},children:[w.jsx("div",{style:{fontSize:"14px",fontWeight:600,fontFamily:F.body,color:_.textPrimary,marginBottom:"12px"},children:"YARA Engine Status"}),w.jsxs("div",{style:{display:"flex",gap:"24px",fontSize:"12px",fontFamily:F.body,marginBottom:a.length>0?"16px":0},children:[w.jsxs("span",{style:{color:_.textSecondary},children:["Native:"," ",w.jsx("span",{style:{color:r?.nativeAvailable?_.success:_.warning,fontWeight:500},children:r?.nativeAvailable?"Available":"Using Fallback"})]}),w.jsxs("span",{style:{color:_.textSecondary},children:["Loaded Rules:"," ",w.jsx("span",{style:{color:"#0d9488",fontWeight:500},children:r?.loadedRulesCount||0})]}),w.jsxs("span",{style:{color:_.textSecondary},children:["Compiled:"," ",w.jsx("span",{style:{color:"#0d9488",fontWeight:500},children:r?.compiledRulesCount||0})]})]}),a.length>0&&w.jsxs("div",{children:[w.jsxs("button",{type:"button",onClick:()=>n(!t),style:{background:"transparent",border:"none",padding:"4px 0",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px",fontSize:"12px",fontFamily:F.body,color:_.textSecondary},children:[t?w.jsx(ui,{size:14}):w.jsx(Dl,{size:14}),"Active Rules (",a.length,")"]}),t&&w.jsx("div",{style:{marginTop:"8px",display:"flex",flexWrap:"wrap",gap:"8px"},children:a.map(i=>w.jsxs("div",{style:{background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",padding:"6px 10px",fontSize:"11px",fontFamily:F.mono,color:_.textPrimary,display:"flex",alignItems:"center",gap:"6px"},children:[w.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:i.source==="predefined"?"#0d9488":"#57534e"}}),i.name,i.severity&&w.jsx("span",{style:{fontSize:"9px",padding:"1px 4px",borderRadius:"3px",background:_[`${i.severity}Bg`]||_.bgSecondary,color:_[i.severity]||_.textTertiary,textTransform:"uppercase"},children:i.severity})]},i.rule_id))})]}),r?.nativeError&&w.jsx("div",{style:{fontSize:"11px",color:_.textSecondary,fontFamily:F.body,marginTop:"8px"},children:r.nativeError})]})}function ZW({isEditing:r,onNew:e,onCancel:t,onResetDefaults:n,resetting:a,hasPredefined:i}){return w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[w.jsxs("h3",{style:{fontSize:"14px",fontWeight:600,color:_.textSecondary,fontFamily:F.body,textTransform:"uppercase",margin:0,display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx(rs,{size:16}),"YARA Rules"]}),w.jsxs("div",{style:{display:"flex",gap:"8px"},children:[!r&&i&&n&&w.jsxs("button",{type:"button",onClick:n,disabled:a,style:{background:"transparent",color:a?_.textTertiary:_.textSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",padding:"8px 14px",cursor:a?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:F.body},children:[w.jsx(Hd,{size:14,className:a?"spin":""}),a?"Resetting...":"Reset Defaults"]}),!r&&w.jsxs("button",{type:"button",onClick:e,style:{background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",padding:"8px 14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:600},children:[w.jsx(rW,{size:14}),"New Rule"]}),r&&w.jsxs("button",{type:"button",onClick:t,style:{background:"transparent",color:_.textSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",padding:"8px 14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:F.body},children:[w.jsx(im,{size:14}),"Cancel"]})]})]})}function KW({rule:r,onEdit:e,onDelete:t,onToggle:n}){return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"12px 16px",marginBottom:"8px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsxs("div",{style:{flex:1},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[w.jsx("span",{style:{fontFamily:F.mono,fontSize:"13px",color:_.textPrimary},children:r.name}),w.jsx("span",{style:{background:r.enabled?_.successBg:_.bgSecondary,color:r.enabled?_.success:_.textTertiary,padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontFamily:F.body,textTransform:"uppercase"},children:r.enabled?"enabled":"disabled"}),r.severity&&w.jsx("span",{style:{background:_[`${r.severity}Bg`]||_.bgSecondary,color:_[r.severity]||_.textSecondary,padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontFamily:F.body,textTransform:"uppercase"},children:r.severity}),r.source&&w.jsx("span",{style:{background:r.source==="predefined"?_.infoBg:_.bgSecondary,color:r.source==="predefined"?_.info:_.textTertiary,padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontFamily:F.body,textTransform:"uppercase"},children:r.source})]}),r.description&&w.jsx("p",{style:{color:_.textSecondary,fontSize:"12px",margin:0},children:r.description})]}),w.jsxs("div",{style:{display:"flex",gap:"8px"},children:[w.jsx("button",{type:"button",onClick:()=>n(r.rule_id,!r.enabled),style:{background:"transparent",border:"none",color:_.textSecondary,cursor:"pointer",padding:"4px 8px",fontSize:"11px",fontFamily:F.body},children:r.enabled?"Disable":"Enable"}),w.jsx("button",{type:"button",onClick:()=>e(r),style:{background:"transparent",border:"none",color:_.accent,cursor:"pointer",padding:"4px 8px",fontSize:"11px",fontFamily:F.body},children:"Edit"}),w.jsx("button",{type:"button",onClick:()=>t(r.rule_id),style:{background:"transparent",border:"none",color:_.critical,cursor:"pointer",padding:"4px"},children:w.jsx(wc,{size:14})})]})]})}function qW({validation:r}){return r?w.jsxs("div",{style:{marginBottom:"12px"},children:[r.errors?.map(e=>w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",color:_.critical,fontSize:"12px",fontFamily:F.body,marginBottom:"4px"},children:[w.jsx(ac,{size:14}),e]},e)),r.warnings?.map(e=>w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",color:_.warning,fontSize:"12px",fontFamily:F.body,marginBottom:"4px"},children:[w.jsx(ac,{size:14}),e]},e))]}):null}function QW({content:r,onChange:e,onSave:t,onCancel:n,validation:a,saving:i}){return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"16px",marginBottom:"16px"},children:[w.jsx(qW,{validation:a}),w.jsx("textarea",{value:r,onChange:o=>e(o.target.value),placeholder:"Enter YARA rule...",style:{width:"100%",minHeight:"300px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"12px",fontFamily:F.mono,fontSize:"12px",color:_.textPrimary,resize:"vertical",outline:"none"}}),w.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"12px"},children:[w.jsx("button",{type:"button",onClick:n,style:{background:"transparent",color:_.textSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",padding:"8px 16px",cursor:"pointer",fontSize:"12px",fontFamily:F.body},children:"Cancel"}),w.jsxs("button",{type:"button",onClick:t,disabled:i,style:{background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",padding:"8px 16px",cursor:i?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:600,opacity:i?.6:1},children:[w.jsx(aN,{size:14}),i?"Saving...":"Save Rule"]})]})]})}const JW=`rule custom_mcp_security_rule : security
|
|
26
|
-
{
|
|
27
|
-
meta:
|
|
28
|
-
description = "Custom MCP security rule"
|
|
29
|
-
author = "Your Name"
|
|
30
|
-
severity = "medium"
|
|
31
|
-
owasp_id = "MCP01"
|
|
32
|
-
|
|
33
|
-
strings:
|
|
34
|
-
$suspicious = "suspicious_pattern" nocase
|
|
35
|
-
$secret = /sk-[a-zA-Z0-9]{40,}/
|
|
36
|
-
|
|
37
|
-
condition:
|
|
38
|
-
any of them
|
|
39
|
-
}`;function eH(){return w.jsx("div",{style:{textAlign:"center",color:_.textSecondary,padding:"32px",background:_.bgCard,borderRadius:"12px",border:`1px solid ${_.borderLight}`,fontFamily:F.body,fontSize:"13px"},children:'No custom rules defined. Click "New Rule" to create one.'})}function tH({rules:r=[],onSave:e,onDelete:t,onToggle:n,onResetDefaults:a}){const[i,o]=Z.useState(!1),[s,l]=Z.useState(null),[u,c]=Z.useState(""),[f,d]=Z.useState(null),[h,v]=Z.useState(!1),[y,m]=Z.useState(!1),x=Z.useCallback(()=>{c(JW),l(null),d(null),o(!0)},[]),b=Z.useCallback(D=>{c(D.content),l(D),d(null),o(!0)},[]),T=Z.useCallback(()=>{o(!1),c(""),l(null),d(null)},[]),C=Z.useCallback(async()=>{v(!0);try{const D=await e({rule_id:s?.rule_id,content:u,enabled:s?.enabled!==!1});D.success?T():d({errors:D.errors})}catch(D){d({errors:[D.message]})}finally{v(!1)}},[u,s,e,T]),k=Z.useCallback(async()=>{if(a){m(!0);try{await a()}finally{m(!1)}}},[a]),L=r.filter(D=>D.source==="predefined"),A=r.filter(D=>D.source==="custom");return w.jsxs("div",{style:{marginTop:"24px"},children:[w.jsx(ZW,{isEditing:i,onNew:x,onCancel:T,onResetDefaults:k,resetting:y,hasPredefined:L.length>0||A.length>0}),i&&w.jsx(QW,{content:u,onChange:c,onSave:C,onCancel:T,validation:f,saving:h}),!i&&r.length===0&&w.jsx(eH,{}),!i&&L.length>0&&w.jsx(KL,{title:"Predefined Rules",rules:L,handlers:{handleEdit:b,onDelete:t,onToggle:n}}),!i&&A.length>0&&w.jsx(KL,{title:"Custom Rules",rules:A,handlers:{handleEdit:b,onDelete:t,onToggle:n}})]})}function KL({title:r,rules:e,handlers:t}){return w.jsxs("div",{style:{marginBottom:"24px"},children:[w.jsxs("h4",{style:{fontSize:"12px",fontWeight:600,color:_.textSecondary,fontFamily:F.body,textTransform:"uppercase",marginBottom:"12px"},children:[r," (",e.length,")"]}),e.map(n=>w.jsx(KW,{rule:n,onEdit:t.handleEdit,onDelete:t.onDelete,onToggle:t.onToggle},n.rule_id))]})}function rH({communityRules:r,engineStatus:e,onToggleRule:t,onSaveRule:n,onDeleteRule:a,onResetDefaults:i}){return w.jsxs("div",{style:{padding:"24px",flex:1,overflow:"auto",background:_.bgPrimary},children:[w.jsx(XW,{engineStatus:e,rules:r}),w.jsx(tH,{rules:r,onSave:n,onDelete:a,onToggle:t,onResetDefaults:i})]})}const Gg={critical:{color:_.error,icon:gG,label:"Critical"},high:{color:"#ea580c",icon:ac,label:"High"},medium:{color:"#b45309",icon:ac,label:"Medium"},low:{color:"#0d9488",icon:XL,label:"Low"},info:{color:_.textTertiary,icon:XL,label:"Info"}},nH={tool:am,prompt:rs,resource:Zu,server:Zu,packet:rm};function aH(r){if(!r)return{summary:null,patterns:[]};const e=[/detected:\s*/i,/patterns?:\s*/i,/found:\s*/i,/matches?:\s*/i];for(const t of e){const n=r.match(t);if(n){const a=r.substring(n.index+n[0].length),i=a.search(/[{\[]/),s=(i>0?a.substring(0,i):a).split(",").map(l=>l.trim()).filter(l=>l&&l.length<100&&!l.includes('"type"'));if(s.length>0){const l=r.match(/^([^:]+):/);return{summary:l?l[1].trim():null,patterns:s}}}}return r.length<200&&!r.includes("{")?{summary:r,patterns:[]}:{summary:null,patterns:[]}}function iH(r){if(!r)return null;try{const e=JSON.parse(r);return JSON.stringify(e,null,2)}catch{return r}}function oH({severity:r}){const e=Gg[r]||Gg.info,t=e.icon;return w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 6px",background:`${e.color}20`,color:e.color,border:`1px solid ${e.color}40`,borderRadius:"4px",fontSize:"10px",fontWeight:"600",fontFamily:F.body},children:[w.jsx(t,{size:10}),e.label]})}function sH({owaspId:r}){return r?w.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",background:_.bgCard,color:_.textSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"4px",fontSize:"10px",fontWeight:"500",fontFamily:F.mono},children:r}):null}function lH({targetType:r,targetName:e}){const t=nH[r]||rs;return w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",color:_.textSecondary,fontFamily:F.body},children:[w.jsx(t,{size:12,stroke:1.5}),w.jsx("span",{style:{fontFamily:F.mono},children:e})]})}function nv({label:r,icon:e,children:t,variant:n}){const a=n==="highlight";return w.jsxs("div",{style:{marginBottom:"12px",background:a?`${_.error}08`:"transparent",border:a?`1px solid ${_.error}25`:"none",borderRadius:a?"6px":0,padding:a?"10px 12px":0},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"10px",fontWeight:"600",color:a?_.error:_.textTertiary,fontFamily:F.body,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"6px"},children:[e&&w.jsx(e,{size:12,stroke:1.5}),r]}),t]})}function uH({patterns:r}){return!r||r.length===0?null:w.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:r.map((e,t)=>w.jsx("code",{style:{display:"inline-block",padding:"4px 8px",background:_.bgCard,border:`1px solid ${_.error}30`,borderRadius:"4px",fontSize:"11px",fontFamily:F.mono,color:_.error,fontWeight:"500"},children:e},`pattern-${t}-${e.substring(0,20)}`))})}function cH({packet:r}){const e=r.headers_json?JSON.parse(r.headers_json):null,t=r.body_json?JSON.parse(r.body_json):r.body_raw;return w.jsxs("div",{style:{background:_.bgCard,borderRadius:"6px",border:`1px solid ${_.borderLight}`,overflow:"hidden"},children:[e&&Object.keys(e).length>0&&w.jsxs("div",{style:{padding:"8px 10px",borderBottom:`1px solid ${_.borderLight}`},children:[w.jsx("div",{style:{fontSize:"9px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"4px"},children:"Headers"}),w.jsx("div",{style:{fontSize:"10px",fontFamily:F.mono},children:Object.entries(e).map(([n,a])=>w.jsxs("div",{style:{marginBottom:"2px"},children:[w.jsxs("span",{style:{color:"#0d9488"},children:[n,":"]})," ",w.jsx("span",{style:{color:_.textPrimary},children:String(a)})]},n))})]}),t&&w.jsxs("div",{style:{padding:"8px 10px"},children:[w.jsx("div",{style:{fontSize:"9px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"4px"},children:"Body"}),w.jsx("pre",{style:{fontSize:"10px",fontFamily:F.mono,color:_.textPrimary,margin:0,overflow:"auto",maxHeight:"200px",whiteSpace:"pre-wrap",wordBreak:"break-word",background:_.bgTertiary,padding:"8px",borderRadius:"4px"},children:typeof t=="object"?JSON.stringify(t,null,2):t})]})]})}function Yw({finding:r,isExpanded:e,onToggle:t}){const[n,a]=Z.useState(null),[i,o]=Z.useState(!1),s=Gg[r.severity]||Gg.info,{summary:l,patterns:u}=aH(r.description),c=iH(r.evidence),f=()=>{!e&&r.frame_number&&!n&&(o(!0),fetch(`/api/packets/${r.frame_number}`).then(h=>h.json()).then(h=>{a(h),o(!1)}).catch(()=>o(!1))),t()},d=e?ui:Dl;return w.jsxs("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,marginBottom:"8px",overflow:"hidden"},children:[w.jsx(fH,{finding:r,config:s,isExpanded:e,ChevronIcon:d,onToggle:f}),e&&w.jsx(dH,{finding:r,patterns:u,summary:l,formattedEvidence:c,packet:n,loadingPacket:i})]})}function fH({finding:r,config:e,isExpanded:t,ChevronIcon:n,onToggle:a}){return w.jsxs("button",{type:"button",onClick:a,"aria-expanded":t,style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 14px",width:"100%",background:t?_.bgTertiary:"transparent",border:"none",borderLeft:`3px solid ${e.color}`,cursor:"pointer",textAlign:"left",transition:"background 0.15s"},onMouseEnter:i=>{t||(i.currentTarget.style.background=_.bgTertiary)},onMouseLeave:i=>{t||(i.currentTarget.style.background="transparent")},children:[w.jsx(n,{size:14,color:_.textTertiary,style:{flexShrink:0}}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap",marginBottom:"4px"},children:[w.jsx("span",{style:{fontSize:"12px",fontWeight:"500",color:_.textPrimary,fontFamily:F.body},children:r.title}),w.jsx(oH,{severity:r.severity}),w.jsx(sH,{owaspId:r.owasp_id})]}),w.jsx(lH,{targetType:r.target_type,targetName:r.target_name})]}),r.server_name&&w.jsx("span",{style:{fontSize:"10px",color:_.textTertiary,fontFamily:F.body,flexShrink:0},children:r.server_name})]})}function dH({finding:r,patterns:e,summary:t,formattedEvidence:n,packet:a,loadingPacket:i}){return w.jsxs("div",{style:{padding:"14px 14px 14px 28px",borderTop:`1px solid ${_.borderLight}`,background:_.bgTertiary},children:[e.length>0&&w.jsxs(nv,{label:"Detected Patterns",icon:MG,variant:"highlight",children:[t&&w.jsx("p",{style:{fontSize:"11px",color:_.textSecondary,fontFamily:F.body,margin:"0 0 8px 0"},children:t}),w.jsx(uH,{patterns:e})]}),n&&w.jsx(nv,{label:"Payload Sample",icon:rs,children:w.jsx("code",{style:{display:"block",padding:"8px 10px",background:_.bgCard,borderRadius:"4px",border:`1px solid ${_.borderLight}`,fontSize:"11px",fontFamily:F.mono,color:_.textPrimary,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5,maxHeight:"150px"},children:n})}),r.frame_number&&w.jsxs(nv,{label:`Traffic Content (Packet #${r.frame_number})`,icon:rm,children:[i&&w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary},children:"Loading..."}),a&&w.jsx(cH,{packet:a}),!i&&!a&&w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary},children:"Click to load packet content"})]}),r.recommendation&&w.jsx(nv,{label:"Recommendation",children:w.jsx("div",{style:{padding:"8px 10px",background:`${_.accentGreen}10`,borderRadius:"6px",border:`1px solid ${_.accentGreen}30`},children:w.jsx("p",{style:{fontSize:"12px",color:_.accentGreen,fontFamily:F.body,margin:0,lineHeight:1.5},children:r.recommendation})})}),w.jsxs("div",{style:{display:"flex",gap:"12px",flexWrap:"wrap",fontSize:"10px",color:_.textTertiary,paddingTop:"10px",borderTop:`1px solid ${_.borderLight}`},children:[w.jsxs("span",{children:["Rule: ",w.jsx("span",{style:{fontFamily:F.mono},children:r.rule_id})]}),r.session_id&&w.jsxs("span",{children:["Session: ",w.jsx("span",{style:{fontFamily:F.mono},children:r.session_id})]})]})]})}const uN={"owasp-mcp":{id:"owasp-mcp",name:"OWASP MCP Top 10",description:"Model Context Protocol vulnerabilities",icon:vW,color:"#0d9488"},"agentic-security":{id:"agentic-security",name:"Agentic Security",description:"AI agent behavioral issues",icon:uW,color:"#374151"},yara:{id:"yara",name:"YARA Detection",description:"Pattern-based security detection",icon:rs,color:"#57534e"},"general-security":{id:"general-security",name:"General Security",description:"Common vulnerabilities",icon:Uw,color:_.accentGreen}},qL={MCP01:"owasp-mcp",MCP02:"owasp-mcp",MCP03:"owasp-mcp",MCP04:"owasp-mcp",MCP05:"owasp-mcp",MCP06:"owasp-mcp",MCP07:"owasp-mcp",MCP08:"owasp-mcp",MCP09:"owasp-mcp",MCP10:"owasp-mcp",ASI01:"agentic-security",ASI02:"agentic-security",ASI03:"agentic-security",ASI04:"agentic-security",ASI05:"agentic-security",ASI06:"agentic-security",ASI07:"agentic-security",ASI08:"agentic-security",ASI09:"agentic-security",ASI10:"agentic-security"},hH={MCP01:"Token Mismanagement",MCP02:"Scope Creep",MCP03:"Tool Poisoning",MCP04:"Supply Chain",MCP05:"Command Injection",MCP06:"Prompt Injection",MCP07:"Insufficient Auth",MCP08:"Lack of Audit",MCP09:"Shadow Servers",MCP10:"Context Injection",ASI01:"Goal Hijack",ASI02:"Tool Misuse",ASI03:"Identity Abuse",ASI04:"Supply Chain",ASI05:"Remote Code Execution",ASI06:"Memory Poisoning",ASI07:"Insecure Communication",ASI08:"Cascading Failures",ASI09:"Trust Exploitation",ASI10:"Rogue Agent",SECRET:"Hardcoded Secrets","CMD-INJ":"Command Injection",SHADOW:"Cross-Server Shadowing",AMBIG:"Tool Name Ambiguity"},$x={critical:_.error,high:"#ea580c",medium:"#b45309",low:"#0d9488",info:_.textTertiary};function pH(r){if(r.rule_id?.startsWith("yara-"))return"yara";const e=r.owasp_id?.toUpperCase();return e&&qL[e]?qL[e]:"general-security"}function vH({owaspId:r,findings:e,selectedFinding:t,onSelectFinding:n}){const[a,i]=Z.useState(!0),o=hH[r]||r,s=e.reduce((c,f)=>(c[f.severity||"info"]=(c[f.severity||"info"]||0)+1,c),{}),l=["critical","high","medium","low","info"],u=l.find(c=>s[c]>0)||"info";return w.jsxs("div",{style:{marginBottom:"6px",background:_.bgCard,borderRadius:"6px",border:`1px solid ${_.borderLight}`,overflow:"hidden"},children:[w.jsxs("button",{type:"button",onClick:()=>i(!a),"aria-expanded":a,style:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",width:"100%",background:"transparent",border:"none",borderLeft:`3px solid ${$x[u]}`,cursor:"pointer",textAlign:"left",transition:"background 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=_.bgTertiary},onMouseLeave:c=>{c.currentTarget.style.background="transparent"},children:[a?w.jsx(ui,{size:12,color:_.textTertiary}):w.jsx(Dl,{size:12,color:_.textTertiary}),w.jsx("span",{style:{padding:"2px 6px",background:_.bgTertiary,color:_.textSecondary,borderRadius:"4px",fontSize:"10px",fontWeight:"600",fontFamily:F.mono},children:r}),w.jsx("span",{style:{flex:1,fontSize:"12px",color:_.textPrimary,fontFamily:F.body},children:o}),w.jsx("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:l.map(c=>s[c]>0&&w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",fontSize:"10px",color:$x[c],fontWeight:"500"},children:[w.jsx("span",{style:{width:"5px",height:"5px",borderRadius:"50%",background:$x[c]}}),s[c]]},c))}),w.jsx("span",{style:{padding:"2px 6px",background:_.bgTertiary,borderRadius:"8px",fontSize:"10px",color:_.textSecondary,fontWeight:"500"},children:e.length})]}),a&&w.jsx("div",{style:{padding:"10px",paddingLeft:"24px",background:_.bgTertiary,borderTop:`1px solid ${_.borderLight}`},children:e.map(c=>w.jsx(Yw,{finding:c,isExpanded:t?.id===c.id,onToggle:()=>n(t?.id===c.id?null:c)},c.id))})]})}function gH({category:r,findings:e,selectedFinding:t,onSelectFinding:n}){const[a,i]=Z.useState(!0),o=uN[r],s=o.icon,l=e.reduce((c,f)=>{const d=f.owasp_id||"OTHER";return c[d]||(c[d]=[]),c[d].push(f),c},{}),u=Object.keys(l).sort((c,f)=>{const d=Number.parseInt(c.replace(/\D/g,""),10)||999,h=Number.parseInt(f.replace(/\D/g,""),10)||999;return d-h});return w.jsxs("div",{style:{marginBottom:"16px"},children:[w.jsxs("button",{type:"button",onClick:()=>i(!a),"aria-expanded":a,style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px 14px",width:"100%",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",cursor:"pointer",textAlign:"left",marginBottom:a?"10px":0,transition:"background 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=_.bgTertiary},onMouseLeave:c=>{c.currentTarget.style.background=_.bgCard},children:[w.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"6px",background:`${o.color}15`,border:`1px solid ${o.color}30`},children:w.jsx(s,{size:16,color:o.color,stroke:1.5})}),w.jsxs("div",{style:{flex:1},children:[w.jsx("div",{style:{fontSize:"13px",fontWeight:"500",color:_.textPrimary,fontFamily:F.body},children:o.name}),w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body},children:o.description})]}),w.jsxs("div",{style:{textAlign:"right",marginRight:"6px"},children:[w.jsx("div",{style:{fontSize:"16px",fontWeight:"600",color:o.color,lineHeight:1},children:e.length}),w.jsx("div",{style:{fontSize:"10px",color:_.textTertiary},children:e.length===1?"finding":"findings"})]}),a?w.jsx(ui,{size:16,color:_.textTertiary}):w.jsx(Dl,{size:16,color:_.textTertiary})]}),a&&w.jsx("div",{style:{marginLeft:"10px"},children:u.map(c=>w.jsx(vH,{owaspId:c,findings:l[c],selectedFinding:t,onSelectFinding:n},c))})]})}function yH({findings:r,selectedFinding:e,onSelectFinding:t}){const n=r.reduce((s,l)=>{const u=pH(l);return s[u]||(s[u]=[]),s[u].push(l),s},{}),i=["owasp-mcp","agentic-security","yara","general-security"].filter(s=>n[s]?.length>0),o=Z.useCallback(s=>{const l=document.getElementById(`category-${s}`);l&&l.scrollIntoView({behavior:"smooth",block:"start"})},[]);return i.length===0?w.jsx("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,padding:"40px",textAlign:"center"},children:w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body,margin:0},children:"No findings yet."})}):w.jsxs("div",{children:[w.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"16px",flexWrap:"wrap"},children:i.map(s=>{const l=uN[s],u=l.icon;return w.jsxs("button",{type:"button",onClick:()=>o(s),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:`${l.color}10`,border:`1px solid ${l.color}30`,borderRadius:"6px",cursor:"pointer",fontFamily:F.body,fontSize:"12px",color:l.color,fontWeight:500,transition:"all 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=`${l.color}20`,c.currentTarget.style.borderColor=`${l.color}50`},onMouseLeave:c=>{c.currentTarget.style.background=`${l.color}10`,c.currentTarget.style.borderColor=`${l.color}30`},children:[w.jsx(u,{size:14,stroke:1.5}),l.name,w.jsx("span",{style:{background:l.color,color:"#fff",borderRadius:"10px",padding:"1px 6px",fontSize:"10px",fontWeight:600},children:n[s].length})]},s)})}),i.map(s=>w.jsx("div",{id:`category-${s}`,children:w.jsx(gH,{category:s,findings:n[s],selectedFinding:e,onSelectFinding:t})},s))]})}function mH({error:r,onNavigateToSetup:e}){if(!r)return null;const t=typeof r=="string"?r:r.message||"An error occurred",a=typeof r=="object"&&r.requiresSetup||t.toLowerCase().includes("no mcp servers")||t.toLowerCase().includes("no servers found")||t.toLowerCase().includes("config file not found")||t.toLowerCase().includes("failed to connect")||t.toLowerCase().includes("servers are running")||t.toLowerCase().includes("start servers via");return w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",background:`${_.critical}10`,border:`1px solid ${_.critical}40`,borderRadius:"12px",marginBottom:"24px"},children:[w.jsx(ac,{size:20,color:_.critical,style:{flexShrink:0}}),w.jsxs("div",{style:{flex:1},children:[w.jsx("h4",{style:{fontSize:"14px",fontWeight:"600",color:_.critical,fontFamily:F.body,margin:"0 0 4px 0"},children:"Scan Error"}),w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body,margin:0,lineHeight:"1.4"},children:t}),a&&e&&w.jsxs("button",{type:"button",onClick:e,style:{display:"inline-flex",alignItems:"center",gap:"4px",marginTop:"12px",padding:"6px 12px",background:_.accentGreen,color:"#fff",border:"none",borderRadius:"4px",fontSize:"12px",fontWeight:500,fontFamily:F.body,cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:i=>{i.currentTarget.style.opacity="0.9"},onMouseLeave:i=>{i.currentTarget.style.opacity="1"},children:["Configure MCP Servers",w.jsx(Vg,{size:12,stroke:2})]})]})]})}const xH=[{id:"all",label:"All"},{id:"critical",label:"Critical",color:_.error},{id:"high",label:"High",color:"#ea580c"},{id:"medium",label:"Medium",color:"#b45309"},{id:"low",label:"Low",color:"#0d9488"},{id:"info",label:"Info",color:_.textTertiary}],av="#0d9488";function SH({filter:r,isActive:e,count:t,onClick:n}){return w.jsxs("button",{onClick:n,type:"button",style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"4px 10px",background:e?`${av}15`:_.bgCard,color:e?av:_.textSecondary,border:`1px solid ${e?av:_.borderLight}`,borderRadius:"6px",fontSize:"11px",fontWeight:e?"600":"400",fontFamily:F.body,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{e||(a.currentTarget.style.background=_.bgTertiary)},onMouseLeave:a=>{e||(a.currentTarget.style.background=_.bgCard)},children:[r.color&&w.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:r.color}}),r.label,t>0&&w.jsx("span",{style:{padding:"1px 5px",background:e?av:_.bgTertiary,color:e?_.textInverse:_.textSecondary,borderRadius:"8px",fontSize:"9px",fontWeight:"600"},children:t})]})}function QL({findings:r,selectedFinding:e,onSelectFinding:t,showFilter:n=!0}){const[a,i]=Z.useState("all");if(!r||r.length===0)return w.jsx("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,padding:"40px",textAlign:"center"},children:w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body,margin:0},children:"No findings yet. Run a scan to detect vulnerabilities."})});const o=r.reduce((c,f)=>{const d=f.severity||"info";return c[d]=(c[d]||0)+1,c},{}),s=a==="all"?r:r.filter(c=>c.severity===a),l={critical:0,high:1,medium:2,low:3,info:4},u=[...s].sort((c,f)=>(l[c.severity]||4)-(l[f.severity]||4));return w.jsxs("div",{children:[n&&w.jsxs("div",{style:{marginBottom:"12px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[w.jsx("span",{style:{fontSize:"10px",fontWeight:"600",color:_.textTertiary,fontFamily:F.body,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Filter by Severity"}),w.jsxs("span",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body},children:[u.length," of ",r.length]})]}),w.jsx("div",{style:{display:"flex",gap:"6px",flexWrap:"wrap"},children:xH.map(c=>w.jsx(SH,{filter:c,isActive:a===c.id,count:c.id==="all"?r.length:o[c.id]||0,onClick:()=>i(c.id)},c.id))})]}),w.jsx("div",{children:u.length===0?w.jsx("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,padding:"24px",textAlign:"center"},children:w.jsxs("p",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body,margin:0},children:["No ",a," severity findings."]})}):u.map(c=>w.jsx(Yw,{finding:c,isExpanded:e?.id===c.id,onToggle:()=>t(e?.id===c.id?null:c)},c.id))})]})}function _H(r){const e=new Date(r),n=new Date-e;if(n<6e4)return"Just now";if(n<36e5){const a=Math.floor(n/6e4);return`${a} min${a>1?"s":""} ago`}if(n<864e5){const a=Math.floor(n/36e5);return`${a} hour${a>1?"s":""} ago`}return e.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function iv({count:r,severity:e,color:t}){return r?w.jsxs("span",{style:{padding:"2px 6px",background:`${t}15`,color:t,borderRadius:"4px",fontSize:"10px",fontWeight:600,fontFamily:F.mono},children:[r," ",e]}):null}function JL({scan:r,onSelect:e,isSelected:t}){const n=r.servers?r.servers.split(","):[];return w.jsx("button",{type:"button",onClick:()=>e(r.scan_id),style:{display:"flex",alignItems:"flex-start",gap:"12px",width:"100%",padding:"12px",background:t?`${_.accentGreen}10`:"transparent",border:`1px solid ${t?_.accentGreen:_.borderLight}`,borderRadius:"6px",cursor:"pointer",textAlign:"left",transition:"all 0.15s"},onMouseEnter:a=>{t||(a.currentTarget.style.background=_.bgSecondary)},onMouseLeave:a=>{t||(a.currentTarget.style.background="transparent")},children:w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"6px"},children:[w.jsx(Ww,{size:12,stroke:1.5,style:{color:_.textMuted}}),w.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:_.textPrimary,fontFamily:F.body},children:_H(r.scan_time)}),w.jsxs("span",{style:{fontSize:"11px",color:_.textMuted,fontFamily:F.mono},children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"6px"},children:[w.jsx(Zu,{size:11,stroke:1.5,style:{color:_.textMuted}}),w.jsx("span",{style:{fontSize:"11px",color:_.textSecondary,fontFamily:F.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.join(", ")})]}),w.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:[w.jsx(iv,{count:r.critical_count,severity:"critical",color:_.severityCritical}),w.jsx(iv,{count:r.high_count,severity:"high",color:_.severityHigh}),w.jsx(iv,{count:r.medium_count,severity:"medium",color:_.severityMedium}),w.jsx(iv,{count:r.low_count,severity:"low",color:_.severityLow})]})]})})}function bH({history:r,onSelectScan:e,selectedScanId:t,expanded:n}){const[a,i]=Z.useState(!1),o=Z.useCallback(()=>{i(l=>!l)},[]);if(!r||r.length===0)return w.jsx("div",{style:{padding:"40px",textAlign:"center",color:_.textMuted,fontFamily:F.body,fontSize:"14px"},children:'No scan history yet. Click "Analyse" to run your first scan.'});const s=n||a;return n?w.jsxs("div",{style:{marginBottom:"16px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},children:[w.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:_.textPrimary,fontFamily:F.body},children:"Analysis History"}),w.jsxs("span",{style:{fontSize:"11px",color:_.textMuted,fontFamily:F.mono,background:_.bgSecondary,padding:"2px 8px",borderRadius:"4px"},children:[r.length," scan",r.length!==1?"s":""]})]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map(l=>w.jsx(JL,{scan:l,onSelect:e,isSelected:t===l.scan_id},l.scan_id))})]}):w.jsxs("div",{style:{marginBottom:"16px",border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden"},children:[w.jsx("button",{type:"button",onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 16px",background:_.bgSecondary,border:"none",cursor:"pointer",textAlign:"left"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[s?w.jsx(ui,{size:16,stroke:2,style:{color:_.textMuted}}):w.jsx(Dl,{size:16,stroke:2,style:{color:_.textMuted}}),w.jsx("span",{style:{fontSize:"13px",fontWeight:600,color:_.textPrimary,fontFamily:F.body},children:"Scan History"}),w.jsx("span",{style:{fontSize:"11px",color:_.textMuted,fontFamily:F.mono,background:_.bgPrimary,padding:"2px 6px",borderRadius:"4px"},children:r.length})]})}),s&&w.jsx("div",{style:{padding:"12px",background:_.bgPrimary,display:"flex",flexDirection:"column",gap:"8px",maxHeight:"300px",overflowY:"auto"},children:r.map(l=>w.jsx(JL,{scan:l,onSelect:e,isSelected:t===l.scan_id},l.scan_id))})]})}const wH=(r,e)=>r?e?{title:"No Security Issues Found",description:"Your MCP servers passed all security checks. No vulnerabilities or suspicious patterns were detected.",showSuccessIcon:!0}:{title:"No Findings",description:'Click "Analyse" to run local static analysis on your connected MCP servers.',showSuccessIcon:!1}:{title:"No MCP Servers Running",description:"Start MCP servers via the Setup tab to enable analysis.",showSuccessIcon:!1};function TH({onNavigateToSetup:r,serversAvailable:e,scanComplete:t}){const{title:n,description:a,showSuccessIcon:i}=wH(e,t);return w.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",textAlign:"center",padding:"40px"},children:[w.jsx("div",{style:{marginBottom:"24px",opacity:i?1:.6},children:i?w.jsx(nm,{size:64,stroke:1.5,style:{color:_.accentGreen},role:"img","aria-label":"Security check passed icon"}):w.jsxs("svg",{width:64,height:64,viewBox:"0 0 24 24",fill:"none",stroke:_.textTertiary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},role:"img","aria-label":"Security scan icon",children:[w.jsx("title",{children:"Security scan icon"}),w.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),w.jsx("path",{d:"M9 12l2 2 4-4"})]})}),w.jsx("h3",{style:{fontSize:"20px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"8px"},children:n}),w.jsx("p",{style:{fontSize:"14px",color:_.textSecondary,fontFamily:F.body,maxWidth:"400px",lineHeight:"1.6",marginBottom:"24px"},children:a}),!e&&w.jsxs("button",{type:"button",onClick:r,style:{display:"flex",alignItems:"center",gap:"6px",padding:"10px 20px",background:_.accentGreen,color:"#fff",border:"none",borderRadius:"6px",fontSize:"14px",fontWeight:500,fontFamily:F.body,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.opacity="0.9"},onMouseLeave:o=>{o.currentTarget.style.opacity="1"},children:[w.jsx(M_,{size:16,stroke:1.5}),"Go to Setup",w.jsx(Vg,{size:14,stroke:2})]}),e&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"8px"},children:[w.jsx(M_,{size:16,stroke:1.5,style:{color:_.textMuted}}),w.jsx("span",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body},children:"Configure different servers?"}),w.jsxs("button",{type:"button",onClick:r,style:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 10px",background:"transparent",color:_.accentGreen,border:`1px solid ${_.accentGreen}`,borderRadius:"4px",fontSize:"12px",fontWeight:500,fontFamily:F.body,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background=_.accentGreen,o.currentTarget.style.color="#fff"},onMouseLeave:o=>{o.currentTarget.style.background="transparent",o.currentTarget.style.color=_.accentGreen},children:["Go to Setup",w.jsx(Vg,{size:12,stroke:2})]})]})]})}const cN=({size:r=24,color:e="currentColor"})=>w.jsx(Uw,{size:r,stroke:1.5,color:e}),om=({size:r=16,color:e="currentColor"})=>w.jsx(oN,{size:r,stroke:1.5,color:e}),CH=({size:r=16,color:e="currentColor"})=>w.jsx(ac,{size:r,stroke:1.5,color:e}),Md=({size:r=16,color:e="currentColor"})=>w.jsx(aN,{size:r,stroke:1.5,color:e}),fN=({size:r=16,color:e="currentColor"})=>w.jsx(Ww,{size:r,stroke:1.5,color:e}),$d=({size:r=16,color:e=_.accentBlue})=>w.jsx("div",{style:{width:r,height:r,border:`2px solid ${_.borderLight}`,borderTop:`2px solid ${e}`,borderRadius:"50%",animation:"spin 0.8s linear infinite"}});function MH({scanning:r}){return r?w.jsx("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"24px",boxShadow:`0 2px 8px ${_.shadowSm}`},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[w.jsx($d,{size:20}),w.jsxs("div",{style:{flex:1},children:[w.jsx("p",{style:{fontSize:"14px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,margin:0,marginBottom:"4px"},children:"Running Local Analysis..."}),w.jsx("p",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body,margin:0},children:"Scanning captured MCP traffic with YARA rules"})]})]})}):null}var k_=function(r,e){return k_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},k_(r,e)};function Q(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");k_(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var kd=function(){return kd=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},kd.apply(this,arguments)};function kH(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(t[n[a]]=r[n[a]]);return t}function eA(r,e,t,n){function a(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(r,[])).next())})}function tA(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,a=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1],i=u;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(u);break}i[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(c){u=[6,c],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var LH=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),AH=(function(){function r(){this.browser=new LH,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),it=new AH;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(it.wxa=!0,it.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?it.worker=!0:!it.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(it.node=!0,it.svgSupported=!0):IH(navigator.userAgent,it);function IH(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var Xw=12,dN="sans-serif",Hi=Xw+"px "+dN,DH=20,PH=100,RH="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function EH(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),a=(r.charCodeAt(t)-DH)/PH;e[n]=a}return e}var zH=EH(RH),pn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,n){if(!r){var a=pn.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Hi),r.measureText(t);t=t||"",n=n||Hi;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||Xw,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=zH[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}};function hN(r){for(var e in pn)r[e]&&(pn[e]=r[e])}var pN=Qn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),vN=Qn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Tc=Object.prototype.toString,sm=Array.prototype,OH=sm.forEach,NH=sm.filter,Zw=sm.slice,BH=sm.map,rA=(function(){}).constructor,ov=rA?rA.prototype:null,Kw="__proto__",jH=2311;function qw(){return jH++}function lm(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function Le(r){if(r==null||typeof r!="object")return r;var e=r,t=Tc.call(r);if(t==="[object Array]"){if(!Ku(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=Le(r[n])}}else if(vN[t]){if(!Ku(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var n=0,a=r.length;n<a;n++)e[n]=r[n]}}}else if(!pN[t]&&!Ku(r)&&!Sl(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==Kw&&(e[o]=Le(r[o]))}return e}function Ye(r,e,t){if(!Pe(e)||!Pe(r))return t?Le(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==Kw){var a=r[n],i=e[n];Pe(i)&&Pe(a)&&!se(i)&&!se(a)&&!Sl(i)&&!Sl(a)&&!L_(i)&&!L_(a)&&!Ku(i)&&!Ku(a)?Ye(a,i,t):(t||!(n in r))&&(r[n]=Le(e[n]))}return r}function um(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=Ye(t,r[n],e);return t}function ae(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==Kw&&(r[t]=e[t]);return r}function De(r,e,t){for(var n=ot(e),a=0,i=n.length;a<i;a++){var o=n[a];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}var FH=pn.createCanvas;function Ue(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function Qw(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var a in t)t.hasOwnProperty(a)&&(r.prototype[a]=t[a]);r.prototype.constructor=r,r.superClass=e}function Wt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}else De(r,e,t)}function Pr(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function O(r,e,t){if(r&&e)if(r.forEach&&r.forEach===OH)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r);else for(var i in r)r.hasOwnProperty(i)&&e.call(t,r[i],i,r)}function le(r,e,t){if(!r)return[];if(!e)return cm(r);if(r.map&&r.map===BH)return r.map(e,t);for(var n=[],a=0,i=r.length;a<i;a++)n.push(e.call(t,r[a],a,r));return n}function Qn(r,e,t,n){if(r&&e){for(var a=0,i=r.length;a<i;a++)t=e.call(n,t,r[a],a,r);return t}}function ht(r,e,t){if(!r)return[];if(!e)return cm(r);if(r.filter&&r.filter===NH)return r.filter(e,t);for(var n=[],a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r)&&n.push(r[a]);return n}function ns(r,e,t){if(r&&e){for(var n=0,a=r.length;n<a;n++)if(e.call(t,r[n],n,r))return r[n]}}function ot(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function VH(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(Zw.call(arguments)))}}var ge=ov&&Me(ov.bind)?ov.call.bind(ov.bind):VH;function He(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(Zw.call(arguments)))}}function se(r){return Array.isArray?Array.isArray(r):Tc.call(r)==="[object Array]"}function Me(r){return typeof r=="function"}function pe(r){return typeof r=="string"}function Wg(r){return Tc.call(r)==="[object String]"}function lt(r){return typeof r=="number"}function Pe(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function L_(r){return!!pN[Tc.call(r)]}function en(r){return!!vN[Tc.call(r)]}function Sl(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Mh(r){return r.colorStops!=null}function gN(r){return r.image!=null}function yN(r){return Tc.call(r)==="[object RegExp]"}function Dr(r){return r!==r}function Tr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function Te(r,e){return r??e}function hn(r,e,t){return r??e??t}function cm(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return Zw.apply(r,e)}function kh(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function Rr(r,e){if(!r)throw new Error(e)}function Mn(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var mN="__ec_primitive__";function Ud(r){r[mN]=!0}function Ku(r){return r[mN]}var GH=(function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return ot(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r})(),xN=typeof Map=="function";function WH(){return xN?new Map:new GH}var SN=(function(){function r(e){var t=se(e);this.data=WH();var n=this;e instanceof r?e.each(a):e&&O(e,a);function a(i,o){t?n.set(i,o):n.set(o,i)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,a){e.call(t,n,a)})},r.prototype.keys=function(){var e=this.data.keys();return xN?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function be(r){return new SN(r)}function ic(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var a=r.length,n=0;n<e.length;n++)t[n+a]=e[n];return t}function Lh(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&ae(t,e),t}function Jw(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Se(r,e){return r.hasOwnProperty(e)}function Vt(){}var Ld=180/Math.PI,HH=Number.EPSILON||Math.pow(2,-52);const $H=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:HH,HashMap:SN,RADIAN_TO_DEGREE:Ld,assert:Rr,bind:ge,clone:Le,concatArray:ic,createCanvas:FH,createHashMap:be,createObject:Lh,curry:He,defaults:De,disableUserSelect:Jw,each:O,eqNaN:Dr,extend:ae,filter:ht,find:ns,guid:qw,hasOwn:Se,indexOf:Ue,inherits:Qw,isArray:se,isArrayLike:Pr,isBuiltInObject:L_,isDom:Sl,isFunction:Me,isGradientObject:Mh,isImagePatternObject:gN,isNumber:lt,isObject:Pe,isPrimitive:Ku,isRegExp:yN,isString:pe,isStringSafe:Wg,isTypedArray:en,keys:ot,logError:lm,map:le,merge:Ye,mergeAll:um,mixin:Wt,noop:Vt,normalizeCssArray:kh,reduce:Qn,retrieve:Tr,retrieve2:Te,retrieve3:hn,setAsPrimitive:Ud,slice:cm,trim:Mn},Symbol.toStringTag,{value:"Module"}));function as(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Gr(r,e){return r[0]=e[0],r[1]=e[1],r}function ei(r){return[r[0],r[1]]}function fm(r,e,t){return r[0]=e,r[1]=t,r}function A_(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Hg(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Eo(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Yd(r){return Math.sqrt(eT(r))}var UH=Yd;function eT(r){return r[0]*r[0]+r[1]*r[1]}var YH=eT;function XH(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function ZH(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function KH(r,e){return r[0]*e[0]+r[1]*e[1]}function Ad(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function Pl(r,e){var t=Yd(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function $g(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Pi=$g;function _N(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Vo=_N;function qH(r,e){return r[0]=-e[0],r[1]=-e[1],r}function Id(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function Gt(r,e,t){var n=e[0],a=e[1];return r[0]=t[0]*n+t[2]*a+t[4],r[1]=t[1]*n+t[3]*a+t[5],r}function Ri(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Ei(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}const QH=Object.freeze(Object.defineProperty({__proto__:null,add:A_,applyTransform:Gt,clone:ei,copy:Gr,create:as,dist:Pi,distSquare:Vo,distance:$g,distanceSquare:_N,div:ZH,dot:KH,len:Yd,lenSquare:eT,length:UH,lengthSquare:YH,lerp:Id,max:Ei,min:Ri,mul:XH,negate:qH,normalize:Pl,scale:Ad,scaleAndAdd:Hg,set:fm,sub:Eo},Symbol.toStringTag,{value:"Module"}));var fu=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),JH=(function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.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 fu(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,t.drift(i,o,e),this.handler.dispatchToElement(new fu(t,e),"drag",e.event);var s=this.handler.findHover(n,a,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new fu(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new fu(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new fu(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new fu(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),ra=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t=="function"&&(a=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===n)return this;var l={h:n,query:t,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,c=i[e][u];return c&&c.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.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 a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=a.length,l=0;l<s;l++){var u=a[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=t[o-1],l=a.length,u=0;u<l;u++){var c=a[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r})(),e$=Math.log(2);function I_(r,e,t,n,a,i){var o=n+"-"+a,s=r.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~a)/e$);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var f=0,d=0,h=0;d<s;d++){var v=1<<d;v&a||(f+=(h%2?-1:1)*r[t][d]*I_(r,e-1,c,u,a|v,i),h++)}return i[o]=f,f}function nA(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},a=I_(t,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*I_(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,c){var f=u*i[6]+c*i[7]+1;l[0]=(u*i[0]+c*i[1]+i[2])/f,l[1]=(u*i[3]+c*i[4]+i[5])/f}}}var Ug="___zrEVENTSAVED",Ux=[];function t$(r,e,t,n,a){return D_(Ux,e,n,a,!0)&&D_(r,t,Ux[0],Ux[1])}function r$(r,e){r&&t(r),e&&t(e);function t(n){var a=n[Ug];a&&(a.clearMarkers&&a.clearMarkers(),delete n[Ug])}}function D_(r,e,t,n,a){if(e.getBoundingClientRect&&it.domSupported&&!bN(e)){var i=e[Ug]||(e[Ug]={}),o=n$(e,i),s=a$(o,i,a);if(s)return s(r,t,n),!0}return!1}function n$(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){O(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function a$(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&i&&d===i[f]&&h===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?nA(s,o):nA(o,s))}function bN(r){return r.nodeName.toUpperCase()==="CANVAS"}var i$=/([&<>"'])/g,o$={"&":"&","<":"<",">":">",'"':""","'":"'"};function Hr(r){return r==null?"":(r+"").replace(i$,function(e,t){return o$[t]})}var s$=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Yx=[],l$=it.browser.firefox&&+it.browser.version.split(".")[0]<39;function P_(r,e,t,n){return t=t||{},n?aA(r,e,t):l$&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):aA(r,e,t),t}function aA(r,e,t){if(it.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(bN(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(D_(Yx,r,n,a)){t.zrX=Yx[0],t.zrY=Yx[1];return}}t.zrX=t.zrY=0}function tT(r){return r||window.event}function Wn(r,e,t){if(e=tT(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&P_(r,o,e,t)}else{P_(r,e,e,t);var i=u$(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&s$.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function u$(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function R_(r,e,t,n){r.addEventListener(e,t,n)}function c$(r,e,t,n){r.removeEventListener(e,t,n)}var $i=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function iA(r){return r.which===2||r.which===3}var f$=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o<s;o++){var l=a[o],u=P_(n,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(e){for(var t in Xx)if(Xx.hasOwnProperty(t)){var n=Xx[t](this._track,e);if(n)return n}},r})();function oA(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function d$(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Xx={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,a=(r[t-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=oA(n)/oA(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=d$(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function hr(){return[1,0,0,1,0,0]}function Ah(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Ih(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Sa(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Ta(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Qi(r,e,t,n){n===void 0&&(n=[0,0]);var a=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=a*f+s*c,r[1]=-a*c+s*f,r[2]=i*f+l*c,r[3]=-i*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function dm(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Jn(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function wN(r){var e=hr();return Ih(e,r),e}const h$=Object.freeze(Object.defineProperty({__proto__:null,clone:wN,copy:Ih,create:hr,identity:Ah,invert:Jn,mul:Sa,rotate:Qi,scale:dm,translate:Ta},Symbol.toStringTag,{value:"Module"}));var Ee=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,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}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r})(),ol=Math.min,Gu=Math.max,E_=Math.abs,sA=["x","y"],p$=["width","height"],ws=new Ee,Ts=new Ee,Cs=new Ee,Ms=new Ee,wn=TN(),dd=wn.minTv,z_=wn.maxTv,Dd=[0,0],ze=(function(){function r(e,t,n,a){r.set(this,e,t,n,a)}return r.set=function(e,t,n,a,i){return a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),e.x=t,e.y=n,e.width=a,e.height=i,e},r.prototype.union=function(e){var t=ol(e.x,this.x),n=ol(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Gu(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Gu(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=hr();return Ta(i,i,[-t.x,-t.y]),dm(i,i,[n,a]),Ta(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,n){return r.intersect(this,e,t,n)},r.intersect=function(e,t,n,a){n&&Ee.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(v$,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(g$,t.x,t.y,t.width,t.height));var s=!!n;wn.reset(a,s);var l=wn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,h=t.x+l,v=t.x+t.width-l,y=t.y+l,m=t.y+t.height-l;if(u>c||f>d||h>v||y>m)return!1;var x=!(c<h||v<u||d<y||m<f);return(s||i)&&(Dd[0]=1/0,Dd[1]=0,lA(u,c,h,v,0,s,i,o),lA(f,d,y,m,1,s,i,o),s&&Ee.copy(n,x?wn.useDir?wn.dirMinTv:dd:z_)),x},r.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}ws.x=Cs.x=t.x,ws.y=Ms.y=t.y,Ts.x=Ms.x=t.x+t.width,Ts.y=Cs.y=t.y+t.height,ws.transform(n),Ms.transform(n),Ts.transform(n),Cs.transform(n),e.x=ol(ws.x,Ts.x,Cs.x,Ms.x),e.y=ol(ws.y,Ts.y,Cs.y,Ms.y);var l=Gu(ws.x,Ts.x,Cs.x,Ms.x),u=Gu(ws.y,Ts.y,Cs.y,Ms.y);e.width=l-e.x,e.height=u-e.y},r})(),v$=new ze(0,0,0,0),g$=new ze(0,0,0,0);function lA(r,e,t,n,a,i,o,s){var l=E_(e-t),u=E_(n-r),c=ol(l,u),f=sA[a],d=sA[1-a],h=p$[a];e<t||n<r?l<u?(i&&(z_[f]=-l),s&&(o[f]=e,o[h]=0)):(i&&(z_[f]=u),s&&(o[f]=r,o[h]=0)):(o&&(o[f]=Gu(r,t),o[h]=ol(e,n)-o[f]),i&&(c<Dd[0]||wn.useDir)&&(Dd[0]=ol(c,Dd[0]),(l<u||!wn.bidirectional)&&(dd[f]=l,dd[d]=0,wn.useDir&&wn.calcDirMTV()),(l>=u||!wn.bidirectional)&&(dd[f]=-u,dd[d]=0,wn.useDir&&wn.calcDirMTV())))}function TN(){var r=0,e=new Ee,t=new Ee,n={minTv:new Ee,maxTv:new Ee,useDir:!1,dirMinTv:new Ee,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=Gu(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),r=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),c=l*i.y+u*i.x;if(a(c)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,a(t.x)&&a(t.y)){o.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function a(i){return E_(i)<1e-10}return n}var CN="silent";function y$(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:m$}}function m$(){$i(this.event)}var x$=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(ra),Df=(function(){function r(e,t){this.x=e,this.y=t}return r})(),S$=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Zx=new ze(0,0,0,0),MN=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Df(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new x$,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new JH(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(O(S$,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=kN(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Df(n,a):this.findHover(n,a),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Df(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=y$(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,a){var i=this.storage.getDisplayList(),o=new Df(t,n);if(uA(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new ze(t-u,n-u,l,l),f=i.length-1;f>=0;f--){var d=i[f];d!==a&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Zx.copy(d.getBoundingRect()),d.transform&&Zx.applyTransform(d.transform),Zx.intersect(c)&&s.push(d))}if(s.length)for(var h=4,v=Math.PI/12,y=Math.PI*2,m=0;m<u;m+=h)for(var x=0;x<y;x+=v){var b=t+m*Math.cos(x),T=n+m*Math.sin(x);if(uA(s,o,b,T,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new f$);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;t.gestureEvent=o;var s=new Df;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e})(ra);O(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){MN.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=kN(this,t,n),i,o;if((r!=="mouseup"||!a)&&(i=this.findHover(t,n),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Pi(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function _$(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return a?CN:!0}return!1}function uA(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=_$(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==CN)){e.target=o;break}}}function kN(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var LN=32,Pf=7;function b$(r){for(var e=0;r>=LN;)e|=r&1,r>>=1;return r+e}function cA(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a<t&&n(r[a],r[a-1])<0;)a++;w$(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function w$(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function fA(r,e,t,n,a){for(n===e&&n++;n<t;n++){for(var i=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Kx(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l<s&&i(r,e[t+a+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&i(r,e[t+a-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])>0?o=c+1:l=c}return l}function qx(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;l<s&&i(r,e[t+a-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l<s&&i(r,e[t+a+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])<0?l=c:o=c+1}return l}function T$(r,e){var t=Pf,n,a,i=0,o=[];n=[],a=[];function s(h,v){n[i]=h,a[i]=v,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&a[h-1]<=a[h]+a[h+1]||h>=2&&a[h-2]<=a[h]+a[h-1])a[h-1]<a[h+1]&&h--;else if(a[h]>a[h+1])break;c(h)}}function u(){for(;i>1;){var h=i-2;h>0&&a[h-1]<a[h+1]&&h--,c(h)}}function c(h){var v=n[h],y=a[h],m=n[h+1],x=a[h+1];a[h]=y+x,h===i-3&&(n[h+1]=n[h+2],a[h+1]=a[h+2]),i--;var b=qx(r[m],r,v,y,0,e);v+=b,y-=b,y!==0&&(x=Kx(r[v+y-1],r,m,x,x-1,e),x!==0&&(y<=x?f(v,y,m,x):d(v,y,m,x)))}function f(h,v,y,m){var x=0;for(x=0;x<v;x++)o[x]=r[h+x];var b=0,T=y,C=h;if(r[C++]=r[T++],--m===0){for(x=0;x<v;x++)r[C+x]=o[b+x];return}if(v===1){for(x=0;x<m;x++)r[C+x]=r[T+x];r[C+m]=o[b];return}for(var k=t,L,A,D;;){L=0,A=0,D=!1;do if(e(r[T],o[b])<0){if(r[C++]=r[T++],A++,L=0,--m===0){D=!0;break}}else if(r[C++]=o[b++],L++,A=0,--v===1){D=!0;break}while((L|A)<k);if(D)break;do{if(L=qx(r[T],o,b,v,0,e),L!==0){for(x=0;x<L;x++)r[C+x]=o[b+x];if(C+=L,b+=L,v-=L,v<=1){D=!0;break}}if(r[C++]=r[T++],--m===0){D=!0;break}if(A=Kx(o[b],r,T,m,0,e),A!==0){for(x=0;x<A;x++)r[C+x]=r[T+x];if(C+=A,T+=A,m-=A,m===0){D=!0;break}}if(r[C++]=o[b++],--v===1){D=!0;break}k--}while(L>=Pf||A>=Pf);if(D)break;k<0&&(k=0),k+=2}if(t=k,t<1&&(t=1),v===1){for(x=0;x<m;x++)r[C+x]=r[T+x];r[C+m]=o[b]}else{if(v===0)throw new Error;for(x=0;x<v;x++)r[C+x]=o[b+x]}}function d(h,v,y,m){var x=0;for(x=0;x<m;x++)o[x]=r[y+x];var b=h+v-1,T=m-1,C=y+m-1,k=0,L=0;if(r[C--]=r[b--],--v===0){for(k=C-(m-1),x=0;x<m;x++)r[k+x]=o[x];return}if(m===1){for(C-=v,b-=v,L=C+1,k=b+1,x=v-1;x>=0;x--)r[L+x]=r[k+x];r[C]=o[T];return}for(var A=t;;){var D=0,P=0,R=!1;do if(e(o[T],r[b])<0){if(r[C--]=r[b--],D++,P=0,--v===0){R=!0;break}}else if(r[C--]=o[T--],P++,D=0,--m===1){R=!0;break}while((D|P)<A);if(R)break;do{if(D=v-qx(o[T],r,h,v,v-1,e),D!==0){for(C-=D,b-=D,v-=D,L=C+1,k=b+1,x=D-1;x>=0;x--)r[L+x]=r[k+x];if(v===0){R=!0;break}}if(r[C--]=o[T--],--m===1){R=!0;break}if(P=m-Kx(r[b],o,0,m,m-1,e),P!==0){for(C-=P,T-=P,m-=P,L=C+1,k=T+1,x=0;x<P;x++)r[L+x]=o[k+x];if(m<=1){R=!0;break}}if(r[C--]=r[b--],--v===0){R=!0;break}A--}while(D>=Pf||P>=Pf);if(R)break;A<0&&(A=0),A+=2}if(t=A,t<1&&(t=1),m===1){for(C-=v,b-=v,L=C+1,k=b+1,x=v-1;x>=0;x--)r[L+x]=r[k+x];r[C]=o[T]}else{if(m===0)throw new Error;for(k=C-(m-1),x=0;x<m;x++)r[k+x]=o[x]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Sg(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<LN){i=cA(r,t,n,e),fA(r,t,n,t+i,e);return}var o=T$(r,e),s=b$(a);do{if(i=cA(r,t,n,e),i<s){var l=a;l>s&&(l=s),fA(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var Tn=1,hd=2,Bu=4,dA=!1;function Qx(){dA||(dA=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function hA(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var C$=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=hA}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,a=0,i=t.length;a<i;a++)this._updateAndAddDisplayable(t[a],null,e);n.length=this._displayListLen,Sg(n,hA)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath(),i=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(i||a)){if(s||(s=e.__clipPaths=[]),i)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=a,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var f=e.childrenRef(),d=0;d<f.length;d++){var h=f[d];e.__dirty&&(h.__dirty|=Tn),this._updateAndAddDisplayable(h,s,n)}e.__dirty=0}else{var v=e;isNaN(v.z)&&(Qx(),v.z=0),isNaN(v.z2)&&(Qx(),v.z2=0),isNaN(v.zlevel)&&(Qx(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var y=e.getDecalElement&&e.getDecalElement();y&&this._updateAndAddDisplayable(y,s,n);var m=e.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,n);var x=e.getTextContent();x&&this._updateAndAddDisplayable(x,s,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var a=Ue(this._roots,e);a>=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),Yg;Yg=it.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Pd={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Pd.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Pd.bounceIn(r*2)*.5:Pd.bounceOut(r*2-1)*.5+.5}},sv=Math.pow,Go=Math.sqrt,Xg=1e-8,AN=1e-4,pA=Go(3),lv=1/3,Ha=as(),Yn=as(),qu=as();function zo(r){return r>-Xg&&r<Xg}function IN(r){return r>Xg||r<-Xg}function fr(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function vA(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function Zg(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(zo(c)&&zo(f))if(zo(s))i[0]=0;else{var v=-l/s;v>=0&&v<=1&&(i[h++]=v)}else{var y=f*f-4*c*d;if(zo(y)){var m=f/c,v=-s/o+m,x=-m/2;v>=0&&v<=1&&(i[h++]=v),x>=0&&x<=1&&(i[h++]=x)}else if(y>0){var b=Go(y),T=c*s+1.5*o*(-f+b),C=c*s+1.5*o*(-f-b);T<0?T=-sv(-T,lv):T=sv(T,lv),C<0?C=-sv(-C,lv):C=sv(C,lv);var v=(-s-(T+C))/(3*o);v>=0&&v<=1&&(i[h++]=v)}else{var k=(2*c*s-3*o*f)/(2*Go(c*c*c)),L=Math.acos(k)/3,A=Go(c),D=Math.cos(L),v=(-s-2*A*D)/(3*o),x=(-s+A*(D+pA*Math.sin(L)))/(3*o),P=(-s+A*(D-pA*Math.sin(L)))/(3*o);v>=0&&v<=1&&(i[h++]=v),x>=0&&x<=1&&(i[h++]=x),P>=0&&P<=1&&(i[h++]=P)}}return h}function DN(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(zo(o)){if(IN(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(zo(c))a[0]=-i/(2*o);else if(c>0){var f=Go(c),u=(-i+f)/(2*o),d=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function Zo(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}function PN(r,e,t,n,a,i,o,s,l,u,c){var f,d=.005,h=1/0,v,y,m,x;Ha[0]=l,Ha[1]=u;for(var b=0;b<1;b+=.05)Yn[0]=fr(r,t,a,o,b),Yn[1]=fr(e,n,i,s,b),m=Vo(Ha,Yn),m<h&&(f=b,h=m);h=1/0;for(var T=0;T<32&&!(d<AN);T++)v=f-d,y=f+d,Yn[0]=fr(r,t,a,o,v),Yn[1]=fr(e,n,i,s,v),m=Vo(Yn,Ha),v>=0&&m<h?(f=v,h=m):(qu[0]=fr(r,t,a,o,y),qu[1]=fr(e,n,i,s,y),x=Vo(qu,Ha),y<=1&&x<h?(f=y,h=x):d*=.5);return c&&(c[0]=fr(r,t,a,o,f),c[1]=fr(e,n,i,s,f)),Go(h)}function M$(r,e,t,n,a,i,o,s,l){for(var u=r,c=e,f=0,d=1/l,h=1;h<=l;h++){var v=h*d,y=fr(r,t,a,o,v),m=fr(e,n,i,s,v),x=y-u,b=m-c;f+=Math.sqrt(x*x+b*b),u=y,c=m}return f}function wr(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function O_(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function k$(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(zo(i)){if(IN(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(zo(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=Go(c),u=(-o+f)/(2*i),d=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function RN(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Xd(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function EN(r,e,t,n,a,i,o,s,l){var u,c=.005,f=1/0;Ha[0]=o,Ha[1]=s;for(var d=0;d<1;d+=.05){Yn[0]=wr(r,t,a,d),Yn[1]=wr(e,n,i,d);var h=Vo(Ha,Yn);h<f&&(u=d,f=h)}f=1/0;for(var v=0;v<32&&!(c<AN);v++){var y=u-c,m=u+c;Yn[0]=wr(r,t,a,y),Yn[1]=wr(e,n,i,y);var h=Vo(Yn,Ha);if(y>=0&&h<f)u=y,f=h;else{qu[0]=wr(r,t,a,m),qu[1]=wr(e,n,i,m);var x=Vo(qu,Ha);m<=1&&x<f?(u=m,f=x):c*=.5}}return l&&(l[0]=wr(r,t,a,u),l[1]=wr(e,n,i,u)),Go(f)}function L$(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,h=wr(r,t,a,d),v=wr(e,n,i,d),y=h-s,m=v-l;u+=Math.sqrt(y*y+m*m),s=h,l=v}return u}var A$=/cubic-bezier\(([0-9,\.e ]+)\)/;function rT(r){var e=r&&A$.exec(r);if(e){var t=e[1].split(","),n=+Mn(t[0]),a=+Mn(t[1]),i=+Mn(t[2]),o=+Mn(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Zg(0,n,i,1,l,s)&&fr(0,a,o,1,s[0])}}}var I$=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Vt,this.ondestroy=e.ondestroy||Vt,this.onrestart=e.onrestart||Vt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Me(e)?e:Pd[e]||rT(e)},r})(),zN=(function(){function r(e){this.value=e}return r})(),D$=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new zN(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),oc=(function(){function r(e){this._list=new D$,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new zN(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),gA={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 _a(r){return r=Math.round(r),r<0?0:r>255?255:r}function P$(r){return r=Math.round(r),r<0?0:r>360?360:r}function Zd(r){return r<0?0:r>1?1:r}function _g(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?_a(parseFloat(e)/100*255):_a(parseInt(e,10))}function Ni(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Zd(parseFloat(e)/100):Zd(parseFloat(e))}function Jx(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Oo(r,e,t){return r+(e-r)*t}function Gn(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function N_(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var ON=new oc(20),uv=null;function du(r,e){uv&&N_(uv,e),uv=ON.put(r,uv||e.slice())}function $r(r,e){if(r){e=e||[];var t=ON.get(r);if(t)return N_(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in gA)return N_(e,gA[n]),du(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){Gn(e,0,0,0,1);return}return Gn(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),du(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){Gn(e,0,0,0,1);return}return Gn(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),du(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Gn(e,+u[0],+u[1],+u[2],1):Gn(e,0,0,0,1);c=Ni(u.pop());case"rgb":if(u.length>=3)return Gn(e,_g(u[0]),_g(u[1]),_g(u[2]),u.length===3?c:Ni(u[3])),du(r,e),e;Gn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Gn(e,0,0,0,1);return}return u[3]=Ni(u[3]),B_(u,e),du(r,e),e;case"hsl":if(u.length!==3){Gn(e,0,0,0,1);return}return B_(u,e),du(r,e),e;default:return}}Gn(e,0,0,0,1)}}function B_(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Ni(r[1]),a=Ni(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],Gn(e,_a(Jx(o,i,t+1/3)*255),_a(Jx(o,i,t)*255),_a(Jx(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function R$(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var c=((i-e)/6+o/2)/o,f=((i-t)/6+o/2)/o,d=((i-n)/6+o/2)/o;e===i?l=d-f:t===i?l=1/3+c-d:n===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function Kg(r,e){var t=$r(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return Kn(t,t.length===4?"rgba":"rgb")}}function E$(r){var e=$r(r);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Rd(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=_a(Oo(o[0],s[0],l)),t[1]=_a(Oo(o[1],s[1],l)),t[2]=_a(Oo(o[2],s[2],l)),t[3]=Zd(Oo(o[3],s[3],l)),t}}var z$=Rd;function nT(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=$r(e[a]),s=$r(e[i]),l=n-a,u=Kn([_a(Oo(o[0],s[0],l)),_a(Oo(o[1],s[1],l)),_a(Oo(o[2],s[2],l)),Zd(Oo(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}var O$=nT;function Bi(r,e,t,n){var a=$r(r);if(r)return a=R$(a),e!=null&&(a[0]=P$(Me(e)?e(a[0]):e)),t!=null&&(a[1]=Ni(Me(t)?t(a[1]):t)),n!=null&&(a[2]=Ni(Me(n)?n(a[2]):n)),Kn(B_(a),"rgba")}function Kd(r,e){var t=$r(r);if(t&&e!=null)return t[3]=Zd(e),Kn(t,"rgba")}function Kn(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function qd(r,e){var t=$r(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}function N$(){return Kn([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var yA=new oc(100);function qg(r){if(pe(r)){var e=yA.get(r);return e||(e=Kg(r,-.1),yA.put(r,e)),e}else if(Mh(r)){var t=ae({},r);return t.colorStops=le(r.colorStops,function(n){return{offset:n.offset,color:Kg(n.color,-.1)}}),t}return r}const B$=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Rd,fastMapToColor:z$,lerp:nT,lift:Kg,liftColor:qg,lum:qd,mapToColor:O$,modifyAlpha:Kd,modifyHSL:Bi,parse:$r,parseCssFloat:Ni,parseCssInt:_g,random:N$,stringify:Kn,toHex:E$},Symbol.toStringTag,{value:"Module"}));var Qg=Math.round;function Qd(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=$r(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var mA=1e-4;function No(r){return r<mA&&r>-mA}function cv(r){return Qg(r*1e3)/1e3}function j_(r){return Qg(r*1e4)/1e4}function j$(r){return"matrix("+cv(r[0])+","+cv(r[1])+","+cv(r[2])+","+cv(r[3])+","+j_(r[4])+","+j_(r[5])+")"}var F$={left:"start",right:"end",center:"middle",middle:"middle"};function V$(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function G$(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function W$(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function NN(r){return r&&!!r.image}function H$(r){return r&&!!r.svgElement}function aT(r){return NN(r)||H$(r)}function BN(r){return r.type==="linear"}function jN(r){return r.type==="radial"}function FN(r){return r&&(r.type==="linear"||r.type==="radial")}function hm(r){return"url(#"+r+")"}function VN(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function GN(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Ld,a=Te(r.scaleX,1),i=Te(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+Qg(o*Ld)+"deg, "+Qg(s*Ld)+"deg)"),l.join(" ")}var $$=(function(){return it.hasGlobalWindow&&Me(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})(),F_=Array.prototype.slice;function Ai(r,e,t){return(e-r)*t+r}function e1(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=Ai(e[i],t[i],n);return r}function U$(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=Ai(e[o][s],t[o][s],n)}return r}function fv(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=e[i]+t[i]*n;return r}function xA(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function Y$(r,e){for(var t=r.length,n=e.length,a=t>n?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(t,n);s++)a.push({offset:o.offset,color:o.color.slice()})}function X$(r,e,t){var n=r,a=e;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var s=i>o;if(s)n.length=o;else for(var l=i;l<o;l++)n.push(t===1?a[l]:F_.call(a[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=a[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=a[l][c])}}function Ed(r){if(Pr(r)){var e=r.length;if(Pr(r[0])){for(var t=[],n=0;n<e;n++)t.push(F_.call(r[n]));return t}return F_.call(r)}return r}function bg(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function Z$(r){return Pr(r&&r[0])?2:1}var dv=0,wg=1,WN=2,pd=3,V_=4,G_=5,SA=6;function _A(r){return r===V_||r===G_}function hv(r){return r===wg||r===WN}var Rf=[0,0,0,0],K$=(function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=SA,l=t;if(Pr(t)){var u=Z$(t);s=u,(u===1&&!lt(t[0])||u===2&&!lt(t[0][0]))&&(o=!0)}else if(lt(t)&&!Dr(t))s=dv;else if(pe(t))if(!isNaN(+t))s=dv;else{var c=$r(t);c&&(l=c,s=pd)}else if(Mh(t)){var f=ae({},l);f.colorStops=le(t.colorStops,function(h){return{offset:h.offset,color:$r(h.color)}}),BN(t)?s=V_:jN(t)&&(s=G_),l=f}i===0?this.valType=s:(s!==this.valType||s===SA)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Me(n)?n:Pd[n]||rT(n)),a.push(d),d},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(y,m){return y.time-m.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=hv(a),u=_A(a),c=0;c<i;c++){var f=n[c],d=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==i-1?X$(d,h,a):u&&Y$(d.colorStops,h.colorStops))}if(!s&&a!==G_&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;for(var v=n[0].value,c=0;c<i;c++)a===dv?n[c].additiveValue=n[c].value-v:a===pd?n[c].additiveValue=fv([],n[c].value,v,-1):hv(a)&&(n[c].additiveValue=a===wg?fv([],n[c].value,v,-1):xA([],n[c].value,v,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===pd,c,f=this._lastFr,d=Math.min,h,v;if(s===1)h=v=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var y=d(f+1,s-1);for(c=y;c>=0&&!(o[c].percent<=t);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=d(c-1,s-2)}v=o[c+1],h=o[c]}if(h&&v){this._lastFr=c,this._lastFrP=t;var m=v.percent-h.percent,x=m===0?1:d((t-h.percent)/m,1);v.easingFunc&&(x=v.easingFunc(x));var b=n?this._additiveValue:u?Rf:e[l];if((hv(i)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[l]=x<1?h.rawValue:v.rawValue;else if(hv(i))i===wg?e1(b,h[a],v[a],x):U$(b,h[a],v[a],x);else if(_A(i)){var T=h[a],C=v[a],k=i===V_;e[l]={type:k?"linear":"radial",x:Ai(T.x,C.x,x),y:Ai(T.y,C.y,x),colorStops:le(T.colorStops,function(A,D){var P=C.colorStops[D];return{offset:Ai(A.offset,P.offset,x),color:bg(e1([],A.color,P.color,x))}}),global:C.global},k?(e[l].x2=Ai(T.x2,C.x2,x),e[l].y2=Ai(T.y2,C.y2,x)):e[l].r=Ai(T.r,C.r,x)}else if(u)e1(b,h[a],v[a],x),n||(e[l]=bg(b));else{var L=Ai(h[a],v[a],x);n?this._additiveValue=L:e[l]=L}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===dv?e[n]=e[n]+a:t===pd?($r(e[n],Rf),fv(Rf,Rf,a,1),e[n]=bg(Rf)):t===wg?fv(e[n],e[n],a,1):t===WN&&xA(e[n],e[n],a,1)},r})(),iT=(function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){lm("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ot(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var s=n[o],l=i[s];if(!l){l=i[s]=new K$(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,d=f[f.length-1];u=d&&d.value,c.valType===pd&&u&&(u=bg(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Ed(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Ed(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.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)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(e);i&&(t=i)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(a,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var d=new I$({life:a,loop:this._loop,delay:this._delay||0,onframe:function(h){t._started=2;var v=t._additiveAnimators;if(v){for(var y=!1,m=0;m<v.length;m++)if(v[m]._clip){y=!0;break}y||(t._additiveAnimators=null)}for(var m=0;m<n.length;m++)n[m].step(t._target,h);var x=t._onframeCbs;if(x)for(var m=0;m<x.length;m++)x[m](t._target,h)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return le(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var a=0;a<t.length;a++){var i=t[a],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[i]=Ed(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||ot(e);for(var n=0;n<t.length;n++){var a=t[n],i=this._tracks[a];if(i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function Wu(){return new Date().getTime()}var q$=(function(r){Q(e,r);function e(t){var n=r.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 e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Wu()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(Yg(n),!t._paused&&t.update())}Yg(n)},e.prototype.start=function(){this._running||(this._time=Wu(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Wu(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Wu()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new iT(t,n.loop);return this.addAnimator(a),a},e})(ra),Q$=300,t1=it.domSupported,r1=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=le(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}})(),bA={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},wA=!1;function W_(r){var e=r.pointerType;return e==="pen"||e==="touch"}function J$(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function n1(r){r&&(r.zrByTouch=!0)}function e7(r,e){return Wn(r.dom,new t7(r,e),!0)}function HN(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var t7=(function(){function r(e,t){this.stopPropagation=Vt,this.stopImmediatePropagation=Vt,this.preventDefault=Vt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),pa={mousedown:function(r){r=Wn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Wn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Wn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Wn(this.dom,r);var e=r.toElement||r.relatedTarget;HN(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){wA=!0,r=Wn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){wA||(r=Wn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Wn(this.dom,r),n1(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),pa.mousemove.call(this,r),pa.mousedown.call(this,r)},touchmove:function(r){r=Wn(this.dom,r),n1(r),this.handler.processGesture(r,"change"),pa.mousemove.call(this,r)},touchend:function(r){r=Wn(this.dom,r),n1(r),this.handler.processGesture(r,"end"),pa.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Q$&&pa.click.call(this,r)},pointerdown:function(r){pa.mousedown.call(this,r)},pointermove:function(r){W_(r)||pa.mousemove.call(this,r)},pointerup:function(r){pa.mouseup.call(this,r)},pointerout:function(r){W_(r)||pa.mouseout.call(this,r)}};O(["click","dblclick","contextmenu"],function(r){pa[r]=function(e){e=Wn(this.dom,e),this.trigger(r,e)}});var H_={pointermove:function(r){W_(r)||H_.mousemove.call(this,r)},pointerup:function(r){H_.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function r7(r,e){var t=e.domHandlers;it.pointerEventsSupported?O(r1.pointer,function(n){Tg(e,n,function(a){t[n].call(r,a)})}):(it.touchEventsSupported&&O(r1.touch,function(n){Tg(e,n,function(a){t[n].call(r,a),J$(e)})}),O(r1.mouse,function(n){Tg(e,n,function(a){a=tT(a),e.touching||t[n].call(r,a)})}))}function n7(r,e){it.pointerEventsSupported?O(bA.pointer,t):it.touchEventsSupported||O(bA.mouse,t);function t(n){function a(i){i=tT(i),HN(r,i.target)||(i=e7(r,i),e.domHandlers[n].call(r,i))}Tg(e,n,a,{capture:!0})}}function Tg(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,R_(r.domTarget,e,t,n)}function a1(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&c$(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var TA=(function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r})(),a7=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this;return a.__pointerCapturing=!1,a.dom=t,a.painterRoot=n,a._localHandlerScope=new TA(t,pa),t1&&(a._globalHandlerScope=new TA(document,H_)),r7(a,a._localHandlerScope),a}return e.prototype.dispose=function(){a1(this._localHandlerScope),t1&&a1(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,t1&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?n7(this,n):a1(n)}},e})(ra),$N=1;it.hasGlobalWindow&&($N=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Jg=$N,$_=.4,U_="#333",Y_="#ccc",i7="#eee",CA=Ah,MA=5e-5;function ks(r){return r>MA||r<-MA}var Ls=[],hu=[],i1=hr(),o1=Math.abs,zi=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return ks(this.rotation)||ks(this.x)||ks(this.y)||ks(this.scaleX-1)||ks(this.scaleY-1)||ks(this.skewX)||ks(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(CA(n),this.invTransform=null);return}n=n||hr(),t?this.getLocalTransform(n):CA(n),e&&(t?Sa(n,e,n):Ih(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ls);var n=Ls[0]<0?-1:1,a=Ls[1]<0?-1:1,i=((Ls[0]-n)*t+n)/Ls[0]||0,o=((Ls[1]-a)*t+a)/Ls[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||hr(),Jn(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-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=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||hr(),Sa(hu,e.invTransform,t),t=hu);var n=this.originX,a=this.originY;(n||a)&&(i1[4]=n,i1[5]=a,Sa(hu,t,i1),hu[4]-=n,hu[5]-=a,t=hu),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&Gt(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&Gt(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&o1(e[0]-1)>1e-10&&o1(e[3]-1)>1e-10?Math.sqrt(o1(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){ey(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var v=n+s,y=a+l;t[4]=-v*i-d*y*o,t[5]=-y*o-h*v*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=d*o,u&&Qi(t,t,u),t[4]+=n+c,t[5]+=a+f,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),ni=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ey(r,e){for(var t=0;t<ni.length;t++){var n=ni[t];r[n]=e[n]}}function ti(r){pv||(pv=new oc(100)),r=r||Hi;var e=pv.get(r);return e||(e={font:r,strWidthCache:new oc(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:pn.measureText("国",r).width,asciiCharWidth:pn.measureText("a",r).width},pv.put(r,e)),e}var pv;function o7(r){if(!(s1>=kA)){r=r||Hi;for(var e=[],t=+new Date,n=0;n<=127;n++)e[n]=pn.measureText(String.fromCharCode(n),r).width;var a=+new Date-t;return a>16?s1=kA:a>2&&s1++,e}}var s1=0,kA=5;function UN(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=o7(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function ri(r,e){var t=r.strWidthCache,n=t.get(e);return n==null&&(n=pn.measureText(e,r.font).width,t.put(e,n)),n}function LA(r,e,t,n){var a=ri(ti(e),r),i=Dh(e),o=sc(0,a,t),s=hl(0,i,n),l=new ze(o,s,a,i);return l}function pm(r,e,t,n){var a=((r||"")+"").split(`
|
|
40
|
-
`),i=a.length;if(i===1)return LA(a[0],e,t,n);for(var o=new ze(0,0,0,0),s=0;s<a.length;s++){var l=LA(a[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function sc(r,e,t,n){return t==="right"?n?r+=e:r-=e:t==="center"&&(n?r+=e/2:r-=e/2),r}function hl(r,e,t,n){return t==="middle"?n?r+=e/2:r-=e/2:t==="bottom"&&(n?r+=e:r-=e),r}function Dh(r){return ti(r).stWideCharWidth}function Ca(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function ty(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=Ca(n[0],t.width),u+=Ca(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var l1="__zr_normal__",u1=ni.concat(["ignore"]),s7=Qn(ni,function(r,e){return r[e]=!0,r},{ignore:!1}),pu={},l7=new ze(0,0,0,0),vv=[],vm=(function(){function r(e){this.id=qw(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;i.copyTransform(t);var c=n.position!=null,f=n.autoOverflowArea,d=void 0;if((f||c)&&(d=l7,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),a||d.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(pu,n,d):ty(pu,n,d),i.x=pu.x,i.y=pu.y,o=pu.align,s=pu.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var v=void 0,y=void 0;h==="center"?(v=d.width*.5,y=d.height*.5):(v=Ca(h[0],d.width),y=Ca(h[1],d.height)),u=!0,i.originX=-i.x+v+(a?0:d.x),i.originY=-i.y+y+(a?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var m=n.offset;m&&(i.x+=m[0],i.y+=m[1],u||(i.originX=-m[0],i.originY=-m[1]));var x=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var b=x.overflowRect=x.overflowRect||new ze(0,0,0,0);i.getLocalTransform(vv),Jn(vv,vv),ze.copy(b,d),b.applyTransform(vv)}else x.overflowRect=null;var T=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,C=void 0,k=void 0,L=void 0;T&&this.canBeInsideText()?(C=n.insideFill,k=n.insideStroke,(C==null||C==="auto")&&(C=this.getInsideTextFill()),(k==null||k==="auto")&&(k=this.getInsideTextStroke(C),L=!0)):(C=n.outsideFill,k=n.outsideStroke,(C==null||C==="auto")&&(C=this.getOutsideFill()),(k==null||k==="auto")&&(k=this.getOutsideStroke(C),L=!0)),C=C||"#000",(C!==x.fill||k!==x.stroke||L!==x.autoStroke||o!==x.align||s!==x.verticalAlign)&&(l=!0,x.fill=C,x.stroke=k,x.autoStroke=L,x.align=o,x.verticalAlign=s,t.setDefaultTextStyle(x)),t.__dirty|=Tn,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Y_:U_},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&$r(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Kn(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},ae(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Pe(e))for(var n=e,a=ot(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==l1)){var o=a.targetName,s=o?t[o]:t;a.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,u1)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var a=0;a<n.length;a++){var i=n[a];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(l1,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===l1,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(Ue(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){lm("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(e,t,n,c),d&&d.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tn),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(e[l]!==i[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&a.push(c)}var f=a[o-1],d=!!(f&&f.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(a),v=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&v&&v.duration>0,v);var y=this._textContent,m=this._textGuide;y&&y.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&=~Tn)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=Ue(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=Ue(a,e),o=Ue(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a<e.length;a++){var i=e[a];ae(t,i),i.textConfig&&(n=n||{},ae(n,i.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,a,i,o){var s=!(t&&a);t&&t.textConfig?(this.textConfig=ae({},a?this.textConfig:n.textConfig),ae(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<u1.length;c++){var f=u1[c],d=i&&s7[f];t&&t[f]!=null?d?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(d?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!i)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],v=h.targetName;h.getLoop()||h.__changeFinalValue(v?(t||n)[v]:t||n)}u&&this._transitionState(e,l,o)},r.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}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new zi,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ae(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Tn;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.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)}},r.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)}},r.prototype.animate=function(e,t,n){var a=e?this[e]:this,i=new iT(a,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},r.prototype.addAnimator=function(e,t){var n=this.__zr,a=this;e.during(function(){a.updateDuringAnimation(t)}).done(function(){var i=a.animators,o=Ue(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var s=n[o];!e||e===s.scope?s.stop(t):i.push(s)}return this.animators=i,this},r.prototype.animateTo=function(e,t,n){c1(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){c1(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,a){for(var i=c1(this,t,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Tn;function t(n,a,i,o){Object.defineProperty(e,n,{get:function(){if(!this[a]){var l=this[a]=[];s(this,l)}return this[a]},set:function(l){this[i]=l[0],this[o]=l[1],this[a]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[i]},set:function(c){l[i]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))})(),r})();Wt(vm,ra);Wt(vm,zi);function c1(r,e,t,n,a){t=t||{};var i=[];YN(r,"",r,e,t,n,i,a);var o=i.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),i.length>0&&t.during&&i[0].during(function(v,y){t.during(y)});for(var d=0;d<i.length;d++){var h=i[d];c&&h.done(c),f&&h.aborted(f),t.force&&h.duration(t.duration),h.start(t.easing)}return i}function f1(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function u7(r){return Pr(r[0])}function c7(r,e,t){if(Pr(e[t]))if(Pr(r[t])||(r[t]=[]),en(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),f1(r[t],e[t],n))}else{var a=e[t],i=r[t],o=a.length;if(u7(a))for(var s=a[0].length,l=0;l<o;l++)i[l]?f1(i[l],a[l],s):i[l]=Array.prototype.slice.call(a[l]);else f1(i,a,o);i.length=a.length}else r[t]=e[t]}function f7(r,e){return r===e||Pr(r)&&Pr(e)&&d7(r,e)}function d7(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function YN(r,e,t,n,a,i,o,s){for(var l=ot(n),u=a.duration,c=a.delay,f=a.additive,d=a.setToFinal,h=!Pe(i),v=r.animators,y=[],m=0;m<l.length;m++){var x=l[m],b=n[x];if(b!=null&&t[x]!=null&&(h||i[x]))if(Pe(b)&&!Pr(b)&&!Mh(b)){if(e){s||(t[x]=b,r.updateDuringAnimation(e));continue}YN(r,x,t[x],b,a,i&&i[x],o,s)}else y.push(x);else s||(t[x]=b,r.updateDuringAnimation(e),y.push(x))}var T=y.length;if(!f&&T)for(var C=0;C<v.length;C++){var k=v[C];if(k.targetName===e){var L=k.stopTracks(y);if(L){var A=Ue(v,k);v.splice(A,1)}}}if(a.force||(y=ht(y,function(z){return!f7(n[z],t[z])}),T=y.length),T>0||a.force&&!o.length){var D=void 0,P=void 0,R=void 0;if(s){P={},d&&(D={});for(var C=0;C<T;C++){var x=y[C];P[x]=t[x],d?D[x]=n[x]:t[x]=n[x]}}else if(d){R={};for(var C=0;C<T;C++){var x=y[C];R[x]=Ed(t[x]),c7(t,n,x)}}var k=new iT(t,!1,!1,f?ht(v,function(B){return B.targetName===e}):null);k.targetName=e,a.scope&&(k.scope=a.scope),d&&D&&k.whenWithKeys(0,D,y),R&&k.whenWithKeys(0,R,y),k.whenWithKeys(u??500,s?P:n,y).delay(c||0),r.addAnimator(k,e),o.push(k)}}var Ae=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===t)return n[a]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=Ue(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=Ue(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a<t.length;a++){var i=t[a];n&&i.removeSelfFromZr(n),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];t.call(n,o,i)}return this},e.prototype.traverse=function(t,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=t.call(n,i);i.isGroup&&!o&&i.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new ze(0,0,0,0),a=t||this._children,i=[],o=null,s=0;s<a.length;s++){var l=a[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(i);c?(ze.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e})(vm);Ae.prototype.type="group";var Cg={},sl={};function h7(r){delete sl[r]}function p7(r){if(!r)return!1;if(typeof r=="string")return qd(r,1)<$_;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,a=0;a<n;a++)t+=qd(e[a].color,1);return t/=n,t<$_}return!1}var v7=(function(){function r(e,t,n){var a=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 C$,o=n.renderer||"canvas";Cg[o]||(o=ot(Cg)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Cg[o](t,i,n,e),l=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!it.node&&!it.worker&&!l?new a7(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?it.touchEventsSupported:!!c,d=44,h;f&&(h=Te(n.pointerSize,d)),this.handler=new MN(i,s,u,s.root,h),this.animation=new q$({stage:{update:l?null:function(){return a._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=p7(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=Wu();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=Wu();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ae&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,h7(this.id))},r})();function X_(r,e){var t=new v7(qw(),r,e);return sl[t.id]=t,t}function g7(r){r.dispose()}function y7(){for(var r in sl)sl.hasOwnProperty(r)&&sl[r].dispose();sl={}}function m7(r){return sl[r]}function XN(r,e){Cg[r]=e}var Z_;function ZN(r){if(typeof Z_=="function")return Z_(r)}function KN(r){Z_=r}var x7="6.0.0";const S7=Object.freeze(Object.defineProperty({__proto__:null,dispose:g7,disposeAll:y7,getElementSSRData:ZN,getInstance:m7,init:X_,registerPainter:XN,registerSSRDataGetter:KN,version:x7},Symbol.toStringTag,{value:"Module"}));var AA=1e-4,qN=20;function _7(r){return r.replace(/^\s+|\s+$/g,"")}var In=Math.min,Yt=Math.max,Ya=Math.abs;function vt(r,e,t,n){var a=e[0],i=e[1],o=t[0],s=t[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}var he=b7;function b7(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ry(r,e,t)}function ry(r,e,t){return pe(r)?_7(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function Xt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),qN),r=(+r).toFixed(e),t?r:+r}function kn(r){return r.sort(function(e,t){return e-t}),r}function ma(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return QN(r)}function QN(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function oT(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(Ya(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function w7(r,e,t){if(!r[e])return 0;var n=JN(r,t);return n[e]||0}function JN(r,e){var t=Qn(r,function(h,v){return h+(isNaN(v)?0:v)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=le(r,function(h){return(isNaN(h)?0:h)/t*n*100}),i=n*100,o=le(a,function(h){return Math.floor(h)}),s=Qn(o,function(h,v){return h+v},0),l=le(a,function(h,v){return h-o[v]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,d=l.length;f<d;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return le(o,function(h){return h/n})}function T7(r,e){var t=Math.max(ma(r),ma(e)),n=r+e;return t>qN?n:Xt(n,t)}var K_=9007199254740991;function sT(r){var e=Math.PI*2;return(r%e+e)%e}function lc(r){return r>-AA&&r<AA}var C7=/^(?:(\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 ci(r){if(r instanceof Date)return r;if(pe(r)){var e=C7.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function e5(r){return Math.pow(10,gm(r))}function gm(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function lT(r,e){var t=gm(r),n=Math.pow(10,t),a=r/n,i;return e?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Mg(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function q_(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var a=r[n].interval,i=r[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,i[o]=o?1:1-t),e=a[o],t=i[o];a[0]===a[1]&&i[0]*i[1]!==1?r.splice(n,1):n++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function ai(r){var e=parseFloat(r);return e==r&&(e!==0||!pe(r)||r.indexOf("x")<=0)?e:NaN}function uT(r){return!isNaN(ai(r))}function t5(){return Math.round(Math.random()*9)}function r5(r,e){return e===0?r:r5(e,r%e)}function IA(r,e){return r==null?e:e==null?r:r*e/r5(r,e)}var M7="[ECharts] ",k7=typeof console<"u"&&console.warn&&console.log;function L7(r,e,t){k7&&console[r](M7+e)}function n5(r,e){L7("error",r)}function gt(r){throw new Error(r)}function DA(r,e,t){return(e-r)*t+r}var a5="series\0",i5="\0_ec_\0";function Tt(r){return r instanceof Array?r:r==null?[]:[r]}function _l(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,a=t.length;n<a;n++){var i=t[n];!r.emphasis[e].hasOwnProperty(i)&&r[e].hasOwnProperty(i)&&(r.emphasis[e][i]=r[e][i])}}}var PA=["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 Cc(r){return Pe(r)&&!se(r)&&!(r instanceof Date)?r.value:r}function A7(r){return Pe(r)&&!(r instanceof Array)}function o5(r,e,t){var n=t==="normalMerge",a=t==="replaceMerge",i=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=be();O(e,function(l,u){if(!Pe(l)){e[u]=null;return}});var s=I7(r,o,t);return(n||a)&&D7(s,r,o,e),n&&P7(s,e),n||a?R7(s,e,a):i&&E7(s,e),z7(s),s}function I7(r,e,t){var n=[];if(t==="replaceAll")return n;for(var a=0;a<r.length;a++){var i=r[a];i&&i.id!=null&&e.set(i.id,a),n.push({existing:t==="replaceMerge"||Jd(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function D7(r,e,t,n){O(n,function(a,i){if(!(!a||a.id==null)){var o=zd(a.id),s=t.get(o);if(s!=null){var l=r[s];Rr(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=e[s],n[i]=null}}})}function P7(r,e){O(e,function(t,n){if(!(!t||t.name==null))for(var a=0;a<r.length;a++){var i=r[a].existing;if(!r[a].newOption&&i&&(i.id==null||t.id==null)&&!Jd(t)&&!Jd(i)&&s5("name",i,t)){r[a].newOption=t,e[n]=null;return}}})}function R7(r,e,t){O(e,function(n){if(n){for(var a,i=0;(a=r[i])&&(a.newOption||Jd(a.existing)||a.existing&&n.id!=null&&!s5("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),i++}})}function E7(r,e){O(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function z7(r){var e=be();O(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),O(r,function(t){var n=t.newOption;Rr(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),O(r,function(t,n){var a=t.existing,i=t.newOption,o=t.keyInfo;if(Pe(i)){if(o.name=i.name!=null?zd(i.name):a?a.name:a5+n,a)o.id=zd(a.id);else if(i.id!=null)o.id=zd(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function s5(r,e,t){var n=ir(e[r],null),a=ir(t[r],null);return n!=null&&a!=null&&n===a}function zd(r){return ir(r,"")}function ir(r,e){return r==null?e:pe(r)?r:lt(r)||Wg(r)?r+"":e}function cT(r){var e=r.name;return!!(e&&e.indexOf(a5))}function Jd(r){return r&&r.id!=null&&zd(r.id).indexOf(i5)===0}function O7(r){return i5+r}function N7(r,e,t){O(r,function(n){var a=n.newOption;Pe(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=B7(e,a,n.existing,t))})}function B7(r,e,t,n){var a=e.type?e.type:t?t.subType:n.determineSubType(r,e);return a}function j7(r,e){var t={},n={};return a(r||[],t),a(e||[],n,t),[i(t),i(n)];function a(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=ir(o[u].seriesId,null);if(f==null)return;for(var d=Tt(o[u].dataIndex),h=l&&l[f],v=0,y=d.length;v<y;v++){var m=d[v];h&&h[m]?h[m]=null:(s[f]||(s[f]={}))[m]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=i(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function bl(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return se(e.dataIndex)?le(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return se(e.name)?le(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function et(){var r="__ec_inner_"+F7++;return function(e){return e[r]||(e[r]={})}}var F7=t5();function Qu(r,e,t){var n=fT(e,t),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!a&&l&&i.set(l,{}),i.each(function(u,c){var f=Mc(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function fT(r,e){var t;if(pe(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var a=be(),i={},o=!1;return O(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&Ue(e.includeMainTypes,c)<0)){o=o||!!c;var d=a.get(c)||a.set(c,{});d[f]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var Bt={useDefault:!0,enableAll:!1,enableNone:!1},V7={useDefault:!1,enableAll:!0,enableNone:!0};function Mc(r,e,t,n){n=n||Bt;var a=t.index,i=t.id,o=t.name,s={models:null,specified:a!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}if(a==="none"||a===!1){if(n.enableNone)return s.models=[],s;a=-1}return a==="all"&&(n.enableAll?a=i=o=null:a=-1),s.models=r.queryComponents({mainType:e,index:a,id:i,name:o}),s}function l5(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function G7(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function W7(r){return r==="auto"?it.domSupported?"html":"richText":r||"html"}function Q_(r,e){var t=be(),n=[];return O(r,function(a){var i=e(a);(t.get(i)||(n.push(i),t.set(i,[]))).push(a)}),{keys:n,buckets:t}}function u5(r,e,t,n,a){var i=e==null||e==="auto";if(n==null)return n;if(lt(n)){var o=DA(t||0,n,a);return Xt(o,i?Math.max(ma(t||0),ma(n)):e)}else{if(pe(n))return a<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var d=r.getDimensionInfo(f);if(d&&d.type==="ordinal")s[f]=(a<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,v=u[f],o=DA(h,v,a);s[f]=Xt(o,i?Math.max(ma(h),ma(v)):e)}}return s}}var Wo=(function(){function r(){}return r.prototype.reset=function(e,t,n,a){return this._list=e,this._step=a=a||1,this._idx=t,this._end=n??(a>0?e.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function d1(r){r.option=r.parentModel=r.ecModel=null}var H7=".",As="___EC__COMPONENT__CONTAINER___",c5="___EC__EXTENDED_CLASS___";function Xa(r){var e={main:"",sub:""};if(r){var t=r.split(H7);e.main=t[0]||"",e.sub=t[1]||""}return e}function $7(r){Rr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function U7(r){return!!(r&&r[c5])}function dT(r,e){r.$constructor=r,r.extend=function(t){var n=this,a;return Y7(n)?a=(function(i){Q(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(t.$constructor||n).apply(this,arguments)},Qw(a,this)),ae(a.prototype,t),a[c5]=!0,a.extend=this.extend,a.superCall=K7,a.superApply=q7,a.superClass=n,a}}function Y7(r){return Me(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function f5(r,e){r.extend=e.extend}var X7=Math.round(Math.random()*10);function Z7(r){var e=["__\0is_clz",X7++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function K7(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function q7(r,e,t){return this.superClass.prototype[e].apply(r,t)}function ym(r){var e={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){$7(a),n.prototype.type=a;var i=Xa(a);if(!i.sub)e[i.main]=n;else if(i.sub!==As){var o=t(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=e[n];if(o&&o[As]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var a=Xa(n),i=[],o=e[a.main];return o&&o[As]?O(o,function(s,l){l!==As&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=Xa(n);return!!e[a.main]},r.getAllClassMainTypes=function(){var n=[];return O(e,function(a,i){n.push(i)}),n},r.hasSubTypes=function(n){var a=Xa(n),i=e[a.main];return i&&i[As]};function t(n){var a=e[n.main];return(!a||!a[As])&&(a=e[n.main]={},a[As]=!0),a}}function wl(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,a,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(a&&Ue(a,l)>=0||i&&Ue(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var Q7=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],J7=wl(Q7),e9=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return J7(this,e,t)},r})(),J_=new oc(50);function t9(r){if(typeof r=="string"){var e=J_.get(r);return e&&e.image}else return r}function hT(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=J_.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!mm(e)&&i.pending.push(o)):(e=pn.loadImage(r,RA,RA),e.__zrImageSrc=r,J_.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function RA(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function mm(r){return r&&r.width&&r.height}var h1=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function r9(r,e,t,n,a){var i={};return d5(i,r,e,t,n,a),i.text}function d5(r,e,t,n,a,i){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
|
|
41
|
-
`);i=h5(t,n,a,i);for(var s=!1,l={},u=0,c=o.length;u<c;u++)p5(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
42
|
-
`),r.isTruncated=s}function h5(r,e,t,n){n=n||{};var a=ae({},n);t=Te(t,"..."),a.maxIterations=Te(n.maxIterations,2);var i=a.minChar=Te(n.minChar,0),o=a.fontMeasureInfo=ti(e),s=o.asciiCharWidth;a.placeholder=Te(n.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<i&&l>=s;u++)l-=s;var c=ri(o,t);return c>l&&(t="",c=0),l=r-c,a.ellipsis=t,a.ellipsisWidth=c,a.contentWidth=l,a.containerWidth=r,a}function p5(r,e,t){var n=t.containerWidth,a=t.contentWidth,i=t.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=ri(i,e);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?n9(e,a,i):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=ri(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function n9(r,e,t){for(var n=0,a=0,i=r.length;a<i&&n<e;a++)n+=UN(t,r.charCodeAt(a));return a}function a9(r,e,t,n){var a=pT(r),i=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=i==="truncate",f=Dh(u),d=Te(e.lineHeight,f),h=e.lineOverflow==="truncate",v=!1,y=e.width;y==null&&t!=null&&(y=t-s);var m=e.height;m==null&&n!=null&&(m=n-l);var x;y!=null&&(i==="break"||i==="breakAll")?x=a?v5(a,e.font,y,i==="breakAll",0).lines:[]:x=a?a.split(`
|
|
43
|
-
`):[];var b=x.length*d;if(m==null&&(m=b),b>m&&h){var T=Math.floor(m/d);v=v||x.length>T,x=x.slice(0,T),b=x.length*d}if(a&&c&&y!=null)for(var C=h5(y,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),k={},L=0;L<x.length;L++)p5(k,x[L],C),x[L]=k.textLine,v=v||k.isTruncated;for(var A=m,D=0,P=ti(u),L=0;L<x.length;L++)D=Math.max(ri(P,x[L]),D);y==null&&(y=D);var R=y;return A+=l,R+=s,{lines:x,height:m,outerWidth:R,outerHeight:A,lineHeight:d,calculatedLineHeight:f,contentWidth:D,contentHeight:b,width:y,isTruncated:v}}var i9=(function(){function r(){}return r})(),EA=(function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r})(),o9=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function s9(r,e,t,n,a){var i=new o9,o=pT(r);if(!o)return i;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&t!=null&&(c=t-l);var f=e.height;f==null&&n!=null&&(f=n-u);for(var d=e.overflow,h=(d==="break"||d==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:d==="breakAll"}:null,v=h1.lastIndex=0,y;(y=h1.exec(o))!=null;){var m=y.index;m>v&&p1(i,o.substring(v,m),e,h),p1(i,y[2],e,h,y[1]),v=h1.lastIndex}v<o.length&&p1(i,o.substring(v,o.length),e,h);var x=[],b=0,T=0,C=d==="truncate",k=e.lineOverflow==="truncate",L={};function A(Ce,Be,ye){Ce.width=Be,Ce.lineHeight=ye,b+=ye,T=Math.max(T,Be)}e:for(var D=0;D<i.lines.length;D++){for(var P=i.lines[D],R=0,z=0,B=0;B<P.tokens.length;B++){var N=P.tokens[B],W=N.styleName&&e.rich[N.styleName]||{},$=N.textPadding=W.padding,H=$?$[1]+$[3]:0,U=N.font=W.font||e.font;N.contentHeight=Dh(U);var G=Te(W.height,N.contentHeight);if(N.innerHeight=G,$&&(G+=$[0]+$[2]),N.height=G,N.lineHeight=hn(W.lineHeight,e.lineHeight,G),N.align=W&&W.align||a,N.verticalAlign=W&&W.verticalAlign||"middle",k&&f!=null&&b+N.lineHeight>f){var X=i.lines.length;B>0?(P.tokens=P.tokens.slice(0,B),A(P,z,R),i.lines=i.lines.slice(0,D+1)):i.lines=i.lines.slice(0,D),i.isTruncated=i.isTruncated||i.lines.length<X;break e}var K=W.width,V=K==null||K==="auto";if(typeof K=="string"&&K.charAt(K.length-1)==="%")N.percentWidth=K,x.push(N),N.contentWidth=ri(ti(U),N.text);else{if(V){var Y=W.backgroundColor,ne=Y&&Y.image;ne&&(ne=t9(ne),mm(ne)&&(N.width=Math.max(N.width,ne.width*G/ne.height)))}var ue=C&&c!=null?c-z:null;ue!=null&&ue<N.width?!V||ue<H?(N.text="",N.width=N.contentWidth=0):(d5(L,N.text,ue-H,U,e.ellipsis,{minChar:e.truncateMinChar}),N.text=L.text,i.isTruncated=i.isTruncated||L.isTruncated,N.width=N.contentWidth=ri(ti(U),N.text)):N.contentWidth=ri(ti(U),N.text)}N.width+=H,z+=N.width,W&&(R=Math.max(R,N.lineHeight))}A(P,z,R)}i.outerWidth=i.width=Te(c,T),i.outerHeight=i.height=Te(f,b),i.contentHeight=b,i.contentWidth=T,i.outerWidth+=l,i.outerHeight+=u;for(var D=0;D<x.length;D++){var N=x[D],fe=N.percentWidth;N.width=parseInt(fe,10)/100*i.width}return i}function p1(r,e,t,n,a){var i=e==="",o=a&&t.rich[a]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(n){var d=o.padding,h=d?d[1]+d[3]:0;if(o.width!=null&&o.width!=="auto"){var v=Ca(o.width,n.width)+h;s.length>0&&v+n.accumWidth>n.width&&(c=e.split(`
|
|
44
|
-
`),u=!0),n.accumWidth=v}else{var y=v5(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+h,f=y.linesWidths,c=y.lines}}c||(c=e.split(`
|
|
45
|
-
`));for(var m=ti(l),x=0;x<c.length;x++){var b=c[x],T=new i9;if(T.styleName=a,T.text=b,T.isLineHolder=!b&&!i,typeof o.width=="number"?T.width=o.width:T.width=f?f[x]:ri(m,b),!x&&!u){var C=(s[s.length-1]||(s[0]=new EA)).tokens,k=C.length;k===1&&C[0].isLineHolder?C[0]=T:(b||!k||i)&&C.push(T)}else s.push(new EA([T]))}}function l9(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var u9=Qn(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function c9(r){return l9(r)?!!u9[r]:!0}function v5(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=ti(e),d=0;d<r.length;d++){var h=r.charAt(d);if(h===`
|
|
46
|
-
`){l&&(s+=l,c+=u),i.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=UN(f,h.charCodeAt(0)),y=n?!1:!c9(h);if(i.length?c+v>t:a+c+v>t){c?(s||l)&&(y?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=h,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=h,c=v)):y?(i.push(l),o.push(u),l=h,u=v):(i.push(h),o.push(v));continue}c+=v,y?(l+=h,u+=v):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}function zA(r,e,t,n,a,i){if(r.baseX=t,r.baseY=n,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;ze.set(OA,sc(t,o,a),hl(n,s,i),o,s),ze.intersect(e,OA,null,NA);var l=NA.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=sc(l.x,l.width,a,!0),r.baseY=hl(l.y,l.height,i,!0)}}var OA=new ze(0,0,0,0),NA={outIntersectRect:{},clamp:!0};function pT(r){return r!=null?r+="":r=""}function f9(r){var e=pT(r.text),t=r.font,n=ri(ti(t),e),a=Dh(t);return eb(r,n,a,null)}function eb(r,e,t,n){var a=new ze(sc(r.x||0,e,r.textAlign),hl(r.y||0,t,r.textBaseline),e,t),i=n??(g5(r)?r.lineWidth:0);return i>0&&(a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i),a}function g5(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var tb="__zr_style_"+Math.round(Math.random()*10),pl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xm={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};pl[tb]=!0;var BA=["z","z2","invisible"],d9=["invisible"],ea=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=ot(t),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(t[i]):r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&h9(this,t,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new ze(0,0,0,0)),n?ze.applyTransform(t,a,n):t.copy(a),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ze(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:ae(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=hd,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&hd)},e.prototype.styleUpdated=function(){this.__dirty&=~hd},e.prototype.createStyle=function(t){return Lh(pl,t)},e.prototype.useStyle=function(t){t[tb]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[tb]},e.prototype._innerSaveToNormal=function(t){r.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,BA)},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.style?o?i?u=n.style:(u=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(u,n.style)):l&&(u=a.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=ot(c),d=0;d<f.length;d++){var h=f[d];h in u&&(u[h]=u[h],this.style[h]=c[h])}for(var v=ot(u),d=0;d<v.length;d++){var h=v[d];this.style[h]=this.style[h]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var y=this.__inHover?d9:BA,d=0;d<y.length;d++){var h=y[d];n&&n[h]!=null?this[h]=n[h]:l&&a[h]!=null&&(this[h]=a[h])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},e.prototype._mergeStyle=function(t,n){return ae(t,n),t},e.prototype.getAnimationStyleProps=function(){return xm},e.initDefaultProps=(function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=Tn|hd})(),e})(vm),v1=new ze(0,0,0,0),g1=new ze(0,0,0,0);function h9(r,e,t){return v1.copy(r.getBoundingRect()),r.transform&&v1.applyTransform(r.transform),g1.width=e,g1.height=t,!v1.intersect(g1)}var cn=Math.min,fn=Math.max,y1=Math.sin,m1=Math.cos,Is=Math.PI*2,gv=as(),yv=as(),mv=as();function Sm(r,e,t){if(r.length!==0){for(var n=r[0],a=n[0],i=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],a=cn(a,n[0]),i=fn(i,n[0]),o=cn(o,n[1]),s=fn(s,n[1]);e[0]=a,e[1]=o,t[0]=i,t[1]=s}}function jA(r,e,t,n,a,i){a[0]=cn(r,t),a[1]=cn(e,n),i[0]=fn(r,t),i[1]=fn(e,n)}var FA=[],VA=[];function p9(r,e,t,n,a,i,o,s,l,u){var c=DN,f=fr,d=c(r,t,a,o,FA);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<d;h++){var v=f(r,t,a,o,FA[h]);l[0]=cn(v,l[0]),u[0]=fn(v,u[0])}d=c(e,n,i,s,VA);for(var h=0;h<d;h++){var y=f(e,n,i,s,VA[h]);l[1]=cn(y,l[1]),u[1]=fn(y,u[1])}l[0]=cn(r,l[0]),u[0]=fn(r,u[0]),l[0]=cn(o,l[0]),u[0]=fn(o,u[0]),l[1]=cn(e,l[1]),u[1]=fn(e,u[1]),l[1]=cn(s,l[1]),u[1]=fn(s,u[1])}function v9(r,e,t,n,a,i,o,s){var l=RN,u=wr,c=fn(cn(l(r,t,a),1),0),f=fn(cn(l(e,n,i),1),0),d=u(r,t,a,c),h=u(e,n,i,f);o[0]=cn(r,a,d),o[1]=cn(e,i,h),s[0]=fn(r,a,d),s[1]=fn(e,i,h)}function g9(r,e,t,n,a,i,o,s,l){var u=Ri,c=Ei,f=Math.abs(a-i);if(f%Is<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(gv[0]=m1(a)*t+r,gv[1]=y1(a)*n+e,yv[0]=m1(i)*t+r,yv[1]=y1(i)*n+e,u(s,gv,yv),c(l,gv,yv),a=a%Is,a<0&&(a=a+Is),i=i%Is,i<0&&(i=i+Is),a>i&&!o?i+=Is:a<i&&o&&(a+=Is),o){var d=i;i=a,a=d}for(var h=0;h<i;h+=Math.PI/2)h>a&&(mv[0]=m1(h)*t+r,mv[1]=y1(h)*n+e,u(s,mv,s),c(l,mv,l))}var Mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ds=[],Ps=[],Ea=[],_o=[],za=[],Oa=[],x1=Math.min,S1=Math.max,Rs=Math.cos,Es=Math.sin,_i=Math.abs,rb=Math.PI,Io=rb*2,_1=typeof Float32Array<"u",Ef=[];function b1(r){var e=Math.round(r/rb*1e8)/1e8;return e%2*rb}function _m(r,e){var t=b1(r[0]);t<0&&(t+=Io);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Io?a=t+Io:e&&t-a>=Io?a=t-Io:!e&&t>a?a=t+(Io-b1(t-a)):e&&t<a&&(a=t-(Io-b1(a-t))),r[0]=t,r[1]=a}var ii=(function(){function r(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 r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=_i(n/Jg/e)||0,this._uy=_i(n/Jg/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Mt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=_i(e-this._xi),a=_i(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Mt.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+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(Mt.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(Mt.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),Ef[0]=a,Ef[1]=i,_m(Ef,o),a=Ef[0],i=Ef[1];var s=i-a;return this.addData(Mt.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=Rs(i)*n+e,this._yi=Es(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(Mt.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Mt.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&_1&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},r.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,a=this._len,i=0;i<t;i++)n+=e[i].len();var o=this.data;if(_1&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(a+n),a>0&&o))for(var s=0;s<a;s++)this.data[s]=o[s];for(var i=0;i<t;i++)for(var l=e[i].data,s=0;s<l.length;s++)this.data[a++]=l[s];this._len=a}},r.prototype.addData=function(e,t,n,a,i,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,_1&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Ea[0]=Ea[1]=za[0]=za[1]=Number.MAX_VALUE,_o[0]=_o[1]=Oa[0]=Oa[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],a=t,i=n),s){case Mt.M:t=a=e[o++],n=i=e[o++],za[0]=a,za[1]=i,Oa[0]=a,Oa[1]=i;break;case Mt.L:jA(t,n,e[o],e[o+1],za,Oa),t=e[o++],n=e[o++];break;case Mt.C:p9(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],za,Oa),t=e[o++],n=e[o++];break;case Mt.Q:v9(t,n,e[o++],e[o++],e[o],e[o+1],za,Oa),t=e[o++],n=e[o++];break;case Mt.A:var u=e[o++],c=e[o++],f=e[o++],d=e[o++],h=e[o++],v=e[o++]+h;o+=1;var y=!e[o++];l&&(a=Rs(h)*f+u,i=Es(h)*d+c),g9(u,c,f,d,h,v,y,za,Oa),t=Rs(v)*f+u,n=Es(v)*d+c;break;case Mt.R:a=t=e[o++],i=n=e[o++];var m=e[o++],x=e[o++];jA(a,i,a+m,i+x,za,Oa);break;case Mt.Z:t=a,n=i;break}Ri(Ea,Ea,za),Ei(_o,_o,Oa)}return o===0&&(Ea[0]=Ea[1]=_o[0]=_o[1]=0),new ze(Ea[0],Ea[1],_o[0]-Ea[0],_o[1]-Ea[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,a=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,d=0;d<t;){var h=e[d++],v=d===1;v&&(i=e[d],o=e[d+1],s=i,l=o);var y=-1;switch(h){case Mt.M:i=s=e[d++],o=l=e[d++];break;case Mt.L:{var m=e[d++],x=e[d++],b=m-i,T=x-o;(_i(b)>n||_i(T)>a||d===t-1)&&(y=Math.sqrt(b*b+T*T),i=m,o=x);break}case Mt.C:{var C=e[d++],k=e[d++],m=e[d++],x=e[d++],L=e[d++],A=e[d++];y=M$(i,o,C,k,m,x,L,A,10),i=L,o=A;break}case Mt.Q:{var C=e[d++],k=e[d++],m=e[d++],x=e[d++];y=L$(i,o,C,k,m,x,10),i=m,o=x;break}case Mt.A:var D=e[d++],P=e[d++],R=e[d++],z=e[d++],B=e[d++],N=e[d++],W=N+B;d+=1,v&&(s=Rs(B)*R+D,l=Es(B)*z+P),y=S1(R,z)*x1(Io,Math.abs(N)),i=Rs(W)*R+D,o=Es(W)*z+P;break;case Mt.R:{s=i=e[d++],l=o=e[d++];var $=e[d++],H=e[d++];y=$*2+H*2;break}case Mt.Z:{var b=s-i,T=l-o;y=Math.sqrt(b*b+T*T),i=s,o=l;break}}y>=0&&(u[f++]=y,c+=y)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,d,h=t<1,v,y,m=0,x=0,b,T=0,C,k;if(!(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,y=this._pathLen,b=t*y,!b)))e:for(var L=0;L<o;){var A=n[L++],D=L===1;switch(D&&(u=n[L],c=n[L+1],s=u,l=c),A!==Mt.L&&T>0&&(e.lineTo(C,k),T=0),A){case Mt.M:s=u=n[L++],l=c=n[L++],e.moveTo(u,c);break;case Mt.L:{f=n[L++],d=n[L++];var P=_i(f-u),R=_i(d-c);if(P>a||R>i){if(h){var z=v[x++];if(m+z>b){var B=(b-m)/z;e.lineTo(u*(1-B)+f*B,c*(1-B)+d*B);break e}m+=z}e.lineTo(f,d),u=f,c=d,T=0}else{var N=P*P+R*R;N>T&&(C=f,k=d,T=N)}break}case Mt.C:{var W=n[L++],$=n[L++],H=n[L++],U=n[L++],G=n[L++],X=n[L++];if(h){var z=v[x++];if(m+z>b){var B=(b-m)/z;Zo(u,W,H,G,B,Ds),Zo(c,$,U,X,B,Ps),e.bezierCurveTo(Ds[1],Ps[1],Ds[2],Ps[2],Ds[3],Ps[3]);break e}m+=z}e.bezierCurveTo(W,$,H,U,G,X),u=G,c=X;break}case Mt.Q:{var W=n[L++],$=n[L++],H=n[L++],U=n[L++];if(h){var z=v[x++];if(m+z>b){var B=(b-m)/z;Xd(u,W,H,B,Ds),Xd(c,$,U,B,Ps),e.quadraticCurveTo(Ds[1],Ps[1],Ds[2],Ps[2]);break e}m+=z}e.quadraticCurveTo(W,$,H,U),u=H,c=U;break}case Mt.A:var K=n[L++],V=n[L++],Y=n[L++],ne=n[L++],ue=n[L++],fe=n[L++],Ce=n[L++],Be=!n[L++],ye=Y>ne?Y:ne,ce=_i(Y-ne)>.001,we=ue+fe,xe=!1;if(h){var z=v[x++];m+z>b&&(we=ue+fe*(b-m)/z,xe=!0),m+=z}if(ce&&e.ellipse?e.ellipse(K,V,Y,ne,Ce,ue,we,Be):e.arc(K,V,ye,ue,we,Be),xe)break e;D&&(s=Rs(ue)*Y+K,l=Es(ue)*ne+V),u=Rs(we)*Y+K,c=Es(we)*ne+V;break;case Mt.R:s=u=n[L],l=c=n[L+1],f=n[L++],d=n[L++];var Ie=n[L++],dt=n[L++];if(h){var z=v[x++];if(m+z>b){var ke=b-m;e.moveTo(f,d),e.lineTo(f+x1(ke,Ie),d),ke-=Ie,ke>0&&e.lineTo(f+Ie,d+x1(ke,dt)),ke-=dt,ke>0&&e.lineTo(f+S1(Ie-ke,0),d+dt),ke-=Ie,ke>0&&e.lineTo(f,d+S1(dt-ke,0));break e}m+=z}e.rect(f,d,Ie,dt);break;case Mt.Z:if(h){var z=v[x++];if(m+z>b){var B=(b-m)/z;e.lineTo(u*(1-B)+s*B,c*(1-B)+l*B);break e}m+=z}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Mt,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})();function Po(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||i>r+s&&i>t+s||i<r-s&&i<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(i-r)<=s/2;var c=l*i-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function y9(r,e,t,n,a,i,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>i+f&&c>s+f||c<e-f&&c<n-f&&c<i-f&&c<s-f||u>r+f&&u>t+f&&u>a+f&&u>o+f||u<r-f&&u<t-f&&u<a-f&&u<o-f)return!1;var d=PN(r,e,t,n,a,i,o,s,u,c,null);return d<=f/2}function y5(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>i+u||l<e-u&&l<n-u&&l<i-u||s>r+u&&s>t+u&&s>a+u||s<r-u&&s<t-u&&s<a-u)return!1;var c=EN(r,e,t,n,a,i,s,l,null);return c<=u/2}var GA=Math.PI*2;function Ln(r){return r%=GA,r<0&&(r+=GA),r}var zf=Math.PI*2;function m9(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-a)%zf<1e-4)return!0;if(i){var f=n;n=Ln(a),a=Ln(f)}else n=Ln(n),a=Ln(a);n>a&&(a+=zf);var d=Math.atan2(l,s);return d<0&&(d+=zf),d>=n&&d<=a||d+zf>=n&&d+zf<=a}function Ii(r,e,t,n,a,i){if(i>e&&i>n||i<e&&i<n||n===e)return 0;var o=(i-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===a?1/0:l>a?s:0}var bo=ii.CMD,zs=Math.PI*2,x9=1e-4;function S9(r,e){return Math.abs(r-e)<x9}var Kr=[-1,-1,-1],$n=[-1,-1];function _9(){var r=$n[0];$n[0]=$n[1],$n[1]=r}function b9(r,e,t,n,a,i,o,s,l,u){if(u>e&&u>n&&u>i&&u>s||u<e&&u<n&&u<i&&u<s)return 0;var c=Zg(e,n,i,s,u,Kr);if(c===0)return 0;for(var f=0,d=-1,h=void 0,v=void 0,y=0;y<c;y++){var m=Kr[y],x=m===0||m===1?.5:1,b=fr(r,t,a,o,m);b<l||(d<0&&(d=DN(e,n,i,s,$n),$n[1]<$n[0]&&d>1&&_9(),h=fr(e,n,i,s,$n[0]),d>1&&(v=fr(e,n,i,s,$n[1]))),d===2?m<$n[0]?f+=h<e?x:-x:m<$n[1]?f+=v<h?x:-x:f+=s<v?x:-x:m<$n[0]?f+=h<e?x:-x:f+=s<h?x:-x)}return f}function w9(r,e,t,n,a,i,o,s){if(s>e&&s>n&&s>i||s<e&&s<n&&s<i)return 0;var l=k$(e,n,i,s,Kr);if(l===0)return 0;var u=RN(e,n,i);if(u>=0&&u<=1){for(var c=0,f=wr(e,n,i,u),d=0;d<l;d++){var h=Kr[d]===0||Kr[d]===1?.5:1,v=wr(r,t,a,Kr[d]);v<o||(Kr[d]<u?c+=f<e?h:-h:c+=i<f?h:-h)}return c}else{var h=Kr[0]===0||Kr[0]===1?.5:1,v=wr(r,t,a,Kr[0]);return v<o?0:i<e?h:-h}}function T9(r,e,t,n,a,i,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Kr[0]=-l,Kr[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=zs-1e-4){n=0,a=zs;var c=i?1:-1;return o>=Kr[0]+r&&o<=Kr[1]+r?c:0}if(n>a){var f=n;n=a,a=f}n<0&&(n+=zs,a+=zs);for(var d=0,h=0;h<2;h++){var v=Kr[h];if(v+r>o){var y=Math.atan2(s,v),c=i?1:-1;y<0&&(y=zs+y),(y>=n&&y<=a||y+zs>=n&&y+zs<=a)&&(y>Math.PI/2&&y<Math.PI*1.5&&(c=-c),d+=c)}}return d}function m5(r,e,t,n,a){for(var i=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,d,h,v=0;v<o;){var y=i[v++],m=v===1;switch(y===bo.M&&v>1&&(t||(s+=Ii(l,u,c,f,n,a))),m&&(l=i[v],u=i[v+1],c=l,f=u),y){case bo.M:c=i[v++],f=i[v++],l=c,u=f;break;case bo.L:if(t){if(Po(l,u,i[v],i[v+1],e,n,a))return!0}else s+=Ii(l,u,i[v],i[v+1],n,a)||0;l=i[v++],u=i[v++];break;case bo.C:if(t){if(y9(l,u,i[v++],i[v++],i[v++],i[v++],i[v],i[v+1],e,n,a))return!0}else s+=b9(l,u,i[v++],i[v++],i[v++],i[v++],i[v],i[v+1],n,a)||0;l=i[v++],u=i[v++];break;case bo.Q:if(t){if(y5(l,u,i[v++],i[v++],i[v],i[v+1],e,n,a))return!0}else s+=w9(l,u,i[v++],i[v++],i[v],i[v+1],n,a)||0;l=i[v++],u=i[v++];break;case bo.A:var x=i[v++],b=i[v++],T=i[v++],C=i[v++],k=i[v++],L=i[v++];v+=1;var A=!!(1-i[v++]);d=Math.cos(k)*T+x,h=Math.sin(k)*C+b,m?(c=d,f=h):s+=Ii(l,u,d,h,n,a);var D=(n-x)*C/T+x;if(t){if(m9(x,b,C,k,k+L,A,e,D,a))return!0}else s+=T9(x,b,C,k,k+L,A,D,a);l=Math.cos(k+L)*T+x,u=Math.sin(k+L)*C+b;break;case bo.R:c=l=i[v++],f=u=i[v++];var P=i[v++],R=i[v++];if(d=c+P,h=f+R,t){if(Po(c,f,d,f,e,n,a)||Po(d,f,d,h,e,n,a)||Po(d,h,c,h,e,n,a)||Po(c,h,c,f,e,n,a))return!0}else s+=Ii(d,f,d,h,n,a),s+=Ii(c,h,c,f,n,a);break;case bo.Z:if(t){if(Po(l,u,c,f,e,n,a))return!0}else s+=Ii(l,u,c,f,n,a);l=c,u=f;break}}return!t&&!S9(u,f)&&(s+=Ii(l,u,c,f,n,a)||0),s!==0}function C9(r,e,t){return m5(r,0,!1,e,t)}function M9(r,e,t,n){return m5(r,e,!0,t,n)}var ny=De({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},pl),k9={style:De({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xm.style)},w1=ni.concat(["invisible","culling","z","z2","zlevel","parent"]),nt=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s<w1.length;++s)a[w1[s]]=this[w1[s]];a.__dirty|=Tn}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=ot(t);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],s=t[o];o==="style"?this.style?ae(this.style,s):this.useStyle(s):o==="shape"?ae(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(pe(t)){var n=qd(t,0);return n>.5?U_:n>.2?i7:Y_}else if(t)return Y_}return U_},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(pe(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=qd(t,0)<$_;if(i===o)return n}},e.prototype.buildPath=function(t,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=~Bu},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new ii(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Bu)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),M9(s,l/u,t,n)))return!0}if(this.hasFill())return C9(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Bu,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:ae(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Bu)},e.prototype.createStyle=function(t){return Lh(ny,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=ae({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=ae({},a.shape),ae(u,n.shape)):(u=ae({},i?this.shape:a.shape),ae(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=ae({},this.shape);for(var c={},f=ot(u),d=0;d<f.length;d++){var h=f[d];typeof u[h]=="object"?this.shape[h]=u[h]:c[h]=u[h]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},e.prototype.getAnimationStyleProps=function(){return k9},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=(function(i){Q(o,i);function o(s){var l=i.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Le(t.style)},o.prototype.getDefaultShape=function(){return Le(t.shape)},o})(e);for(var a in t)typeof t[a]=="function"&&(n.prototype[a]=t[a]);return n},e.initDefaultProps=(function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=Tn|hd|Bu})(),e})(ea),L9=De({strokeFirst:!0,font:Hi,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},ny),uc=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return g5(this.style)},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return Lh(L9,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=f9(this.style)),this._rect},e.initDefaultProps=(function(){var t=e.prototype;t.dirtyRectTolerance=10})(),e})(ea);uc.prototype.type="tspan";var A9=De({x:0,y:0},pl),I9={style:De({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xm.style)};function D9(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var gr=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Lh(A9,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=D9(n.image)?n.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return I9},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ze(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e})(ea);gr.prototype.type="image";function P9(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,c;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+c,n+i),c!==0&&r.arc(t+c,n+i-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Hu=Math.round;function bm(r,e,t){if(e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Hu(n*2)===Hu(a*2)&&(r.x1=r.x2=An(n,s,!0)),Hu(i*2)===Hu(o*2)&&(r.y1=r.y2=An(i,s,!0))),r}}function x5(r,e,t){if(e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=An(n,s,!0),r.y=An(a,s,!0),r.width=Math.max(An(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(An(a+o,s,!1)-r.y,o===0?0:1)),r}}function An(r,e,t){if(!e)return r;var n=Hu(r*2);return(n+Hu(e))%2===0?n/2:(n+(t?1:-1))/2}var R9=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),E9={},Qe=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new R9},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=x5(E9,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?P9(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(nt);Qe.prototype.type="rect";var WA={fill:"#000"},HA=2,Na={},z9={style:De({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},xm.style)},st=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=WA,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;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}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,B9(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new ze(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(a);u?(t.copy(l),t.applyTransform(u),i=i||t.clone(),i.union(t)):(i=i||l.clone(),i.union(l))}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||WA},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var a=n.rich,i=t.rich||a&&{};return ae(t,n),a&&i?(this._mergeRich(i,a),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,n){for(var a=ot(n),i=0;i<a.length;i++){var o=a[i];t[o]=t[o]||{},ae(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return z9},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Hi,a=t.padding,i=this._defaultStyle,o=t.x||0,s=t.y||0,l=t.align||i.align||"left",u=t.verticalAlign||i.verticalAlign||"top";zA(Na,i.overflowRect,o,s,l,u),o=Na.baseX,s=Na.baseY;var c=qA(t),f=a9(c,t,Na.outerWidth,Na.outerHeight),d=T1(t),h=!!t.backgroundColor,v=f.outerHeight,y=f.outerWidth,m=f.lines,x=f.lineHeight;this.isTruncated=!!f.isTruncated;var b=o,T=hl(s,f.contentHeight,u);if(d||a){var C=sc(o,y,l),k=hl(s,v,u);d&&this._renderBackground(t,t,C,k,y,v)}T+=x/2,a&&(b=KA(o,l,a),u==="top"?T+=a[0]:u==="bottom"&&(T-=a[2]));for(var L=0,A=!1,D=!1,P=ZA("fill"in t?t.fill:(D=!0,i.fill)),R=XA("stroke"in t?t.stroke:!h&&(!i.autoStroke||D)?(L=HA,A=!0,i.stroke):null),z=t.textShadowBlur>0,B=0;B<m.length;B++){var N=this._getOrCreateChild(uc),W=N.createStyle();N.useStyle(W),W.text=m[B],W.x=b,W.y=T,W.textAlign=l,W.textBaseline="middle",W.opacity=t.opacity,W.strokeFirst=!0,z&&(W.shadowBlur=t.textShadowBlur||0,W.shadowColor=t.textShadowColor||"transparent",W.shadowOffsetX=t.textShadowOffsetX||0,W.shadowOffsetY=t.textShadowOffsetY||0),W.stroke=R,W.fill=P,R&&(W.lineWidth=t.lineWidth||L,W.lineDash=t.lineDash,W.lineDashOffset=t.lineDashOffset||0),W.font=n,UA(W,t),T+=x,N.setBoundingRect(eb(W,f.contentWidth,f.calculatedLineHeight,A?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,n=this._defaultStyle,a=t.align||n.align,i=t.verticalAlign||n.verticalAlign,o=t.x||0,s=t.y||0;zA(Na,n.overflowRect,o,s,a,i),o=Na.baseX,s=Na.baseY;var l=qA(t),u=s9(l,t,Na.outerWidth,Na.outerHeight,a),c=u.width,f=u.outerWidth,d=u.outerHeight,h=t.padding;this.isTruncated=!!u.isTruncated;var v=sc(o,f,a),y=hl(s,d,i),m=v,x=y;h&&(m+=h[3],x+=h[0]);var b=m+c;T1(t)&&this._renderBackground(t,t,v,y,f,d);for(var T=!!t.backgroundColor,C=0;C<u.lines.length;C++){for(var k=u.lines[C],L=k.tokens,A=L.length,D=k.lineHeight,P=k.width,R=0,z=m,B=b,N=A-1,W=void 0;R<A&&(W=L[R],!W.align||W.align==="left");)this._placeToken(W,t,D,x,z,"left",T),P-=W.width,z+=W.width,R++;for(;N>=0&&(W=L[N],W.align==="right");)this._placeToken(W,t,D,x,B,"right",T),P-=W.width,B-=W.width,N--;for(z+=(c-(z-m)-(b-B)-P)/2;R<=N;)W=L[R],this._placeToken(W,t,D,x,z+W.width/2,"center",T),z+=W.width,R++;x+=D}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=i+a/2;c==="top"?f=i+t.height/2:c==="bottom"&&(f=i+a-t.height/2);var d=!t.isLineHolder&&T1(u);d&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var h=!!u.backgroundColor,v=t.textPadding;v&&(o=KA(o,s,v),f-=t.height/2-v[0]-t.innerHeight/2);var y=this._getOrCreateChild(uc),m=y.createStyle();y.useStyle(m);var x=this._defaultStyle,b=!1,T=0,C=!1,k=ZA("fill"in u?u.fill:"fill"in n?n.fill:(b=!0,x.fill)),L=XA("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!x.autoStroke||b)?(T=HA,C=!0,x.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=t.text,m.x=o,m.y=f,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||Hi,m.opacity=hn(u.opacity,n.opacity,1),UA(m,u),L&&(m.lineWidth=hn(u.lineWidth,n.lineWidth,T),m.lineDash=Te(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=L),k&&(m.fill=k),y.setBoundingRect(eb(m,t.contentWidth,t.contentHeight,C?0:null))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,d=l&&!f,h=t.borderRadius,v=this,y,m;if(d||t.lineHeight||u&&c){y=this._getOrCreateChild(Qe),y.useStyle(y.createStyle()),y.style.fill=null;var x=y.shape;x.x=a,x.y=i,x.width=o,x.height=s,x.r=h,y.dirtyShape()}if(d){var b=y.style;b.fill=l||null,b.fillOpacity=Te(t.fillOpacity,1)}else if(f){m=this._getOrCreateChild(gr),m.onload=function(){v.dirtyStyle()};var T=m.style;T.image=l.image,T.x=a,T.y=i,T.width=o,T.height=s}if(u&&c){var b=y.style;b.lineWidth=u,b.stroke=c,b.strokeOpacity=Te(t.strokeOpacity,1),b.lineDash=t.borderDash,b.lineDashOffset=t.borderDashOffset||0,y.strokeContainThreshold=0,y.hasFill()&&y.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var C=(y||m).style;C.shadowBlur=t.shadowBlur||0,C.shadowColor=t.shadowColor||"transparent",C.shadowOffsetX=t.shadowOffsetX||0,C.shadowOffsetY=t.shadowOffsetY||0,C.opacity=hn(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return _5(t)&&(n=[t.fontStyle,t.fontWeight,S5(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Mn(n)||t.textFont||t.font},e})(ea),O9={left:!0,right:1,center:1},N9={top:1,bottom:1,middle:1},$A=["fontStyle","fontWeight","fontSize","fontFamily"];function S5(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Xw+"px":r+"px"}function UA(r,e){for(var t=0;t<$A.length;t++){var n=$A[t],a=e[n];a!=null&&(r[n]=a)}}function _5(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function B9(r){return YA(r),O(r.rich,YA),r}function YA(r){if(r){r.font=st.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||O9[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||N9[t]?t:"top";var n=r.padding;n&&(r.padding=kh(r.padding))}}function XA(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function ZA(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function KA(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function qA(r){var e=r.text;return e!=null&&(e+=""),e}function T1(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Ne=et(),nb=function(r,e,t,n){if(n){var a=Ne(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=Ne(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},QA=1,JA={},b5=et(),vT=et(),gT=0,Ph=1,wm=2,tn=["emphasis","blur","select"],eh=["normal","emphasis","blur","select"],kc=10,j9=9,vl="highlight",kg="downplay",ay="select",ab="unselect",iy="toggleSelect",yT="selectchanged";function vu(r){return r!=null&&r!=="none"}function Tm(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function w5(r){Tm(r,"emphasis",wm)}function T5(r){r.hoverState===wm&&Tm(r,"normal",gT)}function mT(r){Tm(r,"blur",Ph)}function C5(r){r.hoverState===Ph&&Tm(r,"normal",gT)}function F9(r){r.selected=!0}function V9(r){r.selected=!1}function eI(r,e,t){e(r,t)}function Ji(r,e,t){eI(r,e,t),r.isGroup&&r.traverse(function(n){eI(n,e,t)})}function oy(r,e){switch(e){case"emphasis":r.hoverState=wm;break;case"normal":r.hoverState=gT;break;case"blur":r.hoverState=Ph;break;case"select":r.selected=!0}}function G9(r,e,t,n){for(var a=r.style,i={},o=0;o<e.length;o++){var s=e[o],l=a[s];i[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function W9(r,e,t,n){var a=t&&Ue(t,"select")>=0,i=!1;if(r instanceof nt){var o=b5(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(vu(s)||vu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=ae({},n),u=ae({},u),u.fill=s):!vu(u.fill)&&vu(s)?(i=!0,n=ae({},n),u=ae({},u),u.fill=qg(s)):!vu(u.stroke)&&vu(l)&&(i||(n=ae({},n),u=ae({},u)),u.stroke=qg(l)),n.style=u}}if(n&&n.z2==null){i||(n=ae({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??kc)}return n}function H9(r,e,t){if(t&&t.z2==null){t=ae({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??j9)}return t}function $9(r,e,t){var n=Ue(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:G9(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=ae({},t),o=ae({opacity:n?a:i.opacity*.1},o),t.style=o),t}function C1(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return W9(this,r,e,t);if(r==="blur")return $9(this,r,t);if(r==="select")return H9(this,r,t)}return t}function Tl(r){r.stateProxy=C1;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=C1),t&&(t.stateProxy=C1)}function tI(r,e){!A5(r,e)&&!r.__highByOuter&&Ji(r,w5)}function rI(r,e){!A5(r,e)&&!r.__highByOuter&&Ji(r,T5)}function Ui(r,e){r.__highByOuter|=1<<(e||0),Ji(r,w5)}function Yi(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Ji(r,T5)}function M5(r){Ji(r,mT)}function xT(r){Ji(r,C5)}function k5(r){Ji(r,F9)}function L5(r){Ji(r,V9)}function A5(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function I5(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=vT(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){C5(u)}),s&&t.push(i)),o.isBlured=!1}),O(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function ib(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,c){for(var f=0;f<c.length;f++){var d=u.getItemGraphicEl(c[f]);d&&xT(d)}}if(r!=null&&!(!e||e==="none")){var o=a.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];a.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var d=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!d||e==="series"&&c)){var h=n.getViewOfSeriesModel(u);if(h.group.traverse(function(m){m.__highByOuter&&c&&e==="self"||mT(m)}),Pr(e))i(u.getData(),e);else if(Pe(e))for(var v=ot(e),y=0;y<v.length;y++)i(u.getData(v[y]),e[v[y]]);l.push(u),vT(u).isBlured=!0}}),a.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,a)}})}}function ob(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){vT(n).isBlured=!0;var a=t.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){mT(i)})}}}function U9(r,e,t){var n=r.seriesIndex,a=r.getData(e.dataType);if(a){var i=bl(a,e);i=(se(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var s=a.count(),l=0;!o&&l<s;)o=a.getItemGraphicEl(l++);if(o){var u=Ne(o);ib(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&ib(n,c,f,t)}}}function ST(r,e,t,n){var a={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return a;var i=n.getModel().getComponent(r,e);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(Ne(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Y9(r,e,t){var n=Ne(r),a=ST(n.componentMainType,n.componentIndex,n.componentHighDownName,t),i=a.dispatchers,o=a.focusSelf;i?(o&&ob(n.componentMainType,n.componentIndex,t),O(i,function(s){return tI(s,e)})):(ib(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&ob(n.componentMainType,n.componentIndex,t),tI(r,e))}function X9(r,e,t){I5(t);var n=Ne(r),a=ST(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;a?O(a,function(i){return rI(i,e)}):rI(r,e)}function Z9(r,e,t){if(lb(e)){var n=e.dataType,a=r.getData(n),i=bl(a,e);se(i)||(i=[i]),r[e.type===iy?"toggleSelect":e.type===ay?"select":"unselect"](i,n)}}function nI(r){var e=r.getAllData();O(e,function(t){var n=t.data,a=t.type;n.eachItemGraphicEl(function(i,o){r.isSelected(o,a)?k5(i):L5(i)})})}function K9(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();O(n,function(a){a.data;var i=a.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function Ho(r,e,t){ll(r,!0),Ji(r,Tl),sb(r,e,t)}function q9(r){ll(r,!1)}function Pt(r,e,t,n){n?q9(r):Ho(r,e,t)}function sb(r,e,t){var n=Ne(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var aI=["emphasis","blur","select"],Q9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function or(r,e,t,n){t=t||"itemStyle";for(var a=0;a<aI.length;a++){var i=aI[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=n?n(o):o[Q9[t]]()}}function ll(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function th(r){return!!(r&&r.__highDownDispatcher)}function J9(r,e,t){var n=Ne(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function eU(r){var e=JA[r];return e==null&&QA<=32&&(e=JA[r]=QA++),e}function lb(r){var e=r.type;return e===ay||e===ab||e===iy}function iI(r){var e=r.type;return e===vl||e===kg}function tU(r){var e=b5(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var gu=ii.CMD,rU=[[],[],[]],oI=Math.sqrt,nU=Math.atan2;function D5(r,e){if(e){var t=r.data,n=r.len(),a,i,o,s,l,u,c=gu.M,f=gu.C,d=gu.L,h=gu.R,v=gu.A,y=gu.Q;for(o=0,s=0;o<n;){switch(a=t[o++],s=o,i=0,a){case c:i=1;break;case d:i=1;break;case f:i=3;break;case y:i=2;break;case v:var m=e[4],x=e[5],b=oI(e[0]*e[0]+e[1]*e[1]),T=oI(e[2]*e[2]+e[3]*e[3]),C=nU(-e[1]/T,e[0]/b);t[o]*=b,t[o++]+=m,t[o]*=T,t[o++]+=x,t[o++]*=b,t[o++]*=T,t[o++]+=C,t[o++]+=C,o+=2,s=o;break;case h:u[0]=t[o++],u[1]=t[o++],Gt(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Gt(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<i;l++){var k=rU[l];k[0]=t[o++],k[1]=t[o++],Gt(k,k,e),t[s++]=k[0],t[s++]=k[1]}}r.increaseVersion()}}var M1=Math.sqrt,xv=Math.sin,Sv=Math.cos,Of=Math.PI;function sI(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function ub(r,e){return(r[0]*e[0]+r[1]*e[1])/(sI(r)*sI(e))}function lI(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(ub(r,e))}function uI(r,e,t,n,a,i,o,s,l,u,c){var f=l*(Of/180),d=Sv(f)*(r-t)/2+xv(f)*(e-n)/2,h=-1*xv(f)*(r-t)/2+Sv(f)*(e-n)/2,v=d*d/(o*o)+h*h/(s*s);v>1&&(o*=M1(v),s*=M1(v));var y=(a===i?-1:1)*M1((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,m=y*o*h/s,x=y*-s*d/o,b=(r+t)/2+Sv(f)*m-xv(f)*x,T=(e+n)/2+xv(f)*m+Sv(f)*x,C=lI([1,0],[(d-m)/o,(h-x)/s]),k=[(d-m)/o,(h-x)/s],L=[(-1*d-m)/o,(-1*h-x)/s],A=lI(k,L);if(ub(k,L)<=-1&&(A=Of),ub(k,L)>=1&&(A=0),A<0){var D=Math.round(A/Of*1e6)/1e6;A=Of*2+D%2*Of}c.addData(u,b,T,o,s,C,A,f,i)}var aU=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,iU=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function oU(r){var e=new ii;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=ii.CMD,l=r.match(aU);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),d=void 0,h=c.match(iU)||[],v=h.length,y=0;y<v;y++)h[y]=parseFloat(h[y]);for(var m=0;m<v;){var x=void 0,b=void 0,T=void 0,C=void 0,k=void 0,L=void 0,A=void 0,D=t,P=n,R=void 0,z=void 0;switch(f){case"l":t+=h[m++],n+=h[m++],d=s.L,e.addData(d,t,n);break;case"L":t=h[m++],n=h[m++],d=s.L,e.addData(d,t,n);break;case"m":t+=h[m++],n+=h[m++],d=s.M,e.addData(d,t,n),a=t,i=n,f="l";break;case"M":t=h[m++],n=h[m++],d=s.M,e.addData(d,t,n),a=t,i=n,f="L";break;case"h":t+=h[m++],d=s.L,e.addData(d,t,n);break;case"H":t=h[m++],d=s.L,e.addData(d,t,n);break;case"v":n+=h[m++],d=s.L,e.addData(d,t,n);break;case"V":n=h[m++],d=s.L,e.addData(d,t,n);break;case"C":d=s.C,e.addData(d,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),t=h[m-2],n=h[m-1];break;case"c":d=s.C,e.addData(d,h[m++]+t,h[m++]+n,h[m++]+t,h[m++]+n,h[m++]+t,h[m++]+n),t+=h[m-2],n+=h[m-1];break;case"S":x=t,b=n,R=e.len(),z=e.data,o===s.C&&(x+=t-z[R-4],b+=n-z[R-3]),d=s.C,D=h[m++],P=h[m++],t=h[m++],n=h[m++],e.addData(d,x,b,D,P,t,n);break;case"s":x=t,b=n,R=e.len(),z=e.data,o===s.C&&(x+=t-z[R-4],b+=n-z[R-3]),d=s.C,D=t+h[m++],P=n+h[m++],t+=h[m++],n+=h[m++],e.addData(d,x,b,D,P,t,n);break;case"Q":D=h[m++],P=h[m++],t=h[m++],n=h[m++],d=s.Q,e.addData(d,D,P,t,n);break;case"q":D=h[m++]+t,P=h[m++]+n,t+=h[m++],n+=h[m++],d=s.Q,e.addData(d,D,P,t,n);break;case"T":x=t,b=n,R=e.len(),z=e.data,o===s.Q&&(x+=t-z[R-4],b+=n-z[R-3]),t=h[m++],n=h[m++],d=s.Q,e.addData(d,x,b,t,n);break;case"t":x=t,b=n,R=e.len(),z=e.data,o===s.Q&&(x+=t-z[R-4],b+=n-z[R-3]),t+=h[m++],n+=h[m++],d=s.Q,e.addData(d,x,b,t,n);break;case"A":T=h[m++],C=h[m++],k=h[m++],L=h[m++],A=h[m++],D=t,P=n,t=h[m++],n=h[m++],d=s.A,uI(D,P,t,n,L,A,T,C,k,d,e);break;case"a":T=h[m++],C=h[m++],k=h[m++],L=h[m++],A=h[m++],D=t,P=n,t+=h[m++],n+=h[m++],d=s.A,uI(D,P,t,n,L,A,T,C,k,d,e);break}}(f==="z"||f==="Z")&&(d=s.Z,e.addData(d),t=a,n=i),o=d}return e.toStatic(),e}var P5=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e})(nt);function R5(r){return r.setData!=null}function E5(r,e){var t=oU(r),n=ae({},e);return n.buildPath=function(a){var i=R5(a);if(i&&a.canSave()){a.appendPath(t);var o=a.getContext();o&&a.rebuildPath(o,1)}else{var o=i?a.getContext():a;o&&t.rebuildPath(o,1)}},n.applyTransform=function(a){D5(t,a),this.dirtyShape()},n}function z5(r,e){return new P5(E5(r,e))}function sU(r,e){var t=E5(r,e),n=(function(a){Q(i,a);function i(o){var s=a.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return i})(P5);return n}function lU(r,e){for(var t=[],n=r.length,a=0;a<n;a++){var i=r[a];t.push(i.getUpdatedPathProxy(!0))}var o=new nt(e);return o.createPathProxy(),o.buildPath=function(s){if(R5(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function _T(r,e){e=e||{};var t=new nt;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?D5(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var uU=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),fi=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new uU},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e})(nt);fi.prototype.type="circle";var cU=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),Rh=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new cU},e.prototype.buildPath=function(t,n){var a=.5522848,i=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*a,c=l*a;t.moveTo(i-s,o),t.bezierCurveTo(i-s,o-c,i-u,o-l,i,o-l),t.bezierCurveTo(i+u,o-l,i+s,o-c,i+s,o),t.bezierCurveTo(i+s,o+c,i+u,o+l,i,o+l),t.bezierCurveTo(i-u,o+l,i-s,o+c,i-s,o),t.closePath()},e})(nt);Rh.prototype.type="ellipse";var O5=Math.PI,k1=O5*2,Os=Math.sin,yu=Math.cos,fU=Math.acos,Vr=Math.atan2,cI=Math.abs,Od=Math.sqrt,vd=Math.max,Ba=Math.min,ha=1e-4;function dU(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=f*l-c*u;if(!(d*d<ha))return d=(c*(e-i)-f*(r-a))/d,[r+d*l,e+d*u]}function _v(r,e,t,n,a,i,o){var s=r-t,l=e-n,u=(o?i:-i)/Od(s*s+l*l),c=u*l,f=-u*s,d=r+c,h=e+f,v=t+c,y=n+f,m=(d+v)/2,x=(h+y)/2,b=v-d,T=y-h,C=b*b+T*T,k=a-i,L=d*y-v*h,A=(T<0?-1:1)*Od(vd(0,k*k*C-L*L)),D=(L*T-b*A)/C,P=(-L*b-T*A)/C,R=(L*T+b*A)/C,z=(-L*b+T*A)/C,B=D-m,N=P-x,W=R-m,$=z-x;return B*B+N*N>W*W+$*$&&(D=R,P=z),{cx:D,cy:P,x0:-c,y0:-f,x1:D*(a/k-1),y1:P*(a/k-1)}}function hU(r){var e;if(se(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function pU(r,e){var t,n=vd(e.r,0),a=vd(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,d=!!e.clockwise,h=cI(u-l),v=h>k1&&h%k1;if(v>ha&&(h=v),!(n>ha))r.moveTo(c,f);else if(h>k1-ha)r.moveTo(c+n*yu(l),f+n*Os(l)),r.arc(c,f,n,l,u,!d),a>ha&&(r.moveTo(c+a*yu(u),f+a*Os(u)),r.arc(c,f,a,u,l,d));else{var y=void 0,m=void 0,x=void 0,b=void 0,T=void 0,C=void 0,k=void 0,L=void 0,A=void 0,D=void 0,P=void 0,R=void 0,z=void 0,B=void 0,N=void 0,W=void 0,$=n*yu(l),H=n*Os(l),U=a*yu(u),G=a*Os(u),X=h>ha;if(X){var K=e.cornerRadius;K&&(t=hU(K),y=t[0],m=t[1],x=t[2],b=t[3]);var V=cI(n-a)/2;if(T=Ba(V,x),C=Ba(V,b),k=Ba(V,y),L=Ba(V,m),P=A=vd(T,C),R=D=vd(k,L),(A>ha||D>ha)&&(z=n*yu(u),B=n*Os(u),N=a*yu(l),W=a*Os(l),h<O5)){var Y=dU($,H,N,W,z,B,U,G);if(Y){var ne=$-Y[0],ue=H-Y[1],fe=z-Y[0],Ce=B-Y[1],Be=1/Os(fU((ne*fe+ue*Ce)/(Od(ne*ne+ue*ue)*Od(fe*fe+Ce*Ce)))/2),ye=Od(Y[0]*Y[0]+Y[1]*Y[1]);P=Ba(A,(n-ye)/(Be+1)),R=Ba(D,(a-ye)/(Be-1))}}}if(!X)r.moveTo(c+$,f+H);else if(P>ha){var ce=Ba(x,P),we=Ba(b,P),xe=_v(N,W,$,H,n,ce,d),Ie=_v(z,B,U,G,n,we,d);r.moveTo(c+xe.cx+xe.x0,f+xe.cy+xe.y0),P<A&&ce===we?r.arc(c+xe.cx,f+xe.cy,P,Vr(xe.y0,xe.x0),Vr(Ie.y0,Ie.x0),!d):(ce>0&&r.arc(c+xe.cx,f+xe.cy,ce,Vr(xe.y0,xe.x0),Vr(xe.y1,xe.x1),!d),r.arc(c,f,n,Vr(xe.cy+xe.y1,xe.cx+xe.x1),Vr(Ie.cy+Ie.y1,Ie.cx+Ie.x1),!d),we>0&&r.arc(c+Ie.cx,f+Ie.cy,we,Vr(Ie.y1,Ie.x1),Vr(Ie.y0,Ie.x0),!d))}else r.moveTo(c+$,f+H),r.arc(c,f,n,l,u,!d);if(!(a>ha)||!X)r.lineTo(c+U,f+G);else if(R>ha){var ce=Ba(y,R),we=Ba(m,R),xe=_v(U,G,z,B,a,-we,d),Ie=_v($,H,N,W,a,-ce,d);r.lineTo(c+xe.cx+xe.x0,f+xe.cy+xe.y0),R<D&&ce===we?r.arc(c+xe.cx,f+xe.cy,R,Vr(xe.y0,xe.x0),Vr(Ie.y0,Ie.x0),!d):(we>0&&r.arc(c+xe.cx,f+xe.cy,we,Vr(xe.y0,xe.x0),Vr(xe.y1,xe.x1),!d),r.arc(c,f,a,Vr(xe.cy+xe.y1,xe.cx+xe.x1),Vr(Ie.cy+Ie.y1,Ie.cx+Ie.x1),d),ce>0&&r.arc(c+Ie.cx,f+Ie.cy,ce,Vr(Ie.y1,Ie.x1),Vr(Ie.y0,Ie.x0),!d))}else r.lineTo(c+U,f+G),r.arc(c,f,a,u,l,d)}r.closePath()}}}var vU=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})(),Er=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vU},e.prototype.buildPath=function(t,n){pU(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(nt);Er.prototype.type="sector";var gU=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),Lc=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new gU},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e})(nt);Lc.prototype.type="ring";function yU(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=r.length;d<h;d++)Ri(c,c,r[d]),Ei(f,f,r[d]);Ri(c,c,n[0]),Ei(f,f,n[1])}for(var d=0,h=r.length;d<h;d++){var v=r[d];if(t)l=r[d?d-1:h-1],u=r[(d+1)%h];else if(d===0||d===h-1){a.push(ei(r[d]));continue}else l=r[d-1],u=r[d+1];Eo(i,u,l),Ad(i,i,e);var y=$g(v,l),m=$g(v,u),x=y+m;x!==0&&(y/=x,m/=x),Ad(o,i,-y),Ad(s,i,m);var b=A_([],v,o),T=A_([],v,s);n&&(Ei(b,b,c),Ri(b,b,f),Ei(T,T,c),Ri(T,T,f)),a.push(b),a.push(T)}return t&&a.push(a.shift()),a}function N5(r,e,t){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=yU(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)r.lineTo(a[s][0],a[s][1])}t&&r.closePath()}}var mU=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),zr=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new mU},e.prototype.buildPath=function(t,n){N5(t,n,!0)},e})(nt);zr.prototype.type="polygon";var xU=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),Cr=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new xU},e.prototype.buildPath=function(t,n){N5(t,n,!1)},e})(nt);Cr.prototype.type="polyline";var SU={},_U=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),Zt=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new _U},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=bm(SU,n,this.style);a=l.x1,i=l.y1,o=l.x2,s=l.y2}else a=n.x1,i=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(a,i),u<1&&(o=a*(1-u)+o*u,s=i*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e})(nt);Zt.prototype.type="line";var un=[],bU=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function fI(r,e,t){var n=r.cpx2,a=r.cpy2;return n!=null||a!=null?[(t?vA:fr)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?vA:fr)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?O_:wr)(r.x1,r.cpx1,r.x2,e),(t?O_:wr)(r.y1,r.cpy1,r.y2,e)]}var Ac=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new bU},e.prototype.buildPath=function(t,n){var a=n.x1,i=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,d=n.percent;d!==0&&(t.moveTo(a,i),c==null||f==null?(d<1&&(Xd(a,l,o,d,un),l=un[1],o=un[2],Xd(i,u,s,d,un),u=un[1],s=un[2]),t.quadraticCurveTo(l,u,o,s)):(d<1&&(Zo(a,l,c,o,d,un),l=un[1],c=un[2],o=un[3],Zo(i,u,f,s,d,un),u=un[1],f=un[2],s=un[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return fI(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=fI(this.shape,t,!0);return Pl(n,n)},e})(nt);Ac.prototype.type="bezier-curve";var wU=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Eh=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new wU},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);t.moveTo(c*o+a,f*o+i),t.arc(a,i,o,s,l,!u)},e})(nt);Eh.prototype.type="arc";var zh=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),a=0;a<t.length;a++)n=n||t[a].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<t.length;a++)t[a].path||t[a].createPathProxy(),t[a].path.setScale(n[0],n[1],t[a].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(t,a[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),nt.prototype.getBoundingRect.call(this)},e})(nt),B5=(function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r})(),Rl=(function(r){Q(e,r);function e(t,n,a,i,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=n??0,l.x2=a??1,l.y2=i??0,l.type="linear",l.global=s||!1,l}return e})(B5),bT=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,i)||this;return s.x=t??.5,s.y=n??.5,s.r=a??.5,s.type="radial",s.global=o||!1,s}return e})(B5),L1=Math.min,TU=Math.max,bv=Math.abs,Ns=[0,0],Bs=[0,0],br=TN(),wv=br.minTv,Tv=br.maxTv,j5=(function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Ee;for(var n=0;n<2;n++)this._axes[n]=new Ee;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,a=this._axes,i=e.x,o=e.y,s=i+e.width,l=o+e.height;if(n[0].set(i,o),n[1].set(s,o),n[2].set(s,l),n[3].set(i,l),t)for(var u=0;u<4;u++)n[u].transform(t);Ee.sub(a[0],n[1],n[0]),Ee.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var u=0;u<2;u++)this._origin[u]=a[u].dot(n[0])},r.prototype.intersect=function(e,t,n){var a=!0,i=!t;return t&&Ee.set(t,0,0),br.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(a=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(a=!1,i)||!i&&!br.negativeSize&&Ee.copy(t,a?br.useDir?br.dirMinTv:wv:Tv),a},r.prototype._intersectCheckOneSide=function(e,t,n,a){for(var i=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,Ns),e._getProjMinMaxOnAxis(o,t._corners,Bs),br.negativeSize||Ns[1]<Bs[0]||Ns[0]>Bs[1]){if(i=!1,br.negativeSize||n)return i;var l=bv(Bs[0]-Ns[1]),u=bv(Ns[0]-Bs[1]);L1(l,u)>Tv.len()&&(l<u?Ee.scale(Tv,s,-l*a):Ee.scale(Tv,s,u*a))}else if(!n){var l=bv(Bs[0]-Ns[1]),u=bv(Ns[0]-Bs[1]);(br.useDir||L1(l,u)<wv.len())&&((l<u||!br.bidirectional)&&(Ee.scale(wv,s,l*a),br.useDir&&br.calcDirMTV()),(l>=u||!br.bidirectional)&&(Ee.scale(wv,s,-u*a),br.useDir&&br.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var a=this._axes[e],i=this._origin,o=t[0].dot(a)+i[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(a)+i[e];s=L1(c,s),l=TU(c,l)}n[0]=s+br.touchThreshold,n[1]=l-br.touchThreshold,br.negativeSize=n[1]<n[0]},r})(),CU=[],F5=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var a=0;a<t.length;a++)this.addDisplayable(t[a],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ze(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(CU)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e})(ea),V5=et();function Ic(r,e,t,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=Te(n.duration,200),c=Te(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(f=i.delay)),Me(f)&&(f=f(t,a)),Me(u)&&(u=u(t));var d={duration:u||0,delay:f,easing:c};return d}else return null}function wT(r,e,t,n,a,i,o){var s=!1,l;Me(a)?(o=i,i=a,a=null):Pe(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=Ic(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(c&&c.duration>0){var f=c.duration,d=c.delay,h=c.easing,v={duration:f,delay:d||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,v):e.animateTo(t,v)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function ct(r,e,t,n,a,i){wT("update",r,e,t,n,a,i)}function It(r,e,t,n,a,i){wT("enter",r,e,t,n,a,i)}function Ju(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function Ko(r,e,t,n,a,i){Ju(r)||wT("leave",r,e,t,n,a,i)}function dI(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),Ko(r,{style:{opacity:0}},e,t,n)}function ji(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||dI(a,e,t,n)}):dI(r,e,t,n)}function ta(r){V5(r).oldStyle=r.style}function MU(r){return V5(r).oldStyle}var cb={},Ge=["x","y"],tr=["width","height"];function G5(r){return nt.extend(r)}var kU=sU;function W5(r,e){return kU(r,e)}function na(r,e){cb[r]=e}function rh(r){if(cb.hasOwnProperty(r))return cb[r]}function cc(r,e,t,n){var a=z5(r,e);return t&&(n==="center"&&(t=H5(t,a.getBoundingRect())),CT(a,t)),a}function TT(r,e,t){var n=new gr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(a){if(t==="center"){var i={width:a.width,height:a.height};n.setStyle(H5(e,i))}}});return n}function H5(r,e){var t=e.width/e.height,n=r.height*t,a;n<=r.width?a=r.height:(n=r.width,a=n/t);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var Cn=lU;function CT(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function fc(r,e){return bm(r,r,{lineWidth:e}),r}function LU(r,e){return x5(r,r,e),r}var Lg=An;function $o(r,e){for(var t=Ah([]);r&&r!==e;)Sa(t,r.getLocalTransform(),t),r=r.parent;return t}function ba(r,e,t){return e&&!Pr(e)&&(e=zi.getLocalTransform(e)),t&&(e=Jn([],e)),Gt([],r,e)}function Cm(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Ya(2*e[4]/e[0]),a=e[4]===0||e[5]===0||e[2]===0?1:Ya(2*e[4]/e[2]),i=[r==="left"?-n:r==="right"?n:0,r==="top"?-a:r==="bottom"?a:0];return i=ba(i,e,t),Ya(i[0])>Ya(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function hI(r){return!r.isGroup}function AU(r){return r.shape!=null}function Oh(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){hI(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return AU(o)&&(s.shape=Le(o.shape)),s}var i=n(r);e.traverse(function(o){if(hI(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),ct(o,l,t,Ne(o).dataIndex)}}})}function MT(r,e){return le(r,function(t){var n=t[0];n=Yt(n,e.x),n=In(n,e.x+e.width);var a=t[1];return a=Yt(a,e.y),a=In(a,e.y+e.height),[n,a]})}function $5(r,e){var t=Yt(r.x,e.x),n=In(r.x+r.width,e.x+e.width),a=Yt(r.y,e.y),i=In(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Dc(r,e,t){var n=ae({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),De(a,t),new gr(n)):cc(r.replace("path://",""),n,t,"center")}function gd(r,e,t,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(U5(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function U5(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=A1(c,f,l,u);if(IU(d))return!1;var h=r-a,v=e-i,y=A1(h,v,l,u)/d;if(y<0||y>1)return!1;var m=A1(h,v,c,f)/d;return!(m<0||m>1)}function A1(r,e,t,n){return r*n-t*e}function IU(r){return r<=1e-6&&r>=-1e-6}function Cl(r,e,t,n,a){return e==null||(lt(e)?Et[0]=Et[1]=Et[2]=Et[3]=e:(Et[0]=e[0],Et[1]=e[1],Et[2]=e[2],Et[3]=e[3]),n&&(Et[0]=Yt(0,Et[0]),Et[1]=Yt(0,Et[1]),Et[2]=Yt(0,Et[2]),Et[3]=Yt(0,Et[3])),t&&(Et[0]=-Et[0],Et[1]=-Et[1],Et[2]=-Et[2],Et[3]=-Et[3]),pI(r,Et,"x","width",3,1,a&&a[0]||0),pI(r,Et,"y","height",0,2,a&&a[1]||0)),r}var Et=[0,0,0,0];function pI(r,e,t,n,a,i,o){var s=e[i]+e[a],l=r[n];r[n]+=s,o=Yt(0,In(o,l)),r[n]<o?(r[n]=o,r[t]+=e[a]>=0?-e[a]:e[i]>=0?l+e[i]:Ya(s)>1e-8?(l-o)*e[a]/s:0):r[t]-=e[a]}function eo(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=pe(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&O(ot(l),function(c){Se(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ne(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:De({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function fb(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function is(r,e){if(r)if(se(r))for(var t=0;t<r.length;t++)fb(r[t],e);else fb(r,e)}function kT(r){return!r||Ya(r[1])<Cv&&Ya(r[2])<Cv||Ya(r[0])<Cv&&Ya(r[3])<Cv}var Cv=1e-5;function nh(r,e){return r?ze.copy(r,e):e.clone()}function LT(r,e){return e?Ih(r||hr(),e):void 0}function Ml(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function Y5(r){var e=-1/0,t=1/0;fb(r,function(i){n(i),n(i.getTextContent()),n(i.getTextGuideLine())});function n(i){if(!(!i||i.isGroup)){var o=i.currentStates;if(o.length)for(var s=0;s<o.length;s++)a(i.states[o[s]]);a(i)}}function a(i){if(i){var o=i.z2;o>e&&(e=o),o<t&&(t=o)}}return t>e&&(t=e=0),{min:t,max:e}}function Mm(r,e,t){X5(r,e,t,-1/0)}function X5(r,e,t,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)n=Yt(X5(s[l],e,t,n),n);else r.z=e,r.zlevel=t,n=Yt(r.z2||0,n);if(a&&(a.z=e,a.zlevel=t,isFinite(n)&&(a.z2=n+2)),i){var u=r.textGuideLineConfig;i.z=e,i.zlevel=t,isFinite(n)&&(i.z2=n+(u&&u.showAbove?1:-1))}return n}na("circle",fi);na("ellipse",Rh);na("sector",Er);na("ring",Lc);na("polygon",zr);na("polyline",Cr);na("rect",Qe);na("line",Zt);na("bezierCurve",Ac);na("arc",Eh);const El=Object.freeze(Object.defineProperty({__proto__:null,Arc:Eh,BezierCurve:Ac,BoundingRect:ze,Circle:fi,CompoundPath:zh,Ellipse:Rh,Group:Ae,Image:gr,IncrementalDisplayable:F5,Line:Zt,LinearGradient:Rl,OrientedBoundingRect:j5,Path:nt,Point:Ee,Polygon:zr,Polyline:Cr,RadialGradient:bT,Rect:Qe,Ring:Lc,Sector:Er,Text:st,WH:tr,XY:Ge,applyTransform:ba,calcZ2Range:Y5,clipPointsByRect:MT,clipRectByRect:$5,createIcon:Dc,ensureCopyRect:nh,ensureCopyTransform:LT,expandOrShrinkRect:Cl,extendPath:W5,extendShape:G5,getShapeClass:rh,getTransform:$o,groupTransition:Oh,initProps:It,isBoundingRectAxisAligned:kT,isElementRemoved:Ju,lineLineIntersect:U5,linePolygonIntersect:gd,makeImage:TT,makePath:cc,mergePath:Cn,registerShape:na,removeElement:Ko,removeElementWithFadeOut:ji,resizePath:CT,retrieveZInfo:Ml,setTooltipConfig:eo,subPixelOptimize:Lg,subPixelOptimizeLine:fc,subPixelOptimizeRect:LU,transformDirection:Cm,traverseElements:is,traverseUpdateZ:Mm,updateProps:ct},Symbol.toStringTag,{value:"Module"}));var km={};function Z5(r,e){for(var t=0;t<tn.length;t++){var n=tn[t],a=e[n],i=r.ensureState(n);i.style=i.style||{},i.style.text=a}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function db(r,e,t){var n=r.labelFetcher,a=r.labelDataIndex,i=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=Me(r.defaultText)?r.defaultText(a,r,t):r.defaultText);for(var l={normal:s},u=0;u<tn.length;u++){var c=tn[u],f=e[c];l[c]=Te(n?n.getFormattedLabel(a,c,null,i,f&&f.get("formatter")):null,s)}return l}function vr(r,e,t,n){t=t||km;for(var a=r instanceof st,i=!1,o=0;o<eh.length;o++){var s=e[eh[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new st,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=db(t,e),c=e.normal,f=!!c.getShallow("show"),d=wt(c,n&&n.normal,t,!1,!a);d.text=u.normal,a||r.setTextConfig(sy(c,t,!1));for(var o=0;o<tn.length;o++){var h=tn[o],s=e[h];if(s){var v=l.ensureState(h),y=!!Te(s.getShallow("show"),f);if(y!==f&&(v.ignore=!y),v.style=wt(s,n&&n[h],t,!0,!a),v.style.text=u[h],!a){var m=r.ensureState(h);m.textConfig=sy(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(d.x=l.style.x),l.style.y!=null&&(d.y=l.style.y),l.ignore=!f,l.useStyle(d),l.dirty(),t.enableTextSetter&&(Pc(l).setLabelText=function(x){var b=db(t,e,x);Z5(l,b)})}else l&&(l.ignore=!0);r.dirty()}function sr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<tn.length;n++){var a=tn[n];t[a]=r.getModel([a,e])}return t}function wt(r,e,t,n,a){var i={};return DU(i,r,t,n,a),e&&ae(i,e),i}function sy(r,e,t){e=e||{};var n={},a,i=r.getShallow("rotate"),o=Te(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return a=r.getShallow("position")||(t?null:"inside"),a==="outside"&&(a=e.defaultOutsidePosition||"top"),a!=null&&(n.position=a),s!=null&&(n.offset=s),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function DU(r,e,t,n,a){t=t||km;var i=e.ecModel,o=i&&i.option.textStyle,s=PU(e),l;if(s){l={};var u="richInheritPlainLabel",c=Te(e.get(u),i?i.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var d=e.getModel(["rich",f]);mI(l[f]={},d,o,e,c,t,n,a,!1,!0)}}l&&(r.rich=l);var h=e.get("overflow");h&&(r.overflow=h);var v=e.get("lineOverflow");v&&(r.lineOverflow=v);var y=r,m=e.get("minMargin");if(m!=null)m=lt(m)?m/2:0,y.margin=[m,m,m,m],y.__marginType=$u.minMargin;else{var x=e.get("textMargin");x!=null&&(y.margin=kh(x),y.__marginType=$u.textMargin)}mI(r,e,o,null,null,t,n,a,!0,!1)}function PU(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||km).rich;if(t){e=e||{};for(var n=ot(t),a=0;a<n.length;a++){var i=n[a];e[i]=1}}r=r.parentModel}return e}var vI=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],gI=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],yI=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function mI(r,e,t,n,a,i,o,s,l,u){t=!o&&t||km;var c=i&&i.inheritColor,f=e.getShallow("color"),d=e.getShallow("textBorderColor"),h=Te(e.getShallow("opacity"),t.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(d==="inherit"||d==="auto")&&(c?d=c:d=null),s||(f=f||t.color,d=d||t.textBorderColor),f!=null&&(r.fill=f),d!=null&&(r.stroke=d);var v=Te(e.getShallow("textBorderWidth"),t.textBorderWidth);v!=null&&(r.lineWidth=v);var y=Te(e.getShallow("textBorderType"),t.textBorderType);y!=null&&(r.lineDash=y);var m=Te(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);m!=null&&(r.lineDashOffset=m),!o&&h==null&&!u&&(h=i&&i.defaultOpacity),h!=null&&(r.opacity=h),!o&&!s&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var x=0;x<vI.length;x++){var b=vI[x],T=a!==!1&&n?hn(e.getShallow(b),n.getShallow(b),t[b]):Te(e.getShallow(b),t[b]);T!=null&&(r[b]=T)}for(var x=0;x<gI.length;x++){var b=gI[x],T=e.getShallow(b);T!=null&&(r[b]=T)}if(r.verticalAlign==null){var C=e.getShallow("baseline");C!=null&&(r.verticalAlign=C)}if(!l||!i.disableBox){for(var x=0;x<yI.length;x++){var b=yI[x],T=e.getShallow(b);T!=null&&(r[b]=T)}var k=e.getShallow("borderType");k!=null&&(r.borderDash=k),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function AT(r,e){var t=e&&e.getModel("textStyle");return Mn([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Pc=et();function K5(r,e,t,n){if(r){var a=Pc(r);a.prevValue=a.value,a.value=t;var i=e.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=e)}}function q5(r,e,t,n,a){var i=Pc(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=Te(i.interpolatedValue,i.prevValue),l=i.value;function u(c){var f=u5(t,i.precision,s,l,c);i.interpolatedValue=c===1?null:f;var d=db({labelDataIndex:e,labelFetcher:a,defaultText:o?o(f):f+""},i.statesModels,f);Z5(r,d)}r.percent=0,(i.prevValue==null?It:ct)(r,{percent:1},n,e,null,u)}var $u={minMargin:1,textMargin:2},RU=["textStyle","color"],I1=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],D1=new st,EU=(function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(RU):null)},r.prototype.getFont=function(){return AT({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<I1.length;n++)t[I1[n]]=this.getShallow(I1[n]);return D1.useStyle(t),D1.update(),D1.getBoundingRect()},r})(),Q5=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],zU=wl(Q5),OU=(function(){function r(){}return r.prototype.getLineStyle=function(e){return zU(this,e)},r})(),J5=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],NU=wl(J5),BU=(function(){function r(){}return r.prototype.getItemStyle=function(e,t){return NU(this,e,t)},r})(),rt=(function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){Ye(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,a=n==null?n:n[e];if(a==null&&!t){var i=this.parentModel;i&&(a=i.getShallow(e))}return a},r.prototype.getModel=function(e,t){var n=e!=null,a=n?this.parsePath(e):null,i=n?this._doGet(a):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new r(i,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(Le(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!it.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var a=0;a<e.length&&!(e[a]&&(n=n&&typeof n=="object"?n[e[a]]:null,n==null));a++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r})();dT(rt);Z7(rt);Wt(rt,OU);Wt(rt,BU);Wt(rt,e9);Wt(rt,EU);var jU=Math.round(Math.random()*10);function Rc(r){return[r||"",jU++].join("_")}function FU(r){var e={};r.registerSubTypeDefaulter=function(t,n){var a=Xa(t);e[a.main]=n},r.determineSubType=function(t,n){var a=n.type;if(!a){var i=Xa(t).main;r.hasSubTypes(t)&&e[i]&&(a=e[i](n))}return a}}function VU(r,e){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=t(o),c=u.graph,f=u.noEntryList,d={};for(O(i,function(b){d[b]=!0});f.length;){var h=f.pop(),v=c[h],y=!!d[h];y&&(s.call(l,h,v.originalDeps.slice()),delete d[h]),O(v.successor,y?x:m)}O(d,function(){var b="";throw new Error(b)});function m(b){c[b].entryCount--,c[b].entryCount===0&&f.push(b)}function x(b){d[b]=!0,m(b)}};function t(i){var o={},s=[];return O(i,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=a(c,i);u.entryCount=f.length,u.entryCount===0&&s.push(l),O(f,function(d){Ue(u.predecessor,d)<0&&u.predecessor.push(d);var h=n(o,d);Ue(h.successor,d)<0&&h.successor.push(l)})}),{graph:o,noEntryList:s}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var s=[];return O(i,function(l){Ue(o,l)>=0&&s.push(l)}),s}}function os(r,e){return Ye(Ye({},r,!0),e,!0)}const GU={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},WU={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var ly="ZH",IT="EN",ec=IT,Ag={},DT={},eB=it.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ec).toUpperCase();return r.indexOf(ly)>-1?ly:ec})():ec;function PT(r,e){r=r.toUpperCase(),DT[r]=new rt(e),Ag[r]=e}function HU(r){if(pe(r)){var e=Ag[r.toUpperCase()]||{};return r===ly||r===IT?Le(e):Ye(Le(e),Le(Ag[ec]),!1)}else return Ye(Le(r),Le(Ag[ec]),!1)}function hb(r){return DT[r]}function $U(){return DT[ec]}PT(IT,GU);PT(ly,WU);var pb=null;function UU(r){pb||(pb=r)}function er(){return pb}var RT=1e3,ET=RT*60,Nd=ET*60,Zn=Nd*24,xI=Zn*365,YU={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Ig={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},XU="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Mv="{yyyy}-{MM}-{dd}",SI={year:"{yyyy}",month:"{yyyy}-{MM}",day:Mv,hour:Mv+" "+Ig.hour,minute:Mv+" "+Ig.minute,second:Mv+" "+Ig.second,millisecond:XU},bn=["year","month","day","hour","minute","second","millisecond"],ZU=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function KU(r){return!pe(r)&&!Me(r)?qU(r):r}function qU(r){r=r||{};var e={},t=!0;return O(bn,function(n){t&&(t=r[n]==null)}),O(bn,function(n,a){var i=r[n];e[n]={};for(var o=null,s=a;s>=0;s--){var l=bn[s],u=Pe(i)&&!se(i)?i[l]:i,c=void 0;se(u)?(c=u.slice(),o=c[0]||""):pe(u)?(o=u,c=[o]):(o==null?o=Ig[n]:YU[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function qr(r,e){return r+="","0000".substr(0,e-r.length)+r}function Bd(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function QU(r){return r===Bd(r)}function JU(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Nh(r,e,t,n){var a=ci(r),i=a[tB(t)](),o=a[zT(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[OT(t)](),u=a["get"+(t?"UTC":"")+"Day"](),c=a[NT(t)](),f=(c-1)%12+1,d=a[BT(t)](),h=a[jT(t)](),v=a[FT(t)](),y=c>=12?"pm":"am",m=y.toUpperCase(),x=n instanceof rt?n:hb(n||eB)||$U(),b=x.getModel("time"),T=b.get("month"),C=b.get("monthAbbr"),k=b.get("dayOfWeek"),L=b.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,y+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,qr(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,T[o-1]).replace(/{MMM}/g,C[o-1]).replace(/{MM}/g,qr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,qr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,k[u]).replace(/{ee}/g,L[u]).replace(/{e}/g,u+"").replace(/{HH}/g,qr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,qr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,qr(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,qr(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,qr(v,3)).replace(/{S}/g,v+"")}function eY(r,e,t,n,a){var i=null;if(pe(t))i=t;else if(Me(t)){var o={time:r.time,level:r.time.level},s=er();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=Uu(r.value,a);i=t[c][c][0]}}return Nh(new Date(r.value),i,a,n)}function Uu(r,e){var t=ci(r),n=t[zT(e)]()+1,a=t[OT(e)](),i=t[NT(e)](),o=t[BT(e)](),s=t[jT(e)](),l=t[FT(e)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&i===0,h=d&&a===1,v=h&&n===1;return v?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function uy(r,e,t){switch(e){case"year":r[rB(t)](0);case"month":r[nB(t)](1);case"day":r[aB(t)](0);case"hour":r[iB(t)](0);case"minute":r[oB(t)](0);case"second":r[sB(t)](0)}return r}function tB(r){return r?"getUTCFullYear":"getFullYear"}function zT(r){return r?"getUTCMonth":"getMonth"}function OT(r){return r?"getUTCDate":"getDate"}function NT(r){return r?"getUTCHours":"getHours"}function BT(r){return r?"getUTCMinutes":"getMinutes"}function jT(r){return r?"getUTCSeconds":"getSeconds"}function FT(r){return r?"getUTCMilliseconds":"getMilliseconds"}function tY(r){return r?"setUTCFullYear":"setFullYear"}function rB(r){return r?"setUTCMonth":"setMonth"}function nB(r){return r?"setUTCDate":"setDate"}function aB(r){return r?"setUTCHours":"setHours"}function iB(r){return r?"setUTCMinutes":"setMinutes"}function oB(r){return r?"setUTCSeconds":"setSeconds"}function sB(r){return r?"setUTCMilliseconds":"setMilliseconds"}function rY(r,e,t,n,a,i,o,s){var l=new st({style:{text:r,font:e,align:t,verticalAlign:n,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function VT(r){if(!uT(r))return pe(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function GT(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ec=kh;function vb(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&Mn(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?ci(r):r;if(isNaN(+l)){if(s)return"-"}else return Nh(l,n,t)}if(e==="ordinal")return Wg(r)?a(r):lt(r)&&i(r)?r+"":"-";var u=ai(r);return i(u)?VT(u):Wg(r)?a(r):typeof r=="boolean"?r+"":"-"}var _I=["a","b","c","d","e","f","g"],P1=function(r,e){return"{"+r+(e??"")+"}"};function WT(r,e,t){se(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=_I[i];r=r.replace(P1(o),P1(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];r=r.replace(P1(_I[l],s),t?Hr(u):u)}return r}function nY(r,e,t){return O(e,function(n,a){r=r.replace("{"+a+"}",n)}),r}function lB(r,e){var t=pe(r)?{color:r,extraCssText:e}:r||{},n=t.color,a=t.type;e=t.extraCssText;var i=t.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Hr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Hr(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function aY(r,e,t){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
47
|
-
yyyy`);var n=ci(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n[a+"Date"](),l=n[a+"Hours"](),u=n[a+"Minutes"](),c=n[a+"Seconds"](),f=n[a+"Milliseconds"]();return r=r.replace("MM",qr(o,2)).replace("M",o).replace("yyyy",i).replace("yy",qr(i%100+"",2)).replace("dd",qr(s,2)).replace("d",s).replace("hh",qr(l,2)).replace("h",l).replace("mm",qr(u,2)).replace("m",u).replace("ss",qr(c,2)).replace("s",c).replace("SSS",qr(f,3)),r}function iY(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function kl(r,e){return e=e||"transparent",pe(r)?r:Pe(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function cy(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Dg={},R1={},zc=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Dg),this._normalMasterList=n(R1);function n(a,i){var o=[];return O(a,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){O(this._normalMasterList,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){Dg[e]=t;return}R1[e]=t},r.get=function(e){return R1[e]||Dg[e]},r})();function oY(r){return!!Dg[r]}var gb={coord:1,coord2:2};function sY(r){uB.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var uB=be();function lY(r){var e=r.getShallow("coord",!0),t=gb.coord;if(e==null){var n=uB.get(r.type);n&&n.getCoord2&&(t=gb.coord2,e=n.getCoord2(r))}return{coord:e,from:t}}var $a={none:0,dataCoordSys:1,boxCoordSys:2};function cB(r,e){var t=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=$a.none;if(t){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=$a.dataCoordSys,i||(a=$a.none)):n==="box"&&(a=$a.boxCoordSys,!i&&!oY(t)&&(a=$a.none))}return{coordSysType:t,kind:a}}function Bh(r){var e=r.targetModel,t=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys;r.allowNotFound;var i=cB(e),o=i.kind,s=i.coordSysType;if(a&&o!==$a.dataCoordSys&&(o=$a.dataCoordSys,s=t),o===$a.none||s!==t)return!1;var l=n(t,e);return l?(o===$a.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var fB=function(r,e){var t=e.getReferringComponents(r,Bt).models[0];return t&&t.coordinateSystem},Pg=O,dB=["left","right","top","bottom","width","height"],ul=[["width","left","right"],["height","top","bottom"]];function HT(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),d=f&&f.getBoundingRect(),h,v;if(r==="horizontal"){var y=c.width+(d?-d.x+c.x:0);h=i+y,h>n||l.newline?(i=0,h=y,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(d?-d.y+c.y:0);v=o+m,v>a||l.newline?(i+=s+t,o=0,v=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+t:o=v+t)})}var gl=HT;He(HT,"vertical");He(HT,"horizontal");function hB(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function uY(r,e){var t=lr(r,e,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(t.type===yd.point)i=t.refPoint,a=Dt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=se(o)?o:[o,o];a=Dt(n,t.refContainer),i=t.boxCoordFrom===gb.coord2?t.refPoint:[he(s[0],a.width)+a.x,he(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function pB(r,e){var t=uY(r,e),n=t.viewRect,a=t.center,i=r.get("radius");se(i)||(i=[0,i]);var o=he(n.width,e.getWidth()),s=he(n.height,e.getHeight()),l=Math.min(o,s),u=he(i[0],l/2),c=he(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:c,viewRect:n}}function Dt(r,e,t){t=Ec(t||0);var n=e.width,a=e.height,i=he(r.left,n),o=he(r.top,a),s=he(r.right,n),l=he(r.bottom,a),u=he(r.width,n),c=he(r.height,a),f=t[2]+t[0],d=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=n-s-d-i),isNaN(c)&&(c=a-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=n-s-u-d),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-d;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-t[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-d-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var v=new ze((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,c);return v.margin=t,v}function vB(r,e,t){var n=r.getShallow("preserveAspect",!0);if(!n)return e;var a=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(a))<1e-9)return e;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return a>t&&!l||a<t&&l?(s.width=e.height*t,i==="left"?s.left=0:i==="right"?s.right=0:s.left="center"):(s.height=e.width/t,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),Dt(s,e)}var yd={rect:1,point:2};function lr(r,e,t){var n,a,i,o=r.boxCoordinateSystem,s;if(o){var l=lY(r),u=l.coord,c=l.from;if(o.dataToLayout){i=yd.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else t&&t.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=yd.point,s=c,a=o.dataToPoint(u))}return i==null&&(i=yd.rect),i===yd.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),a=[n.x+n.width/2,n.y+n.height/2]),{type:i,refContainer:n,refPoint:a,boxCoordFrom:s}}function Lm(r,e,t,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ze(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=Dt(De({width:u.width,height:u.height},e),t,n),d=o?f.x-u.x:0,h=s?f.y-u.y:0;return l==="raw"?(i.x=d,i.y=h):(i.x+=d,i.y+=h),i===r&&r.markRedraw(),!0}function cY(r,e){return r[ul[e][0]]!=null||r[ul[e][1]]!=null&&r[ul[e][2]]!=null}function ah(r){var e=r.layoutMode||r.constructor.layoutMode;return Pe(e)?e:e?{type:e}:null}function oi(r,e,t){var n=t&&t.ignoreSize;!se(n)&&(n=[n,n]);var a=o(ul[0],0),i=o(ul[1],1);l(ul[0],r,a),l(ul[1],r,i);function o(u,c){var f={},d=0,h={},v=0,y=2;if(Pg(u,function(b){h[b]=r[b]}),Pg(u,function(b){Se(e,b)&&(f[b]=h[b]=e[b]),s(f,b)&&d++,s(h,b)&&v++}),n[c])return s(e,u[1])?h[u[2]]=null:s(e,u[2])&&(h[u[1]]=null),h;if(v===y||!d)return h;if(d>=y)return f;for(var m=0;m<u.length;m++){var x=u[m];if(!Se(f,x)&&Se(r,x)){f[x]=r[x];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){Pg(u,function(d){c[d]=f[d]})}}function zl(r){return gB({},r)}function gB(r,e){return e&&r&&Pg(dB,function(t){Se(e,t)&&(r[t]=e[t])}),r}var fY=et(),Je=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.uid=Rc("ec_cpt_model"),i}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=ah(this),i=a?zl(t):{},o=n.getTheme();Ye(t,o.get(this.mainType)),Ye(t,this.getDefaultOption()),a&&oi(t,i,a)},e.prototype.mergeOption=function(t,n){Ye(this.option,t,!0);var a=ah(this);a&&oi(this.option,t,a)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!U7(t))return t.defaultOption;var n=fY(this);if(!n.defaultOption){for(var a=[],i=t;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var s={},l=a.length-1;l>=0;l--)s=Ye(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return Mc(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){return hB(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(rt);f5(Je,rt);ym(Je);FU(Je);VU(Je,dY);function dY(r){var e=[];return O(Je.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=le(e,function(t){return Xa(t).main}),r!=="dataset"&&Ue(e,"dataset")<=0&&e.unshift("dataset"),e}var ee={color:{},darkColor:{},size:{}},$t=ee.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};ae($t,{primary:$t.neutral80,secondary:$t.neutral70,tertiary:$t.neutral60,quaternary:$t.neutral50,disabled:$t.neutral20,border:$t.neutral30,borderTint:$t.neutral20,borderShade:$t.neutral40,background:$t.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:$t.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:$t.neutral70,axisLineTint:$t.neutral40,axisTick:$t.neutral70,axisTickMinor:$t.neutral60,axisLabel:$t.neutral70,axisSplitLine:$t.neutral15,axisMinorSplitLine:$t.neutral05});for(var js in $t)if($t.hasOwnProperty(js)){var bI=$t[js];js==="theme"?ee.darkColor.theme=$t.theme.slice():js==="highlight"?ee.darkColor.highlight="rgba(255,231,130,0.4)":js.indexOf("accent")===0?ee.darkColor[js]=Bi(bI,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):ee.darkColor[js]=Bi(bI,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}ee.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var yB="";typeof navigator<"u"&&(yB=navigator.platform||"");var mu="rgba(0, 0, 0, 0.2)",mB=ee.color.theme[0],hY=Bi(mB,null,null,.9);const pY={darkMode:"auto",colorBy:"series",color:ee.color.theme,gradientColor:[hY,mB],aria:{decal:{decals:[{color:mu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:mu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:mu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:mu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:mu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:mu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:yB.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var xB=be(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Dn="original",Mr="arrayRows",Pn="objectRows",ka="keyedColumns",Uo="typedArray",SB="unknown",wa="column",Ol="row",Ar={Must:1,Might:2,Not:3},_B=et();function vY(r){_B(r).datasetMap=be()}function bB(r,e,t){var n={},a=UT(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=_B(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),O(r,function(y,m){var x=Pe(y)?y:r[m]={name:y};x.type==="ordinal"&&c==null&&(c=m,f=v(x)),n[x.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});O(r,function(y,m){var x=y.name,b=v(y);if(c==null){var T=d.valueWayDim;h(n[x],T,b),h(o,T,b),d.valueWayDim+=b}else if(c===m)h(n[x],0,b),h(i,0,b);else{var T=d.categoryWayDim;h(n[x],T,b),h(o,T,b),d.categoryWayDim+=b}});function h(y,m,x){for(var b=0;b<x;b++)y.push(m+b)}function v(y){var m=y.dimsDef;return m?m.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function $T(r,e,t){var n={},a=UT(r);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===Pn||i===ka)&&O(o,function(c,f){(Pe(c)?c.name:c)==="name"&&(s=f)});var l=(function(){for(var c={},f={},d=[],h=0,v=Math.min(5,t);h<v;h++){var y=TB(e.data,i,e.seriesLayoutBy,o,e.startIndex,h);d.push(y);var m=y===Ar.Not;if(m&&c.v==null&&h!==s&&(c.v=h),(c.n==null||c.n===c.v||!m&&d[c.n]===Ar.Not)&&(c.n=h),x(c)&&d[c.n]!==Ar.Not)return c;m||(y===Ar.Might&&f.v==null&&h!==s&&(f.v=h),(f.n==null||f.n===f.v)&&(f.n=h))}function x(b){return b.v!=null&&b.n!=null}return x(c)?c:x(f)?f:null})();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function UT(r){var e=r.get("data",!0);if(!e)return Mc(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Bt).models[0]}function gY(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Mc(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Bt).models}function wB(r,e){return TB(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function TB(r,e,t,n,a,i){var o,s=5;if(en(r))return Ar.Not;var l,u;if(n){var c=n[i];Pe(c)?(l=c.name,u=c.type):pe(c)&&(l=c)}if(u!=null)return u==="ordinal"?Ar.Must:Ar.Not;if(e===Mr){var f=r;if(t===Ol){for(var d=f[i],h=0;h<(d||[]).length&&h<s;h++)if((o=C(d[a+h]))!=null)return o}else for(var h=0;h<f.length&&h<s;h++){var v=f[a+h];if(v&&(o=C(v[i]))!=null)return o}}else if(e===Pn){var y=r;if(!l)return Ar.Not;for(var h=0;h<y.length&&h<s;h++){var m=y[h];if(m&&(o=C(m[l]))!=null)return o}}else if(e===ka){var x=r;if(!l)return Ar.Not;var d=x[l];if(!d||en(d))return Ar.Not;for(var h=0;h<d.length&&h<s;h++)if((o=C(d[h]))!=null)return o}else if(e===Dn)for(var b=r,h=0;h<b.length&&h<s;h++){var m=b[h],T=Cc(m);if(!se(T))return Ar.Not;if((o=C(T[i]))!=null)return o}function C(k){var L=pe(k);if(k!=null&&Number.isFinite(Number(k))&&k!=="")return L?Ar.Might:Ar.Not;if(L&&k!=="-")return Ar.Must}return Ar.Not}var yb=be();function yY(r,e){Rr(yb.get(r)==null&&e),yb.set(r,e)}function mY(r,e,t){var n=yb.get(e);if(!n)return t;var a=n(r);return a?t.concat(a):t}var wI=et(),xY=et(),YT=(function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var a=Tt(this.get("color",!0)),i=this.get("colorLayer",!0);return CB(this,wI,a,i,e,t,n)},r.prototype.clearColorPalette=function(){_Y(this,wI)},r})();function mb(r,e,t,n){var a=Tt(r.get(["aria","decal","decals"]));return CB(r,xY,a,null,e,t,n)}function SY(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function CB(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!n?t:SY(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function _Y(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var kv,Nf,TI,CI="\0_ec_inner",bY=1,XT=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new rt(i),this._locale=new rt(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){var i=LI(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,LI(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?TI(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&O(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=be(),u=n&&n.replaceMergeMainTypeMap;vY(this),O(t,function(f,d){f!=null&&(Je.hasClass(d)?d&&(s.push(d),l.set(d,!0)):a[d]=a[d]==null?Le(f):Ye(a[d],f,!0))}),u&&u.each(function(f,d){Je.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),Je.topologicalTravel(s,Je.getAllClassMainTypes(),c,this);function c(f){var d=mY(this,f,Tt(t[f])),h=i.get(f),v=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",y=o5(h,d,v);N7(y,f,Je),a[f]=null,i.set(f,null),o.set(f,0);var m=[],x=[],b=0,T;O(y,function(C,k){var L=C.existing,A=C.newOption;if(!A)L&&(L.mergeOption({},this),L.optionUpdated({},!1));else{var D=f==="series",P=Je.getClass(f,C.keyInfo.subType,!D);if(!P)return;if(f==="tooltip"){if(T)return;T=!0}if(L&&L.constructor===P)L.name=C.keyInfo.name,L.mergeOption(A,this),L.optionUpdated(A,!1);else{var R=ae({componentIndex:k},C.keyInfo);L=new P(A,this,this,R),ae(L,R),C.brandNew&&(L.__requireNewView=!0),L.init(A,this,this),L.optionUpdated(null,!0)}}L?(m.push(L.option),x.push(L),b++):(m.push(void 0),x.push(void 0))},this),a[f]=m,i.set(f,x),o.set(f,b),f==="series"&&kv(this)}this._seriesIndices||kv(this)},e.prototype.getOption=function(){var t=Le(this.option);return O(t,function(n,a){if(Je.hasClass(a)){for(var i=Tt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Jd(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[CI],t},e.prototype.setTheme=function(t){this._theme=new rt(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var a=t.index,i=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return a!=null?(l=[],O(Tt(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=MI("id",i,s):o!=null?l=MI("name",o,s):l=ht(s,function(u){return!!u}),kI(l,t)},e.prototype.findComponents=function(t){var n=t.query,a=t.mainType,i=s(n),o=i?this.queryComponents(i):ht(this._componentsMap.get(a),function(u){return!!u});return l(kI(o,t));function s(u){var c=a+"Index",f=a+"Id",d=a+"Name";return u&&(u[c]!=null||u[f]!=null||u[d]!=null)?{mainType:a,index:u[c],id:u[f],name:u[d]}:null}function l(u){return t.filter?ht(u,t.filter):u}},e.prototype.eachComponent=function(t,n,a){var i=this._componentsMap;if(Me(t)){var o=n,s=t;i.each(function(f,d){for(var h=0;f&&h<f.length;h++){var v=f[h];v&&s.call(o,d,v,v.componentIndex)}})}else for(var l=pe(t)?i.get(t):Pe(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(a,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=ir(t,null);return ht(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return ht(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return ht(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Nf(this),O(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];t.call(n,i,a)},this)},e.prototype.eachRawSeries=function(t,n){O(this._componentsMap.get("series"),function(a){a&&t.call(n,a,a.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,a){Nf(this),O(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===t&&n.call(a,o,i)},this)},e.prototype.eachRawSeriesByType=function(t,n,a){return O(this.getSeriesByType(t),n,a)},e.prototype.isSeriesFiltered=function(t){return Nf(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Nf(this);var a=[];O(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];t.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=be(a)},e.prototype.restoreData=function(t){kv(this);var n=this._componentsMap,a=[];n.each(function(i,o){Je.hasClass(o)&&a.push(o)}),Je.topologicalTravel(a,Je.getAllClassMainTypes(),function(i){O(n.get(i),function(o){o&&(i!=="series"||!wY(o,t))&&o.restoreData()})})},e.internalField=(function(){kv=function(t){var n=t._seriesIndices=[];O(t._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),t._seriesIndicesMap=be(n)},Nf=function(t){},TI=function(t,n){t.option={},t.option[CI]=bY,t._componentsMap=be({series:[]}),t._componentsCount=be();var a=n.aria;Pe(a)&&a.enabled==null&&(a.enabled=!0),TY(n,t._theme.option),Ye(n,pY,!1),t._mergeOption(n,null)}})(),e})(rt);function wY(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,a=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||a!=null&&r.name!==a}}function TY(r,e){var t=r.color&&!r.colorLayer;O(e,function(n,a){a==="colorLayer"&&t||a==="color"&&r.color||Je.hasClass(a)||(typeof n=="object"?r[a]=r[a]?Ye(r[a],n,!1):Le(n):r[a]==null&&(r[a]=n))})}function MI(r,e,t){if(se(e)){var n=be();return O(e,function(i){if(i!=null){var o=ir(i,null);o!=null&&n.set(i,!0)}}),ht(t,function(i){return i&&n.get(i[r])})}else{var a=ir(e,null);return ht(t,function(i){return i&&a!=null&&i[r]===a})}}function kI(r,e){return e.hasOwnProperty("subType")?ht(r,function(t){return t&&t.subType===e.subType}):r}function LI(r){var e=be();return r&&O(Tt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Wt(XT,YT);var CY=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],MB=(function(){function r(e){O(CY,function(t){this[t]=ge(e[t],e)},this)}return r})(),MY=/^(min|max)?(.+)$/,kY=(function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(O(Tt(e.series),function(o){o&&o.data&&en(o.data)&&Ud(o.data)}),O(Tt(e.dataset),function(o){o&&o.source&&en(o.source)&&Ud(o.source)})),e=Le(e);var a=this._optionBackup,i=LY(e,t,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Le(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var a=e.getComponent("timeline");a&&(t=Le(n[a.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!a.length&&!i)return s;for(var l=0,u=a.length;l<u;l++)AY(a[l].query,t,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!DY(o,this._currentMediaIndices)&&(s=le(o,function(c){return Le(c===-1?i.option:a[c].option)})),this._currentMediaIndices=o,s},r})();function LY(r,e,t){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((f||c)&&(r.options=r.media=null),i=r),c&&se(u)&&O(u,function(h){h&&h.option&&(h.query?n.push(h):a||(a=h))}),d(i),O(l,function(h){return d(h)}),O(n,function(h){return d(h.option)});function d(h){O(e,function(v){v(h,t)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function AY(r,e,t){var n={width:e,height:t,aspectratio:e/t},a=!0;return O(r,function(i,o){var s=o.match(MY);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();IY(n[u],i,l)||(a=!1)}}),a}function IY(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function DY(r,e){return r.join(",")===e.join(",")}var da=O,ih=Pe,AI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function E1(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=AI.length;t<n;t++){var a=AI[t],i=e.normal,o=e.emphasis;i&&i[a]&&(r[a]=r[a]||{},r[a].normal?Ye(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(r[a]=r[a]||{},r[a].emphasis?Ye(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function Wr(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,a=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,De(r[e],n)):r[e]=n),a&&(r.emphasis=r.emphasis||{},r.emphasis[e]=a,a.focus&&(r.emphasis.focus=a.focus),a.blurScope&&(r.emphasis.blurScope=a.blurScope))}}function md(r){Wr(r,"itemStyle"),Wr(r,"lineStyle"),Wr(r,"areaStyle"),Wr(r,"label"),Wr(r,"labelLine"),Wr(r,"upperLabel"),Wr(r,"edgeLabel")}function Jt(r,e){var t=ih(r)&&r[e],n=ih(t)&&t.textStyle;if(n)for(var a=0,i=PA.length;a<i;a++){var o=PA[a];n.hasOwnProperty(o)&&(t[o]=n[o])}}function Hn(r){r&&(md(r),Jt(r,"label"),r.emphasis&&Jt(r.emphasis,"label"))}function PY(r){if(ih(r)){E1(r),md(r),Jt(r,"label"),Jt(r,"upperLabel"),Jt(r,"edgeLabel"),r.emphasis&&(Jt(r.emphasis,"label"),Jt(r.emphasis,"upperLabel"),Jt(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(E1(e),Hn(e));var t=r.markLine;t&&(E1(t),Hn(t));var n=r.markArea;n&&Hn(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!en(i))for(var o=0;o<i.length;o++)Hn(i[o]);O(r.categories,function(u){md(u)})}if(a&&!en(a))for(var o=0;o<a.length;o++)Hn(a[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Hn(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)se(l[o])?(Hn(l[o][0]),Hn(l[o][1])):Hn(l[o]);r.type==="gauge"?(Jt(r,"axisLabel"),Jt(r,"title"),Jt(r,"detail")):r.type==="treemap"?(Wr(r.breadcrumb,"itemStyle"),O(r.levels,function(u){md(u)})):r.type==="tree"&&md(r.leaves)}}function bi(r){return se(r)?r:r?[r]:[]}function II(r){return(se(r)?r[0]:r)||{}}function RY(r,e){da(bi(r.series),function(n){ih(n)&&PY(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),da(t,function(n){da(bi(r[n]),function(a){a&&(Jt(a,"axisLabel"),Jt(a.axisPointer,"label"))})}),da(bi(r.parallel),function(n){var a=n&&n.parallelAxisDefault;Jt(a,"axisLabel"),Jt(a&&a.axisPointer,"label")}),da(bi(r.calendar),function(n){Wr(n,"itemStyle"),Jt(n,"dayLabel"),Jt(n,"monthLabel"),Jt(n,"yearLabel")}),da(bi(r.radar),function(n){Jt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),da(bi(r.geo),function(n){ih(n)&&(Hn(n),da(bi(n.regions),function(a){Hn(a)}))}),da(bi(r.timeline),function(n){Hn(n),Wr(n,"label"),Wr(n,"itemStyle"),Wr(n,"controlStyle",!0);var a=n.data;se(a)&&O(a,function(i){Pe(i)&&(Wr(i,"label"),Wr(i,"itemStyle"))})}),da(bi(r.toolbox),function(n){Wr(n,"iconStyle"),da(n.feature,function(a){Wr(a,"iconStyle")})}),Jt(II(r.axisPointer),"label"),Jt(II(r.tooltip).axisPointer,"label")}function EY(r,e){for(var t=e.split(","),n=r,a=0;a<t.length&&(n=n&&n[t[a]],n!=null);a++);return n}function zY(r,e,t,n){for(var a=e.split(","),i=r,o,s=0;s<a.length-1;s++)o=a[s],i[o]==null&&(i[o]={}),i=i[o];i[a[s]]==null&&(i[a[s]]=t)}function DI(r){r&&O(OY,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var OY=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],NY=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],z1=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Bf(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<z1.length;t++){var n=z1[t][1],a=z1[t][0];e[n]!=null&&(e[a]=e[n])}}function PI(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function RI(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function BY(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function kB(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&kB(r[t].children,e)}function LB(r,e){RY(r,e),r.series=Tt(r.series),O(r.series,function(t){if(Pe(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),PI(t.label);var a=t.data;if(a&&!en(a))for(var i=0;i<a.length;i++)PI(a[i]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=EY(t,"pointer.color");o!=null&&zY(t,"itemStyle.color",o)}else if(n==="bar"){Bf(t),Bf(t.backgroundStyle),Bf(t.emphasis);var a=t.data;if(a&&!en(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(Bf(a[i]),Bf(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),RI(t),kB(t.data,RI)}else n==="graph"||n==="sankey"?BY(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&De(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),DI(t)}}),r.dataRange&&(r.visualMap=r.dataRange),O(NY,function(t){var n=r[t];n&&(se(n)||(n=[n]),O(n,function(a){DI(a)}))})}function jY(r){var e=be();r.eachSeries(function(t){var n=t.get("stack");if(n){var a=e.get(n)||e.set(n,[]),i=t.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:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.push(o)}}),e.each(function(t){if(t.length!==0){var n=t[0].seriesModel,a=n.get("stackOrder")||"seriesAsc";a==="seriesDesc"&&t.reverse(),O(t,function(i,o){i.data.setCalculationInfo("stackedOnSeries",o>0?t[o-1].seriesModel:null)}),FY(t)}})}function FY(r){O(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var d=o.get(e.stackedDimension,f);if(isNaN(d))return a;var h,v;s?v=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var y=NaN,m=t-1;m>=0;m--){var x=r[m];if(s||(v=x.data.rawIndexOf(x.stackedByDimension,h)),v>=0){var b=x.data.getByRawIndex(x.stackResultDimension,v);if(l==="all"||l==="positive"&&b>0||l==="negative"&&b<0||l==="samesign"&&d>=0&&b>0||l==="samesign"&&d<=0&&b<0){d=T7(d,b),y=b;break}}}return n[0]=d,n[1]=y,n})})}var Am=(function(){function r(e){this.data=e.data||(e.sourceFormat===ka?{}:[]),this.sourceFormat=e.sourceFormat||SB,this.seriesLayoutBy=e.seriesLayoutBy||wa,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 a=t[n];a.type==null&&wB(this,n)===Ar.Must&&(a.type="ordinal")}}return r})();function ZT(r){return r instanceof Am}function xb(r,e,t){t=t||AB(r);var n=e.seriesLayoutBy,a=GY(r,t,n,e.sourceHeader,e.dimensions),i=new Am({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:Le(e)});return i}function KT(r){return new Am({data:r,sourceFormat:en(r)?Uo:Dn})}function VY(r){return new Am({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Le(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function AB(r){var e=SB;if(en(r))e=Uo;else if(se(r)){r.length===0&&(e=Mr);for(var t=0,n=r.length;t<n;t++){var a=r[t];if(a!=null){if(se(a)||en(a)){e=Mr;break}else if(Pe(a)){e=Pn;break}}}}else if(Pe(r)){for(var i in r)if(Se(r,i)&&Pr(r[i])){e=ka;break}}return e}function GY(r,e,t,n,a){var i,o;if(!r)return{dimensionsDefine:EI(a),startIndex:o,dimensionsDetectedCount:i};if(e===Mr){var s=r;n==="auto"||n==null?zI(function(u){u!=null&&u!=="-"&&(pe(u)?o==null&&(o=1):o=0)},t,s,10):o=lt(n)?n:n?1:0,!a&&o===1&&(a=[],zI(function(u,c){a[c]=u!=null?u+"":""},t,s,1/0)),i=a?a.length:t===Ol?s.length:s[0]?s[0].length:null}else if(e===Pn)a||(a=WY(r));else if(e===ka)a||(a=[],O(r,function(u,c){a.push(c)}));else if(e===Dn){var l=Cc(r[0]);i=se(l)&&l.length||1}return{startIndex:o,dimensionsDefine:EI(a),dimensionsDetectedCount:i}}function WY(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return ot(t)}function EI(r){if(r){var e=be();return le(r,function(t,n){t=Pe(t)?t:{name:t};var a={name:t.name,displayName:t.displayName,type:t.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=e.get(a.name);return i?a.name+="-"+i.count++:e.set(a.name,{count:1}),a})}}function zI(r,e,t,n){if(e===Ol)for(var a=0;a<t.length&&a<n;a++)r(t[a]?t[a][0]:null,a);else for(var i=t[0]||[],a=0;a<i.length&&a<n;a++)r(i[a],a)}function IB(r){var e=r.sourceFormat;return e===Pn||e===ka}var Fs,Vs,Gs,Ws,OI,NI,DB=(function(){function r(e,t){var n=ZT(e)?e:KT(e);this._source=n;var a=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===Uo&&(this._offset=0,this._dimSize=t,this._data=a),NI(this,a,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=(function(){var e=r.prototype;e.pure=!1,e.persistent=!0})(),r.internalField=(function(){var e;NI=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,d=l.dimensionsDefine,h=OI[qT(u,c)];if(ae(o,h),u===Uo)o.getItem=t,o.count=a,o.fillStorage=n;else{var v=PB(u,c);o.getItem=ge(v,null,s,f,d);var y=RB(u,c);o.count=ge(y,null,s,f,d)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,d=0;d<f;d++){for(var h=u[d],v=h[0]==null?1/0:h[0],y=h[1]==null?-1/0:h[1],m=s-o,x=l[d],b=0;b<m;b++){var T=c[b*f+d];x[o+b]=T,T<v&&(v=T),T>y&&(y=T)}h[0]=v,h[1]=y}},a=function(){return this._data?this._data.length/this._dimSize:0};OI=(e={},e[Mr+"_"+wa]={pure:!0,appendData:i},e[Mr+"_"+Ol]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Pn]={pure:!0,appendData:i},e[ka]={pure:!0,appendData:function(o){var s=this._data;O(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Dn]={appendData:i},e[Uo]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),Lv=function(r){se(r)||n5("series.data or dataset.source must be an array.")};Fs={},Fs[Mr+"_"+wa]=Lv,Fs[Mr+"_"+Ol]=Lv,Fs[Pn]=Lv,Fs[ka]=function(r,e){for(var t=0;t<e.length;t++){var n=e[t].name;n==null&&n5("dimension name must not be null/undefined.")}},Fs[Dn]=Lv;var BI=function(r,e,t,n){return r[n]},HY=(Vs={},Vs[Mr+"_"+wa]=function(r,e,t,n){return r[n+e]},Vs[Mr+"_"+Ol]=function(r,e,t,n,a){n+=e;for(var i=a||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[n]:null}return i},Vs[Pn]=BI,Vs[ka]=function(r,e,t,n,a){for(var i=a||[],o=0;o<t.length;o++){var s=t[o].name,l=s!=null?r[s]:null;i[o]=l?l[n]:null}return i},Vs[Dn]=BI,Vs);function PB(r,e){var t=HY[qT(r,e)];return t}var jI=function(r,e,t){return r.length},$Y=(Gs={},Gs[Mr+"_"+wa]=function(r,e,t){return Math.max(0,r.length-e)},Gs[Mr+"_"+Ol]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},Gs[Pn]=jI,Gs[ka]=function(r,e,t){var n=t[0].name,a=n!=null?r[n]:null;return a?a.length:0},Gs[Dn]=jI,Gs);function RB(r,e){var t=$Y[qT(r,e)];return t}var O1=function(r,e,t){return r[e]},UY=(Ws={},Ws[Mr]=O1,Ws[Pn]=function(r,e,t){return r[t]},Ws[ka]=O1,Ws[Dn]=function(r,e,t){var n=Cc(r);return n instanceof Array?n[e]:n},Ws[Uo]=O1,Ws);function EB(r){var e=UY[r];return e}function qT(r,e){return r===Mr?r+"_"+e:r}function dc(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var a=r.getStore(),i=a.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=a.getDimensionProperty(o);return EB(i)(n,o,s)}else{var l=n;return i===Dn&&(l=Cc(n)),l}}}}var YY=/\{@(.+?)\}/g,Im=(function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),a=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,d=f==="series",h=n.userOutput&&n.userOutput.get();return{componentType:f,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:s,dataType:t,value:a,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,a,i,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),a!=null&&se(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(e);i=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(Me(i))return l.status=t,l.dimensionIndex=a,i(l);if(pe(i)){var c=WT(i,l);return c.replace(YY,function(f,d){var h=d.length,v=d;v.charAt(0)==="["&&v.charAt(h-1)==="]"&&(v=+v.slice(1,h-1));var y=dc(s,e,v);if(o&&se(o.interpolatedValue)){var m=s.getDimensionIndex(v);m>=0&&(y=o.interpolatedValue[m])}return y!=null?y+"":""})}},r.prototype.getRawValue=function(e,t){return dc(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r})();function FI(r){var e,t;return Pe(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function jd(r){return new XY(r)}var XY=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(b){return!(b>=1)&&(b=1),b}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,v=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!n&&(f||h<v)){var y=this._progress;if(se(y))for(var m=0;m<y.length;m++)this._doProgress(y[m],h,v,l,u);else this._doProgress(y,h,v,l,u)}this._dueIndex=v;var x=this._settedOutputEnd!=null?this._settedOutputEnd:v;this._outputDueEnd=x}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,a,i){VI.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:VI.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),se(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r})(),VI=(function(){var r,e,t,n,a,i={reset:function(l,u,c,f){e=l,r=u,t=c,n=f,a=Math.ceil(n/t),i.next=t>1&&n>0?s:o}};return i;function o(){return e<r?e++:null}function s(){var l=e%a*t+Math.ceil(e/a),u=e>=r?null:l<n?l:e;return e++,u}})();function Yo(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!lt(r)&&r!=null&&r!=="-"&&(r=+ci(r)),r==null||r===""?NaN:Number(r))}var ZY=be({number:function(r){return parseFloat(r)},time:function(r){return+ci(r)},trim:function(r){return pe(r)?Mn(r):r}});function zB(r){return ZY.get(r)}var OB={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},KY=(function(){function r(e,t){if(!lt(t)){var n="";gt(n)}this._opFn=OB[e],this._rvalFloat=ai(t)}return r.prototype.evaluate=function(e){return lt(e)?this._opFn(e,this._rvalFloat):this._opFn(ai(e),this._rvalFloat)},r})(),NB=(function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=lt(e)?e:ai(e),a=lt(t)?t:ai(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=pe(e),l=pe(t);s&&(n=l?e:0),l&&(a=s?t:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r})(),qY=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ai(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=ai(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();function QY(r,e){return r==="eq"||r==="ne"?new qY(r==="eq",e):Se(OB,r)?new KY(r,e):null}var JY=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Yo(e,t)},r})();function eX(r,e){var t=new JY,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==wa&>(o);var s=[],l={},u=r.dimensionsDefine;if(u)O(u,function(y,m){var x=y.name,b={index:m,name:x,displayName:y.displayName};if(s.push(b),x!=null){var T="";Se(l,x)&>(T),l[x]=b}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=PB(a,wa);e.__isBuiltIn&&(t.getRawDataItem=function(y){return f(n,i,s,y)},t.getRawData=ge(tX,null,r)),t.cloneRawData=ge(rX,null,r);var d=RB(a,wa);t.count=ge(d,null,n,i,s);var h=EB(a);t.retrieveValue=function(y,m){var x=f(n,i,s,y);return v(x,m)};var v=t.retrieveValueFromItem=function(y,m){if(y!=null){var x=s[m];if(x)return h(y,m,x.name)}};return t.getDimensionInfo=ge(nX,null,s,l),t.cloneAllDimensionInfo=ge(aX,null,s),t}function tX(r){var e=r.sourceFormat;if(!QT(e)){var t="";gt(t)}return r.data}function rX(r){var e=r.sourceFormat,t=r.data;if(!QT(e)){var n="";gt(n)}if(e===Mr){for(var a=[],i=0,o=t.length;i<o;i++)a.push(t[i].slice());return a}else if(e===Pn){for(var a=[],i=0,o=t.length;i<o;i++)a.push(ae({},t[i]));return a}}function nX(r,e,t){if(t!=null){if(lt(t)||!isNaN(t)&&!Se(e,t))return r[t];if(Se(e,t))return e[t]}}function aX(r){return Le(r)}var BB=be();function iX(r){r=Le(r);var e=r.type,t="";e||gt(t);var n=e.split(":");n.length!==2&>(t);var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),r.__isBuiltIn=a,BB.set(e,r)}function oX(r,e,t){var n=Tt(r),a=n.length,i="";a||gt(i);for(var o=0,s=a;o<s;o++){var l=n[o];e=sX(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function sX(r,e,t,n){var a="";e.length||gt(a),Pe(r)||gt(a);var i=r.type,o=BB.get(i);o||gt(a);var s=le(e,function(u){return eX(u,o)}),l=Tt(o.transform({upstream:s[0],upstreamList:s,config:Le(r.config)}));return le(l,function(u,c){var f="";Pe(u)||gt(f),u.data||gt(f);var d=AB(u.data);QT(d)||gt(f);var h,v=e[0];if(v&&c===0&&!u.dimensions){var y=v.startIndex;y&&(u.data=v.data.slice(0,y).concat(u.data)),h={seriesLayoutBy:wa,sourceHeader:y,dimensions:v.metaRawOption.dimensions}}else h={seriesLayoutBy:wa,sourceHeader:0,dimensions:u.dimensions};return xb(u.data,h,null)})}function QT(r){return r===Mr||r===Pn}var Dm="undefined",lX=typeof Uint32Array===Dm?Array:Uint32Array,uX=typeof Uint16Array===Dm?Array:Uint16Array,jB=typeof Int32Array===Dm?Array:Int32Array,GI=typeof Float64Array===Dm?Array:Float64Array,FB={float:GI,int:jB,ordinal:Array,number:Array,time:GI},N1;function xu(r){return r>65535?lX:uX}function Su(){return[1/0,-1/0]}function cX(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function WI(r,e,t,n,a){var i=FB[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new i(n)}var Sb=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=be()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=N1[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],IB(a),this._dimensions=le(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(e);if(i!=null){if(a[i].type===t)return i}else i=a.length;return a[i]={type:t},n.set(e,i),this._chunks[i]=new FB[t||"float"](this._rawCount),this._rawExtent[i]=Su(),i},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],a=this._dimensions[e],i=this._rawExtent,o=a.ordinalOffset||0,s=n.length;o===0&&(i[e]=Su());for(var l=i[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}a.ordinalMeta=t,a.ordinalOffset=s,a.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var a=t.count();return t.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<i;u++){var c=a[u];WI(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var h=d-s,v=0;v<i;v++){var c=a[v],y=N1.arrayRows.call(this,e[h]||f,c.property,h,v);n[v][d]=y;var m=o[v];y<m[0]&&(m[0]=y),y>m[1]&&(m[1]=y)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=le(o,function(b){return b.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=Su()),WI(i,c,f.type,t,n)}if(a.fillStorage)a.fillStorage(e,t,i,l);else for(var d=[],h=e;h<t;h++){d=a.getItem(h,d);for(var v=0;v<s;v++){var y=i[v],m=this._dimValueGetter(d,u[v],h,v);y[h]=m;var x=l[v];m<x[0]&&(x[0]=m),m>x[1]&&(x[1]=m)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],a=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=e;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var a=0,i=this.count();a<i;a++){var o=this.get(e,a);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(i){isNaN(i)||t.push(i)});var n=t.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2===1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},r.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(n!=null&&n<this._count&&n===e)return e;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(t[o]<e)a=o+1;else if(t[o]>e)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i<a;i++)e[i]=t[i]}else e=new n(t.buffer,0,a)}else{var n=xu(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=xu(n._rawCount),o=new i(a),s=[],l=e.length,u=0,c=e[0],f=n._chunks,d=0;d<a;d++){var h=void 0,v=n.getRawIndex(d);if(l===0)h=t(d);else if(l===1){var y=f[c][v];h=t(y,d)}else{for(var m=0;m<l;m++)s[m]=f[e[m]][v];s[m]=d,h=t.apply(null,s)}h&&(o[u++]=v)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var a=ot(e),i=a.length;if(!i)return this;var o=t.count(),s=xu(t._rawCount),l=new s(o),u=0,c=a[0],f=e[c][0],d=e[c][1],h=t._chunks,v=!1;if(!t._indices){var y=0;if(i===1){for(var m=h[a[0]],x=0;x<n;x++){var b=m[x];(b>=f&&b<=d||isNaN(b))&&(l[u++]=y),y++}v=!0}else if(i===2){for(var m=h[a[0]],T=h[a[1]],C=e[a[1]][0],k=e[a[1]][1],x=0;x<n;x++){var b=m[x],L=T[x];(b>=f&&b<=d||isNaN(b))&&(L>=C&&L<=k||isNaN(L))&&(l[u++]=y),y++}v=!0}}if(!v)if(i===1)for(var x=0;x<o;x++){var A=t.getRawIndex(x),b=h[a[0]][A];(b>=f&&b<=d||isNaN(b))&&(l[u++]=A)}else for(var x=0;x<o;x++){for(var D=!0,A=t.getRawIndex(x),P=0;P<i;P++){var R=a[P],b=h[R][A];(b<e[R][0]||b>e[R][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(x))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var a=e._chunks,i=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=Su();for(var f=0;f<s;f++){for(var d=e.getRawIndex(f),h=0;h<o;h++)l[h]=a[t[h]][d];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(i[0]=v,v=i);for(var c=0;c<v.length;c++){var y=t[c],m=v[c],x=u[y],b=a[y];b&&(b[d]=m),m<x[0]&&(x[0]=m),m>x[1]&&(x[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,d,h=new(xu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var v=1;v<o-1;v+=l){for(var y=Math.min(v+l,o-1),m=Math.min(v+l*2,o),x=(m+y)/2,b=0,T=y;T<m;T++){var C=this.getRawIndex(T),k=i[C];isNaN(k)||(b+=k)}b/=m-y;var L=v,A=Math.min(v+l,o),D=v-1,P=i[u];c=-1,d=L;for(var R=-1,z=0,T=L;T<A;T++){var C=this.getRawIndex(T),k=i[C];if(isNaN(k)){z++,R<0&&(R=C);continue}f=Math.abs((D-x)*(k-P)-(D-T)*(b-P)),f>c&&(c=f,d=C)}z>0&&z<A-L&&(h[s++]=Math.min(R,d),d=Math.max(R,d)),h[s++]=d,u=d}return h[s++]=this.getRawIndex(o-1),n._count=s,n._indices=h,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),a=n._chunks,i=Math.floor(1/t),o=a[e],s=this.count(),l=new(xu(this._rawCount))(Math.ceil(s/i)*2),u=0,c=0;c<s;c+=i){var f=c,d=o[this.getRawIndex(f)],h=c,v=o[this.getRawIndex(h)],y=i;c+i>s&&(y=s-c);for(var m=0;m<y;m++){var x=this.getRawIndex(c+m),b=o[x];b<d&&(d=b,f=c+m),b>v&&(v=b,h=c+m)}var T=this.getRawIndex(f),C=this.getRawIndex(h);f<h?(l[u++]=T,l[u++]=C):(l[u++]=C,l[u++]=T)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,a){for(var i=this.clone([e],!0),o=i._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),f=i._rawExtent[e]=Su(),d=new(xu(this._rawCount))(Math.ceil(c/l)),h=0,v=0;v<c;v+=l){l>c-v&&(l=c-v,s.length=l);for(var y=0;y<l;y++){var m=this.getRawIndex(v+y);s[y]=u[m]}var x=n(s),b=this.getRawIndex(Math.min(v+a(s,x)||0,c-1));u[b]=x,x<f[0]&&(f[0]=x),x>f[1]&&(f[1]=x),d[h++]=b}return i._count=h,i._indices=d,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(a[e[0]][s],i);break;case 2:t(a[e[0]][s],a[e[1]][s],i);break;default:for(var l=0,u=[];l<n;l++)u[l]=a[e[l]][s];u[l]=i,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=Su();if(!t)return n;var a=this.count(),i=!this._indices,o;if(i)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<a;u++){var c=this.getRawIndex(u),f=t[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][t]);return n},r.prototype.clone=function(e,t){var n=new r,a=this._chunks,i=e&&Qn(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?cX(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Le(this._extent),e._rawExtent=Le(this._rawExtent)},r.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 a=0;a<n;a++)t[a]=this._indices[a]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,n,a,i){return Yo(t[i],this._dimensions[i])}N1={arrayRows:e,objectRows:function(t,n,a,i){return Yo(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return Yo(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}})(),r})(),VB=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(Av(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=en(s)?Uo:Dn,i=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=Te(f.seriesLayoutBy,d.seriesLayoutBy)||null,v=Te(f.sourceHeader,d.sourceHeader),y=Te(f.dimensions,d.dimensions),m=h!==d.seriesLayoutBy||!!v!=!!d.sourceHeader||y;a=m?[xb(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:y},l)]:[]}else{var x=e;if(n){var b=this._applyTransform(t);a=b.sourceList,i=b.upstreamSignList}else{var T=x.get("source",!0);a=[xb(T,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&$I(i)}var o,s=[],l=[];return O(e,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&$I(f),s.push(c),l.push(u._getVersionSign())}),n?o=oX(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[VY(s[0])]),{sourceList:o,upstreamSignList:l}},r.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}},r.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},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Av(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new Sb,s.initData(new DB(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Av(e)){var t=UT(e);return t?[t.getSourceManager()]:[]}else return le(gY(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,a;if(Av(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),a=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:a}},r})();function HI(r){var e=r.option.transform;e&&Ud(r.option.transform)}function Av(r){return r.mainType==="series"}function $I(r){throw new Error(r)}var fX="line-height:1";function GB(r){var e=r.lineHeight;return e==null?fX:"line-height:"+Hr(e+"")+"px"}function WB(r,e){var t=r.color||ee.color.tertiary,n=r.fontSize||12,a=r.fontWeight||"400",i=r.color||ee.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Hr(n+"")+"px;color:"+Hr(t)+";font-weight:"+Hr(a+""),valueStyle:"font-size:"+Hr(o+"")+"px;color:"+Hr(i)+";font-weight:"+Hr(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var dX=[0,10,20,30],hX=["",`
|
|
48
|
-
`,`
|
|
49
|
-
|
|
50
|
-
`,`
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`];function rr(r,e){return e.type=r,e}function _b(r){return r.type==="section"}function HB(r){return _b(r)?pX:vX}function $B(r){if(_b(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return O(r.blocks,function(a){var i=$B(a);i>=e&&(e=i+ +(n&&(!i||_b(a)&&!a.noHeader)))}),e}return 0}function pX(r,e,t,n){var a=e.noHeader,i=gX($B(e)),o=[],s=e.blocks||[];Rr(!s||se(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Se(u,l)){var c=new NB(u[l],null);s.sort(function(y,m){return c.evaluate(y.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}O(s,function(y,m){var x=e.valueFormatter,b=HB(y)(x?ae(ae({},r),{valueFormatter:x}):r,y,m>0?i.html:0,n);b!=null&&o.push(b)});var f=r.renderMode==="richText"?o.join(i.richText):bb(n,o.join(""),a?t:i.html);if(a)return f;var d=vb(e.header,"ordinal",r.useUTC),h=WB(n,r.renderMode).nameStyle,v=GB(n);return r.renderMode==="richText"?UB(r,d,h)+i.richText+f:bb(n,'<div style="'+h+";"+v+';">'+Hr(d)+"</div>"+f,t)}function vX(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(C){return C=se(C)?C:[C],le(C,function(k,L){return vb(k,se(h)?h[L]:h,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||ee.color.secondary,a),d=i?"":vb(l,"ordinal",u),h=e.valueType,v=o?[]:c(e.value,e.dataIndex),y=!s||!i,m=!s&&i,x=WB(n,a),b=x.nameStyle,T=x.valueStyle;return a==="richText"?(s?"":f)+(i?"":UB(r,d,b))+(o?"":xX(r,v,y,m,T)):bb(n,(s?"":f)+(i?"":yX(d,!s,b))+(o?"":mX(v,y,m,T)),t)}}function UI(r,e,t,n,a,i){if(r){var o=HB(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function gX(r){return{html:dX[r],richText:hX[r]}}function bb(r,e,t){var n='<div style="clear:both"></div>',a="margin: "+t+"px 0 0",i=GB(r);return'<div style="'+a+";"+i+';">'+e+n+"</div>"}function yX(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+Hr(r)+"</span>"}function mX(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=se(r)?r:[r],'<span style="'+i+";"+n+'">'+le(r,function(o){return Hr(o)}).join(" ")+"</span>"}function UB(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function xX(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(se(e)?e.join(" "):e,i)}function YB(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return kl(n)}function XB(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var B1=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=t5()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=lB({color:t,type:e,renderMode:n,markerId:a});return pe(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};se(t)?O(t,function(i){return ae(n,i)}):ae(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r})();function ZB(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=se(s),u=YB(e,t),c,f,d,h;if(o>1||l&&!o){var v=SX(s,e,t,i,u);c=v.inlineValues,f=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var y=a.getDimensionInfo(i[0]);h=c=dc(a,t,i[0]),f=y.type}else h=c=l?s[0]:s;var m=cT(e),x=m&&e.name||"",b=a.getName(t),T=n?x:b;return rr("section",{header:x,noHeader:n||!m,sortParam:h,blocks:[rr("nameValue",{markerType:"item",markerColor:u,name:T,noName:!Mn(T),value:c,valueType:f,dataIndex:t})].concat(d||[])})}function SX(r,e,t,n,a){var i=e.getData(),o=Qn(r,function(f,d,h){var v=i.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?O(n,function(f){c(dc(i,t,f),f)}):O(r,c);function c(f,d){var h=i.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(rr("nameValue",{markerType:"subItem",markerColor:a,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var wo=et();function Iv(r,e){return r.getName(e)||r.getId(e)}var Rg="__universalTransitionEnabled",St=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=jd({count:bX,reset:wX}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=wo(this).sourceManager=new VB(this);i.prepareSource();var o=this.getInitialData(t,a);XI(o,this),this.dataTask.context.data=o,wo(this).dataBeforeProcessed=o,YI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=ah(this),i=a?zl(t):{},o=this.subType;Je.hasClass(o)&&(o+="Series"),Ye(t,n.getTheme().get(this.subType)),Ye(t,this.getDefaultOption()),_l(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&oi(t,i,a)},e.prototype.mergeOption=function(t,n){t=Ye(this.option,t,!0),this.fillDataTextStyle(t.data);var a=ah(this);a&&oi(this.option,t,a);var i=wo(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);XI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,wo(this).dataBeforeProcessed=o,YI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!en(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&_l(t[a],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=wb(this);if(n){var a=n.context.data;return t==null||!a.getLinkedData?a:a.getLinkedData(t)}else return wo(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=wb(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}wo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return be(t)},e.prototype.getSourceManager=function(){return wo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return wo(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,n,a,i){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(t);if(!s||!l)return[];var u=l.dataToCoord(a);i==null&&(i=1/0);var c=[],f=1/0,d=-1,h=0;return o.each(n,function(v,y){var m=l.dataToCoord(v),x=u-m,b=Math.abs(x);b<=i&&((b<f||b===f&&x>=0&&d<0)&&(f=b,d=x,h=0),x===d&&(c[h++]=y))}),c.length=h,c},e.prototype.formatTooltip=function(t,n,a){return ZB({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(it.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=YT.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Iv(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var a=[],i=0;i<t.length;i++)a[0]=t[i],this.isSelected(t[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=ot(t),a=[],i=0;i<n.length;i++){var o=t[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Iv(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Rg])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Pe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=Iv(t,f);u[d]=!0,this._selectedDataIndicesMap[d]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],d=Iv(t,h);o.selectedMap=(a={},a[d]=!0,a),this._selectedDataIndicesMap=(i={},i[d]=t.getRawIndex(h),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(a){var i=t.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return Je.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Je);Wt(St,Im);Wt(St,YT);f5(St,Je);function YI(r){var e=r.name;cT(r)||(r.name=_X(r)||e)}function _X(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return O(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function bX(r){return r.model.getRawData().count()}function wX(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),TX}function TX(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function XI(r,e){O(ic(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,He(CX,e))})}function CX(r,e){var t=wb(r);return t&&t.setOutputEnd((e||this).count()),e}function wb(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Ct=(function(){function r(){this.group=new Ae,this.uid=Rc("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();dT(Ct);ym(Ct);function Oc(){var r=et();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var KB=et(),MX=Oc(),mt=(function(){function r(){this.group=new Ae,this.uid=Rc("viewChart"),this.renderTask=jd({plan:kX,reset:LX}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&KI(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&KI(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){is(this.group,e)},r.markUpdateMethod=function(e,t){KB(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function ZI(r,e,t){r&&th(r)&&(e==="emphasis"?Ui:Yi)(r,t)}function KI(r,e,t){var n=bl(r,e),a=e&&e.highlightKey!=null?eU(e.highlightKey):null;n!=null?O(Tt(n),function(i){ZI(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){ZI(i,t,a)})}dT(mt);ym(mt);function kX(r){return MX(r.model)}function LX(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&KB(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),AX[l]}var AX={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},fy="\0__throttleOriginMethod",qI="\0__throttleRate",QI="\0__throttleType";function Pm(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var d=function(){for(var h=[],v=0;v<arguments.length;v++)h[v]=arguments[v];n=new Date().getTime(),l=this,u=h;var y=c||e,m=c||t;c=null,s=n-(m?a:i)-y,clearTimeout(o),m?o=setTimeout(f,y):s>=0?f():o=setTimeout(f,-s),a=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}function Nc(r,e,t,n){var a=r[e];if(a){var i=a[fy]||a,o=a[QI],s=a[qI];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=Pm(i,t,n==="debounce"),a[fy]=i,a[QI]=n,a[qI]=t}return a}}function oh(r,e){var t=r[e];t&&t[fy]&&(t.clear&&t.clear(),r[e]=t[fy])}var JI=et(),eD={itemStyle:wl(J5,!0),lineStyle:wl(Q5,!0)},IX={lineStyle:"stroke",itemStyle:"fill"};function qB(r,e){var t=r.visualStyleMapper||eD[e];return t||(console.warn("Unknown style type '"+e+"'."),eD.itemStyle)}function QB(r,e){var t=r.visualDrawType||IX[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var DX={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=qB(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=QB(r,n),u=o[l],c=Me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=d,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Me(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Me(o.stroke)?d:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var y=r.getDataParams(v),m=ae({},o);m[l]=c(y),h.setItemVisual(v,"style",m)}}}},jf=new rt,PX={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=qB(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){jf.option=l[n];var u=a(jf),c=o.ensureUniqueItemVisual(s,"style");ae(c,u),jf.option.decal&&(o.setItemVisual(s,"decal",jf.option.decal),jf.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},RX={performRawSeries:!0,overallReset:function(r){var e=be();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),JI(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=JI(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=QB(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var d=i.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",v=n.count();d[l]=t.getColorFromPalette(h,o,v)}})}})}},Dv=Math.PI;function EX(r,e){e=e||{},De(e,{text:"loading",textColor:ee.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:ee.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Ae,n=new Qe({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new st({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Qe({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Eh({shape:{startAngle:-Dv/2,endAngle:-Dv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Dv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Dv*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var JB=(function(){function r(e,t,n,a){this._stageTaskMap=be(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=be();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;O(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";Rr(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;O(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,v=d.agentStubMap;v.each(function(m){s(a,m)&&(m.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var y=o.getPerformArgs(d,a.block);v.each(function(m){m.perform(y)}),d.perform(y)&&(i=!0)}else f&&f.each(function(m,x){s(a,m)&&m.dirty();var b=o.getPerformArgs(m,a.block);b.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(b)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=be(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||jd({plan:jX,reset:FX,count:GX}));h.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,h)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||jd({reset:zX});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=be(),u=e.seriesType,c=e.getTargetSeries,f=!0,d=!1,h="";Rr(!e.createOnAllSeries,h),u?n.eachRawSeriesByType(u,v):c?c(n,a).each(v):(f=!1,O(n.getSeries(),v));function v(y){var m=y.uid,x=l.set(m,s&&s.get(m)||(d=!0,jd({reset:OX,onDirty:BX})));x.context={model:y,overallProgress:f},x.agent=o,x.__block=f,i._pipe(y,x)}d&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return Me(e)&&(e={overallReset:e,seriesType:WX(e)}),e.uid=Rc("stageHandler"),t&&(e.visualType=t),e},r})();function zX(r){r.overallReset(r.ecModel,r.api,r.payload)}function OX(r){return r.overallProgress&&NX}function NX(){this.agent.dirty(),this.getDownstream().dirty()}function BX(){this.agent&&this.agent.dirty()}function jX(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function FX(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Tt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?le(e,function(t,n){return ej(n)}):VX}var VX=ej(0);function ej(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function GX(r){return r.data.count()}function WX(r){dy=null;try{r(sh,tj)}catch{}return dy}var sh={},tj={},dy;rj(sh,XT);rj(tj,MB);sh.eachSeriesByType=sh.eachRawSeriesByType=function(r){dy=r};sh.eachComponent=function(r){r.mainType==="series"&&r.subType&&(dy=r.subType)};function rj(r,e){for(var t in e.prototype)r[t]=Vt}var Re=ee.darkColor,HX=Re.background,Ff=function(){return{axisLine:{lineStyle:{color:Re.axisLine}},splitLine:{lineStyle:{color:Re.axisSplitLine}},splitArea:{areaStyle:{color:[Re.backgroundTint,Re.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Re.axisMinorSplitLine}},axisLabel:{color:Re.axisLabel},axisName:{}}},tD={label:{color:Re.secondary},itemStyle:{borderColor:Re.borderTint},dividerLineStyle:{color:Re.border}},nj={darkMode:!0,color:Re.theme,backgroundColor:HX,axisPointer:{lineStyle:{color:Re.border},crossStyle:{color:Re.borderShade},label:{color:Re.tertiary}},legend:{textStyle:{color:Re.secondary},pageTextStyle:{color:Re.tertiary}},textStyle:{color:Re.secondary},title:{textStyle:{color:Re.primary},subtextStyle:{color:Re.quaternary}},toolbox:{iconStyle:{borderColor:Re.accent50}},tooltip:{backgroundColor:Re.neutral20,defaultBorderColor:Re.border,textStyle:{color:Re.tertiary}},dataZoom:{borderColor:Re.accent10,textStyle:{color:Re.tertiary},brushStyle:{color:Re.backgroundTint},handleStyle:{color:Re.neutral00,borderColor:Re.accent20},moveHandleStyle:{color:Re.accent40},emphasis:{handleStyle:{borderColor:Re.accent50}},dataBackground:{lineStyle:{color:Re.accent30},areaStyle:{color:Re.accent20}},selectedDataBackground:{lineStyle:{color:Re.accent50},areaStyle:{color:Re.accent30}}},visualMap:{textStyle:{color:Re.secondary},handleStyle:{borderColor:Re.neutral30}},timeline:{lineStyle:{color:Re.accent10},label:{color:Re.tertiary},controlStyle:{color:Re.accent30,borderColor:Re.accent30}},calendar:{itemStyle:{color:Re.neutral00,borderColor:Re.neutral20},dayLabel:{color:Re.tertiary},monthLabel:{color:Re.secondary},yearLabel:{color:Re.secondary}},matrix:{x:tD,y:tD,backgroundColor:{borderColor:Re.axisLine},body:{itemStyle:{borderColor:Re.borderTint}}},timeAxis:Ff(),logAxis:Ff(),valueAxis:Ff(),categoryAxis:Ff(),line:{symbol:"circle"},graph:{color:Re.theme},gauge:{title:{color:Re.secondary},axisLine:{lineStyle:{color:[[1,Re.neutral05]]}},axisLabel:{color:Re.axisLabel},detail:{color:Re.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Re.background}},radar:(function(){var r=Ff();return r.axisName={color:Re.axisLabel},r.axisLine.lineStyle.color=Re.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:Re.neutral20,textStyle:{color:Re.secondary}},emphasis:{itemStyle:{color:Re.neutral30}}}},sunburst:{itemStyle:{borderColor:Re.background}},map:{itemStyle:{borderColor:Re.border,areaColor:Re.neutral10},label:{color:Re.tertiary},emphasis:{label:{color:Re.primary},itemStyle:{areaColor:Re.highlight}},select:{label:{color:Re.primary},itemStyle:{areaColor:Re.highlight}}},geo:{itemStyle:{borderColor:Re.border,areaColor:Re.neutral10},emphasis:{label:{color:Re.primary},itemStyle:{areaColor:Re.highlight}},select:{label:{color:Re.primary},itemStyle:{color:Re.highlight}}}};nj.categoryAxis.splitLine.show=!1;var $X=(function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(pe(e)){var i=Xa(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};O(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var d=o[f],h=u.lastIndexOf(d);if(h>0&&h===u.length-d.length){var v=u.slice(0,h);v!=="data"&&(t.mainType=v,t[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,d,h,v){return f[h]==null||d[v||h]===f[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),Tb=["symbol","symbolSize","symbolRotate","symbolOffset"],rD=Tb.concat(["symbolKeepAspect"]),UX={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<Tb.length;o++){var s=Tb[o],l=r.get(s);Me(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(ae({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=ot(a);function c(f,d){for(var h=r.getRawValue(d),v=r.getDataParams(d),y=0;y<u.length;y++){var m=u[y];f.setItemVisual(d,m,a[m](h,v))}}return{dataEach:i?c:null}}},YX={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<rD.length;s++){var l=rD[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function JT(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function jh(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function aj(r,e,t,n){switch(t){case"color":var a=r.ensureUniqueItemVisual(e,"style");a[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function ij(r,e){function t(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}O([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=ae({},a),o.dispatchAction(ae(a,{type:n[1],seriesIndex:t(i,a)}))})})}function _u(r,e,t,n,a){var i=r+e;t.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=bl(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:se(d)?f.getName(d[0]):f.getName(d),selected:pe(l)?l:ae({},l)})}})}function XX(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(_u("map","selectchanged",e,a,n),_u("pie","selectchanged",e,a,n)):n.fromAction==="select"?(_u("map","selected",e,a,n),_u("pie","selected",e,a,n)):n.fromAction==="unselect"&&(_u("map","unselected",e,a,n),_u("pie","unselected",e,a,n))})}function cl(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var ZX=Math.round(Math.random()*9),KX=typeof Object.defineProperty=="function",qX=(function(){function r(){this._id="__ec_inner_"+ZX++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return KX?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r})(),QX=nt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n+i),r.lineTo(t-a,n+i),r.closePath()}}),JX=nt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n),r.lineTo(t,n+i),r.lineTo(t-a,n),r.closePath()}}),eZ=nt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),d=Math.cos(u),h=o*.6,v=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*h,l+s+d*h,t,n-v,t,n),r.bezierCurveTo(t,n-v,t-c+f*h,l+s+d*h,t-c,l+s),r.closePath()}}),tZ=nt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+t),r.lineTo(a,i+t/4*3),r.lineTo(a-o,i+t),r.lineTo(a,i),r.closePath()}}),rZ={line:Zt,rect:Qe,roundRect:Qe,square:Qe,circle:fi,diamond:JX,pin:eZ,arrow:tZ,triangle:QX},nZ={line:function(r,e,t,n,a){a.x1=r,a.y1=e+n/2,a.x2=r+t,a.y2=e+n/2},rect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n},roundRect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n,a.r=Math.min(t,n)/4},square:function(r,e,t,n,a){var i=Math.min(t,n);a.x=r,a.y=e,a.width=i,a.height=i},circle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.r=Math.min(t,n)/2},diamond:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n},pin:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},arrow:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},triangle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n}},hy={};O(rZ,function(r,e){hy[e]=new r});var aZ=nt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=ty(r,e,t),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var a=hy[n];a||(n="rect",a=hy[n]),nZ[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function iZ(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||ee.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function Kt(r,e,t,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=TT(r.slice(8),new ze(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=cc(r.slice(7),{},new ze(e,t,n,a),o?"center":"cover"):l=new aZ({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=iZ,i&&l.setColor(i),l}function Bc(r){return se(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Nl(r,e){if(r!=null)return se(r)||(r=[r,r]),[he(r[0],e[0])||0,he(Te(r[1],r[0]),e[1])||0]}function fl(r){return isFinite(r)}function oZ(r,e,t){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,a=a*t.width+t.x,i=i*t.height+t.y,o=o*t.height+t.y),n=fl(n)?n:0,a=fl(a)?a:1,i=fl(i)?i:0,o=fl(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function sZ(r,e,t){var n=t.width,a=t.height,i=Math.min(n,a),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*a+t.y,l=l*i),o=fl(o)?o:.5,s=fl(s)?s:.5,l=l>=0&&fl(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Cb(r,e,t){for(var n=e.type==="radial"?sZ(r,e,t):oZ(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function lZ(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function Pv(r){return parseInt(r,10)}function Yu(r,e,t){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[a]||Pv(s[n])||Pv(r.style[n]))-(Pv(s[i])||0)-(Pv(s[o])||0)|0}function uZ(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:lt(r)?[r]:se(r)?r:null}function eC(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&uZ(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=le(t,function(i){return i/a}),n/=a)}return[t,n]}var cZ=new ii(!0);function py(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function nD(r){return typeof r=="string"&&r!=="none"}function vy(r){var e=r.fill;return e!=null&&e!=="none"}function aD(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function iD(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function Mb(r,e,t){var n=hT(e.image,e.__image,t);if(mm(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Ld),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function fZ(r,e,t,n){var a,i=py(t),o=vy(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||cZ,f=e.__dirty;if(!n){var d=t.fill,h=t.stroke,v=o&&!!d.colorStops,y=i&&!!h.colorStops,m=o&&!!d.image,x=i&&!!h.image,b=void 0,T=void 0,C=void 0,k=void 0,L=void 0;(v||y)&&(L=e.getBoundingRect()),v&&(b=f?Cb(r,d,L):e.__canvasFillGradient,e.__canvasFillGradient=b),y&&(T=f?Cb(r,h,L):e.__canvasStrokeGradient,e.__canvasStrokeGradient=T),m&&(C=f||!e.__canvasFillPattern?Mb(r,d,e):e.__canvasFillPattern,e.__canvasFillPattern=C),x&&(k=f||!e.__canvasStrokePattern?Mb(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=k),v?r.fillStyle=b:m&&(C?r.fillStyle=C:o=!1),y?r.strokeStyle=T:x&&(k?r.strokeStyle=k:i=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var D,P;r.setLineDash&&t.lineDash&&(a=eC(e),D=a[0],P=a[1]);var R=!0;(u||f&Bu)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),R=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),R&&c.rebuildPath(r,l?s:1),D&&(r.setLineDash(D),r.lineDashOffset=P),n||(t.strokeFirst?(i&&iD(r,t),o&&aD(r,t)):(o&&aD(r,t),i&&iD(r,t))),D&&r.setLineDash([])}function dZ(r,e,t){var n=e.__image=hT(t.image,e.__image,e,e.onload);if(!(!n||!mm(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,d=s-c;r.drawImage(n,u,c,f,d,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function hZ(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Hi,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=eC(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(py(t)&&r.strokeText(a,t.x,t.y),vy(t)&&r.fillText(a,t.x,t.y)):(vy(t)&&r.fillText(a,t.x,t.y),py(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var oD=["shadowBlur","shadowOffsetX","shadowOffsetY"],sD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function oj(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){dn(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?pl.opacity:o}(n||e.blend!==t.blend)&&(i||(dn(r,a),i=!0),r.globalCompositeOperation=e.blend||pl.blend);for(var s=0;s<oD.length;s++){var l=oD[s];(n||e[l]!==t[l])&&(i||(dn(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(dn(r,a),i=!0),r.shadowColor=e.shadowColor||pl.shadowColor),i}function lD(r,e,t,n,a){var i=lh(e,a.inHover),o=n?null:t&&lh(t,a.inHover)||{};if(i===o)return!1;var s=oj(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(dn(r,a),s=!0),nD(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(dn(r,a),s=!0),nD(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(dn(r,a),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(dn(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<sD.length;c++){var f=sD[c],d=f[0];(n||i[d]!==o[d])&&(s||(dn(r,a),s=!0),r[d]=i[d]||f[1])}return s}function pZ(r,e,t,n,a){return oj(r,lh(e,a.inHover),t&&lh(t,a.inHover),n,a)}function sj(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function vZ(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),sj(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function gZ(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var uD=1,cD=2,fD=3,dD=4;function yZ(r){var e=vy(r),t=py(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function dn(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function lh(r,e){return e&&r.__hoverStyle||r.style}function tC(r,e){dl(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function dl(r,e,t,n){var a=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~Tn,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||lZ(i,o))&&(o&&o.length&&(dn(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(dn(r,t),r.save(),vZ(i,r,t),s=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof nt&&e.autoBatch&&yZ(e.style);s||gZ(a,u.transform)?(dn(r,t),sj(r,e)):c||dn(r,t);var f=lh(e,t.inHover);e instanceof nt?(t.lastDrawType!==uD&&(l=!0,t.lastDrawType=uD),lD(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),fZ(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof uc?(t.lastDrawType!==fD&&(l=!0,t.lastDrawType=fD),lD(r,e,u,l,t),hZ(r,e,f)):e instanceof gr?(t.lastDrawType!==cD&&(l=!0,t.lastDrawType=cD),pZ(r,e,u,l,t),dZ(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==dD&&(l=!0,t.lastDrawType=dD),mZ(r,e,t)),c&&n&&dn(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function mZ(r,e,t){var n=e.getDisplayables(),a=e.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),dl(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),dl(r,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var j1=new qX,hD=new oc(100),pD=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function hc(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&j1.delete(r);var i=j1.get(r);if(i)return i;var o=De(r,{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});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=a?1:1/t,j1.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,d=0;d<pD.length;++d){var h=o[pD[d]];if(h!=null&&!se(h)&&!pe(h)&&!lt(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var v;if(f){v=c.join(",")+(a?"-svg":"");var y=hD.get(v);y&&(a?u.svgElement=y:u.image=y)}var m=uj(o.dashArrayX),x=xZ(o.dashArrayY),b=lj(o.symbol),T=SZ(m),C=cj(x),k=!a&&pn.createCanvas(),L=a&&{tag:"g",attrs:{},key:"dcl",children:[]},A=P(),D;k&&(k.width=A.width*t,k.height=A.height*t,D=k.getContext("2d")),R(),f&&hD.put(v,k||L),u.image=k,u.svgElement=L,u.svgWidth=A.width,u.svgHeight=A.height;function P(){for(var z=1,B=0,N=T.length;B<N;++B)z=IA(z,T[B]);for(var W=1,B=0,N=b.length;B<N;++B)W=IA(W,b[B].length);z*=W;var $=C*T.length*b.length;return{width:Math.max(1,Math.min(z,o.maxTileWidth)),height:Math.max(1,Math.min($,o.maxTileHeight))}}function R(){D&&(D.clearRect(0,0,k.width,k.height),o.backgroundColor&&(D.fillStyle=o.backgroundColor,D.fillRect(0,0,k.width,k.height)));for(var z=0,B=0;B<x.length;++B)z+=x[B];if(z<=0)return;for(var N=-C,W=0,$=0,H=0;N<A.height;){if(W%2===0){for(var U=$/2%b.length,G=0,X=0,K=0;G<A.width*2;){for(var V=0,B=0;B<m[H].length;++B)V+=m[H][B];if(V<=0)break;if(X%2===0){var Y=(1-o.symbolSize)*.5,ne=G+m[H][X]*Y,ue=N+x[W]*Y,fe=m[H][X]*o.symbolSize,Ce=x[W]*o.symbolSize,Be=K/2%b[U].length;ye(ne,ue,fe,Ce,b[U][Be])}G+=m[H][X],++K,++X,X===m[H].length&&(X=0)}++H,H===m.length&&(H=0)}N+=x[W],++$,++W,W===x.length&&(W=0)}function ye(ce,we,xe,Ie,dt){var ke=a?1:t,$e=Kt(dt,ce*ke,we*ke,xe*ke,Ie*ke,o.color,o.symbolKeepAspect);if(a){var tt=n.painter.renderOneToVNode($e);tt&&L.children.push(tt)}else tC(D,$e)}}}}function lj(r){if(!r||r.length===0)return[["rect"]];if(pe(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!pe(r[t])){e=!1;break}if(e)return lj([r]);for(var n=[],t=0;t<r.length;++t)pe(r[t])?n.push([r[t]]):n.push(r[t]);return n}function uj(r){if(!r||r.length===0)return[[0,0]];if(lt(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!lt(r[n])){t=!1;break}if(t)return uj([r]);for(var a=[],n=0;n<r.length;++n)if(lt(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=le(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function xZ(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(lt(r)){var e=Math.ceil(r);return[e,e]}var t=le(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function SZ(r){return le(r,function(e){return cj(e)})}function cj(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function _Z(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=hc(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=hc(a,e)}}})}var va=new ra,fj={};function bZ(r,e){fj[r]=e}function dj(r){return fj[r]}var hj={};function pj(r,e){hj[r]=e}function wZ(r){return hj[r]}var TZ="6.0.0",CZ={zrender:"6.0.0"},MZ=1,kZ=800,LZ=900,AZ=1e3,IZ=2e3,DZ=5e3,vj=1e3,PZ=1100,rC=2e3,gj=3e3,RZ=4e3,Rm=4500,EZ=4600,zZ=5e3,OZ=6e3,yj=7e3,mj={PROCESSOR:{FILTER:AZ,SERIES_FILTER:kZ,STATISTIC:DZ},VISUAL:{LAYOUT:vj,PROGRESSIVE_LAYOUT:PZ,GLOBAL:rC,CHART:gj,POST_CHART_LAYOUT:EZ,COMPONENT:RZ,BRUSH:zZ,CHART_ITEM:Rm,ARIA:OZ,DECAL:yj}},ar="__flagInMainProcess",Rv="__mainProcessVersion",_r="__pendingUpdate",F1="__needsUpdateStatus",vD=/^[a-zA-Z0-9_]+$/,V1="__connectUpdateStatus",gD=0,NZ=1,BZ=2;function xj(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return _j(this,r,e)}}function Sj(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _j(this,r,e)}}function _j(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),ra.prototype[e].apply(r,t)}var bj=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(ra),wj=bj.prototype;wj.on=Sj("on");wj.off=Sj("off");var Hs,G1,Ev,wi,zv,W1,H1,bu,wu,yD,mD,$1,xD,Ov,SD,Tj,jn,_D,Tu,gy=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,new $X)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},i._dom=t;var o="canvas",s="auto",l=!1;i[Rv]=1,a.ssr&&KN(function(d){var h=Ne(d),v=h.dataIndex;if(v!=null){var y=be();return y.set("series_index",h.seriesIndex),y.set("data_index",v),h.ssrType&&y.set("ssr_type",h.ssrType),y}});var u=i._zr=X_(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Te(a.useDirtyRect,l),useCoarsePointer:Te(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Pm(ge(u.flush,u),17),i._updateTheme(n),i._locale=HU(a.locale||eB),i._coordSysMgr=new zc;var c=i._api=SD(i);function f(d,h){return d.__prio-h.__prio}return Sg(my,f),Sg(Ab,f),i._scheduler=new JB(i,c,Ab,my),i._messageCenter=new bj,i._initEvents(),i.resize=ge(i.resize,i),u.animation.on("frame",i._onframe,i),yD(u,i),mD(u,i),Ud(i),i}return e.prototype._onframe=function(){if(!this._disposed){_D(this);var t=this._scheduler;if(this[_r]){var n=this[_r].silent;this[ar]=!0,Tu(this);try{Hs(this),wi.update.call(this,null,this[_r].updateParams)}catch(l){throw this[ar]=!1,this[_r]=null,l}this._zr.flush(),this[ar]=!1,this[_r]=null,bu.call(this,n),wu.call(this,n)}else if(t.unfinished){var a=MZ,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),W1(this,i),t.performVisualTasks(i),Ov(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[ar]){if(this._disposed){this.id;return}var i,o,s;if(Pe(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[ar]=!0,Tu(this),!this._model||n){var l=new kY(this._api),u=this._theme,c=this._model=new XT;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Ib);var f={seriesTransition:s,optionChanged:!0};if(a)this[_r]={silent:i,updateParams:f},this[ar]=!1,this.getZr().wakeUp();else{try{Hs(this),wi.update.call(this,null,f)}catch(d){throw this[_r]=null,this[ar]=!1,d}this._ssr||this._zr.flush(),this[_r]=null,this[ar]=!1,bu.call(this,i),wu.call(this,i)}}},e.prototype.setTheme=function(t,n){if(!this[ar]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[_r]&&(i==null&&(i=this[_r].silent),o=this[_r].updateParams,this[_r]=null),this[ar]=!0,Tu(this);try{this._updateTheme(t),a.setTheme(this._theme),Hs(this),wi.update.call(this,{type:"setTheme"},o)}catch(s){throw this[ar]=!1,s}this[ar]=!1,bu.call(this,i),wu.call(this,i)}}},e.prototype._updateTheme=function(t){pe(t)&&(t=Cj[t]),t&&(t=Le(t),t&&LB(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||it.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return O(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;O(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return O(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(xy[a]){var l=s,u=s,c=-s,f=-s,d=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();O(yl,function(T,C){if(T.group===a){var k=n?T.getZr().painter.getSvgDom().innerHTML:T.renderToCanvas(Le(t)),L=T.getDom().getBoundingClientRect();l=i(L.left,l),u=i(L.top,u),c=o(L.right,c),f=o(L.bottom,f),d.push({dom:k,left:L.left,top:L.top})}}),l*=h,u*=h,c*=h,f*=h;var v=c-l,y=f-u,m=pn.createCanvas(),x=X_(m,{renderer:n?"svg":"canvas"});if(x.resize({width:v,height:y}),n){var b="";return O(d,function(T){var C=T.left-l,k=T.top-u;b+='<g transform="translate('+C+","+k+')">'+T.dom+"</g>"}),x.painter.getSvgRoot().innerHTML=b,t.connectedBackgroundColor&&x.painter.setBackgroundColor(t.connectedBackgroundColor),x.refreshImmediately(),x.painter.toDataURL()}else return t.connectedBackgroundColor&&x.add(new Qe({shape:{x:0,y:0,width:v,height:y},style:{fill:t.connectedBackgroundColor}})),O(d,function(T){var C=new gr({style:{x:T.left*h-l,y:T.top*h-u,image:T.dom}});x.add(C)}),x.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,a){return zv(this,"convertToPixel",t,n,a)},e.prototype.convertToLayout=function(t,n,a){return zv(this,"convertToLayout",t,n,a)},e.prototype.convertFromPixel=function(t,n,a){return zv(this,"convertFromPixel",t,n,a)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=Qu(a,t);return O(o,function(s,l){l.indexOf("Models")>=0&&O(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=Qu(a,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?JT(s,l,n):jh(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;O(jZ,function(a){var i=function(o){var s=t.getModel(),l=o.target,u,c=a==="globalout";if(c?u={}:l&&cl(l,function(y){var m=Ne(y);if(m&&m.dataIndex!=null){var x=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=x&&x.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=ae({},m.eventData),!0},!0),u){var f=u.componentType,d=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",d=u.seriesIndex);var h=f&&d!=null&&s.getComponent(f,d),v=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=a,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:v},t.trigger(a,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(a,i,t)});var n=this._messageCenter;O(Lb,function(a,i){n.on(i,function(o){t.trigger(i,o)})}),XX(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&l5(this.getDom(),aC,"");var n=this,a=n._api,i=n._model;O(n._componentsViews,function(o){o.dispose(i,a)}),O(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete yl[n.id]},e.prototype.resize=function(t){if(!this[ar]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[_r]&&(i==null&&(i=this[_r].silent),a=!0,this[_r]=null),this[ar]=!0,Tu(this);try{a&&Hs(this),wi.update.call(this,{type:"resize",animation:ae({duration:0},t&&t.animation)})}catch(o){throw this[ar]=!1,o}this[ar]=!1,bu.call(this,i),wu.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(Pe(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!Db[t]){var a=Db[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=ae({},t);return n.type=kb[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(Pe(n)||(n={silent:!!n}),!!yy[t.type]&&this._model){if(this[ar]){this._pendingActions.push(t);return}var a=n.silent;H1.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&it.browser.weChat&&this._throttledZrFlush(),bu.call(this,a),wu.call(this,a)}},e.prototype.updateLabelLayout=function(){va.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Hs=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),G1(f,!0),G1(f,!1),d.plan()},G1=function(f,d){for(var h=f._model,v=f._scheduler,y=d?f._componentsViews:f._chartsViews,m=d?f._componentsMap:f._chartsMap,x=f._zr,b=f._api,T=0;T<y.length;T++)y[T].__alive=!1;d?h.eachComponent(function(L,A){L!=="series"&&C(A)}):h.eachSeries(C);function C(L){var A=L.__requireNewView;L.__requireNewView=!1;var D="_ec_"+L.id+"_"+L.type,P=!A&&m[D];if(!P){var R=Xa(L.type),z=d?Ct.getClass(R.main,R.sub):mt.getClass(R.sub);P=new z,P.init(h,b),m[D]=P,y.push(P),x.add(P.group)}L.__viewId=P.__id=D,P.__alive=!0,P.__model=L,P.group.__ecComponentInfo={mainType:L.mainType,index:L.componentIndex},!d&&v.prepareView(P,L,h,b)}for(var T=0;T<y.length;){var k=y[T];k.__alive?T++:(!d&&k.renderTask.dispose(),x.remove(k.group),k.dispose(h,b),y.splice(T,1),m[k.__id]===k&&delete m[k.__id],k.__id=k.group.__ecComponentInfo=null)}},Ev=function(f,d,h,v,y){var m=f._model;if(m.setUpdatePayload(h),!v){O([].concat(f._componentsViews).concat(f._chartsViews),k);return}var x={};x[v+"Id"]=h[v+"Id"],x[v+"Index"]=h[v+"Index"],x[v+"Name"]=h[v+"Name"];var b={mainType:v,query:x};y&&(b.subType=y);var T=h.excludeSeriesId,C;T!=null&&(C=be(),O(Tt(T),function(L){var A=ir(L,null);A!=null&&C.set(A,!0)})),m&&m.eachComponent(b,function(L){var A=C&&C.get(L.id)!=null;if(!A)if(iI(h))if(L instanceof St)h.type===vl&&!h.notBlur&&!L.get(["emphasis","disabled"])&&U9(L,h,f._api);else{var D=ST(L.mainType,L.componentIndex,h.name,f._api),P=D.focusSelf,R=D.dispatchers;h.type===vl&&P&&!h.notBlur&&ob(L.mainType,L.componentIndex,f._api),R&&O(R,function(z){h.type===vl?Ui(z):Yi(z)})}else lb(h)&&L instanceof St&&(Z9(L,h,f._api),nI(L),jn(f))},f),m&&m.eachComponent(b,function(L){var A=C&&C.get(L.id)!=null;A||k(f[v==="series"?"_chartsMap":"_componentsMap"][L.__viewId])},f);function k(L){L&&L.__alive&&L[d]&&L[d](L.__model,m,f._api,h)}},wi={prepareAndUpdate:function(f){Hs(this),wi.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var h=this._model,v=this._api,y=this._zr,m=this._coordSysMgr,x=this._scheduler;if(h){h.setUpdatePayload(f),x.restoreData(h,f),x.performSeriesTasks(h),m.create(h,v),x.performDataProcessorTasks(h,f),W1(this,h),m.update(h,v),n(h),x.performVisualTasks(h,f);var b=h.get("backgroundColor")||"transparent";y.setBackgroundColor(b);var T=h.get("darkMode");T!=null&&T!=="auto"&&y.setDarkMode(T),$1(this,h,v,f,d),va.trigger("afterupdate",h,v)}},updateTransform:function(f){var d=this,h=this._model,v=this._api;if(h){h.setUpdatePayload(f);var y=[];h.eachComponent(function(x,b){if(x!=="series"){var T=d.getViewOfComponentModel(b);if(T&&T.__alive)if(T.updateTransform){var C=T.updateTransform(b,h,v,f);C&&C.update&&y.push(T)}else y.push(T)}});var m=be();h.eachSeries(function(x){var b=d._chartsMap[x.__viewId];if(b.updateTransform){var T=b.updateTransform(x,h,v,f);T&&T.update&&m.set(x.uid,1)}else m.set(x.uid,1)}),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:m}),Ov(this,h,v,f,{},m),va.trigger("afterupdate",h,v)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),mt.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),$1(this,d,this._api,f,{}),va.trigger("afterupdate",d,this._api))},updateVisual:function(f){var d=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(v){v.getData().clearAllVisual()}),mt.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(v,y){if(v!=="series"){var m=d.getViewOfComponentModel(y);m&&m.__alive&&m.updateVisual(y,h,d._api,f)}}),h.eachSeries(function(v){var y=d._chartsMap[v.__viewId];y.updateVisual(v,h,d._api,f)}),va.trigger("afterupdate",h,this._api))},updateLayout:function(f){wi.update.call(this,f)}};function t(f,d,h,v,y){if(f._disposed){f.id;return}for(var m=f._model,x=f._coordSysMgr.getCoordinateSystems(),b,T=Qu(m,h),C=0;C<x.length;C++){var k=x[C];if(k[d]&&(b=k[d](m,T,v,y))!=null)return b}}zv=t,W1=function(f,d){var h=f._chartsMap,v=f._scheduler;d.eachSeries(function(y){v.updateStreamModes(y,h[y.__viewId])})},H1=function(f,d){var h=this,v=this.getModel(),y=f.type,m=f.escapeConnect,x=yy[y],b=(x.update||"update").split(":"),T=b.pop(),C=b[0]!=null&&Xa(b[0]);this[ar]=!0,Tu(this);var k=[f],L=!1;f.batch&&(L=!0,k=le(f.batch,function(H){return H=De(ae({},H),f),H.batch=null,H}));var A=[],D,P=[],R=x.nonRefinedEventType,z=lb(f),B=iI(f);if(B&&I5(this._api),O(k,function(H){var U=x.action(H,v,h._api);if(x.refineEvent?P.push(U):D=U,D=D||ae({},H),D.type=R,A.push(D),B){var G=fT(f),X=G.queryOptionMap,K=G.mainTypeSpecified,V=K?X.keys()[0]:"series";Ev(h,T,H,V),jn(h)}else z?(Ev(h,T,H,"series"),jn(h)):C&&Ev(h,T,H,C.main,C.sub)}),T!=="none"&&!B&&!z&&!C)try{this[_r]?(Hs(this),wi.update.call(this,f),this[_r]=null):wi[T].call(this,f)}catch(H){throw this[ar]=!1,H}if(L?D={type:R,escapeConnect:m,batch:A}:D=A[0],this[ar]=!1,!d){var N=void 0;if(x.refineEvent){var W=x.refineEvent(P,f,v,this._api).eventContent;Rr(Pe(W)),N=De({type:x.refinedEventType},W),N.fromAction=f.type,N.fromActionPayload=f,N.escapeConnect=!0}var $=this._messageCenter;$.trigger(D.type,D),N&&$.trigger(N.type,N)}},bu=function(f){for(var d=this._pendingActions;d.length;){var h=d.shift();H1.call(this,h,f)}},wu=function(f){!f&&this.trigger("updated")},yD=function(f,d){f.on("rendered",function(h){d.trigger("rendered",h),f.animation.isFinished()&&!d[_r]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},mD=function(f,d){f.on("mouseover",function(h){var v=h.target,y=cl(v,th);y&&(Y9(y,h,d._api),jn(d))}).on("mouseout",function(h){var v=h.target,y=cl(v,th);y&&(X9(y,h,d._api),jn(d))}).on("click",function(h){var v=h.target,y=cl(v,function(b){return Ne(b).dataIndex!=null},!0);if(y){var m=y.selected?"unselect":"select",x=Ne(y);d._api.dispatchAction({type:m,dataType:x.dataType,dataIndexInside:x.dataIndex,seriesIndex:x.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function a(f){var d=[],h=[],v=!1;if(f.eachComponent(function(b,T){var C=T.get("zlevel")||0,k=T.get("z")||0,L=T.getZLevelKey();v=v||!!L,(b==="series"?h:d).push({zlevel:C,z:k,idx:T.componentIndex,type:b,key:L})}),v){var y=d.concat(h),m,x;Sg(y,function(b,T){return b.zlevel===T.zlevel?b.z-T.z:b.zlevel-T.zlevel}),O(y,function(b){var T=f.getComponent(b.type,b.idx),C=b.zlevel,k=b.key;m!=null&&(C=Math.max(m,C)),k?(C===m&&k!==x&&C++,x=k):x&&(C===m&&C++,x=""),m=C,T.setZLevel(C)})}}$1=function(f,d,h,v,y){a(d),xD(f,d,h,v,y),O(f._chartsViews,function(m){m.__alive=!1}),Ov(f,d,h,v,y),O(f._chartsViews,function(m){m.__alive||m.remove(d,h)})},xD=function(f,d,h,v,y,m){O(m||f._componentsViews,function(x){var b=x.__model;u(b,x),x.render(b,d,h,v),l(b,x),c(b,x)})},Ov=function(f,d,h,v,y,m){var x=f._scheduler;y=ae(y||{},{updatedSeries:d.getSeries()}),va.trigger("series:beforeupdate",d,h,y);var b=!1;d.eachSeries(function(T){var C=f._chartsMap[T.__viewId];C.__alive=!0;var k=C.renderTask;x.updatePayload(k,v),u(T,C),m&&m.get(T.uid)&&k.dirty(),k.perform(x.getPerformArgs(k))&&(b=!0),C.group.silent=!!T.get("silent"),s(T,C),nI(T)}),x.unfinished=b||x.unfinished,va.trigger("series:layoutlabels",d,h,y),va.trigger("series:transition",d,h,y),d.eachSeries(function(T){var C=f._chartsMap[T.__viewId];l(T,C),c(T,C)}),o(f,d),va.trigger("series:afterupdate",d,h,y)},jn=function(f){f[F1]=!0,f.getZr().wakeUp()},Tu=function(f){f[Rv]=(f[Rv]+1)%1e3},_D=function(f){f[F1]&&(f.getZr().storage.traverse(function(d){Ju(d)||i(d)}),f[F1]=!1)};function i(f){for(var d=[],h=f.currentStates,v=0;v<h.length;v++){var y=h[v];y==="emphasis"||y==="blur"||y==="select"||d.push(y)}f.selected&&f.states.select&&d.push("select"),f.hoverState===wm&&f.states.emphasis?d.push("emphasis"):f.hoverState===Ph&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var h=f._zr,v=h.storage,y=0;v.traverse(function(m){m.isGroup||y++}),y>d.get("hoverLayerThreshold")&&!it.node&&!it.worker&&d.eachSeries(function(m){if(!m.preventUsingHoverLayer){var x=f._chartsMap[m.__viewId];x.__alive&&x.eachRendered(function(b){b.states.emphasis&&(b.states.emphasis.hoverLayer=!0)})}})}function s(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function l(f,d){if(!f.preventAutoZ){var h=Ml(f);d.eachRendered(function(v){return Mm(v,h.z,h.zlevel),!0})}}function u(f,d){d.eachRendered(function(h){if(!Ju(h)){var v=h.getTextContent(),y=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),y&&y.stateTransition&&(y.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,d){var h=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),y=h.get("duration"),m=y>0?{duration:y,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(x){if(x.states&&x.states.emphasis){if(Ju(x))return;if(x instanceof nt&&tU(x),x.__dirty){var b=x.prevStates;b&&x.useStates(b)}if(v){x.stateTransition=m;var T=x.getTextContent(),C=x.getTextGuideLine();T&&(T.stateTransition=m),C&&(C.stateTransition=m)}x.__dirty&&i(x)}})}SD=function(f){return new((function(d){Q(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var y=v.__ecComponentInfo;if(y!=null)return f._model.getComponent(y.mainType,y.index);v=v.parent}},h.prototype.enterEmphasis=function(v,y){Ui(v,y),jn(f)},h.prototype.leaveEmphasis=function(v,y){Yi(v,y),jn(f)},h.prototype.enterBlur=function(v){M5(v),jn(f)},h.prototype.leaveBlur=function(v){xT(v),jn(f)},h.prototype.enterSelect=function(v){k5(v),jn(f)},h.prototype.leaveSelect=function(v){L5(v),jn(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},h.prototype.getMainProcessVersion=function(){return f[Rv]},h})(MB))(f)},Tj=function(f){function d(h,v){for(var y=0;y<h.length;y++){var m=h[y];m[V1]=v}}O(kb,function(h,v){f._messageCenter.on(v,function(y){if(xy[f.group]&&f[V1]!==gD){if(y&&y.escapeConnect)return;var m=f.makeActionFromEvent(y),x=[];O(yl,function(b){b!==f&&b.group===f.group&&x.push(b)}),d(x,gD),O(x,function(b){b[V1]!==NZ&&b.dispatchAction(m)}),d(x,BZ)}})})}})(),e})(ra),nC=gy.prototype;nC.on=xj("on");nC.off=xj("off");nC.one=function(r,e,t){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(r,a)}this.on.call(this,r,a,t)};var jZ=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var yy={},kb={},Lb={},Ab=[],Ib=[],my=[],Cj={},Db={},yl={},xy={},FZ=+new Date-0,VZ=+new Date-0,aC="_echarts_instance_";function GZ(r,e,t){var n=!(t&&t.ssr);if(n){var a=iC(r);if(a)return a}var i=new gy(r,e,t);return i.id="ec_"+FZ++,yl[i.id]=i,n&&l5(r,aC,i.id),Tj(i),va.trigger("afterinit",i),i}function WZ(r){if(se(r)){var e=r;r=null,O(e,function(t){t.group!=null&&(r=t.group)}),r=r||"g_"+VZ++,O(e,function(t){t.group=r})}return xy[r]=!0,r}function Mj(r){xy[r]=!1}var HZ=Mj;function $Z(r){pe(r)?r=yl[r]:r instanceof gy||(r=iC(r)),r instanceof gy&&!r.isDisposed()&&r.dispose()}function iC(r){return yl[G7(r,aC)]}function UZ(r){return yl[r]}function oC(r,e){Cj[r]=e}function sC(r){Ue(Ib,r)<0&&Ib.push(r)}function lC(r,e){uC(Ab,r,e,IZ)}function kj(r){Em("afterinit",r)}function Lj(r){Em("afterupdate",r)}function Em(r,e){va.on(r,e)}function La(r,e,t){var n,a,i,o,s;Me(e)&&(t=e,e=""),Pe(r)?(n=r.type,a=r.event,o=r.update,s=r.publishNonRefinedEvent,t||(t=r.action),i=r.refineEvent):(n=r,a=e);function l(c){return c.toLowerCase()}a=l(a||n);var u=i?l(n):a;yy[n]||(Rr(vD.test(n)&&vD.test(a)),i&&Rr(a!==n),yy[n]={actionType:n,refinedEventType:a,nonRefinedEventType:u,update:o,action:t,refineEvent:i},Lb[a]=1,i&&s&&(Lb[u]=1),kb[u]=n)}function Aj(r,e){zc.register(r,e)}function YZ(r){var e=zc.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function XZ(r,e){pj(r,e)}function Ij(r,e){uC(my,r,e,vj,"layout")}function ss(r,e){uC(my,r,e,gj,"visual")}var bD=[];function uC(r,e,t,n,a){if((Me(e)||Pe(e))&&(t=e,e=n),!(Ue(bD,t)>=0)){bD.push(t);var i=JB.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function cC(r,e){Db[r]=e}function ZZ(r){hN({createCanvas:r})}function Dj(r,e,t){var n=dj("registerMap");n&&n(r,e,t)}function KZ(r){var e=dj("getMap");return e&&e(r)}var Pj=iX;ss(rC,DX);ss(Rm,PX);ss(Rm,RX);ss(rC,UX);ss(Rm,YX);ss(yj,_Z);sC(LB);lC(LZ,jY);cC("default",EX);La({type:vl,event:vl,update:vl},Vt);La({type:kg,event:kg,update:kg},Vt);La({type:ay,event:yT,update:ay,action:Vt,refineEvent:fC,publishNonRefinedEvent:!0});La({type:ab,event:yT,update:ab,action:Vt,refineEvent:fC,publishNonRefinedEvent:!0});La({type:iy,event:yT,update:iy,action:Vt,refineEvent:fC,publishNonRefinedEvent:!0});function fC(r,e,t,n){return{eventContent:{selected:K9(t),isFromClick:e.isFromClick||!1}}}oC("default",{});oC("dark",nj);var qZ={},wD=[],QZ={registerPreprocessor:sC,registerProcessor:lC,registerPostInit:kj,registerPostUpdate:Lj,registerUpdateLifecycle:Em,registerAction:La,registerCoordinateSystem:Aj,registerLayout:Ij,registerVisual:ss,registerTransform:Pj,registerLoading:cC,registerMap:Dj,registerImpl:bZ,PRIORITY:mj,ComponentModel:Je,ComponentView:Ct,SeriesModel:St,ChartView:mt,registerComponentModel:function(r){Je.registerClass(r)},registerComponentView:function(r){Ct.registerClass(r)},registerSeriesModel:function(r){St.registerClass(r)},registerChartView:function(r){mt.registerClass(r)},registerCustomSeries:function(r,e){pj(r,e)},registerSubTypeDefaulter:function(r,e){Je.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){XN(r,e)}};function Ze(r){if(se(r)){O(r,function(e){Ze(e)});return}Ue(wD,r)>=0||(wD.push(r),Me(r)&&(r={install:r}),r.install(QZ))}function Vf(r){return r==null?0:r.length||1}function TD(r){return r}var Xi=(function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||TD,this._newKeyGetter=a||TD,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=a[o],l=n[s],u=Vf(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],c=a[l],f=Vf(u),d=Vf(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var a=e[n],i=t[a],o=Vf(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);t[a]=null}},r.prototype._initIndexMap=function(e,t,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[a](e[o],o);if(i||(n[o]=s),!!t){var l=t[s],u=Vf(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r})(),JZ=(function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function eK(r,e){var t={},n=t.encode={},a=be(),i=[],o=[],s={};O(r.dimensions,function(d){var h=r.getDimensionInfo(d),v=h.coordDim;if(v){var y=h.coordDimIndex;U1(n,v)[y]=d,h.isExtraCoord||(a.set(v,1),tK(h.type)&&(i[0]=d),U1(s,v)[y]=r.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(d)}xB.each(function(m,x){var b=U1(n,x),T=h.otherDims[x];T!=null&&T!==!1&&(b[T]=h.name)})});var l=[],u={};a.each(function(d,h){var v=n[h];u[h]=v[0],l=l.concat(v)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=le(l,function(d){return r.getDimensionInfo(d).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(i=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,t.userOutput=new JZ(s,e),t}function U1(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function Sy(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function tK(r){return!(r==="ordinal"||r==="time")}var Eg=(function(){function r(e){this.otherDims={},e!=null&&ae(this,e)}return r})(),rK=et(),nK={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Rj=(function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Oj(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Te(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=IB(this.source),n=!Nj(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=t?d.name:null,u=d.type)}i.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=nK[u]||"f",c&&(a+=c.uid),a+="$"}var h=this.source,v=[h.seriesLayoutBy,h.startIndex,a].join("$$");return{dimensions:i,hash:v}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(t);o&&(a=o.name)}e.push(a)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Ej(r){return r instanceof Rj}function zj(r){for(var e=be(),t=0;t<(r||[]).length;t++){var n=r[t],a=Pe(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function Oj(r){var e=rK(r);return e.dimNameMap||(e.dimNameMap=zj(r.dimensionsDefine))}function Nj(r){return r>30}var Gf=Pe,To=le,aK=typeof Int32Array>"u"?Array:Int32Array,iK="e\0\0",CD=-1,oK=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],sK=["_approximateExtent"],MD,Nv,Wf,Hf,Y1,$f,X1,Ur=(function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;Ej(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=pe(f)?new Eg({name:f}):f instanceof Eg?f:new Eg(f),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var v=d.otherDims=d.otherDims||{};o.push(h),i[h]=d,u[h]!=null&&(l=!0),d.createInvertedIndices&&(s[h]=[]);var y=c;lt(d.storeDimIndex)&&(y=d.storeDimIndex),v.itemName===0&&(this._nameDimIdx=y),v.itemId===0&&(this._idDimIdx=y),a&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=be();O(o,function(x){m.set(i[x].storeDimIndex,x)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(lt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof Sb&&(i=e),!i){var o=this.dimensions,s=ZT(e)||Pr(e)?new DB(e,o.length):e;i=new Sb;var l=To(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=eK(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=t[l],o&&X1(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var a=this._dimInfos[t[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Uo&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Dn;if(l&&!a.pure)for(var u=[],c=e;c<t;c++){var f=a.getItem(c,u);if(!this.hasItemOption&&A7(f)&&(this.hasItemOption=!0),f){var d=f.name;i[c]==null&&d!=null&&(i[c]=ir(d,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=ir(h,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)X1(this,c);MD(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Gf(e)?ae(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Wf(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},r.prototype.getId=function(e){return Nv(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,a=this._store;return se(e)?a.getValues(To(e,function(i){return n._getStoreDimIndex(i)}),t):a.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,a=t.length;n<a;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],a=n&&n[t];return a==null||isNaN(a)?CD:a},r.prototype.each=function(e,t,n){Me(e)&&(n=t,t=e,e=[]);var a=n||this,i=To(Hf(e),this._getStoreDimIndex,this);this._store.each(i,a?ge(t,a):t)},r.prototype.filterSelf=function(e,t,n){Me(e)&&(n=t,t=e,e=[]);var a=n||this,i=To(Hf(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?ge(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=ot(e);return O(a,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){Me(e)&&(n=t,t=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(t&&t.apply(this,arguments))},n),a},r.prototype.map=function(e,t,n,a){var i=n||a||this,o=To(Hf(e),this._getStoreDimIndex,this),s=$f(this);return s._store=this._store.map(o,i?ge(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=n||a||this,o=To(Hf(e),this._getStoreDimIndex,this);this._store.modify(o,i?ge(t,i):t)},r.prototype.downSample=function(e,t,n,a){var i=$f(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.minmaxDownSample=function(e,t){var n=$f(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=$f(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new rt(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Xi(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Nv(e,n)},function(n){return Nv(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Gf(e)?ae(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],a=n&&n[t];return a??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),se(i)?i=i.slice():Gf(i)&&(i=ae({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Gf(t)?ae(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Gf(e)?ae(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?ae(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;nb(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){O(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:To(this.dimensions,this._getDimInfo,this),this.hostModel)),Y1(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];Me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(cm(arguments)))})},r.internalField=(function(){MD=function(e){var t=e._invertedIndicesMap;O(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new aK(o.categories.length);for(var l=0;l<n.length;l++)n[l]=CD;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Wf=function(e,t,n){return ir(e._getCategory(t,n),null)},Nv=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Wf(e,e._idDimIdx,t)),n==null&&(n=iK+t),n},Hf=function(e){return se(e)||(e=e!=null?[e]:[]),e},$f=function(e){var t=new r(e._schema?e._schema:To(e.dimensions,e._getDimInfo,e),e.hostModel);return Y1(t,e),t},Y1=function(e,t){O(oK.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,O(sK,function(n){e[n]=Le(t[n])}),e._calculationInfo=ae({},t._calculationInfo)},X1=function(e,t){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=a[t];if(s==null&&i!=null&&(n[t]=s=Wf(e,i,t)),l==null&&o!=null&&(a[t]=l=Wf(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),a[t]=l}}})(),r})();function lK(r,e){return jc(r,e).dimensions}function jc(r,e){ZT(r)||(r=KT(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=be(),i=[],o=cK(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Nj(o),l=n===r.dimensionsDefine,u=l?Oj(r):zj(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=be(c),d=new jB(o),h=0;h<d.length;h++)d[h]=-1;function v(P){var R=d[P];if(R<0){var z=n[P],B=Pe(z)?z:{name:z},N=new Eg,W=B.name;W!=null&&u.get(W)!=null&&(N.name=N.displayName=W),B.type!=null&&(N.type=B.type),B.displayName!=null&&(N.displayName=B.displayName);var $=i.length;return d[P]=$,N.storeDimIndex=P,i.push(N),N}return i[R]}if(!s)for(var h=0;h<o;h++)v(h);f.each(function(P,R){var z=Tt(P).slice();if(z.length===1&&!pe(z[0])&&z[0]<0){f.set(R,!1);return}var B=f.set(R,[]);O(z,function(N,W){var $=pe(N)?u.get(N):N;$!=null&&$<o&&(B[W]=$,m(v($),R,W))})});var y=0;O(t,function(P){var R,z,B,N;if(pe(P))R=P,N={};else{N=P,R=N.name;var W=N.ordinalMeta;N.ordinalMeta=null,N=ae({},N),N.ordinalMeta=W,z=N.dimsDef,B=N.otherDims,N.name=N.coordDim=N.coordDimIndex=N.dimsDef=N.otherDims=null}var $=f.get(R);if($!==!1){if($=Tt($),!$.length)for(var H=0;H<(z&&z.length||1);H++){for(;y<o&&v(y).coordDim!=null;)y++;y<o&&$.push(y++)}O($,function(U,G){var X=v(U);if(l&&N.type!=null&&(X.type=N.type),m(De(X,N),R,G),X.name==null&&z){var K=z[G];!Pe(K)&&(K={name:K}),X.name=X.displayName=K.name,X.defaultTooltip=K.defaultTooltip}B&&De(X.otherDims,B)})}});function m(P,R,z){xB.get(R)!=null?P.otherDims[R]=z:(P.coordDim=R,P.coordDimIndex=z,a.set(R,!0))}var x=e.generateCoord,b=e.generateCoordCount,T=b!=null;b=x?b||1:0;var C=x||"value";function k(P){P.name==null&&(P.name=P.coordDim)}if(s)O(i,function(P){k(P)}),i.sort(function(P,R){return P.storeDimIndex-R.storeDimIndex});else for(var L=0;L<o;L++){var A=v(L),D=A.coordDim;D==null&&(A.coordDim=fK(C,a,T),A.coordDimIndex=0,(!x||b<=0)&&(A.isExtraCoord=!0),b--),k(A),A.type==null&&(wB(r,L)===Ar.Must||A.isExtraCoord&&(A.otherDims.itemName!=null||A.otherDims.seriesName!=null))&&(A.type="ordinal")}return uK(i),new Rj({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function uK(r){for(var e=be(),t=0;t<r.length;t++){var n=r[t],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function cK(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return O(e,function(i){var o;Pe(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function fK(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var dK=(function(){function r(e){this.coordSysDims=[],this.axisMap=be(),this.categoryAxisMap=be(),this.coordSysName=e}return r})();function hK(r){var e=r.get("coordinateSystem"),t=new dK(e),n=pK[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var pK={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",Bt).models[0],i=r.getReferringComponents("yAxis",Bt).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),Cu(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),Cu(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",Bt).models[0];e.coordSysDims=["single"],t.set("single",a),Cu(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",Bt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Cu(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),Cu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();O(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Cu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,n){var a=r.getReferringComponents("matrix",Bt).models[0];e.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");t.set("x",i),t.set("y",o),n.set("x",i),n.set("y",o)}};function Cu(r){return r.get("type")==="category"}function Bj(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;vK(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,d;if(O(i,function(b,T){pe(b)&&(i[T]=b={name:b}),l&&!b.isExtraCoord&&(!n&&!u&&b.ordinalMeta&&(u=b),!c&&b.type!=="ordinal"&&b.type!=="time"&&(!a||a===b.coordDim)&&(c=b))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,d="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,v=c.type,y=0;O(i,function(b){b.coordDim===h&&y++});var m={name:f,coordDim:h,coordDimIndex:y,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},x={name:d,coordDim:d,coordDimIndex:y+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(d,v),x.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(x)):(i.push(m),i.push(x))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function vK(r){return!Ej(r.schema)}function Zi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function dC(r,e){return Zi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function gK(r,e){var t=r.get("coordinateSystem"),n=zc.get(t),a;return e&&e.coordSysDims&&(a=le(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Sy(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function yK(r,e,t){var n,a;return t&&O(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function di(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=KT(r)):(a=n.getSource(),i=a.sourceFormat===Dn);var o=hK(e),s=gK(e,o),l=t.useEncodeDefaulter,u=Me(l)?l:l?He(bB,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=jc(a,c),d=yK(f.dimensions,t.createInvertedIndices,o),h=i?null:n.getSharedDataStore(f),v=Bj(e,{schema:f,store:h}),y=new Ur(f,e);y.setCalculationInfo(v);var m=d!=null&&mK(a)?function(x,b,T,C){return C===d?T:this.defaultDimValueGetter(x,b,T,C)}:null;return y.hasItemOption=!1,y.initData(i?a:h,null,m),y}function mK(r){if(r.sourceFormat===Dn){var e=xK(r.data||[]);return!se(Cc(e))}}function xK(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}function Pb(r){return r.type==="interval"||r.type==="log"}function SK(r,e,t,n,a){var i={},o=i.interval=lT(e/t,!0);n!=null&&o<n&&(o=i.interval=n),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=uh(o),l=i.niceTickExtent=[Xt(Math.ceil(r[0]/o)*o,s),Xt(Math.floor(r[1]/o)*o,s)];return _K(l,r),i}function Z1(r){var e=Math.pow(10,gm(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Xt(t*e)}function uh(r){return ma(r)+2}function kD(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function _K(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),kD(r,0,e),kD(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function hC(r,e){return r>=e[0]&&r<=e[1]}var bK=(function(){function r(){this.normalize=LD,this.scale=AD}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ge(e.normalize,e),this.scale=ge(e.scale,e)):(this.normalize=LD,this.scale=AD)},r})();function LD(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function AD(r,e){return r*(e[1]-e[0])+e[0]}function Rb(r,e,t){var n=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/n,Math.log(t?e[1]:Math.max(0,e[1]))/n]}var ls=(function(){function r(e){this._calculator=new bK,this._setting=e||{},this._extent=[1/0,-1/0];var t=er();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(e){var t=er();t&&this._innerSetBreak(t.parseAxisBreakOption(e,ge(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();ym(ls);var wK=0,ch=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++wK,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&le(n,TK);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!pe(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=be(this.categories))},r})();function TK(r){return Pe(r)&&r.value!=null?r.value:r+""}var pc=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new ch({})),se(a)&&(a=new ch({categories:le(a,function(i){return Pe(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:pe(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return hC(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var c=0;o<s;++o){for(;i[c]!=null;)c++;a.push(c),i[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(ls);ls.registerClass(pc);var Co=Xt,Ki=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return hC(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=uh(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=er(),l=[];if(!n)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;a[0]<i[0]&&(t.expandToNicedExtent?l.push({value:Co(i[0]-n,o)}):l.push({value:a[0]}));for(var c=function(v,y){return Math.round((y-v)/n)},f=i[0];f<=i[1];){if(l.push({value:f}),f=Co(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=Co(f+d*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:i[1];return a[1]>h&&(t.expandToNicedExtent?l.push({value:Co(h+n,o)}):l.push({value:a[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(v){return v.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],f=s.value-l.value,d=f/t,h=uh(d);u<t-1;){var v=Co(l.value+(u+1)*d,h);v>i[0]&&v<i[1]&&c.push(v),u++}var y=er();y&&y.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(m){return m},this._interval,i),a.push(c)}}return a},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=ma(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=Co(t.value,a,!0);return VT(i)},e.prototype.calcNiceTicks=function(t,n,a){t=t||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var s=SK(i,o,t,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);t.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval,s=this._intervalPrecision;t.fixMin||(n[0]=Co(Math.floor(n[0]/o)*o,s)),t.fixMax||(n[1]=Co(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e})(ls);ls.registerClass(Ki);var jj=typeof Float32Array<"u",CK=jj?Float32Array:Array;function Za(r){return se(r)?jj?new Float32Array(r):r:new CK(r)}var Eb="__ec_stack_";function Fj(r){return r.get("stack")||Eb+r.seriesIndex}function pC(r){return r.dim+r.index}function MK(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var a=t.getBandWidth(),i=0;i<r.count;i++)e.push(De({bandWidth:a,axisKey:n,stackId:Eb+i},r));for(var o=Wj(e),s=[],i=0;i<r.count;i++){var l=o[n][Eb+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function Vj(r,e){var t=[];return e.eachSeriesByType(r,function(n){Uj(n)&&t.push(n)}),t}function kK(r){var e={};O(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),d=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),v=f.getStore(),y=0,m=v.count();y<m;++y){var x=v.get(h,y);e[d]?e[d].push(x):e[d]=[x]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function Gj(r){var e=kK(r),t=[];return O(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var v=he(n.get("barWidth"),s),y=he(n.get("barMaxWidth"),s),m=he(n.get("barMinWidth")||(Yj(n)?.5:1),s),x=n.get("barGap"),b=n.get("barCategoryGap"),T=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:v,barMaxWidth:y,barMinWidth:m,barGap:x,barCategoryGap:b,defaultBarGap:T,axisKey:pC(i),stackId:Fj(n)})}),Wj(t)}function Wj(r){var e={};O(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var d=n.barMinWidth;d&&(l[u].minWidth=d);var h=n.barGap;h!=null&&(s.gap=h);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var t={};return O(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=ot(i).length;s=Math.max(35-l*4,15)+"%"}var u=he(s,o),c=he(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),O(i,function(x){var b=x.maxWidth,T=x.minWidth;if(x.width){var C=x.width;b&&(C=Math.min(C,b)),T&&(C=Math.max(C,T)),x.width=C,f-=C+c*C,d--}else{var C=h;b&&b<C&&(C=Math.min(b,f)),T&&T>C&&(C=T),C!==h&&(x.width=C,f-=C+c*C,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var v=0,y;O(i,function(x,b){x.width||(x.width=h),y=x,v+=x.width*(1+c)}),y&&(v-=y.width*c);var m=-v/2;O(i,function(x,b){t[a][b]=t[a][b]||{bandWidth:o,offset:m,width:x.width},m+=x.width*(1+c)})}),t}function LK(r,e,t){if(r&&e){var n=r[pC(e)];return n}}function Hj(r,e){var t=Vj(r,e),n=Gj(t);O(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=Fj(a),u=n[pC(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function $j(r){return{seriesType:r,plan:Oc(),reset:function(e){if(Uj(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),f=Zi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=AK(a,i),v=Yj(e),y=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),x=t.getLayout("size"),b=t.getLayout("offset");return{progress:function(T,C){for(var k=T.count,L=v&&Za(k*3),A=v&&l&&Za(k*3),D=v&&Za(k),P=n.master.getRect(),R=d?P.width:P.height,z,B=C.getStore(),N=0;(z=T.next())!=null;){var W=B.get(f?m:o,z),$=B.get(s,z),H=h,U=void 0;f&&(U=+W-B.get(o,z));var G=void 0,X=void 0,K=void 0,V=void 0;if(d){var Y=n.dataToPoint([W,$]);if(f){var ne=n.dataToPoint([U,$]);H=ne[0]}G=H,X=Y[1]+b,K=Y[0]-H,V=x,Math.abs(K)<y&&(K=(K<0?-1:1)*y)}else{var Y=n.dataToPoint([$,W]);if(f){var ne=n.dataToPoint([$,U]);H=ne[1]}G=Y[0]+b,X=H,K=x,V=Y[1]-H,Math.abs(V)<y&&(V=(V<=0?-1:1)*y)}v?(L[N]=G,L[N+1]=X,L[N+2]=d?K:V,A&&(A[N]=d?P.x:G,A[N+1]=d?X:P.y,A[N+2]=R),D[z]=z):C.setItemLayout(z,{x:G,y:X,width:K,height:V}),N+=3}v&&C.setLayout({largePoints:L,largeDataIndices:D,largeBackgroundPoints:A,valueAxisHorizontal:d})}}}}}}function Uj(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function Yj(r){return r.pipelineContext&&r.pipelineContext.large}function AK(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var IK=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},vC=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return Nh(t.value,SI[JU(Bd(this._minLevelUnit))]||SI.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return eY(t,n,a,o,i)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=er(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(i&&t.breakTicks==="only_break")return er().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=Uu(a[1],s);o.push({value:a[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=NK(this._minLevelUnit,this._approxInterval,s,a,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=Uu(a[1],s);o.push({value:a[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var f=this.getSetting("useUTC"),d=bn.length-1,h=0;return O(o,function(v){d=Math.min(d,Ue(bn,v.time.upperTimeUnit)),h=Math.max(h,v.time.level)}),i&&er().pruneTicksByBreak(t.pruneByBreak,o,this._brkCtx.breaks,function(v){return v.value},this._approxInterval,this._extent),i&&t.breakTicks!=="none"&&er().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(v){for(var y=Math.max(Ue(bn,Uu(v.vmin,f)),Ue(bn,Uu(v.vmax,f))),m=0,x=0;x<bn.length;x++)if(!Xj(bn[x],v.vmin,v.vmax,f)){m=x;break}var b=Math.min(m,d),T=Math.max(b,y);return{level:h,lowerTimeUnit:bn[T],upperTimeUnit:bn[b]}}),o},e.prototype.calcNiceExtent=function(t){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=Zn,n[1]+=Zn),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-Zn}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,a){t=t||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var o=Bv.length,s=Math.min(IK(Bv,this._approxInterval,0,o),o-1);this._interval=Bv[s][1],this._intervalPrecision=uh(this._interval),this._minLevelUnit=Bv[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return lt(t)?t:+ci(t)},e.prototype.contain=function(t){return hC(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(Ki),Bv=[["second",RT],["minute",ET],["hour",Nd],["quarter-day",Nd*6],["half-day",Nd*12],["day",Zn*1.2],["half-week",Zn*3.5],["week",Zn*7],["month",Zn*31],["quarter",Zn*95],["half-year",xI/2],["year",xI]];function Xj(r,e,t,n){return uy(new Date(e),r,n).getTime()===uy(new Date(t),r,n).getTime()}function DK(r,e){return r/=Zn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function PK(r){var e=30*Zn;return r/=e,r>6?6:r>3?3:r>2?2:1}function RK(r){return r/=Nd,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function ID(r,e){return r/=e?ET:RT,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function EK(r){return lT(r,!0)}function zK(r,e,t){var n=Math.max(0,Ue(bn,e)-1);return uy(new Date(r),bn[n],t).getTime()}function OK(r,e){var t=new Date(0);t[r](1);var n=t.getTime();t[r](1+e);var a=t.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function NK(r,e,t,n,a,i){var o=1e4,s=ZU,l=0;function u(N,W,$,H,U,G,X){for(var K=OK(U,N),V=W,Y=new Date(V);V<$&&V<=n[1]&&(X.push({value:V}),!(l++>o));)if(Y[U](Y[H]()+N),V=Y.getTime(),i){var ne=i.calcNiceTickMultiple(V,K);ne>0&&(Y[U](Y[H]()+ne*N),V=Y.getTime())}X.push({value:V,notAdd:!0})}function c(N,W,$){var H=[],U=!W.length;if(!Xj(Bd(N),n[0],n[1],t)){U&&(W=[{value:zK(n[0],N,t)},{value:n[1]}]);for(var G=0;G<W.length-1;G++){var X=W[G].value,K=W[G+1].value;if(X!==K){var V=void 0,Y=void 0,ne=void 0,ue=!1;switch(N){case"year":V=Math.max(1,Math.round(e/Zn/365)),Y=tB(t),ne=tY(t);break;case"half-year":case"quarter":case"month":V=PK(e),Y=zT(t),ne=rB(t);break;case"week":case"half-week":case"day":V=DK(e),Y=OT(t),ne=nB(t),ue=!0;break;case"half-day":case"quarter-day":case"hour":V=RK(e),Y=NT(t),ne=aB(t);break;case"minute":V=ID(e,!0),Y=BT(t),ne=iB(t);break;case"second":V=ID(e,!1),Y=jT(t),ne=oB(t);break;case"millisecond":V=EK(e),Y=FT(t),ne=sB(t);break}K>=n[0]&&X<=n[1]&&u(V,X,K,Y,ne,ue,H),N==="year"&&$.length>1&&G===0&&$.unshift({value:$[0].value-V})}}for(var G=0;G<H.length;G++)$.push(H[G])}}for(var f=[],d=[],h=0,v=0,y=0;y<s.length;++y){var m=Bd(s[y]);if(QU(s[y])){c(s[y],f[f.length-1]||[],d);var x=s[y+1]?Bd(s[y+1]):null;if(m!==x){if(d.length){v=h,d.sort(function(N,W){return N.value-W.value});for(var b=[],T=0;T<d.length;++T){var C=d[T].value;(T===0||d[T-1].value!==C)&&(b.push(d[T]),C>=n[0]&&C<=n[1]&&h++)}var k=a/e;if(h>k*1.5&&v>k/1.5||(f.push(b),h>k||r===s[y]))break}d=[]}}}for(var L=ht(le(f,function(N){return ht(N,function(W){return W.value>=n[0]&&W.value<=n[1]&&!W.notAdd})}),function(N){return N.length>0}),A=[],D=L.length-1,y=0;y<L.length;++y)for(var P=L[y],R=0;R<P.length;++R){var z=Uu(P[R].value,t);A.push({value:P[R].value,time:{level:D-y,upperTimeUnit:z,lowerTimeUnit:z}})}A.sort(function(N,W){return N.value-W.value});for(var B=[],y=0;y<A.length;++y)(y===0||A[y].value!==A[y-1].value)&&B.push(A[y]);return B}ls.registerClass(vC);var zb=Xt,BK=Math.floor,jK=Math.ceil,jv=Math.pow,Fv=Math.log,Zj=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Ki,t}return e.prototype.getTicks=function(t){t=t||{};var n=this._extent.slice(),a=this._originalScale.getExtent(),i=r.prototype.getTicks.call(this,t),o=this.base,s=this._originalScale._innerGetBreaks(),l=er();return le(i,function(u){var c=u.value,f=null,d=jv(o,c);c===n[0]&&this._fixMin?f=a[0]:c===n[1]&&this._fixMax&&(f=a[1]);var h;if(l){var v=l.getTicksLogTransformBreak(u,o,s,Vv);h=v.vBreak,f==null&&(f=v.brkRoundingCriterion)}return f!=null&&(d=Vv(d,f)),{value:d,break:h}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var a=Rb(this.base,[t,n]);r.prototype.setExtent.call(this,a[0],a[1])},e.prototype.getExtent=function(){var t=this.base,n=r.prototype.getExtent.call(this);n[0]=jv(t,n[0]),n[1]=jv(t,n[1]);var a=this._originalScale.getExtent();return this._fixMin&&(n[0]=Vv(n[0],a[0])),this._fixMax&&(n[1]=Vv(n[1],a[1])),n},e.prototype.unionExtentFromData=function(t,n){this._originalScale.unionExtentFromData(t,n);var a=Rb(this.base,t.getApproximateExtent(n),!0);this._innerUnionExtent(a)},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent.slice(),a=this._getExtentSpanWithBreaks();if(!(!isFinite(a)||a<=0)){var i=e5(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[zb(jK(n[0]/i)*i),zb(BK(n[1]/i)*i)];this._interval=i,this._intervalPrecision=uh(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Fv(t)/Fv(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Fv(t)/Fv(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),jv(this.base,t)},e.prototype.setBreaksFromOption=function(t){var n=er();if(n){var a=n.logarithmicParseBreaksFromOption(t,this.base,ge(this.parse,this)),i=a.parsedOriginal,o=a.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e})(Ki);function Vv(r,e){return zb(r,ma(e))}ls.registerClass(Zj);var FK=(function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);i==null&&(i=t.get("startValue",!0));var o=this._modelMinRaw=i;Me(o)?this._modelMinNum=Gv(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Gv(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(Me(s)?this._modelMaxNum=Gv(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Gv(e,s)),a)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=se(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ca(u[0],1),Ca(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?a?0:NaN:t-i[0]*o),l==null&&(l=e?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Dr(s)||Dr(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[GK[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=VK[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r})(),VK={min:"_determinedMin",max:"_determinedMax"},GK={min:"_dataMin",max:"_dataMax"};function Kj(r,e,t){var n=r.rawExtentInfo;return n||(n=new FK(r,e,t),r.rawExtentInfo=n,n)}function Gv(r,e){return e==null?null:Dr(e)?NaN:r.parse(e)}function qj(r,e){var t=r.type,n=Kj(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=Vj("bar",o),l=!1;if(O(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=Gj(s),c=WK(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function WK(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=LK(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;O(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;O(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,d=c/f-c;return e+=d*(l/u),r-=d*(s/u),{min:r,max:e}}function Ll(r,e){var t=e,n=qj(r,t),a=n.extent,i=t.get("splitNumber");r instanceof Zj&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(Jj(t)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Fh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new pc({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new vC({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ls.getClass(e)||Ki)}}function HK(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Fc(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=KU(e);return function(a,i){return r.scale.getFormattedLabel(a,i,t)}}else{if(pe(e))return function(a){var i=r.scale.getLabel(a),o=e.replace("{value}",i??"");return o};if(Me(e)){if(r.type==="category")return function(a,i){return e(_y(r,a),a.value-r.scale.getExtent()[0],null)};var n=er();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),e(_y(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function _y(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function gC(r){var e=r.get("interval");return e??"auto"}function Qj(r){return r.type==="category"&&gC(r.getLabelModel())===0}function by(r,e){var t={};return O(r.mapDimensionsAll(e),function(n){t[dC(r,n)]=!0}),ot(t)}function $K(r,e,t){e&&O(by(e,t),function(n){var a=e.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}function vc(r){return r==="middle"||r==="center"}function fh(r){return r.getShallow("show")}function Jj(r){var e=r.get("breaks",!0);if(e!=null)return!er()||!UK(r.axis)?void 0:e}function UK(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var Vc=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})();function YK(r){return di(null,r)}var XK={isDimensionStacked:Zi,enableDataStack:Bj,getStackedDimension:dC};function ZK(r,e){var t=e;e instanceof rt||(t=new rt(e));var n=Fh(t);return n.setExtent(r[0],r[1]),Ll(n,t),n}function KK(r){Wt(r,Vc)}function qK(r,e){return e=e||{},wt(r,null,null,e.state!=="normal")}const QK=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:lK,createList:YK,createScale:ZK,createSymbol:Kt,createTextStyle:qK,dataStack:XK,enableHoverEmphasis:Ho,getECData:Ne,getLayoutRect:Dt,mixinAxisModelCommonMethods:KK},Symbol.toStringTag,{value:"Module"}));var JK=1e-8;function DD(r,e){return Math.abs(r-e)<JK}function rl(r,e,t){var n=0,a=r[0];if(!a)return!1;for(var i=1;i<r.length;i++){var o=r[i];n+=Ii(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!DD(a[0],s[0])||!DD(a[1],s[1]))&&(n+=Ii(a[0],a[1],s[0],s[1],e,t)),n!==0}var eq=[];function K1(r,e){for(var t=0;t<r.length;t++)Gt(r[t],r[t],e)}function PD(r,e,t,n){for(var a=0;a<r.length;a++){var i=r[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(Ri(e,e,i),Ei(t,t,i))}}function tq(r){for(var e=0,t=0,n=0,a=r.length,i=r[a-1][0],o=r[a-1][1],s=0;s<a;s++){var l=r[s][0],u=r[s][1],c=i*u-l*o;e+=c,t+=(i+l)*c,n+=(o+u)*c,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var e3=(function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r})(),RD=(function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r})(),ED=(function(){function r(e){this.type="linestring",this.points=e}return r})(),t3=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,a=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>a&&(n=o,a=l)}if(n)return tq(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return O(o,function(s){s.type==="polygon"?PD(s.exterior,a,i,t):O(s.points,function(l){PD(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new ze(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var i=0,o=a.length;i<o;i++){var s=a[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(rl(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(rl(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=o.width/o.height;a?i||(i=a/s):a=s*i;for(var l=new ze(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var d=c[f];d.type==="polygon"?(K1(d.exterior,u),O(d.interiors,function(h){K1(h,u)})):O(d.points,function(h){K1(h,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e})(e3),rq=(function(r){Q(e,r);function e(t,n){var a=r.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=Ah(eq),o=t;o&&!o.isGeoSVGGraphicRoot;)Sa(i,o.getLocalTransform(),i),o=o.parent;return Jn(i,i),Gt(a,a,i),a},e})(e3);function nq(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return O(n,function(a){var i=a.geometry,o=i.encodeOffsets,s=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=r3(s,o,t);break;case"Polygon":q1(s,o,t);break;case"MultiLineString":q1(s,o,t);break;case"MultiPolygon":O(s,function(l,u){return q1(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function q1(r,e,t){for(var n=0;n<r.length;n++)r[n]=r3(r[n],e[n],t)}function r3(r,e,t){for(var n=[],a=e[0],i=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function Ob(r,e){return r=nq(r),le(ht(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new RD(o[0],o.slice(1)));break;case"MultiPolygon":O(a.coordinates,function(l){l[0]&&i.push(new RD(l[0],l.slice(1)))});break;case"LineString":i.push(new ED([a.coordinates]));break;case"MultiLineString":i.push(new ED(a.coordinates))}var s=new t3(n[e||"name"],i,n.cp);return s.properties=n,s})}const aq=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:K_,asc:kn,getPercentWithPrecision:w7,getPixelPrecision:oT,getPrecision:ma,getPrecisionSafe:QN,isNumeric:uT,isRadianAroundZero:lc,linearMap:vt,nice:lT,numericToNumber:ai,parseDate:ci,parsePercent:he,quantile:Mg,quantity:e5,quantityExponent:gm,reformIntervals:q_,remRadian:sT,round:Xt},Symbol.toStringTag,{value:"Module"})),iq=Object.freeze(Object.defineProperty({__proto__:null,format:Nh,parse:ci,roundTime:uy},Symbol.toStringTag,{value:"Module"})),oq=Object.freeze(Object.defineProperty({__proto__:null,Arc:Eh,BezierCurve:Ac,BoundingRect:ze,Circle:fi,CompoundPath:zh,Ellipse:Rh,Group:Ae,Image:gr,IncrementalDisplayable:F5,Line:Zt,LinearGradient:Rl,Polygon:zr,Polyline:Cr,RadialGradient:bT,Rect:Qe,Ring:Lc,Sector:Er,Text:st,clipPointsByRect:MT,clipRectByRect:$5,createIcon:Dc,extendPath:W5,extendShape:G5,getShapeClass:rh,getTransform:$o,initProps:It,makeImage:TT,makePath:cc,mergePath:Cn,registerShape:na,resizePath:CT,updateProps:ct},Symbol.toStringTag,{value:"Module"})),sq=Object.freeze(Object.defineProperty({__proto__:null,addCommas:VT,capitalFirst:iY,encodeHTML:Hr,formatTime:aY,formatTpl:WT,getTextRect:rY,getTooltipMarker:lB,normalizeCssArray:Ec,toCamelCase:GT,truncateText:r9},Symbol.toStringTag,{value:"Module"})),lq=Object.freeze(Object.defineProperty({__proto__:null,bind:ge,clone:Le,curry:He,defaults:De,each:O,extend:ae,filter:ht,indexOf:Ue,inherits:Qw,isArray:se,isFunction:Me,isObject:Pe,isString:pe,map:le,merge:Ye,reduce:Qn},Symbol.toStringTag,{value:"Module"}));var uq=et(),Fd=et(),Ma={estimate:1,determine:2};function wy(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function n3(r,e){var t=le(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function cq(r,e){var t=r.getLabelModel().get("customValues");if(t){var n=Fc(r),a=r.scale.getExtent(),i=n3(r,t),o=ht(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:le(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?dq(r,e):pq(r)}function fq(r,e,t){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=n3(r,n);return{ticks:ht(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?hq(r,e):{ticks:le(r.scale.getTicks(t),function(o){return o.value})}}function dq(r,e){var t=r.getLabelModel(),n=a3(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:n}function a3(r,e,t){var n=gq(r),a=gC(e),i=t.kind===Ma.estimate;if(!i){var o=o3(n,a);if(o)return o}var s,l;Me(a)?s=u3(r,a):(l=a==="auto"?yq(r,t):a,s=l3(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return Nb(n,a,u),!0}):Nb(n,a,u),u}function hq(r,e){var t=vq(r),n=gC(e),a=o3(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),Me(n))i=u3(r,n,!0);else if(n==="auto"){var s=a3(r,r.getLabelModel(),wy(Ma.determine));o=s.labelCategoryInterval,i=le(s.labels,function(l){return l.tickValue})}else o=n,i=l3(r,o,!0);return Nb(t,n,{ticks:i,tickCategoryInterval:o})}function pq(r){var e=r.scale.getTicks(),t=Fc(r);return{labels:le(e,function(n,a){return{formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var vq=i3("axisTick"),gq=i3("axisLabel");function i3(r){return function(t){return Fd(t)[r]||(Fd(t)[r]={list:[]})}}function o3(r,e){for(var t=0;t<r.list.length;t++)if(r.list[t].key===e)return r.list[t].value}function Nb(r,e,t){return r.list.push({key:e,value:t}),t}function yq(r,e){if(e.kind===Ma.estimate){var t=r.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Fd(r).autoInterval=t,!0}),t}var n=Fd(r).autoInterval;return n??(Fd(r).autoInterval=r.calculateCategoryInterval(e))}function mq(r,e){var t=e.kind,n=Sq(r),a=Fc(r),i=(n.axisRotate-n.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],d=r.dataToCoord(f+1)-r.dataToCoord(f),h=Math.abs(d*Math.cos(i)),v=Math.abs(d*Math.sin(i)),y=0,m=0;f<=s[1];f+=u){var x=0,b=0,T=pm(a({value:f}),n.font,"center","top");x=T.width*1.3,b=T.height*1.3,y=Math.max(y,x,7),m=Math.max(m,b,7)}var C=y/h,k=m/v;isNaN(C)&&(C=1/0),isNaN(k)&&(k=1/0);var L=Math.max(0,Math.floor(Math.min(C,k)));if(t===Ma.estimate)return e.out.noPxChangeTryDetermine.push(ge(xq,null,r,L,l)),L;var A=s3(r,L,l);return A??L}function xq(r,e,t){return s3(r,e,t)==null}function s3(r,e,t){var n=uq(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=a[0],n.axisExtent1=a[1]}function Sq(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function l3(r,e,t){var n=Fc(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Qj(r),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==i[0]&&y(i[0]);for(var v=u;v<=i[1];v+=l)y(v);h&&v-l!==i[1]&&y(i[1]);function y(m){var x={value:m};s.push(t?m:{formattedLabel:n(x),rawLabel:a.getLabel(x),tickValue:m,time:void 0,break:void 0})}return s}function u3(r,e,t){var n=r.scale,a=Fc(r),i=[];return O(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var zD=[0,1],aa=(function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return oT(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(a.parse(e)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),OD(n,a.count())),vt(e,zD,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),OD(n,a.count()));var i=vt(e,n,zD,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=fq(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),a=n.ticks,i=le(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return _q(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=le(n,function(i){return le(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(e){return e=e||wy(Ma.determine),cq(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(e){return e=e||wy(Ma.determine),mq(this,e)},r})();function OD(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function _q(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;O(e,function(h){h.coord-=u/2,h.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=i[0]>i[1];d(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&d(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),d(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&d(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function d(h,v){return h=Xt(h),v=Xt(v),f?h>v:h<v}}function bq(r){var e=Je.extend(r);return Je.registerClass(e),e}function wq(r){var e=Ct.extend(r);return Ct.registerClass(e),e}function Tq(r){var e=St.extend(r);return St.registerClass(e),e}function Cq(r){var e=mt.extend(r);return mt.registerClass(e),e}var Uf=Math.PI*2,$s=ii.CMD,Mq=["top","right","bottom","left"];function kq(r,e,t,n,a){var i=t.width,o=t.height;switch(r){case"top":n.set(t.x+i/2,t.y-e),a.set(0,-1);break;case"bottom":n.set(t.x+i/2,t.y+o+e),a.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),a.set(-1,0);break;case"right":n.set(t.x+i+e,t.y+o/2),a.set(1,0);break}}function Lq(r,e,t,n,a,i,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,f=s*t+e;if(Math.abs(n-a)%Uf<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var d=n;n=Ln(a),a=Ln(d)}else n=Ln(n),a=Ln(a);n>a&&(a+=Uf);var h=Math.atan2(s,o);if(h<0&&(h+=Uf),h>=n&&h<=a||h+Uf>=n&&h+Uf<=a)return l[0]=c,l[1]=f,u-t;var v=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=t*Math.cos(a)+r,x=t*Math.sin(a)+e,b=(v-o)*(v-o)+(y-s)*(y-s),T=(m-o)*(m-o)+(x-s)*(x-s);return b<T?(l[0]=v,l[1]=y,Math.sqrt(b)):(l[0]=m,l[1]=x,Math.sqrt(T))}function Ty(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,c=t-r,f=n-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,v=h/d;s&&(v=Math.min(Math.max(v,0),1)),v*=d;var y=o[0]=r+v*c,m=o[1]=e+v*f;return Math.sqrt((y-a)*(y-a)+(m-i)*(m-i))}function c3(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(c-i)*(c-i))}var ga=[];function Aq(r,e,t){var n=c3(e.x,e.y,e.width,e.height,r.x,r.y,ga);return t.set(ga[0],ga[1]),n}function Iq(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,c=e.data,f=r.x,d=r.y,h=0;h<c.length;){var v=c[h++];h===1&&(n=c[h],a=c[h+1],i=n,o=a);var y=u;switch(v){case $s.M:i=c[h++],o=c[h++],n=i,a=o;break;case $s.L:y=Ty(n,a,c[h],c[h+1],f,d,ga,!0),n=c[h++],a=c[h++];break;case $s.C:y=PN(n,a,c[h++],c[h++],c[h++],c[h++],c[h],c[h+1],f,d,ga),n=c[h++],a=c[h++];break;case $s.Q:y=EN(n,a,c[h++],c[h++],c[h],c[h+1],f,d,ga),n=c[h++],a=c[h++];break;case $s.A:var m=c[h++],x=c[h++],b=c[h++],T=c[h++],C=c[h++],k=c[h++];h+=1;var L=!!(1-c[h++]);s=Math.cos(C)*b+m,l=Math.sin(C)*T+x,h<=1&&(i=s,o=l);var A=(f-m)*T/b+m;y=Lq(m,x,T,C,C+k,L,A,d,ga),n=Math.cos(C+k)*b+m,a=Math.sin(C+k)*T+x;break;case $s.R:i=n=c[h++],o=a=c[h++];var D=c[h++],P=c[h++];y=c3(i,o,D,P,f,d,ga);break;case $s.Z:y=Ty(n,a,i,o,f,d,ga,!0),n=i,a=o;break}y<u&&(u=y,t.set(ga[0],ga[1]))}return u}var xa=new Ee,Lt=new Ee,Ut=new Ee,Ka=new Ee,Ua=new Ee;function ND(r,e){if(r){var t=r.getTextGuideLine(),n=r.getTextContent();if(n&&t){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||Mq,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,c=r.getComputedTransform(),f=c&&Jn([],c),d=e.get("length2")||0;u&&Ut.copy(u);for(var h=0;h<o.length;h++){var v=o[h];kq(v,0,s,xa,Ka),Ee.scaleAndAdd(Lt,xa,Ka,d),Lt.transform(f);var y=r.getBoundingRect(),m=u?u.distance(Lt):r instanceof nt?Iq(Lt,r.path,Ut):Aq(Lt,y,Ut);m<l&&(l=m,Lt.transform(c),Ut.transform(c),Ut.toArray(i[0]),Lt.toArray(i[1]),xa.toArray(i[2]))}f3(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Cy=[],Qr=new Ee;function f3(r,e){if(e<=180&&e>0){e=e/180*Math.PI,xa.fromArray(r[0]),Lt.fromArray(r[1]),Ut.fromArray(r[2]),Ee.sub(Ka,xa,Lt),Ee.sub(Ua,Ut,Lt);var t=Ka.len(),n=Ua.len();if(!(t<.001||n<.001)){Ka.scale(1/t),Ua.scale(1/n);var a=Ka.dot(Ua),i=Math.cos(e);if(i<a){var o=Ty(Lt.x,Lt.y,Ut.x,Ut.y,xa.x,xa.y,Cy,!1);Qr.fromArray(Cy),Qr.scaleAndAdd(Ua,o/Math.tan(Math.PI-e));var s=Ut.x!==Lt.x?(Qr.x-Lt.x)/(Ut.x-Lt.x):(Qr.y-Lt.y)/(Ut.y-Lt.y);if(isNaN(s))return;s<0?Ee.copy(Qr,Lt):s>1&&Ee.copy(Qr,Ut),Qr.toArray(r[1])}}}}function Dq(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,xa.fromArray(r[0]),Lt.fromArray(r[1]),Ut.fromArray(r[2]),Ee.sub(Ka,Lt,xa),Ee.sub(Ua,Ut,Lt);var n=Ka.len(),a=Ua.len();if(!(n<.001||a<.001)){Ka.scale(1/n),Ua.scale(1/a);var i=Ka.dot(e),o=Math.cos(t);if(i<o){var s=Ty(Lt.x,Lt.y,Ut.x,Ut.y,xa.x,xa.y,Cy,!1);Qr.fromArray(Cy);var l=Math.PI/2,u=Math.acos(Ua.dot(e)),c=l+u-t;if(c>=l)Ee.copy(Qr,Ut);else{Qr.scaleAndAdd(Ua,s/Math.tan(Math.PI/2-c));var f=Ut.x!==Lt.x?(Qr.x-Lt.x)/(Ut.x-Lt.x):(Qr.y-Lt.y)/(Ut.y-Lt.y);if(isNaN(f))return;f<0?Ee.copy(Qr,Lt):f>1&&Ee.copy(Qr,Ut)}Qr.toArray(r[1])}}}}function Q1(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function Pq(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=Pi(n[0],n[1]),i=Pi(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=Id([],n[1],n[0],o/a),l=Id([],n[1],n[2],o/i),u=Id([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function yC(r,e,t){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=a.ignore,l=0;l<eh.length;l++){var u=eh[l],c=e[u],f=u==="normal";if(c){var d=c.get("show"),h=f?s:Te(a.states[u]&&a.states[u].ignore,s);if(h||!Te(d,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0),n&&Q1(n,!0,u,c);continue}n||(n=new Cr,r.setTextGuideLine(n),!f&&(s||!o)&&Q1(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),Q1(n,!1,u,c)}}if(n){De(n.style,t),n.style.fill=null;var y=i.get("showAbove"),m=r.textGuideLineConfig=r.textGuideLineConfig||{};m.showAbove=y||!1,n.buildPath=Pq}}function mC(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<tn.length;n++){var a=tn[n];t[a]=r.getModel([a,e])}return t}var BD=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],Rq=1,My=2,d3=Rq|My;function ky(r,e,t){t=t||d3,e?r.dirty|=t:r.dirty&=~t}function h3(r,e){return e=e||d3,r.dirty==null||!!(r.dirty&e)}function si(r){if(r)return h3(r)&&p3(r,r.label,r),r}function p3(r,e,t){var n=e.getComputedTransform();r.transform=LT(r.transform,n);var a=r.localRect=nh(r.localRect,e.getBoundingRect()),i=e.style,o=i.margin,s=t&&t.marginForce,l=t&&t.minMarginForce,u=t&&t.marginDefault,c=i.__marginType;c==null&&u&&(o=u,c=$u.textMargin);for(var f=0;f<4;f++)J1[f]=c===$u.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===$u.textMargin&&Cl(a,J1,!1,!1);var d=r.rect=nh(r.rect,a);return n&&d.applyTransform(n),c===$u.minMargin&&Cl(d,J1,!1,!1),r.axisAligned=kT(n),(r.label=r.label||{}).ignore=e.ignore,ky(r,!1),ky(r,!0,My),r}var J1=[0,0,0,0];function Eq(r,e,t){return r.transform=LT(r.transform,t),r.localRect=nh(r.localRect,e),r.rect=nh(r.rect,e),t&&r.rect.applyTransform(t),r.axisAligned=kT(t),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function Bb(r,e){if(r){r.label.x+=e.x,r.label.y+=e.y,r.label.markRedraw();var t=r.transform;t&&(t[4]+=e.x,t[5]+=e.y);var n=r.rect;n&&(n.x+=e.x,n.y+=e.y);var a=r.obb;a&&a.fromBoundingRect(r.localRect,t)}}function jb(r,e){for(var t=0;t<BD.length;t++){var n=BD[t];r[n]==null&&(r[n]=e[n])}return si(r)}function jD(r){var e=r.obb;return(!e||h3(r,My))&&(r.obb=e=e||new j5,e.fromBoundingRect(r.localRect,r.transform),ky(r,!1,My)),e}function Fb(r,e,t,n,a){var i=r.length,o=Ge[e],s=tr[e];if(i<2)return!1;r.sort(function(A,D){return A.rect[o]-D.rect[o]});for(var l=0,u,c=!1,f=0;f<i;f++){var d=r[f],h=d.rect;u=h[o]-l,u<0&&(h[o]-=u,d.label[o]-=u,c=!0),l=h[o]+h[s]}var v=r[0],y=r[i-1],m,x;b(),m<0&&k(-m,.8),x<0&&k(x,.8),b(),T(m,x,1),T(x,m,-1),b(),m<0&&L(-m),x<0&&L(x);function b(){m=v.rect[o]-t,x=n-y.rect[o]-y.rect[s]}function T(A,D,P){if(A<0){var R=Math.min(D,-A);if(R>0){C(R*P,0,i);var z=R+A;z<0&&k(-z*P,1)}else k(-A*P,1)}}function C(A,D,P){A!==0&&(c=!0);for(var R=D;R<P;R++){var z=r[R],B=z.rect;B[o]+=A,z.label[o]+=A}}function k(A,D){for(var P=[],R=0,z=1;z<i;z++){var B=r[z-1].rect,N=Math.max(r[z].rect[o]-B[o]-B[s],0);P.push(N),R+=N}if(R){var W=Math.min(Math.abs(A)/R,D);if(A>0)for(var z=0;z<i-1;z++){var $=P[z]*W;C($,0,z+1)}else for(var z=i-1;z>0;z--){var $=P[z-1]*W;C(-$,z,i)}}}function L(A){var D=A<0?-1:1;A=Math.abs(A);for(var P=Math.ceil(A/(i-1)),R=0;R<i-1;R++)if(D>0?C(P,0,R+1):C(-P,i-R-1,i),A-=P,A<=0)return}return c}function zq(r){for(var e=0;e<r.length;e++){var t=r[e],n=t.defaultAttr,a=t.labelLine;t.label.attr("ignore",n.ignore),a&&a.attr("ignore",n.labelGuideIgnore)}}function v3(r){var e=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function t(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<r.length;n++){var a=si(r[n]);if(!a.label.ignore){for(var i=a.label,o=a.labelLine,s=!1,l=0;l<e.length;l++)if(zm(a,e[l],null,{touchThreshold:.05})){s=!0;break}s?(t(i),o&&t(o)):e.push(a)}}}function zm(r,e,t,n){return!r||!e||r.label&&r.label.ignore||e.label&&e.label.ignore||!r.rect.intersect(e.rect,t,n)?!1:r.axisAligned&&e.axisAligned?!0:jD(r).intersect(jD(e),t,n)}function Oq(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function Nq(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:Oq(n&&n.shape.points)}}var FD=["align","verticalAlign","width","height","fontSize"],Zr=new zi,eS=et(),Bq=et();function Wv(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var Hv=["x","y","rotation"],jq=(function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),c=a.getBoundingRect().plain();ze.applyTransform(c,c,u),u?Zr.setLocalTransform(u):(Zr.x=Zr.y=Zr.rotation=Zr.originX=Zr.originY=0,Zr.scaleX=Zr.scaleY=1),Zr.rotation=Ln(Zr.rotation);var f=a.__hostTarget,d;if(f){d=f.getBoundingRect().plain();var h=f.getComputedTransform();ze.applyTransform(d,d,h)}var v=d&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:v,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:d,priority:d?d.width*d.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:v&&v.ignore,x:Zr.x,y:Zr.y,scaleX:Zr.scaleX,scaleY:Zr.scaleY,rotation:Zr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,a=n.get("labelLayout");(Me(a)||ot(a).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=Ne(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function a(T,C){return function(){ND(T,C)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;Me(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(Nq(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var d=!1;if(c.x!=null?(s.x=he(c.x,t),s.setStyle("x",0),d=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=he(c.y,n),s.setStyle("y",0),d=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:c.labelLinePoints}),d=!1)}var v=eS(s);v.needsUpdateLabelLine=d,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var y=0;y<FD.length;y++){var m=FD[y];s.setStyle(m,c[m]!=null?c[m]:u.style[m])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var x=o.seriesModel;if(o.dataIndex!=null){var b=o.seriesModel.getData(o.dataType);x=b.getItemModel(o.dataIndex)}s.on("drag",a(l,x.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=[];O(this._labelList,function(l){l.defaultAttr.ignore||a.push(jb({},l))});var i=ht(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=ht(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});Fb(i,0,0,t),Fb(o,1,0,n);var s=ht(a,function(l){return l.layoutOption.hideOverlap});zq(s),v3(s)},r.prototype.processLabelsOverall=function(){var e=this;O(this._chartViewList,function(t){var n=t.__model,a=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=eS(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=Ne(e),i=a.dataIndex;if(n&&i!=null){var o=t.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");yC(e,mC(s),l),ND(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),a=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Ju(e))){var i=eS(n),o=i.oldLayout,s=Ne(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var d=e.prevStates;d&&(Ue(d,"select")>=0&&n.attr(i.oldLayoutSelect),Ue(d,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),ct(n,u,t,l)}else if(n.attr(u),!Pc(n).valueAnimation){var f=Te(n.style.opacity,1);n.style.opacity=0,It(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var h=i.oldLayoutSelect={};Wv(h,u,Hv),Wv(h,n.states.select,Hv)}if(n.states.emphasis){var v=i.oldLayoutEmphasis={};Wv(v,u,Hv),Wv(v,n.states.emphasis,Hv)}q5(n,l,c,t,t)}if(a&&!a.ignore&&!a.invisible){var i=Bq(a),o=i.oldLayout,y={points:a.shape.points};o?(a.attr({shape:o}),ct(a,{shape:y},t)):(a.setShape(y),a.style.strokePercent=0,It(a,{style:{strokePercent:1}},t)),i.oldLayout=y}},r})(),tS=et();function Fq(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=tS(t).labelManager;a||(a=tS(t).labelManager=new jq),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=tS(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var rS=Math.sin,nS=Math.cos,g3=Math.PI,Us=Math.PI*2,Vq=180/g3,y3=(function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,c=!l,f=Math.abs(u),d=No(f-Us)||(c?u>=Us:-u>=Us),h=u>0?u%Us:u%Us+Us,v=!1;d?v=!0:No(f)?v=!1:v=h>=g3==!!c;var y=e+n*nS(o),m=t+a*rS(o);this._start&&this._add("M",y,m);var x=Math.round(i*Vq);if(d){var b=1/this._p,T=(c?1:-1)*(Us-b);this._add("A",n,a,x,1,+c,e+n*nS(o+T),t+a*rS(o+T)),b>.01&&this._add("A",n,a,x,0,+c,y,m)}else{var C=e+n*nS(s),k=t+a*rS(s);this._add("A",n,a,x,+v,+c,C,k)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var c=[],f=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h)){this._invalid=!0;return}c.push(Math.round(h*f)/f)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r})(),xC="none",Gq=Math.round;function Wq(r){var e=r.fill;return e!=null&&e!==xC}function Hq(r){var e=r.stroke;return e!=null&&e!==xC}var Vb=["lineCap","miterLimit","lineJoin"],$q=le(Vb,function(r){return"stroke-"+r.toLowerCase()});function Uq(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof gr){r("opacity",a);return}if(Wq(e)){var i=Qd(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;o<1&&r("fill-opacity",o)}else r("fill",xC);if(Hq(e)){var s=Qd(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*a:s.opacity*a,f=e.strokeFirst;if(u!==1&&r("stroke-width",u),f&&r("paint-order",f?"stroke":"fill"),c<1&&r("stroke-opacity",c),e.lineDash){var d=eC(t),h=d[0],v=d[1];h&&(v=Gq(v||0),r("stroke-dasharray",h.join(",")),(v||n)&&r("stroke-dashoffset",v))}for(var y=0;y<Vb.length;y++){var m=Vb[y];if(e[m]!==ny[m]){var x=e[m]||ny[m];x&&r($q[y],x)}}}}var m3="http://www.w3.org/2000/svg",x3="http://www.w3.org/1999/xlink",Yq="http://www.w3.org/2000/xmlns/",Xq="http://www.w3.org/XML/1998/namespace",VD="ecmeta_";function S3(r){return document.createElementNS(m3,r)}function dr(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function Zq(r,e){var t=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function Kq(r){return"</"+r+">"}function SC(r,e){e=e||{};var t=e.newline?`
|
|
54
|
-
`:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return Zq(o,s)+(o!=="style"?Hr(l):l||"")+(i?""+t+le(i,function(u){return n(u)}).join(t)+t:"")+Kq(o)}return n(r)}function qq(r,e,t){t=t||{};var n=t.newline?`
|
|
55
|
-
`:"",a=" {"+n,i=n+"}",o=le(ot(r),function(l){return l+a+le(ot(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=le(ot(e),function(l){return"@keyframes "+l+a+le(ot(e[l]),function(u){return u+a+le(ot(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function Gb(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function GD(r,e,t,n){return dr("svg","root",{width:r,height:e,xmlns:m3,"xmlns:xlink":x3,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var Qq=0;function _3(){return Qq++}var WD={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"},Ks="transform-origin";function Jq(r,e,t){var n=ae({},r.shape);ae(n,e),r.buildPath(t,n);var a=new y3;return a.reset(VN(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function eQ(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Ks]=t+"px "+n+"px")}var tQ={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function b3(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function rQ(r,e,t){var n=r.shape.paths,a={},i,o;if(O(n,function(l){var u=Gb(t.zrId);u.animation=!0,Om(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,d=ot(c),h=d.length;if(h){o=d[h-1];var v=c[o];for(var y in v){var m=v[y];a[y]=a[y]||{d:""},a[y].d+=m.d||""}for(var x in f){var b=f[x].animation;b.indexOf(o)>=0&&(i=b)}}}),!!i){e.d=!1;var s=b3(a,t);return i.replace(o,s)}}function HD(r){return pe(r)?WD[r]?"cubic-bezier("+WD[r]+")":rT(r)?r:"":""}function Om(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof zh){var s=rQ(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var c=a[u],f=[c.getMaxTime()/1e3+"s"],d=HD(c.getClip().easing),h=c.getDelay();d?f.push(d):f.push("linear"),h&&f.push(h/1e3+"s"),c.getLoop()&&f.push("infinite");var v=f.join(" ");l[v]=l[v]||[v,[]],l[v][1].push(c)}function y(b){var T=b[1],C=T.length,k={},L={},A={},D="animation-timing-function";function P(ye,ce,we){for(var xe=ye.getTracks(),Ie=ye.getMaxTime(),dt=0;dt<xe.length;dt++){var ke=xe[dt];if(ke.needsAnimate()){var $e=ke.keyframes,tt=ke.propName;if(we&&(tt=we(tt)),tt)for(var bt=0;bt<$e.length;bt++){var Or=$e[bt],yr=Math.round(Or.time/Ie*100)+"%",vn=HD(Or.easing),gn=Or.rawValue;(pe(gn)||lt(gn))&&(ce[yr]=ce[yr]||{},ce[yr][tt]=Or.rawValue,vn&&(ce[yr][D]=vn))}}}}for(var R=0;R<C;R++){var z=T[R],B=z.targetName;B?B==="shape"&&P(z,L):!n&&P(z,k)}for(var N in k){var W={};ey(W,r),ae(W,k[N]);var $=GN(W),H=k[N][D];A[N]=$?{transform:$}:{},eQ(A[N],W),H&&(A[N][D]=H)}var U,G=!0;for(var N in L){A[N]=A[N]||{};var X=!U,H=L[N][D];X&&(U=new ii);var K=U.len();U.reset(),A[N].d=Jq(r,L[N],U);var V=U.len();if(!X&&K!==V){G=!1;break}H&&(A[N][D]=H)}if(!G)for(var N in A)delete A[N].d;if(!n)for(var R=0;R<C;R++){var z=T[R],B=z.targetName;B==="style"&&P(z,A,function(xe){return tQ[xe]})}for(var Y=ot(A),ne=!0,ue,R=1;R<Y.length;R++){var fe=Y[R-1],Ce=Y[R];if(A[fe][Ks]!==A[Ce][Ks]){ne=!1;break}ue=A[fe][Ks]}if(ne&&ue){for(var N in A)A[N][Ks]&&delete A[N][Ks];e[Ks]=ue}if(ht(Y,function(ye){return ot(A[ye]).length>0}).length){var Be=b3(A,t);return Be+" "+b[0]+" both"}}for(var m in l){var s=y(l[m]);s&&o.push(s)}if(o.length){var x=t.zrId+"-cls-"+_3();t.cssNodes["."+x]={animation:o.join(",")},e.class=x}}function nQ(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};$D(n,e,t)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=qg(l))}var u=a.lineWidth;if(u){var c=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),$D(n,e,t)}}function $D(r,e,t,n){var a=JSON.stringify(r),i=t.cssStyleCache[a];i||(i=t.zrId+"-cls-"+_3(),t.cssStyleCache[a]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var dh=Math.round;function w3(r){return r&&pe(r.src)}function T3(r){return r&&Me(r.toDataURL)}function _C(r,e,t,n){Uq(function(a,i){var o=a==="fill"||a==="stroke";o&&FN(i)?M3(e,r,a,n):o&&aT(i)?k3(t,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),cQ(t,r,n)}function bC(r,e){var t=ZN(e);t&&(t.each(function(n,a){n!=null&&(r[(VD+a).toLowerCase()]=n+"")}),e.isSilent()&&(r[VD+"silent"]="true"))}function UD(r){return No(r[0]-1)&&No(r[1])&&No(r[2])&&No(r[3]-1)}function aQ(r){return No(r[4])&&No(r[5])}function wC(r,e,t){if(e&&!(aQ(e)&&UD(e))){var n=1e4;r.transform=UD(e)?"translate("+dh(e[4]*n)/n+" "+dh(e[5]*n)/n+")":j$(e)}}function YD(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push(dh(n[i][0]*t)/t),a.push(dh(n[i][1]*t)/t);e.points=a.join(" ")}function XD(r){return!r.smooth}function iQ(r){var e=le(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,a){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(n[o[1]]=dh(s*a)/a)}}}var oQ={circle:[iQ(["cx","cy","r"])],polyline:[YD,XD],polygon:[YD,XD]};function sQ(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function C3(r,e){var t=r.style,n=r.shape,a=oQ[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&VN(r)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&sQ(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);a[0](n,i,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var d=r.path;f&&(d.beginPath(),r.buildPath(d,r.shape),r.pathUpdated());var h=d.getVersion(),v=r,y=v.__svgPathBuilder;(v.__svgPathVersion!==h||!y||l!==v.__svgPathStrokePercent)&&(y||(y=v.__svgPathBuilder=new y3),y.reset(u),d.rebuildPath(y,l),y.generateStr(),v.__svgPathVersion=h,v.__svgPathStrokePercent=l),i.d=y.getStr()}return wC(i,r.transform),_C(i,t,r,e),bC(i,r),e.animation&&Om(r,i,e),e.emphasis&&nQ(r,i,e),dr(s,r.id+"",i)}function lQ(r,e){var t=r.style,n=t.image;if(n&&!pe(n)&&(w3(n)?n=n.src:T3(n)&&(n=n.toDataURL())),!!n){var a=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return a&&(l.x=a),i&&(l.y=i),wC(l,r.transform),_C(l,t,r,e),bC(l,r),e.animation&&Om(r,l,e),dr("image",r.id+"",l)}}function uQ(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var a=t.font||Hi,i=t.x||0,o=V$(t.y||0,Dh(a),t.textBaseline),s=F$[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(_5(t)){var u="",c=t.fontStyle,f=S5(t.fontSize);if(!parseFloat(f))return;var d=t.fontFamily||dN,h=t.fontWeight;u+="font-size:"+f+";font-family:"+d+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),h&&h!=="normal"&&(u+="font-weight:"+h+";"),l.style=u}else l.style="font: "+a;return n.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),wC(l,r.transform),_C(l,t,r,e),bC(l,r),e.animation&&Om(r,l,e),dr("text",r.id+"",l,void 0,n)}}function ZD(r,e){if(r instanceof nt)return C3(r,e);if(r instanceof gr)return lQ(r,e);if(r instanceof uc)return uQ(r,e)}function cQ(r,e,t){var n=r.style;if(G$(n)){var a=W$(r),i=t.shadowCache,o=i[a];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,h=Qd(n.shadowColor),v=h.opacity,y=h.color,m=d/2/l,x=d/2/u,b=m+" "+x;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=dr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[dr("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:b,"flood-color":y,"flood-opacity":v})]),i[a]=o}e.filter=hm(o)}}function M3(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(BN(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(jN(a))i="radialGradient",o.cx=Te(a.x,.5),o.cy=Te(a.y,.5),o.r=Te(a.r,.5);else return;for(var s=a.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=j_(s[u].offset)*100+"%",d=s[u].color,h=Qd(d),v=h.color,y=h.opacity,m={offset:f};m["stop-color"]=v,y<1&&(m["stop-opacity"]=y),l.push(dr("stop",u+"",m))}var x=dr(i,"",o,l),b=SC(x),T=n.gradientCache,C=T[b];C||(C=n.zrId+"-g"+n.gradientIdx++,T[b]=C,o.id=C,n.defs[C]=dr(i,C,o,l)),e[t]=hm(C)}function k3(r,e,t,n){var a=r.style[t],i=r.getBoundingRect(),o={},s=a.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(NN(a)){var d=a.imageWidth,h=a.imageHeight,v=void 0,y=a.image;if(pe(y)?v=y:w3(y)?v=y.src:T3(y)&&(v=y.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Rr(d,m),Rr(h,m)}else if(d==null||h==null){var x=function(R,z){if(R){var B=R.elm,N=d||z.width,W=h||z.height;R.tag==="pattern"&&(u?(W=1,N/=i.width):c&&(N=1,W/=i.height)),R.attrs.width=N,R.attrs.height=W,B&&(B.setAttribute("width",N),B.setAttribute("height",W))}},b=hT(v,null,r,function(R){l||x(L,R),x(f,R)});b&&b.width&&b.height&&(d=d||b.width,h=h||b.height)}f=dr("image","img",{href:v,width:d,height:h}),o.width=d,o.height=h}else a.svgElement&&(f=Le(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(f){var T,C;l?T=C=1:u?(C=1,T=o.width/i.width):c?(T=1,C=o.height/i.height):o.patternUnits="userSpaceOnUse",T!=null&&!isNaN(T)&&(o.width=T),C!=null&&!isNaN(C)&&(o.height=C);var k=GN(a);k&&(o.patternTransform=k);var L=dr("pattern","",o,[f]),A=SC(L),D=n.patternCache,P=D[A];P||(P=n.zrId+"-p"+n.patternIdx++,D[A]=P,o.id=P,L=n.defs[P]=dr("pattern",P,o,[f])),e[t]=hm(P)}}function fQ(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=dr("clipPath",i,o,[C3(r,t)])}e["clip-path"]=hm(i)}function KD(r){return document.createTextNode(r)}function nl(r,e,t){r.insertBefore(e,t)}function qD(r,e){r.removeChild(e)}function QD(r,e){r.appendChild(e)}function L3(r){return r.parentNode}function A3(r){return r.nextSibling}function aS(r,e){r.textContent=e}var JD=58,dQ=120,hQ=dr("","");function Wb(r){return r===void 0}function Wa(r){return r!==void 0}function pQ(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function xd(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function hh(r){var e,t=r.children,n=r.tag;if(Wa(n)){var a=r.elm=S3(n);if(TC(hQ,r),se(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&QD(a,hh(i))}else Wa(r.text)&&!Pe(r.text)&&QD(a,KD(r.text))}else r.elm=KD(r.text);return r.elm}function I3(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&nl(r,hh(i),e)}}function Ly(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(Wa(a.tag)){var i=L3(a.elm);qD(i,a.elm)}else qD(r,a.elm)}}function TC(r,e){var t,n=e.elm,a=r&&r.attrs||{},i=e.attrs||{};if(a!==i){for(t in i){var o=i[t],s=a[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t==="style"?n.style.cssText=o:t.charCodeAt(0)!==dQ?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(Yq,t,o):t.charCodeAt(3)===JD?n.setAttributeNS(Xq,t,o):t.charCodeAt(5)===JD?n.setAttributeNS(x3,t,o):n.setAttribute(t,o))}for(t in a)t in i||n.removeAttribute(t)}}function vQ(r,e,t){for(var n=0,a=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],c=t[l],f,d,h,v;n<=i&&a<=l;)o==null?o=e[++n]:s==null?s=e[--i]:u==null?u=t[++a]:c==null?c=t[--l]:xd(o,u)?(ju(o,u),o=e[++n],u=t[++a]):xd(s,c)?(ju(s,c),s=e[--i],c=t[--l]):xd(o,c)?(ju(o,c),nl(r,o.elm,A3(s.elm)),o=e[++n],c=t[--l]):xd(s,u)?(ju(s,u),nl(r,s.elm,o.elm),s=e[--i],u=t[++a]):(Wb(f)&&(f=pQ(e,n,i)),d=f[u.key],Wb(d)?nl(r,hh(u),o.elm):(h=e[d],h.tag!==u.tag?nl(r,hh(u),o.elm):(ju(h,u),e[d]=void 0,nl(r,h.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(v=t[l+1]==null?null:t[l+1].elm,I3(r,v,t,a,l)):Ly(r,e,n,i))}function ju(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(TC(r,e),Wb(e.text)?Wa(n)&&Wa(a)?n!==a&&vQ(t,n,a):Wa(a)?(Wa(r.text)&&aS(t,""),I3(t,null,a,0,a.length-1)):Wa(n)?Ly(t,n,0,n.length-1):Wa(r.text)&&aS(t,""):r.text!==e.text&&(Wa(n)&&Ly(t,n,0,n.length-1),aS(t,e.text)))}function gQ(r,e){if(xd(r,e))ju(r,e);else{var t=r.elm,n=L3(t);hh(e),n!==null&&(nl(n,e.elm,A3(t)),Ly(n,[r],0,0))}return e}var yQ=0,mQ=(function(){function r(e,t,n){if(this.type="svg",this.refreshHover=eP(),this.configLayer=eP(),this.storage=t,this._opts=n=ae({},n),this.root=e,this._id="zr"+yQ++,this._oldVNode=GD(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=S3("svg");TC(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",gQ(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return ZD(e,Gb(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=Gb(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=xQ(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=dr("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=le(ot(i.defs),function(d){return i.defs[d]});if(u.length&&o.push(dr("defs","defs",{},u)),e.animation){var c=qq(i.cssNodes,i.cssAnims,{newline:!0});if(c){var f=dr("style","stl",{},[],c);o.push(f)}}return GD(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},SC(this.renderToVNode({animation:Te(e.cssAnimation,!0),emphasis:Te(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Te(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,c=0;c<a;c++){var f=e[c];if(!f.invisible){var d=f.__clipPaths,h=d&&d.length||0,v=l&&l.length||0,y=void 0;for(y=Math.max(h-1,v-1);y>=0&&!(d&&l&&d[y]===l[y]);y--);for(var m=v-1;m>y;m--)o--,s=i[o-1];for(var x=y+1;x<h;x++){var b={};fQ(d[x],b,t);var T=dr("g","clip-g-"+u++,b,[]);(s?s.children:n).push(T),i[o++]=T,s=T}l=d;var C=ZD(f,t);C&&(s?s.children:n).push(C)}}},r.prototype.resize=function(e,t){var n=this._opts,a=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),a&&i&&(i.style.display="none",e=Yu(a,0,n),t=Yu(a,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(aT(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=$$(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r})();function eP(r){return function(){}}function xQ(r,e,t,n){var a;if(t&&t!=="none")if(a=dr("rect","bg",{width:r,height:e,x:"0",y:"0"}),FN(t))M3({fill:t},a.attrs,"fill",n);else if(aT(t))k3({style:{fill:t},dirty:Vt,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=Qd(t),o=i.color,s=i.opacity;a.attrs.fill=o,s<1&&(a.attrs["fill-opacity"]=s)}return a}function SQ(r){r.registerPainter("svg",mQ)}function tP(r,e,t){var n=pn.createCanvas(),a=e.getWidth(),i=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",r)),n.width=a*t,n.height=i*t,n}var iS=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||Jg,typeof t=="string"?o=tP(t,n,a):Pe(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(Jw(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=n,i.dpr=a,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=tP("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ze(0,0,0,0);function c(b){if(!(!b.isFinite()||b.isZero()))if(o.length===0){var T=new ze(0,0,0,0);T.copy(b),o.push(T)}else{for(var C=!1,k=1/0,L=0,A=0;A<o.length;++A){var D=o[A];if(D.intersect(b)){var P=new ze(0,0,0,0);P.copy(D),P.union(b),o[A]=P,C=!0;break}else if(l){u.copy(b),u.union(D);var R=b.width*b.height,z=D.width*D.height,B=u.width*u.height,N=B-R-z;N<k&&(k=N,L=A)}}if(l&&(o[L].union(b),C=!0),!C){var T=new ze(0,0,0,0);T.copy(b),o.push(T)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var d=t[f];if(d){var h=d.shouldBePainted(a,i,!0,!0),v=d.__isRendered&&(d.__dirty&Tn||!h)?d.getPrevPaintRect():null;v&&c(v);var y=h&&(d.__dirty&Tn||!d.__isRendered)?d.getPaintRect():null;y&&c(y)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var d=n[f],h=d&&d.shouldBePainted(a,i,!0,!0);if(d&&(!h||!d.__zr)&&d.__isRendered){var v=d.getPrevPaintRect();v&&c(v)}}var m;do{m=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var x=f+1;x<o.length;)o[f].intersect(o[x])?(m=!0,o[f].union(o[x]),o.splice(x,1)):x++;f++}}while(m);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var a=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),i.width=t*a,i.height=n*a,s&&(s.width=t*a,s.height=n*a,a!==1&&this.ctxBack.scale(a,a))},e.prototype.clear=function(t,n,a){var i=this.dom,o=this.ctx,s=i.width,l=i.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,f=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/f,l/f));var h=this.domBack;function v(y,m,x,b){if(o.clearRect(y,m,x,b),n&&n!=="transparent"){var T=void 0;if(Mh(n)){var C=n.global||n.__width===x&&n.__height===b;T=C&&n.__canvasGradient||Cb(o,n,{x:0,y:0,width:x,height:b}),n.__canvasGradient=T,n.__width=x,n.__height=b}else gN(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,T=Mb(o,n,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));o.save(),o.fillStyle=T||n,o.fillRect(y,m,x,b),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(h,y,m,x,b),o.restore())}!a||u?v(0,0,s,l):a.length&&O(a,function(y){v(y.x*f,y.y*f,y.width*f,y.height*f)})},e})(ra),rP=1e5,Ys=314159,$v=.01,_Q=.001;function bQ(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function wQ(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var TQ=(function(){function r(e,t,n,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=ae({},n||{}),this.dpr=n.devicePixelRatio||Jg,this._singleCanvas=i,this.root=e;var o=e.style;o&&(Jw(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=e,f=c.width,d=c.height;n.width!=null&&(f=n.width),n.height!=null&&(d=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=d*this.dpr,this._width=f,this._height=d;var h=new iS(c,this,this.dpr);h.__builtin__=!0,h.initContext(),l[Ys]=h,h.zlevel=Ys,s.push(Ys),this._domRoot=e}else{this._width=Yu(e,0,n),this._height=Yu(e,1,n);var u=this._domRoot=wQ(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<a.length;i++){var o=a[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(rP)),i||(i=n.ctx,i.save()),dl(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(rP)},r.prototype.paintOne=function(e,t){tC(e,t)},r.prototype._paintList=function(e,t,n,a){if(this._redrawId===a){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Yg(function(){l._paintList(e,t,n,a)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Ys).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(a){a.virtual&&e.drawImage(a.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var a=this,i=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&i.push(u)}for(var c=!0,f=!1,d=function(y){var m=i[y],x=m.ctx,b=o&&m.createRepaintRects(e,t,h._width,h._height),T=n?m.__startIndex:m.__drawIndex,C=!n&&m.incremental&&Date.now,k=C&&Date.now(),L=m.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,L,b);else if(T===m.__startIndex){var A=e[T];(!A.incremental||!A.notClear||n)&&m.clear(!1,L,b)}T===-1&&(console.error("For some unknown reason. drawIndex is -1"),T=m.__startIndex);var D,P=function(N){var W={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(D=T;D<m.__endIndex;D++){var $=e[D];if($.__inHover&&(f=!0),a._doPaintEl($,m,o,N,W,D===m.__endIndex-1),C){var H=Date.now()-k;if(H>15)break}}W.prevElClipPaths&&x.restore()};if(b)if(b.length===0)D=m.__endIndex;else for(var R=h.dpr,z=0;z<b.length;++z){var B=b[z];x.save(),x.beginPath(),x.rect(B.x*R,B.y*R,B.width*R,B.height*R),x.clip(),P(B),x.restore()}else x.save(),P(),x.restore();m.__drawIndex=D,m.__drawIndex<m.__endIndex&&(c=!1)},h=this,v=0;v<i.length;v++)d(v);return it.wxa&&O(this._layers,function(y){y&&y.ctx&&y.ctx.draw&&y.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,n,a,i,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!a||l&&l.intersect(a))&&(dl(s,e,i,o),e.setPrevPaintRect(l))}else dl(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Ys);var n=this._layers[e];return n||(n=new iS("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ye(n,this._layerConfig[e],!0):this._layerConfig[e-$v]&&Ye(n,this._layerConfig[e-$v],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,a=this._zlevelList,i=a.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&bQ(t)){if(i>0&&e>a[0]){for(l=0;l<i-1&&!(a[l]<e&&a[l+1]>e);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a];e.call(t,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,d){f.__dirty=f.__used=!1});function t(f){i&&(i.__endIndex!==f&&(i.__dirty=!0),i.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var a=e[n];if(a.zlevel!==e[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var a=e[l],u=a.zlevel,c=void 0;s!==u&&(s=u,o=0),a.incremental?(c=this.getLayer(u+_Q,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?$v:0),this._needsManuallyCompositing),c.__builtin__||lm("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),i=c),a.__dirty&Tn&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,d){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,O(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Ye(n[e],t,!0):n[e]=t;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===e||i===e+$v){var o=this._layers[i];Ye(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,a=t[e];a&&(a.dom.parentNode.removeChild(a.dom),delete t[e],n.splice(Ue(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;if(e!=null&&(a.width=e),t!=null&&(a.height=t),e=Yu(i,0,a),t=Yu(i,1,a),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Ys).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ys].dom;var t=new iS("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 a=t.dom.width,i=t.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,a,i):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];dl(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function CQ(r){r.registerPainter("canvas",TQ)}var MQ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new Ae,a=Kt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(a),a.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=Kt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=ee.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(St);function gc(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=dc(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(dc(r,e,t[o]));return i.join(" ")}}function D3(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!se(e))return e+"";for(var n=[],a=0;a<t.length;a++){var i=r.getDimensionIndex(t[a]);i>=0&&n.push(e[i])}return n.join(" ")}var Vh=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o,s){this.removeAll();var l=Kt(t,-1,-1,2,2,null,s);l.attr({z2:Te(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=kQ,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Ui(this.childAt(0))},e.prototype.downplay=function(){Yi(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=e.getSymbolZ2(t,n),c=o!==this._symbolType,f=i&&i.disableAnimation;if(c){var d=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,u,d)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(v):ct(h,v,s,n),ta(h)}if(this._updateCommon(t,n,l,a,i),c){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,It(h,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,c,f,d,h,v,y,m,x;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,d=i.focus,h=i.blurScope,y=i.labelStatesModels,m=i.hoverScale,x=i.cursorStyle,v=i.emphasisDisabled),!i||t.hasItemOption){var b=i&&i.itemModel?i.itemModel:t.getItemModel(n),T=b.getModel("emphasis");u=T.getModel("itemStyle").getItemStyle(),f=b.getModel(["select","itemStyle"]).getItemStyle(),c=b.getModel(["blur","itemStyle"]).getItemStyle(),d=T.get("focus"),h=T.get("blurScope"),v=T.get("disabled"),y=sr(b),m=T.getShallow("scale"),x=b.getShallow("cursor")}var C=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(C||0)*Math.PI/180||0);var k=Nl(t.getItemVisual(n,"symbolOffset"),a);k&&(s.x=k[0],s.y=k[1]),x&&s.attr("cursor",x);var L=t.getItemVisual(n,"style"),A=L.fill;if(s instanceof gr){var D=s.style;s.useStyle(ae({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},L))}else s.__isEmptyBrush?s.useStyle(ae({},L)):s.useStyle(L),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var P=t.getItemVisual(n,"liftZ"),R=this._z2;P!=null?R==null&&(this._z2=s.z2,s.z2+=P):R!=null&&(s.z2=R,this._z2=null);var z=o&&o.useNameLabel;vr(s,y,{labelFetcher:l,labelDataIndex:n,defaultText:B,inheritColor:A,defaultOpacity:L.opacity});function B($){return z?t.getName($):gc(t,$)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var N=s.ensureState("emphasis");N.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var W=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;N.scaleX=this._sizeX*W,N.scaleY=this._sizeY*W,this.setSymbolScale(1),Pt(this,d,h,v)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=Ne(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&Ko(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Ko(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Bc(t.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},e})(Ae);function kQ(r,e){this.parent.drift(r,e)}function oS(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function nP(r){return r!=null&&!Pe(r)&&(r={isIgnore:r}),r||{}}function aP(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:sr(e),cursorStyle:e.get("cursor")}}var Gh=(function(){function r(e){this.group=new Ae,this._SymbolCtor=e||Vh}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=nP(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=aP(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var d=c(f);if(oS(e,d,f,t)){var h=new o(e,f,l,u);h.setPosition(d),e.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,d){var h=i.getItemGraphicEl(d),v=c(f);if(!oS(e,v,f,t)){n.remove(h);return}var y=e.getItemVisual(f,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==y)n.remove(h),h=new o(e,f,l,u),h.setPosition(v);else{h.updateData(e,f,l,u);var x={x:v[0],y:v[1]};s?h.attr(x):ct(h,x,a)}n.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var d=i.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},a)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=aP(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=nP(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(oS(t,o,i,n)){var s=new this._SymbolCtor(t,i,this._seriesScope);s.traverse(a),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){is(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(a){a.fadeOut(function(){t.remove(a)},n.hostModel)}):t.removeAll()},r})();function P3(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=LQ(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=le(r.dimensions,function(v){return e.mapDimension(v)}),d=!1,h=e.getCalculationInfo("stackResultDimension");return Zi(e,f[0])&&(d=!0,f[0]=h),Zi(e,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function LQ(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:lt(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function R3(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function AQ(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function IQ(r,e,t,n,a,i,o,s){for(var l=AQ(r,e),u=[],c=[],f=[],d=[],h=[],v=[],y=[],m=P3(a,e,o),x=r.getLayout("points")||[],b=e.getLayout("points")||[],T=0;T<l.length;T++){var C=l[T],k=!0,L=void 0,A=void 0;switch(C.cmd){case"=":L=C.idx*2,A=C.idx1*2;var D=x[L],P=x[L+1],R=b[A],z=b[A+1];(isNaN(D)||isNaN(P))&&(D=R,P=z),u.push(D,P),c.push(R,z),f.push(t[L],t[L+1]),d.push(n[A],n[A+1]),y.push(e.getRawIndex(C.idx1));break;case"+":var B=C.idx,N=m.dataDimsForPoint,W=a.dataToPoint([e.get(N[0],B),e.get(N[1],B)]);A=B*2,u.push(W[0],W[1]),c.push(b[A],b[A+1]);var $=R3(m,a,e,B);f.push($[0],$[1]),d.push(n[A],n[A+1]),y.push(e.getRawIndex(B));break;case"-":k=!1}k&&(h.push(C),v.push(v.length))}v.sort(function(fe,Ce){return y[fe]-y[Ce]});for(var H=u.length,U=Za(H),G=Za(H),X=Za(H),K=Za(H),V=[],T=0;T<v.length;T++){var Y=v[T],ne=T*2,ue=Y*2;U[ne]=u[ue],U[ne+1]=u[ue+1],G[ne]=c[ue],G[ne+1]=c[ue+1],X[ne]=f[ue],X[ne+1]=f[ue+1],K[ne]=d[ue],K[ne+1]=d[ue+1],V[T]=h[Y]}return{current:U,next:G,stackedOnCurrent:X,stackedOnNext:K,status:V}}var Mo=Math.min,ko=Math.max;function ml(r,e){return isNaN(r)||isNaN(e)}function Hb(r,e,t,n,a,i,o,s,l){for(var u,c,f,d,h,v,y=t,m=0;m<n;m++){var x=e[y*2],b=e[y*2+1];if(y>=a||y<0)break;if(ml(x,b)){if(l){y+=i;continue}break}if(y===t)r[i>0?"moveTo":"lineTo"](x,b),f=x,d=b;else{var T=x-u,C=b-c;if(T*T+C*C<.5){y+=i;continue}if(o>0){for(var k=y+i,L=e[k*2],A=e[k*2+1];L===x&&A===b&&m<n;)m++,k+=i,y+=i,L=e[k*2],A=e[k*2+1],x=e[y*2],b=e[y*2+1],T=x-u,C=b-c;var D=m+1;if(l)for(;ml(L,A)&&D<n;)D++,k+=i,L=e[k*2],A=e[k*2+1];var P=.5,R=0,z=0,B=void 0,N=void 0;if(D>=n||ml(L,A))h=x,v=b;else{R=L-u,z=A-c;var W=x-u,$=L-x,H=b-c,U=A-b,G=void 0,X=void 0;if(s==="x"){G=Math.abs(W),X=Math.abs($);var K=R>0?1:-1;h=x-K*G*o,v=b,B=x+K*X*o,N=b}else if(s==="y"){G=Math.abs(H),X=Math.abs(U);var V=z>0?1:-1;h=x,v=b-V*G*o,B=x,N=b+V*X*o}else G=Math.sqrt(W*W+H*H),X=Math.sqrt($*$+U*U),P=X/(X+G),h=x-R*o*(1-P),v=b-z*o*(1-P),B=x+R*o*P,N=b+z*o*P,B=Mo(B,ko(L,x)),N=Mo(N,ko(A,b)),B=ko(B,Mo(L,x)),N=ko(N,Mo(A,b)),R=B-x,z=N-b,h=x-R*G/X,v=b-z*G/X,h=Mo(h,ko(u,x)),v=Mo(v,ko(c,b)),h=ko(h,Mo(u,x)),v=ko(v,Mo(c,b)),R=x-h,z=b-v,B=x+R*X/G,N=b+z*X/G}r.bezierCurveTo(f,d,h,v,x,b),f=B,d=N}else r.lineTo(x,b)}u=x,c=b,y+=i}return m}var E3=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),DQ=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new E3},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&ml(a[o*2-2],a[o*2-1]);o--);for(;i<o&&ml(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=Hb(t,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=ii.CMD,s,l,u=n==="x",c=[],f=0;f<i.length;){var d=i[f++],h=void 0,v=void 0,y=void 0,m=void 0,x=void 0,b=void 0,T=void 0;switch(d){case o.M:s=i[f++],l=i[f++];break;case o.L:if(h=i[f++],v=i[f++],T=u?(t-s)/(h-s):(t-l)/(v-l),T<=1&&T>=0){var C=u?(v-l)*T+l:(h-s)*T+s;return u?[t,C]:[C,t]}s=h,l=v;break;case o.C:h=i[f++],v=i[f++],y=i[f++],m=i[f++],x=i[f++],b=i[f++];var k=u?Zg(s,h,y,x,t,c):Zg(l,v,m,b,t,c);if(k>0)for(var L=0;L<k;L++){var A=c[L];if(A<=1&&A>=0){var C=u?fr(l,v,m,b,A):fr(s,h,y,x,A);return u?[t,C]:[C,t]}}s=x,l=b;break}}},e})(nt),PQ=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(E3),z3=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new PQ},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ml(a[s*2-2],a[s*2-1]);s--);for(;o<s&&ml(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=Hb(t,a,o,s,s,1,n.smooth,l,n.connectNulls);Hb(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e})(nt);function O3(r,e,t,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,c=t.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new Qe({shape:{x:o,y:s,width:l,height:u}});if(e){var d=r.getBaseAxis(),h=d.isHorizontal(),v=d.inverse;h?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var y=Me(a)?function(m){a(m,f)}:null;It(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,y)}return f}function N3(r,e,t){var n=r.getArea(),a=Xt(n.r0,1),i=Xt(n.r,1),o=new Er({shape:{cx:Xt(r.cx,1),cy:Xt(r.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,It(o,{shape:{endAngle:n.endAngle,r:i}},t)}return o}function Wh(r,e,t,n,a){if(r){if(r.type==="polar")return N3(r,e,t);if(r.type==="cartesian2d")return O3(r,e,t,n,a)}else return null;return null}function qo(r,e){return r.type===e}function iP(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function oP(r){for(var e=1/0,t=1/0,n=-1/0,a=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),a=Math.max(s,a))}return[[e,t],[n,a]]}function sP(r,e){var t=oP(r),n=t[0],a=t[1],i=oP(e),o=i[0],s=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function lP(r){return lt(r)?r:r?.5:0}function RQ(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),a=Za(n*2),i=0;i<n;i++){var o=R3(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function Lo(r,e,t,n,a){var i=t.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(a){for(l=0;l<r.length;l+=2){var h=e||r;!isNaN(h[l])&&!isNaN(h[l+1])&&d.push(r[l],r[l+1])}r=d}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var v=(c[o]+f[o])/2,y=[];u[o]=y[o]=v,u[1-o]=c[1-o],y[1-o]=f[1-o],s.push(u[0],u[1]),s.push(y[0],y[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function EQ(r,e){var t=[],n=r.length,a,i;function o(c,f,d){var h=c.coord,v=(d-h)/(f.coord-h),y=nT(v,[c.color,f.color]);return{coord:d,color:y}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)a=l;else if(u>e){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function zQ(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=e.getAxis(a),u=le(i.stops,function(T){return{coord:l.toGlobalCoord(l.dataToCoord(T.value)),color:T.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=EQ(u,a==="x"?t.getWidth():t.getHeight()),h=d.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var v=10,y=d[0].coord-v,m=d[h-1].coord+v,x=m-y;if(x<.001)return"transparent";O(d,function(T){T.offset=(T.coord-y)/x}),d.push({offset:h?d[h-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:h?d[0].offset:.5,color:f[0]||"transparent"});var b=new Rl(0,0,0,0,d,!0);return b[a]=y,b[a+"2"]=m,b}}}function OQ(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&NQ(i,e))){var o=e.mapDimension(i.dim),s={};return O(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function NQ(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(Vh.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function BQ(r,e){return isNaN(r)||isNaN(e)}function jQ(r){for(var e=r.length/2;e>0&&BQ(r[e*2-2],r[e*2-1]);e--);return e-1}function uP(r,e){return[r[e*2],r[e*2+1]]}function FQ(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+a],!(isNaN(o)||isNaN(r[u*2+1-a]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function B3(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<tn.length;e++)if(r.get([tn[e],"endLabel","show"]))return!0;return!1}function sS(r,e,t,n){if(qo(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=B3(n)?function(h,v){r._endLabelOnDuring(h,v,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),c=O3(e,t,n,function(){var h=r._endLabel;h&&t&&s.originalX!=null&&h.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,d=Math.max(f.width,f.height);u?(f.y-=d,f.height+=d*2):(f.x-=d,f.width+=d*2)}return l&&l(1,c),c}else return N3(e,t,n)}function VQ(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),a=t.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var GQ=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Ae,n=new Gh;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=ge(this._changePolyState,this)},e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],f=i.type==="polar",d=this._coordSys,h=this._symbolDraw,v=this._polyline,y=this._polygon,m=this._lineGroup,x=!n.ssr&&t.get("animation"),b=!u.isEmpty(),T=u.get("origin"),C=P3(i,s,T),k=b&&RQ(i,s,C),L=t.get("showSymbol"),A=t.get("connectNulls"),D=L&&!f&&OQ(t,s,i),P=this._data;P&&P.eachItemGraphicEl(function(fe,Ce){fe.__temp&&(o.remove(fe),P.setItemGraphicEl(Ce,null))}),L||h.remove(),o.add(m);var R=f?!1:t.get("step"),z;i&&i.getArea&&t.get("clip",!0)&&(z=i.getArea(),z.width!=null?(z.x-=.1,z.y-=.1,z.width+=.2,z.height+=.2):z.r0&&(z.r0-=.5,z.r+=.5)),this._clipShapeForSymbol=z;var B=zQ(s,i,a)||s.getVisual("style")[s.getVisual("drawType")];if(!(v&&d.type===i.type&&R===this._step))L&&h.updateData(s,{isIgnore:D,clipShape:z,disableAnimation:!0,getSymbolPoint:function(fe){return[c[fe*2],c[fe*2+1]]}}),x&&this._initSymbolLabelAnimation(s,i,z),R&&(k&&(k=Lo(k,c,i,R,A)),c=Lo(c,null,i,R,A)),v=this._newPolyline(c),b?y=this._newPolygon(c,k):y&&(m.remove(y),y=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,kl(B)),m.setClipPath(sS(this,i,!0,t));else{b&&!y?y=this._newPolygon(c,k):y&&!b&&(m.remove(y),y=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,kl(B));var N=m.getClipPath();if(N){var W=sS(this,i,!1,t);It(N,{shape:W.shape},t)}else m.setClipPath(sS(this,i,!0,t));L&&h.updateData(s,{isIgnore:D,clipShape:z,disableAnimation:!0,getSymbolPoint:function(fe){return[c[fe*2],c[fe*2+1]]}}),(!iP(this._stackedOnPoints,k)||!iP(this._points,c))&&(x?this._doUpdateAnimation(s,k,i,a,R,T,A):(R&&(k&&(k=Lo(k,c,i,R,A)),c=Lo(c,null,i,R,A)),v.setShape({points:c}),y&&y.setShape({points:c,stackedOnPoints:k})))}var $=t.getModel("emphasis"),H=$.get("focus"),U=$.get("blurScope"),G=$.get("disabled");if(v.useStyle(De(l.getLineStyle(),{fill:"none",stroke:B,lineJoin:"bevel"})),or(v,t,"lineStyle"),v.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var X=v.getState("emphasis").style;X.lineWidth=+v.style.lineWidth+1}Ne(v).seriesIndex=t.seriesIndex,Pt(v,H,U,G);var K=lP(t.get("smooth")),V=t.get("smoothMonotone");if(v.setShape({smooth:K,smoothMonotone:V,connectNulls:A}),y){var Y=s.getCalculationInfo("stackedOnSeries"),ne=0;y.useStyle(De(u.getAreaStyle(),{fill:B,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Y&&(ne=lP(Y.get("smooth"))),y.setShape({smooth:K,stackedOnSmooth:ne,smoothMonotone:V,connectNulls:A}),or(y,t,"areaStyle"),Ne(y).seriesIndex=t.seriesIndex,Pt(y,H,U,G)}var ue=this._changePolyState;s.eachItemGraphicEl(function(fe){fe&&(fe.onHoverStateChange=ue)}),this._polyline.onHoverStateChange=ue,this._data=s,this._coordSys=i,this._stackedOnPoints=k,this._points=c,this._step=R,this._valueOrigin=T,t.get("triggerLineEvent")&&(this.packEventData(t,v),y&&this.packEventData(t,y))},e.prototype.packEventData=function(t,n){Ne(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=bl(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var d=t.get("zlevel")||0,h=t.get("z")||0;u=new Vh(o,s),u.x=c,u.y=f,u.setZ(d,h);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=d,v.z=h,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else mt.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=bl(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else mt.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;oy(this._polyline,t),n&&oy(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new DQ({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new z3({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");Me(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Me(f)?f(null):f;t.eachItemGraphicEl(function(h,v){var y=h;if(y){var m=[h.x,h.y],x=void 0,b=void 0,T=void 0;if(a)if(o){var C=a,k=n.pointToCoord(m);i?(x=C.startAngle,b=C.endAngle,T=-k[1]/180*Math.PI):(x=C.r0,b=C.r,T=k[0])}else{var L=a;i?(x=L.x,b=L.x+L.width,T=h.x):(x=L.y+L.height,b=L.y,T=h.y)}var A=b===x?0:(T-x)/(b-x);l&&(A=1-A);var D=Me(f)?f(v):c*A+d,P=y.getSymbolPath(),R=P.getTextContent();y.attr({scaleX:0,scaleY:0}),y.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),R&&R.animateFrom({style:{opacity:0}},{duration:300,delay:D}),P.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(B3(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new st({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=jQ(l);c>=0&&(vr(s,sr(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?D3(o,h):gc(o,f)},enableTextSetter:!0},VQ(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),d=a.hostModel,h=d.get("connectNulls"),v=s.get("precision"),y=s.get("distance")||0,m=l.getBaseAxis(),x=m.isHorizontal(),b=m.inverse,T=n.shape,C=b?x?T.x:T.y+T.height:x?T.x+T.width:T.y,k=(x?y:0)*(b?-1:1),L=(x?0:-y)*(b?-1:1),A=x?"x":"y",D=FQ(f,C,A),P=D.range,R=P[1]-P[0],z=void 0;if(R>=1){if(R>1&&!h){var B=uP(f,P[0]);u.attr({x:B[0]+k,y:B[1]+L}),o&&(z=d.getRawValue(P[0]))}else{var B=c.getPointOn(C,A);B&&u.attr({x:B[0]+k,y:B[1]+L});var N=d.getRawValue(P[0]),W=d.getRawValue(P[1]);o&&(z=u5(a,v,N,W,D.t))}i.lastFrameIndex=P[0]}else{var $=t===1||i.lastFrameIndex>0?P[0]:0,B=uP(f,$);o&&(z=d.getRawValue($)),u.attr({x:B[0]+k,y:B[1]+L})}if(o){var H=Pc(u);typeof H.setLabelText=="function"&&H.setLabelText(z)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,d=IQ(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),h=d.current,v=d.stackedOnCurrent,y=d.next,m=d.stackedOnNext;if(o&&(v=Lo(d.stackedOnCurrent,d.current,a,o,l),h=Lo(d.current,null,a,o,l),m=Lo(d.stackedOnNext,d.next,a,o,l),y=Lo(d.next,null,a,o,l)),sP(h,y)>3e3||c&&sP(v,m)>3e3){u.stopAnimation(),u.setShape({points:y}),c&&(c.stopAnimation(),c.setShape({points:y,stackedOnPoints:m}));return}u.shape.__points=d.current,u.shape.points=h;var x={shape:{points:y}};d.current!==h&&(x.shape.__points=d.next),u.stopAnimation(),ct(u,x,f),c&&(c.setShape({points:h,stackedOnPoints:v}),c.stopAnimation(),ct(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var b=[],T=d.status,C=0;C<T.length;C++){var k=T[C].cmd;if(k==="="){var L=t.getItemGraphicEl(T[C].idx1);L&&b.push({el:L,ptIdx:C})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var A=u.shape.__points,D=0;D<b.length;D++){var P=b[D].el,R=b[D].ptIdx*2;P.x=A[R],P.y=A[R+1],P.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(mt);function Hh(r,e){return{seriesType:r,plan:Oc(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(a){var s=le(a.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Zi(n,s[0])&&(s[0]=u),Zi(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),d=n.getDimensionIndex(s[1]);return l&&{progress:function(h,v){for(var y=h.end-h.start,m=o&&Za(y*l),x=[],b=[],T=h.start,C=0;T<h.end;T++){var k=void 0;if(l===1){var L=c.get(f,T);k=a.dataToPoint(L,null,b)}else x[0]=c.get(f,T),x[1]=c.get(d,T),k=a.dataToPoint(x,null,b);o?(m[C++]=k[0],m[C++]=k[1]):v.setItemLayout(T,k.slice())}o&&v.setLayout("points",m)}}}}}}var WQ={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},HQ=function(r){return Math.round(r.length/2)};function j3(r){return{seriesType:r,reset:function(e,t,n){var a=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/h)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/h));var v=void 0;pe(i)?v=WQ[i]:Me(i)&&(v=i),v&&e.setData(a.downSample(a.mapDimension(u.dim),1/h,v,HQ))}}}}}function $Q(r){r.registerChartView(GQ),r.registerSeriesModel(MQ),r.registerLayout(Hh("line",!0)),r.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)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,j3("line"))}var ph=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)O(i.getAxes(),function(d,h){if(d.type==="category"&&n!=null){var v=d.getTicksCoords(),y=d.getTickModel().get("alignWithLabel"),m=o[h],x=n[h]==="x1"||n[h]==="y1";if(x&&!y&&(m+=1),v.length<2)return;if(v.length===2){s[h]=d.toGlobalCoord(d.getExtent()[x?1:0]);return}for(var b=void 0,T=void 0,C=1,k=0;k<v.length;k++){var L=v[k].coord,A=k===v.length-1?v[k-1].tickValue+C:v[k].tickValue;if(A===m){T=L;break}else if(A<m)b=L;else if(b!=null&&A>m){T=(L+b)/2;break}k===1&&(C=A-v[0].tickValue)}T==null&&(b?b&&(T=v[v.length-1].coord):T=v[0].coord),s[h]=d.toGlobalCoord(T)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(St);St.registerClass(ph);var UQ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return di(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=os(ph.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:ee.color.primary,borderWidth:2}},realtimeSort:!1}),e})(ph),YQ=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Ay=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new YQ},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,d=n.clockwise,h=Math.PI*2,v=d?f-c<h:c-f<h;v||(c=f-(d?h:-h));var y=Math.cos(c),m=Math.sin(c),x=Math.cos(f),b=Math.sin(f);v?(t.moveTo(y*o+a,m*o+i),t.arc(y*u+a,m*u+i,l,-Math.PI+c,c,!d)):t.moveTo(y*s+a,m*s+i),t.arc(a,i,s,c,f,!d),t.arc(x*u+a,b*u+i,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&t.arc(a,i,o,f,c,d)},e})(nt);function XQ(r,e){e=e||{};var t=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return ty(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,h=u.r0,v=(d+h)/2,y=u.startAngle,m=u.endAngle,x=(y+m)/2,b=t?Math.abs(d-h)/2:0,T=Math.cos,C=Math.sin,k=c+d*T(y),L=f+d*C(y),A="left",D="top";switch(s){case"startArc":k=c+(h-l)*T(x),L=f+(h-l)*C(x),A="center",D="top";break;case"insideStartArc":k=c+(h+l)*T(x),L=f+(h+l)*C(x),A="center",D="bottom";break;case"startAngle":k=c+v*T(y)+Uv(y,l+b,!1),L=f+v*C(y)+Yv(y,l+b,!1),A="right",D="middle";break;case"insideStartAngle":k=c+v*T(y)+Uv(y,-l+b,!1),L=f+v*C(y)+Yv(y,-l+b,!1),A="left",D="middle";break;case"middle":k=c+v*T(x),L=f+v*C(x),A="center",D="middle";break;case"endArc":k=c+(d+l)*T(x),L=f+(d+l)*C(x),A="center",D="bottom";break;case"insideEndArc":k=c+(d-l)*T(x),L=f+(d-l)*C(x),A="center",D="top";break;case"endAngle":k=c+v*T(m)+Uv(m,l+b,!0),L=f+v*C(m)+Yv(m,l+b,!0),A="left",D="middle";break;case"insideEndAngle":k=c+v*T(m)+Uv(m,-l+b,!0),L=f+v*C(m)+Yv(m,-l+b,!0),A="right",D="middle";break;default:return ty(n,a,i)}return n=n||{},n.x=k,n.y=L,n.align=A,n.verticalAlign=D,n}}function ZQ(r,e,t,n){if(lt(n)){r.setTextConfig({rotation:n});return}else if(se(e)){r.setTextConfig({rotation:0});return}var a=r.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,s=(i+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function Uv(r,e,t){return e*Math.sin(r)*(t?-1:1)}function Yv(r,e,t){return e*Math.cos(r)*(t?1:-1)}function qa(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;se(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:le(n,function(i){return Ca(i,a)})}}var lS=Math.max,uS=Math.min;function KQ(r,e){var t=r.getArea&&r.getArea();if(qo(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=a,t.width+=a*2):(t.y-=a,t.height+=a*2)}}return t}var qQ=(function(r){Q(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,a,i){this._model=t,this._removeOnRenderedListener(a),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,a):this._renderNormal(t,n,a,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){is(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,a,i){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=t.isAnimationEnabled()?t:null,h=QQ(t,u);h&&this._enableRealtimeSort(h,s,a);var v=t.get("clip",!0)||h,y=KQ(u,s);o.removeClipPath();var m=t.get("roundCap",!0),x=t.get("showBackground",!0),b=t.getModel("backgroundStyle"),T=b.get("borderRadius")||0,C=[],k=this._backgroundEls,L=i&&i.isInitSort,A=i&&i.type==="changeAxisOrder";function D(z){var B=Xv[u.type](s,z);if(!B)return null;var N=iJ(u,f,B);return N.useStyle(b.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",T):N.setShape("cornerRadius",T),C[z]=N,N}s.diff(l).add(function(z){var B=s.getItemModel(z),N=Xv[u.type](s,z,B);if(N&&(x&&D(z),!(!s.hasValue(z)||!pP[u.type](N)))){var W=!1;v&&(W=cP[u.type](y,N));var $=fP[u.type](t,s,z,N,f,d,c.model,!1,m);h&&($.forceLabelAnimation=!0),vP($,s,z,B,N,t,f,u.type==="polar"),L?$.attr({shape:N}):h?dP(h,d,$,N,z,f,!1,!1):It($,{shape:N},t,z),s.setItemGraphicEl(z,$),o.add($),$.ignore=W}}).update(function(z,B){var N=s.getItemModel(z),W=Xv[u.type](s,z,N);if(W){if(x){var $=void 0;k.length===0?$=D(B):($=k[B],$.useStyle(b.getItemStyle()),u.type==="cartesian2d"?$.setShape("r",T):$.setShape("cornerRadius",T),C[z]=$);var H=Xv[u.type](s,z),U=V3(f,H,u);ct($,{shape:U},d,z)}var G=l.getItemGraphicEl(B);if(!s.hasValue(z)||!pP[u.type](W)){o.remove(G);return}var X=!1;v&&(X=cP[u.type](y,W),X&&o.remove(G));var K=G&&(G.type==="sector"&&m||G.type==="sausage"&&!m);if(K&&(G&&ji(G,t,B),G=null),G?ta(G):G=fP[u.type](t,s,z,W,f,d,c.model,!0,m),h&&(G.forceLabelAnimation=!0),A){var V=G.getTextContent();if(V){var Y=Pc(V);Y.prevValue!=null&&(Y.prevValue=Y.value)}}else vP(G,s,z,N,W,t,f,u.type==="polar");L?G.attr({shape:W}):h?dP(h,d,G,W,z,f,!0,A):ct(G,{shape:W},t,z,null),s.setItemGraphicEl(z,G),G.ignore=X,o.add(G)}}).remove(function(z){var B=l.getItemGraphicEl(z);B&&ji(B,t,z)}).execute();var P=this._backgroundGroup||(this._backgroundGroup=new Ae);P.removeAll();for(var R=0;R<C.length;++R)P.add(C[R]);o.add(P),this._backgroundEls=C,this._data=s},e.prototype._renderLarge=function(t,n,a){this._clear(),yP(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),yP(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Wh(t.coordinateSystem,!1,t),a=this.group;n?a.setClipPath(n):a.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,a){var i=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,a),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){i._updateSortWithinSameData(n,s,o,a)},a.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,a){var i=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=a(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:le(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,a){for(var i=a.scale,o=t.mapDimension(a.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,i.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){ji(i,t,Ne(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(mt),cP={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=lS(e.x,r.x),s=uS(e.x+e.width,a),l=lS(e.y,r.y),u=uS(e.y+e.height,i),c=s<o,f=u<l;return e.x=c&&o>a?s:o,e.y=f&&l>i?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=uS(e.r,r.r),i=lS(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},fP={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new Qe({shape:ae({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?Ay:Er,c=new u({shape:n,z2:1});c.name="item";var f=F3(a);if(c.calculateTextPosition=XQ(f,{isRoundCap:u===Ay}),i){var d=c.shape,h=a?"r":"endAngle",v={};d[h]=a?n.r0:n.startAngle,v[h]=n[h],(s?ct:It)(c,{shape:v},i)}return c}};function QQ(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function dP(r,e,t,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?ct:It)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?ct:It)(t,{shape:u},c,a)}function hP(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var JQ=["x","y","width","height"],eJ=["cx","cy","r","startAngle","endAngle"],pP={cartesian2d:function(r){return!hP(r,JQ)},polar:function(r){return!hP(r,eJ)}},Xv={cartesian2d:function(r,e,t){var n=r.getItemLayout(e);if(!n)return null;var a=t?rJ(t,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function tJ(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function F3(r){return(function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}})(r)}function vP(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=qa(n.getModel("itemStyle"),c,!0);ae(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var d=n.getShallow("cursor");d&&r.attr("cursor",d);var h=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",v=sr(n);vr(r,v,{labelFetcher:i,labelDataIndex:t,defaultText:gc(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var y=r.getTextContent();if(s&&y){var m=n.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,ZQ(r,m==="outside"?h:m,F3(o),n.get(["label","rotate"]))}K5(y,v,i.getRawValue(t),function(b){return D3(e,b)});var x=n.getModel(["emphasis"]);Pt(r,x.get("focus"),x.get("blurScope"),x.get("disabled")),or(r,n),tJ(a)&&(r.style.fill="none",r.style.stroke="none",O(r.states,function(b){b.style&&(b.style.fill=b.style.stroke="none")}))}function rJ(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var nJ=(function(){function r(){}return r})(),gP=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new nJ},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<a.length;c+=3)l[i]=u,l[o]=a[c+2],s[i]=a[c+i],s[o]=a[c+o],t.rect(s[0],s[1],l[0],l[1])},e})(nt);function yP(r,e,t,n){var a=r.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),s=a.getLayout("size"),l=r.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var c=new gP({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new gP({shape:{points:a.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(a.getVisual("style")),f.style.stroke=null,Ne(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",mP),f.on("mousemove",mP)),t&&t.push(f)}var mP=Pm(function(r){var e=this,t=aJ(e,r.offsetX,r.offsetY);Ne(e).dataIndex=t>=0?t:null},30,!1);function aJ(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[a]=i[d+2],s[n]=i[d+n],s[a]=i[d+a],l[a]<0&&(s[a]+=l[a],l[a]=-l[a]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function V3(r,e,t){if(qo(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function iJ(r,e,t){var n=r.type==="polar"?Er:Qe;return new n({shape:V3(e,t,r),silent:!0,z2:0})}function oJ(r){r.registerChartView(qQ),r.registerSeriesModel(UQ),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,He(Hj,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$j("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,j3("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var xP=Math.PI*2,Zv=Math.PI/180;function sJ(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=pB(n,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*Zv,h=n.get("endAngle"),v=n.get("padAngle")*Zv;h=h==="auto"?d-xP:-h*Zv;var y=n.get("minAngle")*Zv,m=y+v,x=0;a.each(i,function(U){!isNaN(U)&&x++});var b=a.getSum(i),T=Math.PI/(b||x)*2,C=n.get("clockwise"),k=n.get("roseType"),L=n.get("stillShowZeroSum"),A=a.getDataExtent(i);A[0]=0;var D=C?1:-1,P=[d,h],R=D*v/2;_m(P,!C),d=P[0],h=P[1];var z=G3(n);z.startAngle=d,z.endAngle=h,z.clockwise=C,z.cx=s,z.cy=l,z.r=u,z.r0=c;var B=Math.abs(h-d),N=B,W=0,$=d;if(a.setLayout({viewRect:f,r:u}),a.each(i,function(U,G){var X;if(isNaN(U)){a.setItemLayout(G,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:C,cx:s,cy:l,r0:c,r:k?NaN:u});return}k!=="area"?X=b===0&&L?T:U*T:X=B/x,X<m?(X=m,N-=m):W+=U;var K=$+D*X,V=0,Y=0;v>X?(V=$+D*X/2,Y=V):(V=$+R,Y=K-R),a.setItemLayout(G,{angle:X,startAngle:V,endAngle:Y,clockwise:C,cx:s,cy:l,r0:c,r:k?vt(U,A,[c,u]):u}),$=K}),N<xP&&x)if(N<=.001){var H=B/x;a.each(i,function(U,G){if(!isNaN(U)){var X=a.getItemLayout(G);X.angle=H;var K=0,V=0;H<v?(K=d+D*(G+1/2)*H,V=K):(K=d+D*G*H+R,V=d+D*(G+1)*H-R),X.startAngle=K,X.endAngle=V}})}else T=N/W,$=d,a.each(i,function(U,G){if(!isNaN(U)){var X=a.getItemLayout(G),K=X.angle===m?m:U*T,V=0,Y=0;K<v?(V=$+D*K/2,Y=V):(V=$+R,Y=$+D*K-R),X.startAngle=V,X.endAngle=Y,$+=D*K}})})}var G3=et();function Gc(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=e.getData();a.filterSelf(function(i){for(var o=a.getName(i),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var lJ=Math.PI/180;function SP(r,e,t,n,a,i,o,s,l,u){if(r.length<2)return;function c(y){for(var m=y.rB,x=m*m,b=0;b<y.list.length;b++){var T=y.list[b],C=Math.abs(T.label.y-t),k=n+T.len,L=k*k,A=Math.sqrt(Math.abs((1-C*C/x)*L)),D=e+(A+T.len2)*a,P=D-T.label.x,R=T.targetTextWidth-P*a;W3(T,R,!0),T.label.x=D}}function f(y){for(var m={list:[],maxY:0},x={list:[],maxY:0},b=0;b<y.length;b++)if(y[b].labelAlignTo==="none"){var T=y[b],C=T.label.y>t?x:m,k=Math.abs(T.label.y-t);if(k>=C.maxY){var L=T.label.x-e-T.len2*a,A=n+T.len,D=Math.abs(L)<A?Math.sqrt(k*k/(1-L*L/A/A)):A;C.rB=D,C.maxY=k}C.list.push(T)}c(m),c(x)}for(var d=r.length,h=0;h<d;h++)if(r[h].position==="outer"&&r[h].labelAlignTo==="labelLine"){var v=r[h].label.x-u;r[h].linePoints[1][0]+=v,r[h].label.x=u}Fb(r,1,l,l+o)&&f(r)}function uJ(r,e,t,n,a,i,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<r.length;d++){var h=r[d].label;cS(r[d])||(h.x<e?(c=Math.min(c,h.x),l.push(r[d])):(f=Math.max(f,h.x),u.push(r[d])))}for(var d=0;d<r.length;d++){var v=r[d];if(!cS(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var h=v.label,y=v.linePoints,m=void 0;v.labelAlignTo==="edge"?h.x<e?m=y[2][0]-v.labelDistance-o-v.edgeDistance:m=o+a-v.edgeDistance-y[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?h.x<e?m=c-o-v.bleedMargin:m=o+a-f-v.bleedMargin:h.x<e?m=h.x-o-v.bleedMargin:m=o+a-h.x-v.bleedMargin,v.targetTextWidth=m,W3(v,m,!1)}}SP(u,e,t,n,1,a,i,o,s,f),SP(l,e,t,n,-1,a,i,o,s,c);for(var d=0;d<r.length;d++){var v=r[d];if(!cS(v)&&v.linePoints){var h=v.label,y=v.linePoints,x=v.labelAlignTo==="edge",b=h.style.padding,T=b?b[1]+b[3]:0,C=h.style.backgroundColor?0:T,k=v.rect.width+C,L=y[1][0]-y[2][0];x?h.x<e?y[2][0]=o+v.edgeDistance+k+v.labelDistance:y[2][0]=o+a-v.edgeDistance-k-v.labelDistance:(h.x<e?y[2][0]=h.x+v.labelDistance:y[2][0]=h.x-v.labelDistance,y[1][0]=y[2][0]+L),y[1][1]=y[2][1]=h.y}}}function W3(r,e,t){if(r.labelStyleWidth==null){var n=r.label,a=n.style,i=r.rect,o=a.backgroundColor,s=a.padding,l=s?s[1]+s[3]:0,u=a.overflow,c=i.width+(o?0:l);if(e<c||t){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var d=e-l,h=e<c?d:t?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",h)}H3(i,n)}}}function H3(r,e){_P.rect=r,p3(_P,e,cJ)}var cJ={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},_P={};function cS(r){return r.position==="center"}function fJ(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*lJ,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(L){L.ignore=!0}function v(L){if(!L.ignore)return!0;for(var A in L.states)if(L.states[A].ignore===!1)return!0;return!1}e.each(function(L){var A=e.getItemGraphicEl(L),D=A.shape,P=A.getTextContent(),R=A.getTextGuideLine(),z=e.getItemModel(L),B=z.getModel("label"),N=B.get("position")||z.get(["emphasis","label","position"]),W=B.get("distanceToLabelLine"),$=B.get("alignTo"),H=he(B.get("edgeDistance"),u),U=B.get("bleedMargin");U==null&&(U=Math.min(u,d)>200?10:2);var G=z.getModel("labelLine"),X=G.get("length");X=he(X,u);var K=G.get("length2");if(K=he(K,u),Math.abs(D.endAngle-D.startAngle)<o){O(P.states,h),P.ignore=!0,R&&(O(R.states,h),R.ignore=!0);return}if(v(P)){var V=(D.startAngle+D.endAngle)/2,Y=Math.cos(V),ne=Math.sin(V),ue,fe,Ce,Be;n=D.cx,a=D.cy;var ye=N==="inside"||N==="inner";if(N==="center")ue=D.cx,fe=D.cy,Be="center";else{var ce=(ye?(D.r+D.r0)/2*Y:D.r*Y)+n,we=(ye?(D.r+D.r0)/2*ne:D.r*ne)+a;if(ue=ce+Y*3,fe=we+ne*3,!ye){var xe=ce+Y*(X+l-D.r),Ie=we+ne*(X+l-D.r),dt=xe+(Y<0?-1:1)*K,ke=Ie;$==="edge"?ue=Y<0?c+H:c+u-H:ue=dt+(Y<0?-W:W),fe=ke,Ce=[[ce,we],[xe,Ie],[dt,ke]]}Be=ye?"center":$==="edge"?Y>0?"right":"left":Y>0?"left":"right"}var $e=Math.PI,tt=0,bt=B.get("rotate");if(lt(bt))tt=bt*($e/180);else if(N==="center")tt=0;else if(bt==="radial"||bt===!0){var Or=Y<0?-V+$e:-V;tt=Or}else if(bt==="tangential"&&N!=="outside"&&N!=="outer"){var yr=Math.atan2(Y,ne);yr<0&&(yr=$e*2+yr);var vn=ne>0;vn&&(yr=$e+yr),tt=yr-$e}if(i=!!tt,P.x=ue,P.y=fe,P.rotation=tt,P.setStyle({verticalAlign:"middle"}),ye){P.setStyle({align:Be});var us=P.states.select;us&&(us.x+=P.x,us.y+=P.y)}else{var gn=new ze(0,0,0,0);H3(gn,P),t.push({label:P,labelLine:R,position:N,len:X,len2:K,minTurnAngle:G.get("minTurnAngle"),maxSurfaceAngle:G.get("maxSurfaceAngle"),surfaceNormal:new Ee(Y,ne),linePoints:Ce,textAlign:Be,labelDistance:W,labelAlignTo:$,edgeDistance:H,bleedMargin:U,rect:gn,unconstrainedWidth:gn.width,labelStyleWidth:P.style.width})}A.setTextConfig({inside:ye})}}),!i&&r.get("avoidLabelOverlap")&&uJ(t,n,a,l,u,d,c,f);for(var y=0;y<t.length;y++){var m=t[y],x=m.label,b=m.labelLine,T=isNaN(x.x)||isNaN(x.y);if(x){x.setStyle({align:m.textAlign}),T&&(O(x.states,h),x.ignore=!0);var C=x.states.select;C&&(C.x+=x.x,C.y+=x.y)}if(b){var k=m.linePoints;T||!k?(O(b.states,h),b.ignore=!0):(f3(k,m.minTurnAngle),Dq(k,m.surfaceNormal,m.maxSurfaceAngle),b.setShape({points:k}),x.__hostTarget.textGuideLineConfig={anchor:new Ee(k[0][0],k[0][1])})}}}var dJ=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;i.z2=2;var o=new st;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),c=t.getItemLayout(n),f=ae(qa(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(i){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(It(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):d==="scale"?(o.shape.r=c.r0,It(o,{shape:{r:c.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),It(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,ct(o,{shape:{endAngle:c.endAngle}},s,n))}else ta(o),ct(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),or(o,l);var h=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),y=Math.cos(h)*v,m=Math.sin(h)*v,x=l.getShallow("cursor");x&&o.attr("cursor",x),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=ae({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},qa(u.getModel("itemStyle"),c)),ae(o.ensureState("select"),{x:y,y:m,shape:qa(l.getModel(["select","itemStyle"]),c)}),ae(o.ensureState("blur"),{shape:qa(l.getModel(["blur","itemStyle"]),c)});var b=o.getTextGuideLine(),T=o.getTextContent();b&&ae(b.ensureState("select"),{x:y,y:m}),ae(T.ensureState("select"),{x:y,y:m}),Pt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this,o=n.getItemModel(a),s=o.getModel("labelLine"),l=n.getItemVisual(a,"style"),u=l&&l.fill,c=l&&l.opacity;vr(i,sr(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(a,"normal")||n.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")i.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new Cr,this.setTextGuideLine(h)),yC(this,mC(o),{stroke:u,opacity:hn(s.get(["lineStyle","opacity"]),c,1)})}},e})(Er),hJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a,i){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var d=G3(t),h=new Er({shape:Le(d)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(v){var y=new dJ(o,v,u);o.setItemGraphicEl(v,y),l.add(y)}).update(function(v,y){var m=s.getItemGraphicEl(y);m.updateData(o,v,u),m.off("click"),l.add(m),o.setItemGraphicEl(v,m)}).remove(function(v){var y=s.getItemGraphicEl(v);ji(y,t,v)}).execute(),fJ(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="pie",e})(mt);function Wc(r,e,t){e=se(e)&&{coordDimensions:e}||ae({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=jc(n,e).dimensions,i=new Ur(a,r);return i.initData(n,t),i}var Hc=(function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r})(),pJ=et(),$3=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Hc(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Wc(this,{coordDimensions:["value"],encodeDefaulter:He($T,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=pJ(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=JN(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){_l(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e})(St);sY({fullType:$3.type,getCoord2:function(r){return r.getShallow("center")}});function vJ(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(lt(o)&&!isNaN(o)&&o<0)})}}}function gJ(r){r.registerChartView(hJ),r.registerSeriesModel($3),ij("pie",r.registerAction),r.registerLayout(He(sJ,"pie")),r.registerProcessor(Gc("pie")),r.registerProcessor(vJ("pie"))}var yJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:ee.color.primary}},universalTransition:{divideShape:"clone"}},e})(St),U3=4,mJ=(function(){function r(){}return r})(),xJ=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new mJ},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<U3,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<a.length;){var d=a[f++],h=a[f++];isNaN(d)||isNaN(h)||c&&!c.contain(d,h)||(s.x=d-i[0]/2,s.y=h-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,a=t.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var a=this.shape,i=a.points,o=a.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var c=u*2,f=i[c]-s/2,d=i[c+1]-l/2;if(t>=f&&n>=d&&t<=f+s&&n<=d+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<a.length;){var h=a[d++],v=a[d++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(v,u),f=Math.max(v,f)}t=this._rect=new ze(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e})(nt),SJ=(function(){function r(){this.group=new Ae}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var a=(n.endIndex-n.startIndex)*2,i=n.startIndex*4*2;t=new Float32Array(t.buffer,i,a)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var a=this._newAdded[0],i=t.getLayout("points"),o=a&&a.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),a.endIndex=e.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new xJ({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=Kt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<U3;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=Ne(e);u.seriesIndex=a.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),_J=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Hh("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new SJ:new Gh,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(mt),Y3={left:0,right:0,top:0,bottom:0},Iy=["25%","25%"],bJ=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,n){var a=zl(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&t.outerBounds&&oi(t.outerBounds,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&oi(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:Y3,outerBoundsContain:"all",outerBoundsClampWidth:Iy[0],outerBoundsClampHeight:Iy[1],backgroundColor:ee.color.transparent,borderWidth:1,borderColor:ee.color.neutral30},e})(Je),$b=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Bt).models[0]},e.type="cartesian2dAxis",e})(Je);Wt($b,Vc);var X3={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:ee.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:ee.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:ee.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[ee.color.backgroundTint,ee.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:ee.color.neutral00,borderColor:ee.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},wJ=Ye({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},X3),CC=Ye({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:ee.color.axisMinorSplitLine,width:1}}},X3),TJ=Ye({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},CC),CJ=De({logBase:10},CC);const Z3={category:wJ,value:CC,time:TJ,log:CJ};var MJ={value:1,category:1,time:1,log:1},Ub=null;function kJ(r){Ub||(Ub=r)}function $h(){return Ub}function yc(r,e,t,n){O(MJ,function(a,i){var o=Ye(Ye({},Z3[i],!0),n,!0),s=(function(l){Q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=ah(this),h=d?zl(c):{},v=f.getTheme();Ye(c,v.get(i+"Axis")),Ye(c,this.getDefaultOption()),c.type=bP(c),d&&oi(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=ch.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=$h();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",bP)}function bP(r){return r.type||(r.data?"category":"value")}var LJ=(function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return le(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ht(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),Yb=["x","y"];function wP(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var AJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Yb,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!wP(t)||!wP(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-a[0]*c,h=o[1]-i[0]*f,v=this._transform=[c,0,0,f,d,h];this._invTransform=Jn([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new ze(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Gt(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n,a){if(a=a||[],this._invTransform)return Gt(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-t,o=Math.min(a[0],a[1])-t,s=Math.max(n[0],n[1])-i+t,l=Math.max(a[0],a[1])-o+t;return new ze(i,o,s,l)},e})(LJ),K3=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(aa),Nm="expandAxisBreak",q3="collapseAxisBreak",Q3="toggleAxisBreak",MC="axisbreakchanged",IJ={type:Nm,event:MC,update:"update",refineEvent:kC},DJ={type:q3,event:MC,update:"update",refineEvent:kC},PJ={type:Q3,event:MC,update:"update",refineEvent:kC};function kC(r,e,t,n){var a=[];return O(r,function(i){a=a.concat(i.eventBreaks)}),{eventContent:{breaks:a}}}function RJ(r){r.registerAction(IJ,e),r.registerAction(DJ,e),r.registerAction(PJ,e);function e(t,n){var a=[],i=Qu(n,t);function o(s,l){O(i[s],function(u){var c=u.updateAxisBreaks(t);O(c.breaks,function(f){var d;a.push(De((d={},d[l]=u.componentIndex,d),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:a}}}var Bo=Math.PI,EJ=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],zJ=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],mc=et(),J3=et(),e4=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,a=this.recordMap,i=a[t]||(a[t]=[]);return i[n]||(i[n]={ready:{}})},r})();function OJ(r,e,t,n){var a=t.axis,i=e.ensureRecord(t),o=[],s,l=LC(r.axisName)&&vc(r.nameLocation);O(n,function(v){var y=si(v);if(!(!y||y.label.ignore)){o.push(y);var m=i.transGroup;l&&(m.transform?Jn(Yf,m.transform):Ah(Yf),y.transform&&Sa(Yf,Yf,y.transform),ze.copy(Kv,y.localRect),Kv.applyTransform(Yf),s?s.union(Kv):ze.copy(s=new ze(0,0,0,0),Kv))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(v,y){return Math.abs(v.label[u]-c)-Math.abs(y.label[u]-c)}),l&&s){var f=a.getExtent(),d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-d;s.union(new ze(d,0,h,1))}i.stOccupiedRect=s,i.labelInfoList=o}var Yf=hr(),Kv=new ze(0,0,0,0),t4=function(r,e,t,n,a,i){if(vc(r.nameLocation)){var o=i.stOccupiedRect;o&&r4(Eq({},o,i.transGroup.transform),n,a)}else n4(i.labelInfoList,i.dirVec,n,a)};function r4(r,e,t){var n=new Ee;zm(r,e,n,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&Bb(e,n)}function n4(r,e,t,n){for(var a=Ee.dot(n,e)>=0,i=0,o=r.length;i<o;i++){var s=r[a?i:o-1-i];s.label.ignore||r4(s,t,n)}}var Jr=(function(){function r(e,t,n,a){this.group=new Ae,this._axisModel=e,this._api=t,this._local={},this._shared=a||new e4(t4),this._resetCfgDetermined(n)}return r.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},a=Te(e.axisName,t.get("name")),i=t.get("nameMoveOverlap");(i==null||i==="auto")&&(i=Te(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:Te(e.nameDirection,1),tickDirection:Te(e.tickDirection,1),labelDirection:Te(e.labelDirection,1),labelOffset:Te(e.labelOffset,0),silent:Te(e.silent,!0),axisName:a,nameLocation:hn(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:LC(a)&&i,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=o;var s=new Ae({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(t);l.transGroup=this._transformGroup,l.dirVec=new Ee(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),O(NJ,function(a){e[a]&&BJ[a](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},r.innerTextLayout=function(e,t,n){var a=sT(t-e),i,o;return lc(a)?(o=n>0?"top":"bottom",i="center"):lc(a-Bo)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<Bo?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),NJ=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],BJ={axisLine:function(r,e,t,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,c=[l[0],0],f=[l[1],0],d=c[0]>f[0];u&&(Gt(c,c,u),Gt(f,f,u));var h=ae({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())$h().buildAxisBreakLine(n,a,i,v);else{var y=new Zt(ae({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},v));fc(y.shape,y.style.lineWidth),y.anid="line",a.add(y)}var m=n.get(["axisLine","symbol"]);if(m!=null){var x=n.get(["axisLine","symbolSize"]);pe(m)&&(m=[m,m]),(pe(x)||lt(x))&&(x=[x,x]);var b=Nl(n.get(["axisLine","symbolOffset"])||0,x),T=x[0],C=x[1];O([{rotate:r.rotation+Math.PI/2,offset:b[0],r:0},{rotate:r.rotation-Math.PI/2,offset:b[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(k,L){if(m[L]!=="none"&&m[L]!=null){var A=Kt(m[L],-T/2,-C/2,T,C,h.stroke,!0),D=k.r+k.offset,P=d?f:c;A.attr({rotation:k.rotate,x:P[0]+D*Math.cos(r.rotation),y:P[1]-D*Math.sin(r.rotation),silent:!0,z2:11}),a.add(A)}})}}},axisTickLabelEstimate:function(r,e,t,n,a,i,o,s){var l=CP(e,a,s);l&&TP(r,e,t,n,a,i,o,Ma.estimate)},axisTickLabelDetermine:function(r,e,t,n,a,i,o,s){var l=CP(e,a,s);l&&TP(r,e,t,n,a,i,o,Ma.determine);var u=GJ(r,a,i,n);VJ(r,e.labelLayoutList,u),WJ(r,a,i,n,r.tickDirection)},axisName:function(r,e,t,n,a,i,o,s){var l=t.ensureRecord(n);e.nameEl&&(a.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(LC(u)){var c=r.nameLocation,f=r.nameDirection,d=n.getModel("nameTextStyle"),h=n.get("nameGap")||0,v=n.axis.getExtent(),y=n.axis.inverse?-1:1,m=new Ee(0,0),x=new Ee(0,0);c==="start"?(m.x=v[0]-y*h,x.x=-y):c==="end"?(m.x=v[1]+y*h,x.x=y):(m.x=(v[0]+v[1])/2,m.y=r.labelOffset+f*h,x.y=f);var b=hr();x.transform(Qi(b,b,r.rotation));var T=n.get("nameRotate");T!=null&&(T=T*Bo/180);var C,k;vc(c)?C=Jr.innerTextLayout(r.rotation,T??r.rotation,f):(C=jJ(r.rotation,c,T||0,v),k=r.raw.axisNameAvailableWidth,k!=null&&(k=Math.abs(k/Math.sin(C.rotation)),!isFinite(k)&&(k=null)));var L=d.getFont(),A=n.get("nameTruncate",!0)||{},D=A.ellipsis,P=Tr(r.raw.nameTruncateMaxWidth,A.maxWidth,k),R=s.nameMarginLevel||0,z=new st({x:m.x,y:m.y,rotation:C.rotation,silent:Jr.isLabelSilent(n),style:wt(d,{text:u,font:L,overflow:"truncate",width:P,ellipsis:D,fill:d.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:d.get("align")||C.textAlign,verticalAlign:d.get("verticalAlign")||C.textVerticalAlign}),z2:1});if(eo({el:z,componentModel:n,itemName:u}),z.__fullText=u,z.anid="name",n.get("triggerEvent")){var B=Jr.makeAxisEventDataBase(n);B.targetType="axisName",B.name=u,Ne(z).eventData=B}i.add(z),z.updateTransform(),e.nameEl=z;var N=l.nameLayout=si({label:z,priority:z.z2,defaultAttr:{ignore:z.ignore},marginDefault:vc(c)?EJ[R]:zJ[R]});if(l.nameLocation=c,a.add(z),z.decomposeTransform(),r.shouldNameMoveOverlap&&N){var W=t.ensureRecord(n);t.resolveAxisNameOverlap(r,t,n,N,x,W)}}}};function TP(r,e,t,n,a,i,o,s){i4(e)||HJ(r,e,a,s,n,o);var l=e.labelLayoutList;$J(r,n,l,i),XJ(n,r.rotation,l);var u=r.optionHideOverlap;FJ(n,l,u),u&&v3(ht(l,function(c){return c&&!c.label.ignore})),OJ(r,t,n,l)}function jJ(r,e,t,n){var a=sT(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return lc(a-Bo/2)?(o=l?"bottom":"top",i="center"):lc(a-Bo*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<Bo*1.5&&a>Bo/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function FJ(r,e,t){if(Qj(r.axis))return;function n(s,l,u){var c=si(e[l]),f=si(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){Sd(c.label);return}if(f.suggestIgnore){Sd(f.label);return}var d=.1;if(!t){var h=[0,0,0,0];c=jb({marginForce:h},c),f=jb({marginForce:h},f)}zm(c,f,null,{touchThreshold:d})&&Sd(s?f.label:c.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;n(a,0,1),n(i,o-1,o-2)}function VJ(r,e,t){r.showMinorTicks||O(e,function(n){if(n&&n.label.ignore)for(var a=0;a<t.length;a++){var i=t[a],o=J3(i),s=mc(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){Sd(i);return}}})}function Sd(r){r&&(r.ignore=!0)}function a4(r,e,t,n,a){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Gt(o,o,e),Gt(s,s,e));var c=new Zt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});fc(c.shape,c.style.lineWidth),c.anid=a+"_"+r[l].tickValue,i.push(c);var f=J3(c);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return i}function GJ(r,e,t,n){var a=n.axis,i=n.getModel("axisTick"),o=i.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||a.scale.isBlank())return[];for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=a.getTicksCoords(),c=a4(u,t.transform,l,De(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)e.add(c[f]);return c}function WJ(r,e,t,n,a){var i=n.axis,o=n.getModel("minorTick");if(!(!r.showMinorTicks||i.scale.isBlank())){var s=i.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=a*o.get("length"),c=De(l.getLineStyle(),De(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=a4(s[f],t.transform,u,c,"minorticks_"+f),h=0;h<d.length;h++)e.add(d[h])}}function CP(r,e,t){if(i4(r)){var n=r.axisLabelsCreationContext,a=n.out.noPxChangeTryDetermine;if(t.noPxChange){for(var i=!0,o=0;o<a.length;o++)i=i&&a[o]();if(i)return!1}a.length&&(e.remove(r.labelGroup),Xb(r,null,null,null))}return!0}function HJ(r,e,t,n,a,i){var o=a.axis,s=Tr(r.raw.axisLabelShow,a.get(["axisLabel","show"])),l=new Ae;t.add(l);var u=wy(n);if(!s||o.scale.isBlank()){Xb(e,[],l,u);return}var c=a.getModel("axisLabel"),f=o.getViewLabels(u),d=(Tr(r.raw.labelRotate,c.get("rotate"))||0)*Bo/180,h=Jr.innerTextLayout(r.rotation,d,r.labelDirection),v=a.getCategories&&a.getCategories(!0),y=[],m=a.get("triggerEvent"),x=1/0,b=-1/0;O(f,function(C,k){var L,A=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(C.tickValue):C.tickValue,D=C.formattedLabel,P=C.rawLabel,R=c;if(v&&v[A]){var z=v[A];Pe(z)&&z.textStyle&&(R=new rt(z.textStyle,c,a.ecModel))}var B=R.getTextColor()||a.get(["axisLine","lineStyle","color"]),N=R.getShallow("align",!0)||h.textAlign,W=Te(R.getShallow("alignMinLabel",!0),N),$=Te(R.getShallow("alignMaxLabel",!0),N),H=R.getShallow("verticalAlign",!0)||R.getShallow("baseline",!0)||h.textVerticalAlign,U=Te(R.getShallow("verticalAlignMinLabel",!0),H),G=Te(R.getShallow("verticalAlignMaxLabel",!0),H),X=10+(((L=C.time)===null||L===void 0?void 0:L.level)||0);x=Math.min(x,X),b=Math.max(b,X);var K=new st({x:0,y:0,rotation:0,silent:Jr.isLabelSilent(a),z2:X,style:wt(R,{text:D,align:k===0?W:k===f.length-1?$:N,verticalAlign:k===0?U:k===f.length-1?G:H,fill:Me(B)?B(o.type==="category"?P:o.type==="value"?A+"":A,k):B})});K.anid="label_"+A;var V=mc(K);if(V.break=C.break,V.tickValue=A,V.layoutRotation=h.rotation,eo({el:K,componentModel:a,itemName:D,formatterParamsExtra:{isTruncated:function(){return K.isTruncated},value:P,tickIndex:k}}),m){var Y=Jr.makeAxisEventDataBase(a);Y.targetType="axisLabel",Y.value=P,Y.tickIndex=k,C.break&&(Y.break={start:C.break.parsedBreak.vmin,end:C.break.parsedBreak.vmax}),o.type==="category"&&(Y.dataIndex=A),Ne(K).eventData=Y,C.break&&YJ(a,i,K,C.break)}y.push(K),l.add(K)});var T=le(y,function(C){return{label:C,priority:mc(C).break?C.z2+(b-x+1):C.z2,defaultAttr:{ignore:C.ignore}}});Xb(e,T,l,u)}function i4(r){return!!r.labelLayoutList}function Xb(r,e,t,n){r.labelLayoutList=e,r.labelGroup=t,r.axisLabelsCreationContext=n}function $J(r,e,t,n){var a=e.get(["axisLabel","margin"]);O(t,function(i,o){var s=si(i);if(s){var l=s.label,u=mc(l);s.suggestIgnore=l.ignore,l.ignore=!1,ey(Ti,UJ),Ti.x=e.axis.dataToCoord(u.tickValue),Ti.y=r.labelOffset+r.labelDirection*a,Ti.rotation=u.layoutRotation,n.add(Ti),Ti.updateTransform(),n.remove(Ti),Ti.decomposeTransform(),ey(l,Ti),l.markRedraw(),ky(s,!0),si(s)}})}var Ti=new Qe,UJ=new Qe;function LC(r){return!!r}function YJ(r,e,t,n){t.on("click",function(a){var i={type:Nm,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};i[r.axis.dim+"AxisIndex"]=r.componentIndex,e.dispatchAction(i)})}function XJ(r,e,t){var n=er();if(n){var a=n.retrieveAxisBreakPairs(t,function(o){return o&&mc(o.label).break},!0),i=r.get(["breakLabelLayout","moveOverlap"],!0);(i===!0||i==="auto")&&O(a,function(o){$h().adjustBreakLabelPair(r.axis.inverse,e,[si(t[o[0]]),si(t[o[1]])])})}}function Dy(r,e,t){t=t||{};var n=e.axis,a={},i=n.getAxesOnZeroOf()[0],o=n.position,s=i?"onZero":o,l=n.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,d=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(i){var h=i.toGlobalCoord(i.dataToCoord(0));d[c.onZero]=Math.max(Math.min(h,d[1]),d[0])}a.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[o],a.labelOffset=i?d[c[o]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Tr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate=s==="top"?-y:y,a.z2=1,a}function ZJ(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function MP(r){var e={xAxisModel:null,yAxisModel:null};return O(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,Bt).models[0];e[n]=i}),e}function KJ(r,e,t,n,a,i){for(var o=Dy(r,t),s=!1,l=!1,u=0;u<e.length;u++)Pb(e[u].getOtherAxis(t.axis).scale)&&(s=l=!0,t.axis.type==="category"&&t.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=i,new Jr(t,n,o,a)}function qJ(r,e,t){var n=Dy(e,t);r.updateCfg(n)}function o4(r,e,t){var n=Ki.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,{expandToNicedExtent:!0}),o=a.length-1,s=n.getInterval.call(t),l=qj(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;r.type==="log"&&(u=Rb(r.base,u,!0)),r.setBreaksFromOption(Jj(e)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var h=n.getInterval.call(r),v=u[0],y=u[1];if(c&&f)h=(y-v)/o;else if(c)for(y=u[0]+h*o;y<u[1]&&isFinite(y)&&isFinite(u[1]);)h=Z1(h),y=u[0]+h*o;else if(f)for(v=u[1]-h*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)h=Z1(h),v=u[1]-h*o;else{var m=r.getTicks().length-1;m>o&&(h=Z1(h));var x=h*o;y=Math.ceil(u[1]/h)*h,v=Xt(y-x),v<0&&u[0]>=0?(v=0,y=Xt(x)):y>0&&u[1]<=0&&(y=0,v=-Xt(x))}var b=(a[0].value-i[0].value)/s,T=(a[o].value-i[o].value)/s;n.setExtent.call(r,v+h*b,y+h*T),n.setInterval.call(r,h),(b||T)&&n.setNiceExtent.call(r,v+h,y-h)}var kP=[[3,1],[0,2]],QJ=(function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Yb,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=ot(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],v=h.model,y=h.scale;Pb(y)&&v.get("alignTicks")&&v.get("interval")==null?c.push(h):(Ll(y,v),Pb(y)&&(s=h))}c.length&&(s||(s=c.pop(),Ll(s.scale,s.model)),O(c,function(m){o4(m.scale,m.model,s.scale)}))}}a(n.x),a(n.y);var i={};O(n.x,function(o){LP(n,"y",o,i)}),O(n.y,function(o){LP(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=lr(e,t),i=this._rect=Dt(e.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(Zb(o,i),!n){var u=tee(i,s,o,l,t),c=void 0;if(l)Kb?(Kb(this._axesList,i),Zb(o,i)):c=DP(i.clone(),"axisLabel",null,i,o,u,a);else{var f=ree(e,i,a),d=f.outerBoundsRect,h=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;d&&(c=DP(d,h,v,i,o,u,a))}s4(i,o,Ma.determine,null,c,a)}O(this._coordsList,function(y){y.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}Pe(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===e||i[a].getAxis("y").index===t)return i[a]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",Bt).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",Bt).models[0],i=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,Ue(o,s)<0&&(s=null);else if(n&&a)s=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(a)l=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,O(s.x,function(c,f){O(s.y,function(d,h){var v="x"+f+"y"+h,y=new AJ(v);y.master=a,y.model=e,a._coordsMap[v]=y,a._coordsList.push(y),y.addAxis(c),y.addAxis(d)})});function u(c){return function(f,d){if(fS(f,e)){var h=f.get("position");c==="x"?h!=="top"&&h!=="bottom"&&(h=o.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=o.left?"right":"left"),o[h]=!0;var v=new K3(c,Fh(f),[0,0],f.get("type"),h),y=v.type==="category";v.onBand=y&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=i,v.index=d,i._axesList.push(v),s[c][d]=v,l[c]++}}}},r.prototype._updateScale=function(e,t){O(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),e.eachSeries(function(a){if(ZJ(a)){var i=MP(a),o=i.xAxisModel,s=i.yAxisModel;if(!fS(o,t)||!fS(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(a,i){O(by(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return O(this.getCartesians(),function(a){var i=e!=null&&e!=="auto"?a.getAxis(e):a.getBaseAxis(),o=a.getOtherAxis(i);Ue(t,i)<0&&t.push(i),Ue(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(a,i){var o=new r(a,e,t);o.name="grid_"+i,o.resize(a,t,!0),a.coordinateSystem=o,n.push(o)}),e.eachSeries(function(a){Bh({targetModel:a,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var o=MP(a),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},r.dimensions=Yb,r})();function fS(r,e){return r.getCoordSysModel()===e}function LP(r,e,t,n){t.getAxesOnZeroOf=function(){return i?[i]:[]};var a=r[e],i,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)AP(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&AP(a[u])&&!n[c(a[u])]){i=a[u];break}i&&(n[c(i)]=!0);function c(f){return f.dim+"_"+f.index}}function AP(r){return r&&r.type!=="category"&&r.type!=="time"&&HK(r)}function JJ(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(a){return a+e}:function(a){return n-a+e},r.toLocalCoord=r.dim==="x"?function(a){return a-e}:function(a){return n-a+e}}function Zb(r,e){O(r.x,function(t){return IP(t,e.x,e.width)}),O(r.y,function(t){return IP(t,e.y,e.height)})}function IP(r,e,t){var n=[0,t],a=r.inverse?1:0;r.setExtent(n[a],n[1-a]),JJ(r,e)}var Kb;function eee(r){Kb=r}function DP(r,e,t,n,a,i,o){s4(n,a,Ma.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=ns(s,function(d){return d>0})==null;return Cl(n,s,!0,!0,t),Zb(a,n),l;function u(d){O(a[Ge[d]],function(h){if(fh(h.model)){var v=i.ensureRecord(h.model),y=v.labelInfoList;if(y)for(var m=0;m<y.length;m++){var x=y[m],b=h.scale.normalize(mc(x.label).tickValue);b=d===1?1-b:b,c(x.rect,d,b),c(x.rect,1-d,NaN)}var T=v.nameLayout;if(T){var b=vc(v.nameLocation)?.5:NaN;c(T.rect,d,b),c(T.rect,1-d,NaN)}}})}function c(d,h,v){var y=r[Ge[h]]-d[Ge[h]],m=d[tr[h]]+d[Ge[h]]-(r[tr[h]]+r[Ge[h]]);y=f(y,1-v),m=f(m,v);var x=kP[h][0],b=kP[h][1];s[x]=Yt(s[x],y),s[b]=Yt(s[b],m)}function f(d,h){return d>0&&!Dr(h)&&h>1e-4&&(d/=h),d}}function tee(r,e,t,n,a){var i=new e4(nee);return O(t,function(o){return O(o,function(s){if(fh(s.model)){var l=!n;s.axisBuilder=KJ(r,e,s.model,a,i,l)}})}),i}function s4(r,e,t,n,a,i){var o=t===Ma.determine;O(e,function(u){return O(u,function(c){fh(c.model)&&(qJ(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Ge[1-u]]=r[tr[u]]<=i.refContainer[tr[u]]*.5?0:1-u===1?2:1}O(e,function(u,c){return O(u,function(f){fh(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function ree(r,e,t){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=e.clone():(a==null||a==="auto")&&(n=Dt(r.get("outerBounds",!0)||Y3,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||Ue(["all","axisLabel"],i)<0?o="all":o=i;var s=[ry(Te(r.get("outerBoundsClampWidth",!0),Iy[0]),e.width),ry(Te(r.get("outerBoundsClampHeight",!0),Iy[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var nee=function(r,e,t,n,a,i){var o=t.axis.dim==="x"?"y":"x";t4(r,e,t,n,a,i),vc(r.nameLocation)||O(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&n4(s.labelInfoList,s.dirVec,n,a)})};function aee(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return iee(t,r,e),t.seriesInvolved&&see(t,r),t}function iee(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];O(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=vh(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(O(s.getAxes(),He(y,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var d=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(f.get(["axisPointer","axis"]));(d||h)&&O(v.baseAxes,He(y,h?"cross":!0,d)),h&&O(v.otherAxes,He(y,"cross",!1))}function y(m,x,b){var T=b.model.getModel("axisPointer",a),C=T.get("show");if(!(!C||C==="auto"&&!m&&!qb(T))){x==null&&(x=T.get("triggerTooltip")),T=m?oee(b,f,a,e,m,x):T;var k=T.get("snap"),L=T.get("triggerEmphasis"),A=vh(b.model),D=x||k||b.type==="category",P=r.axesInfo[A]={key:A,axis:b,coordSys:s,axisPointerModel:T,triggerTooltip:x,triggerEmphasis:L,involveSeries:D,snap:k,useHandle:qb(T),seriesModels:[],linkGroup:null};u[A]=P,r.seriesInvolved=r.seriesInvolved||D;var R=lee(i,b);if(R!=null){var z=o[R]||(o[R]={axesInfo:{}});z.axesInfo[A]=P,z.mapper=i[R].mapper,P.linkGroup=z}}}})}function oee(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};O(s,function(d){l[d]=Le(o.get(d))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&De(u,f.textStyle)}}return r.model.getModel("axisPointer",new rt(l,t,n))}function see(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||O(r.coordSysAxesInfo[vh(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function lee(r,e){for(var t=e.model,n=e.dim,a=0;a<r.length;a++){var i=r[a]||{};if(dS(i[n+"AxisId"],t.id)||dS(i[n+"AxisIndex"],t.componentIndex)||dS(i[n+"AxisName"],t.name))return a}}function dS(r,e){return r==="all"||se(r)&&Ue(r,e)>=0||r===e}function uee(r){var e=AC(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=qb(t);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function AC(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[vh(r)]}function cee(r){var e=AC(r);return e&&e.axisPointerModel}function qb(r){return!!r.get(["handle","show"])}function vh(r){return r.type+"||"+r.id}var PP={},Bl=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.axisPointerClass&&uee(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,a,!0)},e.prototype.updateAxisPointer=function(t,n,a,i){this._doUpdateAxisPointerClass(t,a,!1)},e.prototype.remove=function(t,n){var a=this._axisPointer;a&&a.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,a){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var o=cee(t);o?(this._axisPointer||(this._axisPointer=new i)).render(t,o,n,a):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){PP[t]=n},e.getAxisPointerClass=function(t){return t&&PP[t]},e.type="axis",e})(Ct),Qb=et();function l4(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=Qb(r).splitAreaColors,d=be(),h=0;if(f)for(var v=0;v<u.length;v++){var y=f.get(u[v].tickValue);if(y!=null){h=(y+(c-1)*v)%c;break}}var m=a.toGlobalCoord(u[0].coord),x=o.getAreaStyle();s=se(s)?s:[s];for(var v=1;v<u.length;v++){var b=a.toGlobalCoord(u[v].coord),T=void 0,C=void 0,k=void 0,L=void 0;a.isHorizontal()?(T=m,C=l.y,k=b-T,L=l.height,m=T+k):(T=l.x,C=m,k=l.width,L=b-C,m=C+L);var A=u[v-1].tickValue;A!=null&&d.set(A,h),e.add(new Qe({anid:A!=null?"area_"+A:null,shape:{x:T,y:C,width:k,height:L},style:De({fill:s[h]},x),autoBatch:!0,silent:!0})),h=(h+1)%c}Qb(r).splitAreaColors=d}}}function u4(r){Qb(r).splitAreaColors=null}var fee=["splitArea","splitLine","minorSplitLine","breakArea"],c4=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ae,this.group.add(this._axisGroup),!!fh(t)){this._axisGroup.add(t.axis.axisBuilder.group),O(fee,function(l){t.get([l,"show"])&&dee[l](this,this._axisGroup,t,t.getCoordSysModel(),a)},this);var s=i&&i.type==="changeAxisOrder"&&i.isInitSort;s||Oh(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){u4(this)},e.type="cartesianAxis",e})(Bl),dee={splitLine:function(r,e,t,n,a){var i=t.axis;if(!i.scale.isBlank()){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=se(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=i.isHorizontal(),h=0,v=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],m=[],x=s.getLineStyle(),b=0;b<v.length;b++){var T=i.toGlobalCoord(v[b].coord);if(!(b===0&&!u||b===v.length-1&&!c)){var C=v[b].tickValue;d?(y[0]=T,y[1]=f.y,m[0]=T,m[1]=f.y+f.height):(y[0]=f.x,y[1]=T,m[0]=f.x+f.width,m[1]=T);var k=h++%l.length,L=new Zt({anid:C!=null?"line_"+C:null,autoBatch:!0,shape:{x1:y[0],y1:y[1],x2:m[0],y2:m[1]},style:De({stroke:l[k]},x),silent:!0});fc(L.shape,x.lineWidth),e.add(L)}}}},minorSplitLine:function(r,e,t,n,a){var i=t.axis,o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var f=[],d=[],h=s.getLineStyle(),v=0;v<c.length;v++)for(var y=0;y<c[v].length;y++){var m=i.toGlobalCoord(c[v][y].coord);u?(f[0]=m,f[1]=l.y,d[0]=m,d[1]=l.y+l.height):(f[0]=l.x,f[1]=m,d[0]=l.x+l.width,d[1]=m);var x=new Zt({anid:"minor_line_"+c[v][y].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0});fc(x.shape,h.lineWidth),e.add(x)}},splitArea:function(r,e,t,n,a){l4(r,e,t,n)},breakArea:function(r,e,t,n,a){var i=$h(),o=t.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,r,t,n.coordinateSystem.getRect(),a)}},f4=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(c4),hee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=f4.type,t}return e.type="yAxis",e})(c4),pee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new Qe({shape:t.coordinateSystem.getRect(),style:De({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(Ct),RP={offset:0};function d4(r){r.registerComponentView(pee),r.registerComponentModel(bJ),r.registerCoordinateSystem("cartesian2d",QJ),yc(r,"x",$b,RP),yc(r,"y",$b,RP),r.registerComponentView(f4),r.registerComponentView(hee),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function vee(r,e){var t=r.coordinateSystem,n=t&&t.type,a=t&&t.getBaseAxis&&t.getBaseAxis(),i=a&&a.scale&&a.scale.type,o=n==="cartesian2d"&&i==="ordinal"||n==="single",s=e.model.get("jitter")>0;return o&&s}var gee=et();function EP(r,e,t,n){if(r instanceof K3){var a=r.scale.type;if(a!=="category"&&a!=="ordinal")return t}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?h4(t,o,u,n):yee(r,e,t,n,o,l):t}function h4(r,e,t,n){if(t===null)return r+(Math.random()-.5)*e;var a=t-n*2,i=Math.min(Math.max(0,e),a);return r+(Math.random()-.5)*i}function yee(r,e,t,n,a,i){var o=gee(r);o.items||(o.items=[]);var s=o.items,l=zP(s,e,t,n,a,i,1),u=zP(s,e,t,n,a,i,-1),c=Math.abs(l-t)<Math.abs(u-t)?l:u,f=r.scale.type==="ordinal"?r.getBandWidth():null,d=Math.abs(c-t);return d>a/2||f&&d>f/2-n?h4(t,a,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function zP(r,e,t,n,a,i,o){for(var s=t,l=0;l<r.length;l++){var u=r[l],c=e-u.fixedCoord,f=s-u.floatCoord,d=c*c+f*f,h=n+u.r+i;if(d<h*h){var v=u.floatCoord+Math.sqrt(h*h-c*c)*o;if(Math.abs(v-t)>a/2)return Number.MAX_VALUE;if(o===1&&v>s||o===-1&&v<s){s=v,l=-1;continue}}}return s}function mee(r){r.eachSeriesByType("scatter",function(e){var t=e.coordinateSystem;if(t&&(t.type==="cartesian2d"||t.type==="single")){var n=t.getBaseAxis?t.getBaseAxis():null,a=n&&vee(e,n);if(a){var i=e.getData();i.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=i.getItemLayout(o),f=i.getItemVisual(o,"symbolSize"),d=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var h=EP(n,c[0],c[1],d/2);i.setItemLayout(o,[c[0],h])}else if(s==="x"||s==="single"&&!u){var h=EP(n,c[1],c[0],d/2);i.setItemLayout(o,[h,c[1]])}})}}})}function xee(r){Ze(d4),r.registerSeriesModel(yJ),r.registerChartView(_J),r.registerLayout(Hh("scatter"))}function See(r){r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,mee)}function _ee(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],a=e.coordinateSystem;if(a){var i=a.getIndicatorAxes();O(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){n[u]=n[u]||[];var c=a.dataToPoint(l,s);n[u][s]=OP(c)?c:NP(a)})}),t.each(function(o){var s=ns(n[o],function(l){return OP(l)})||NP(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function OP(r){return!isNaN(r[0])&&!isNaN(r[1])}function NP(r){return[r.cx,r.cy]}function bee(r){var e=r.polar;if(e){se(e)||(e=[e]);var t=[];O(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],se(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}O(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var wee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(d,h){var v=d.getItemVisual(h,"symbol")||"circle";if(v!=="none"){var y=Bc(d.getItemVisual(h,"symbolSize")),m=Kt(v,-1,-1,2,2),x=d.getItemVisual(h,"symbolRotate")||0;return m.attr({style:{strokeNoScale:!0},z2:100,scaleX:y[0]/2,scaleY:y[1]/2,rotation:x*Math.PI/180||0}),m}}function c(d,h,v,y,m,x){v.removeAll();for(var b=0;b<h.length-1;b++){var T=u(y,m);T&&(T.__dimIdx=b,d[b]?(T.setPosition(d[b]),El[x?"initProps":"updateProps"](T,{x:h[b][0],y:h[b][1]},t,m)):T.setPosition(h[b]),v.add(T))}}function f(d){return le(d,function(h){return[i.cx,i.cy]})}s.diff(l).add(function(d){var h=s.getItemLayout(d);if(h){var v=new zr,y=new Cr,m={shape:{points:h}};v.shape.points=f(h),y.shape.points=f(h),It(v,m,t,d),It(y,m,t,d);var x=new Ae,b=new Ae;x.add(y),x.add(v),x.add(b),c(y.shape.points,h,b,s,d,!0),s.setItemGraphicEl(d,x)}}).update(function(d,h){var v=l.getItemGraphicEl(h),y=v.childAt(0),m=v.childAt(1),x=v.childAt(2),b={shape:{points:s.getItemLayout(d)}};b.shape.points&&(c(y.shape.points,b.shape.points,x,s,d,!1),ta(m),ta(y),ct(y,b,t),ct(m,b,t),s.setItemGraphicEl(d,v))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,h){var v=s.getItemModel(h),y=d.childAt(0),m=d.childAt(1),x=d.childAt(2),b=s.getItemVisual(h,"style"),T=b.fill;o.add(d),y.useStyle(De(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:T})),or(y,v,"lineStyle"),or(m,v,"areaStyle");var C=v.getModel("areaStyle"),k=C.isEmpty()&&C.parentModel.isEmpty();m.ignore=k,O(["emphasis","select","blur"],function(A){var D=v.getModel([A,"areaStyle"]),P=D.isEmpty()&&D.parentModel.isEmpty();m.ensureState(A).ignore=P&&k;var R=v.getModel([A,"lineStyle"]).getLineStyle();y.ensureState(A).style=R;var z=D.getAreaStyle();m.ensureState(A).style=z;var B=v.getModel([A,"itemStyle"]).getItemStyle();x.eachChild(function(N){N.ensureState(A).style=Le(B)})}),m.useStyle(De(v.getModel("areaStyle").getAreaStyle(),{fill:T,opacity:.7,decal:b.decal}));var L=v.getModel("emphasis");x.eachChild(function(A){if(A instanceof gr){var D=A.style;A.useStyle(ae({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},b))}else A.useStyle(b),A.setColor(T),A.style.strokeNoScale=!0;var P=s.getStore().get(s.getDimensionIndex(A.__dimIdx),h);(P==null||isNaN(P))&&(P=""),vr(A,sr(v),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:A.__dimIdx,defaultText:P,inheritColor:T,defaultOpacity:b.opacity})}),Pt(d,L.get("focus"),L.get("blurScope"),L.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e})(mt),Tee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Hc(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return Wc(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=YB(this,t);return rr("section",{header:u,sortBlocks:!0,blocks:le(s,function(f){var d=i.get(i.mapDimension(f.dim),t);return rr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(le(a.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=a.getIndicatorAxes();return a.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e})(St),Xf=Z3.value;function qv(r,e){return De({show:e},r)}var Cee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),a=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),d=this.get("triggerEvent"),h=le(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var y=l;v.color!=null&&(y=De({color:v.color},l));var m=Ye(Le(v),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:y,triggerEvent:d},!1);if(pe(c)){var x=m.name;m.name=c.replace("{value}",x??"")}else Me(c)&&(m.name=c(m.name,m));var b=new rt(m,null,this.ecModel);return Wt(b,Vc.prototype),b.mainType="radar",b.componentIndex=this.componentIndex,b},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:ee.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ye({lineStyle:{color:ee.color.neutral20}},Xf.axisLine),axisLabel:qv(Xf.axisLabel,!1),axisTick:qv(Xf.axisTick,!1),splitLine:qv(Xf.splitLine,!0),splitArea:qv(Xf.splitArea,!0),indicator:[]},e})(Je),Mee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t,a),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,n){var a=t.coordinateSystem,i=a.getIndicatorAxes(),o=le(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Jr(s.model,n,{axisName:l,position:[a.cx,a.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});O(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),d=l.get("color"),h=u.get("color"),v=se(d)?d:[d],y=se(h)?h:[h],m=[],x=[];function b($,H,U){var G=U%H.length;return $[G]=$[G]||[],G}if(i==="circle")for(var T=a[0].getTicksCoords(),C=n.cx,k=n.cy,L=0;L<T.length;L++){if(c){var A=b(m,v,L);m[A].push(new fi({shape:{cx:C,cy:k,r:T[L].coord}}))}if(f&&L<T.length-1){var A=b(x,y,L);x[A].push(new Lc({shape:{cx:C,cy:k,r0:T[L].coord,r:T[L+1].coord}}))}}else for(var D,P=le(a,function($,H){var U=$.getTicksCoords();return D=D==null?U.length-1:Math.min(U.length-1,D),le(U,function(G){return n.coordToPoint(G.coord,H)})}),R=[],L=0;L<=D;L++){for(var z=[],B=0;B<a.length;B++)z.push(P[B][L]);if(z[0]&&z.push(z[0].slice()),c){var A=b(m,v,L);m[A].push(new Cr({shape:{points:z}}))}if(f&&R){var A=b(x,y,L-1);x[A].push(new zr({shape:{points:z.concat(R)}}))}R=z.slice().reverse()}var N=l.getLineStyle(),W=u.getAreaStyle();O(x,function($,H){this.group.add(Cn($,{style:De({stroke:"none",fill:y[H%y.length]},W),silent:!0}))},this),O(m,function($,H){this.group.add(Cn($,{style:De({fill:"none",stroke:v[H%v.length]},N),silent:!0}))},this)},e.type="radar",e})(Ct),kee=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.type="value",i.angle=0,i.name="",i}return e})(aa),Lee=(function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=le(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new kee(o,new Ki);return s.name=a.get("name"),s.model=a,a.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],a=n.angle,i=this.cx+e*Math.cos(a),o=this.cy-e*Math.sin(a);return[i,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=Math.sqrt(t*t+n*n);t/=a,n/=a;for(var i=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(i-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(a))]},r.prototype.resize=function(e,t){var n=lr(e,t).refContainer,a=e.get("center"),i=Math.min(n.width,n.height)/2;this.cx=he(a[0],n.width)+n.x,this.cy=he(a[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(pe(o)||lt(o))&&(o=[0,o]),this.r0=he(o[0],i),this.r=he(o[1],i),O(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},r.prototype.update=function(e,t){var n=this._indicatorAxes,a=this._model;O(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==a)){var u=s.getData();O(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var i=a.get("splitNumber"),o=new Ki;o.setExtent(0,i),o.setInterval(1),O(n,function(s,l){o4(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=n[a.get("radarIndex")||0])}),n},r.dimensions=[],r})();function Aee(r){r.registerCoordinateSystem("radar",Lee),r.registerComponentModel(Cee),r.registerComponentView(Mee),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function Iee(r){Ze(Aee),r.registerChartView(wee),r.registerSeriesModel(Tee),r.registerLayout(_ee),r.registerProcessor(Gc("radar")),r.registerPreprocessor(bee)}var IC=et();function Dee(r,e,t){IC(r)[e]=t}function Pee(r,e,t){var n=IC(r),a=n[e];a===t&&(n[e]=null)}function BP(r,e){return!!IC(r)[e]}La({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Vt);var Ree={axisPointer:1,tooltip:1,brush:1};function p4(r,e,t){var n=e.getComponentByElement(r.topTarget);if(!n||n===t||Ree.hasOwnProperty(n.mainType))return!1;var a=n.coordinateSystem;if(!a||a.model===t)return!1;var i=Ml(n),o=Ml(t);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}var jl=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var a=ge(n._mousedownHandler,n),i=ge(n._mousemoveHandler,n),o=ge(n._mouseupHandler,n),s=ge(n._mousewheelHandler,n),l=ge(n._pinchHandler,n);return n.enable=function(u,c){var f=c.zInfo,d=Ml(f.component),h=d.z,v=d.zlevel,y={component:f.component,z:h,zlevel:v,z2:Te(f.z2,-1/0)},m=ae({},c.triggerInfo);this._opt=De(ae({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:y,triggerInfo:m}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Kf(t,"mousedown",a,y),Kf(t,"mousemove",i,y),Kf(t,"mouseup",o,y)),(u===!0||u==="scale"||u==="zoom")&&(Kf(t,"mousewheel",s,y),Kf(t,"pinch",l,y)))},n.disable=function(){this._enabled=!1,qf(t,"mousedown",a),qf(t,"mousemove",i),qf(t,"mouseup",o),qf(t,"mousewheel",s),qf(t,"pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,n,a){var i=this._opt,o=i.zInfoParsed;if(p4(t,i.api,o.component))return!1;var s=i.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(t,n,a)),u&&s.isInClip&&!s.isInClip(t,n,a)&&(u=!1),u},e.prototype._decideCursorStyle=function(t,n,a,i){var o=t.target;if(!o&&this._checkPointer(t,n,a))return"grab";if(i)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(iA(t)||Zf(t))){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var a=t.offsetX,i=t.offsetY;this._checkPointer(t,a,i)&&(this._x=a,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var n=this._zr;if(!(t.gestureEvent==="pinch"||BP(n,"globalPan")||Zf(t))){var a=t.offsetX,i=t.offsetY;if(!this._dragging||!zg("moveOnMouseMove",t,this._opt)){var o=this._decideCursorStyle(t,a,i,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=a-s,c=i-l;this._x=a,this._y=i,this._opt.preventDefaultMouseMove&&$i(t.event),t.__ecRoamConsumed=!0,jP(this,"pan","moveOnMouseMove",t,{dx:u,dy:c,oldX:s,oldY:l,newX:a,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Zf(t)){var n=this._zr;if(!iA(t)){this._dragging=!1;var a=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);a&&n.setCursorStyle(a)}}},e.prototype._mousewheelHandler=function(t){if(!Zf(t)){var n=zg("zoomOnMouseWheel",t,this._opt),a=zg("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),s=t.offsetX,l=t.offsetY;if(!(i===0||!n&&!a)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(a){var f=Math.abs(i),d=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:d,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(BP(this._zr,"globalPan")||Zf(t))){var n=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,n,a,i,o){t._checkPointer(i,o.originX,o.originY)&&($i(i.event),i.__ecRoamConsumed=!0,jP(t,n,a,i,o))},e})(ra);function Zf(r){return r.__ecRoamConsumed}var Eee=et();function Bm(r){var e=Eee(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Kf(r,e,t,n){for(var a=Bm(r),i=a.roam,o=i[e]=i[e]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:t,zInfoParsed:n}),zee(r,e)}function qf(r,e,t){for(var n=Bm(r),a=n.roam[e]||[],i=0;i<a.length;i++)if(a[i].listener===t){a.splice(i,1),a.length||Oee(r,e);return}}function zee(r,e){var t=Bm(r);t.uniform[e]||r.on(e,t.uniform[e]=function(n){var a=t.roam[e];if(a)for(var i=0;i<a.length;i++)a[i].listener(n)})}function Oee(r,e){var t=Bm(r),n=t.uniform;n[e]&&(r.off(e,n[e]),n[e]=null)}function jP(r,e,t,n,a){a.isAvailableBehavior=ge(zg,null,t,n),r.trigger(e,a)}function zg(r,e,t){var n=t[r];return!r||n&&(!pe(n)||e.event[n+"Key"])}function DC(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function PC(r,e,t,n){var a=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;o*=e,o=RC(o,i);var s=o/r.zoom;r.zoom=o,g4(a,t,n,s),a.dirty()}function v4(r,e,t,n,a,i){var o=new ze(0,0,0,0);n.enable(r.get("roam"),{api:e,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,c,f){return o.copy(t.getBoundingRect()),o.applyTransform(t.getComputedTransform()),o.contain(c,f)},isInClip:function(u,c,f){return!i||i.contain(c,f)}}}),a.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;a.zoom=s?s.getZoom():1;var l=r.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){DC(a,u.dx,u.dy),e.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){PC(a,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function FP(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function jm(r,e,t){var n=r.getZoom(),a=r.getCenter(),i=e.zoom,o=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter(FP(r,o))),i!=null&&(i=RC(n*i,t)/n,g4(r,e.originX,e.originY,i),r.updateTransform(),r.setCenter(FP(r,o)),r.setZoom(i*n)),{center:r.getCenter(),zoom:r.getZoom()}}function g4(r,e,t,n){r.x-=(e-r.x)*(n-1),r.y-=(t-r.y)*(n-1),r.scaleX*=n,r.scaleY*=n}function RC(r,e){if(e){var t=e.min||0,n=e.max||1/0;r=Math.max(Math.min(n,r),t)}return r}function y4(r){if(pe(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var hS,Py={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},VP=ot(Py),Ry={"alignment-baseline":"textBaseline","stop-color":"stopColor"},GP=ot(Ry),Nee=(function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=y4(e);this._defsUsePending=[];var a=new Ae;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),_n(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;Fee(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var d=Fm(o);d.length>=4&&(c={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(c&&s!=null&&l!=null&&(f=x4(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=a;a=new Ae,a.add(h),h.scaleX=h.scaleY=f.scale,h.x=f.x,h.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Qe({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var c=hS[s];if(c&&Se(hS,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var d={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(d),s==="g"&&(u=d)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var h=WP[s];if(h&&Se(WP,s)){var v=h.call(this,e),y=e.getAttribute("id");y&&(this._defs[y]=v)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,i,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var n=new uc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),Bee(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=(function(){hS={g:function(e,t){var n=new Ae;return Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Qe;return Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new fi;return Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new Zt;return Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Rh;return Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),a;n&&(a=UP(n));var i=new zr({shape:{points:a||[]},silent:!0});return Fn(t,i),_n(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=UP(n));var i=new Cr({shape:{points:a||[]},silent:!0});return Fn(t,i),_n(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new gr;return Fn(t,n),_n(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new Ae;return Fn(t,s),_n(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Ae;return Fn(t,s),_n(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=z5(n);return Fn(t,a),_n(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),r})(),WP={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new Rl(e,t,n,a);return HP(r,i),$P(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new bT(e,t,n);return HP(r,a),$P(r,a),a}};function HP(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function $P(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};m4(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000",s=i.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=$r(o),u=l&&l[3];u&&(l[3]*=Ni(s),o=Kn(l,"rgba"))}e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function Fn(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),De(e.__inheritedStyle,r.__inheritedStyle))}function UP(r){for(var e=Fm(r),t=[],n=0;n<e.length;n+=2){var a=parseFloat(e[n]),i=parseFloat(e[n+1]);t.push([a,i])}return t}function _n(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(Wee(r,e),m4(r,o,s),n||Hee(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=YP(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=YP(i,"stroke",o.stroke,t)),O(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),O(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),a&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=le(Fm(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function Bee(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,a=n;!n||n==="auto"||n==="baseline"?a="alphabetic":n==="before-edge"||n==="text-before-edge"?a="top":n==="after-edge"||n==="text-after-edge"?a="bottom":(n==="central"||n==="mathematical")&&(a="middle"),r.style.textBaseline=a}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var jee=/^url\(\s*#(.*?)\)/;function YP(r,e,t,n){var a=t&&t.match(jee);if(a){var i=Mn(a[1]);n.push([r,e,i]);return}return t==="none"&&(t=null),t}function Fee(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var Vee=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fm(r){return r.match(Vee)||[]}var Gee=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,pS=Math.PI/180;function Wee(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],a=null;t.replace(Gee,function(f,d,h){return n.push(d,h),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],s=n[i-1],l=Fm(o);switch(a=a||hr(),s){case"translate":Ta(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":dm(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Qi(a,a,-parseFloat(l[0])*pS,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*pS);Sa(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*pS);Sa(a,[1,c,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var XP=/([^\s:;]+)\s*:\s*([^:;]+)/g;function m4(r,e,t){var n=r.getAttribute("style");if(n){XP.lastIndex=0;for(var a;(a=XP.exec(n))!=null;){var i=a[1],o=Se(Py,i)?Py[i]:null;o&&(e[o]=a[2]);var s=Se(Ry,i)?Ry[i]:null;s&&(t[s]=a[2])}}}function Hee(r,e,t){for(var n=0;n<VP.length;n++){var a=VP[n],i=r.getAttribute(a);i!=null&&(e[Py[a]]=i)}for(var n=0;n<GP.length;n++){var a=GP[n],i=r.getAttribute(a);i!=null&&(t[Ry[a]]=i)}}function x4(r,e){var t=e.width/r.width,n=e.height/r.height,a=Math.min(t,n);return{scale:a,x:-(r.x+r.width/2)*a+(e.x+e.width/2),y:-(r.y+r.height/2)*a+(e.y+e.height/2)}}function $ee(r,e){var t=new Nee;return t.parse(r,e)}var Uee=be(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Yee=(function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=be(),this._freedGraphics=[],this._mapName=e,this._parsedXML=y4(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=Zee(e.named),n=t.regions,a=t.regionsMap;this._regions=n,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&$ee(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,Rr(n!=null)}catch(m){throw new Error(`Invalid svg format
|
|
56
|
-
`+m.message)}var a=new Ae;a.add(n),a.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,d=void 0;if(i!=null?(u=0,f=i):s&&(u=s.x,f=s.width),o!=null?(c=0,d=o):s&&(c=s.y,d=s.height),u==null||c==null){var h=n.getBoundingRect();u==null&&(u=h.x,f=h.width),c==null&&(c=h.y,d=h.height)}l=this._boundingRect=new ze(u,c,f,d)}if(s){var v=x4(s,l);n.scaleX=n.scaleY=v.scale,n.x=v.x,n.y=v.y}a.setClipPath(new Qe({shape:l.plain()}));var y=[];return O(t.named,function(m){Uee.get(m.svgNodeTagLower)!=null&&(y.push(m),Xee(m.el))}),{root:a,boundingRect:l,named:y}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r})();function Xee(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function Zee(r){var e=[],t=be();return O(r,function(n){if(n.namedFrom==null){var a=new rq(n.name,n.el);e.push(a),t.set(n.name,a)}}),{regions:e,regionsMap:t}}var Jb=[126,25],ZP="南海诸岛",qs=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Xs=0;Xs<qs.length;Xs++)for(var Mu=0;Mu<qs[Xs].length;Mu++)qs[Xs][Mu][0]/=10.5,qs[Xs][Mu][1]/=-10.5/.75,qs[Xs][Mu][0]+=Jb[0],qs[Xs][Mu][1]+=Jb[1];function Kee(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===ZP)return;e.push(new t3(ZP,le(qs,function(n){return{type:"polygon",exterior:n}}),Jb))}}var qee={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Qee(r,e){if(r==="china"){var t=qee[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var Jee=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function ete(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:Jee[0]})}var tte="name",rte=(function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=be(),this._mapName=e,this._specialAreas=n,this._geoJSON=ate(t)}return r.prototype.load=function(e,t){t=t||tte;var n=this._parsedMap.get(t);if(!n){var a=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:a,boundingRect:nte(a)})}var i=be(),o=[];return O(n.regions,function(s){var l=s.name;e&&Se(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new ze(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?Ob(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
|
|
57
|
-
`+i.message)}return Kee(t,a),O(a,function(i){var o=i.name;Qee(t,i),ete(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),a},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r})();function nte(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function ate(r){return pe(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var Qf=be();const qi={registerMap:function(r,e,t){if(e.svg){var n=new Yee(r,e.svg);Qf.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new rte(r,a,t);Qf.set(r,n)}},getGeoResource:function(r){return Qf.get(r)},getMapForUser:function(r){var e=Qf.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=Qf.get(r);if(n)return n.load(e,t)}};var EC=["rect","circle","line","ellipse","polygon","polyline","path"],ite=be(EC),ote=be(EC.concat(["g"])),ste=be(EC.concat(["g"])),S4=et();function Qv(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function KP(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var _4=(function(){function r(e){var t=this.group=new Ae,n=this._transformGroup=new Ae;t.add(n),this.uid=Rc("ec_map_draw"),this._controller=new jl(e.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new Ae),n.add(this._svgGroup=new Ae)}return r.prototype.draw=function(e,t,n,a,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(T){!s&&T.getHostGeoModel()===e&&(s=T.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,f=l.getTransformInfo(),d=f.raw,h=f.roam,v=!u.childAt(0)||i,y=e.getShallow("clip",!0),m;y?(m=l.getViewRect().clone(),this.group.setClipPath(new Qe({shape:m.clone()}))):this.group.removeClipPath(),v?(c.x=h.x,c.y=h.y,c.scaleX=h.scaleX,c.scaleY=h.scaleY,c.dirty()):ct(c,h,e);var x=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,b={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:x,isGeo:o,transformInfoRaw:d};l.resourceType==="geoJSON"?this._buildGeoJSON(b):l.resourceType==="geoSVG"&&this._buildSVG(b),this._updateController(e,m,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=be(),n=be(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(h,v){return v&&(h=v(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function f(h){for(var v=[],y=!u&&l&&l.project,m=0;m<h.length;++m){var x=c(h[m],y);x&&v.push(x)}return v}function d(h){return{shape:{points:f(h)}}}a.removeAll(),O(e.geo.regions,function(h){var v=h.name,y=t.get(v),m=n.get(v)||{},x=m.dataIdx,b=m.regionModel;if(!y){y=t.set(v,new Ae),a.add(y),x=s?s.indexOfName(v):null,b=e.isGeo?o.getRegionModel(v):s?s.getItemModel(x):null;var T=b.get("silent",!0);T!=null&&(y.silent=T),n.set(v,{dataIdx:x,regionModel:b})}var C=[],k=[];O(h.geometries,function(D){if(D.type==="polygon"){var P=[D.exterior].concat(D.interiors||[]);u&&(P=rR(P,u)),O(P,function(z){C.push(new zr(d(z)))})}else{var R=D.points;u&&(R=rR(R,u,!0)),O(R,function(z){k.push(new Cr(d(z)))})}});var L=c(h.getCenter(),l&&l.project);function A(D,P){if(D.length){var R=new zh({culling:!0,segmentIgnoreThreshold:1,shape:{paths:D}});y.add(R),qP(e,R,x,b),QP(e,R,v,b,o,x,L),P&&(KP(R),O(R.states,KP))}}A(C),A(k,!0)}),t.each(function(h,v){var y=n.get(v),m=y.dataIdx,x=y.regionModel;JP(e,h,v,x,o,m),eR(e,h,v,x,o),tR(e,h,v,x,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=be(),i=!1;O(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,d=u?u.indexOfName(s):null,h=l.getRegionModel(s);ite.get(c)!=null&&f instanceof ea&&qP(e,f,d,h),f instanceof ea&&(f.culling=!0);var v=h.get("silent",!0);if(v!=null&&(f.silent=v),f.z2EmphasisLift=0,!o.namedFrom&&(ste.get(c)!=null&&QP(e,f,s,h,l,d,null),JP(e,f,s,h,l,d),eR(e,f,s,h,l),ote.get(c)!=null)){var y=tR(e,f,s,h,l);y==="self"&&(i=!0);var m=a.get(s)||a.set(s,[]);m.push(f)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){Tl(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(e);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=qi.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=qi.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n,a){var i=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=i.getZoom(),o.enable(e.get("roam")||!1,{api:a,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,f,d){return i.containPoint([f,d])},isInClip:function(c,f,d){return!t||t.contain(f,d)}}});var l=e.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=e.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,DC(s,c.dx,c.dy),a.dispatchAction(ae(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,PC(s,c.scale,c.originX,c.originY),a.dispatchAction(ae(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=S4(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,a){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},r})();function qP(r,e,t,n){var a=n.getModel("itemStyle"),i=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=Qv(a),u=Qv(i),c=Qv(s),f=Qv(o),d=r.data;if(d){var h=d.getItemVisual(t,"style"),v=d.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),v&&(l.decal=hc(v,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,Tl(e)}function QP(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var f=l?t:i,d=void 0;(!s||i>=0)&&(d=a);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,sr(n),{labelFetcher:d,labelDataIndex:f,defaultText:t},h);var v=e.getTextContent();if(v&&(S4(v).ignore=v.ignore,e.textConfig&&o)){var y=e.getBoundingRect().clone();e.textConfig.layoutRect=y,e.textConfig.position=[(o[0]-y.x)/y.width*100+"%",(o[1]-y.y)/y.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function JP(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):Ne(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function eR(r,e,t,n,a){r.data||eo({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function tR(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return Pt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&J9(e,a,t),o}function rR(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),O(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var lte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new _4(a);o.add(s.group),s.draw(t,n,a,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,a)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,a){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,d=new fi({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:kc+1)});if(!f){var h=t.mainSeries.getData(),v=i.getName(l),y=h.indexOfName(v),m=i.getItemModel(l),x=m.getModel("label"),b=h.getItemGraphicEl(y);vr(d,sr(m),{labelFetcher:{getFormattedLabel:function(T,C){return t.getFormattedLabel(y,C)}},defaultText:v}),d.disableLabelAnimation=!0,x.get("position")||d.setTextConfig({position:"bottom"}),b.onHoverStateChange=function(T){oy(d,T)}}o.add(d)}}})},e.type="map",e})(mt),ute=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=Wc(this,{coordDimensions:["value"],encodeDefaulter:He($T,this)}),a=be(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,o)}var u=qi.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return O(u.regions,function(c){var f=c.name,d=a.get(f),h=c.properties&&c.properties.echartsStyle,v;d==null?(v={name:f},i.push(v)):v=n.getRawDataItem(d),h&&Ye(v,h)}),n.appendData(i),n},e.prototype.getHostGeoModel=function(){if(cB(this).kind!==$a.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),d=i.mapDimension("value");isNaN(l[c].originalData.get(d,f))||u.push(l[c].name)}return rr("section",{header:u.join(", "),noHeader:!u.length,blocks:[rr("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",a=Kt(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return a.setStyle(t.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill=ee.color.neutral00,a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:ee.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ee.color.border,areaColor:ee.color.background},emphasis:{label:{show:!0,color:ee.color.primary},itemStyle:{areaColor:ee.color.highlight}},select:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},nameProperty:"name"},e})(St);function cte(r,e){var t={};return O(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c<u;c++)s=Math.min(s,t[i][c]),l=Math.max(l,t[i][c]),o+=t[i][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function fte(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),a=n?"o"+n.id:"i"+t.getMapType();(e[a]=e[a]||[]).push(t)}),O(e,function(t,n){for(var a=cte(le(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(a.cloneShallow()),t[i].mainSeries=t[0]})}function dte(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var a={};O(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),d=s.getRegion(f);if(!(!d||isNaN(u))){var h=a[f]||0,v=s.dataToPoint(d.getCenter());a[f]=h+1,l.setItemLayout(c,{point:v,offset:h})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!a[s],i.setItemLayout(o,l)}),e[n]=!0}})}var nR=Gt,Fl=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this;return a.type="view",a.dimensions=["x","y"],a._roamTransformable=new zi,a._rawTransformable=new zi,a.name=t,a._opt=n,a}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new ze(t,n,a,i),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,a,i){this._transformTo(t,n,a,i),this._viewRect=new ze(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ze(t,n,a,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&t&&(t=[he(t[0],n.api.getWidth()),he(t[1],n.api.getWidth())]),this._centerOption=Le(t),this._updateCenterAndZoom()},e.prototype.setZoom=function(t){this._zoom=RC(t||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,a=t.y+t.height/2;return[n,a]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._centerOption,n=this._rect;t&&n&&(this._center=[he(t[0],n.width,n.x),he(t[1],n.height,n.y)]);var a=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=Gt([],s,a),o=Gt([],o,a),i.originX=s[0],i.originY=s[1],i.x=o[0]-s[0],i.y=o[1]-s[1],i.scaleX=i.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Ih(this.transform||(this.transform=[]),n.transform||hr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Jn(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new zi;return a.transform=n.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,a){var i=n?this._rawTransform:this.transform;return a=a||[],i?nR(a,t,i):Gr(a,t)},e.prototype.pointToData=function(t,n,a){a=a||[];var i=this.invTransform;return i?nR(a,t,i):(a[0]=t[0],a[1]=t[1],a)},e.prototype.convertToPixel=function(t,n,a){var i=aR(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=aR(n);return i===this?i.pointToData(a):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e})(zi);function aR(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var hte={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},b4=["lng","lat"],ew=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t,{api:a.api,ecModel:a.ecModel})||this;i.dimensions=b4,i.type="geo",i._nameCoordMap=be(),i.map=n;var o=a.projection,s=qi.load(n,a.nameMap,a.nameProperty),l=qi.getGeoResource(n);i.resourceType=l?l.type:null;var u=i.regions=s.regions,c=hte[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var f;if(o)for(var d=0;d<u.length;d++){var h=u[d].getBoundingRect(o);f=f||h.clone(),f.union(h)}else f=s.boundingRect;return i.setBoundingRect(f.x,f.y,f.width,f.height),i.aspectScale=o?1:Te(a.aspectScale,c.aspectScale),i._invertLongitute=o?!1:c.invertLongitute,i}return e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new ze(t,n,a,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(t))return n[a]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,a){if(pe(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,n,a)}},e.prototype.pointToData=function(t,n,a){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t,a)},e.prototype.pointToProjected=function(t,n){return r.prototype.pointToData.call(this,t,0,n)},e.prototype.projectedToPoint=function(t,n,a){return r.prototype.dataToPoint.call(this,t,n,a)},e.prototype.convertToPixel=function(t,n,a){var i=iR(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=iR(n);return i===this?i.pointToData(a):null},e})(Fl);Wt(ew,Fl);function iR(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Bt).models[0]||{}).coordinateSystem:null}function oR(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],a=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])){var i=this.projection;if(i){var o=n[0],s=n[1],l=a[0],u=a[1];n=[1/0,1/0],a=[-1/0,-1/0];var c=function(k,L,A,D){for(var P=A-k,R=D-L,z=0;z<=100;z++){var B=z/100,N=i.project([k+P*B,L+R*B]);Ri(n,n,N),Ei(a,a,N)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),d=r.get("layoutCenter"),h=r.get("layoutSize"),v=lr(r,e).refContainer,y=f.width/f.height*this.aspectScale,m=!1,x,b;d&&h&&(x=[he(d[0],v.width)+v.x,he(d[1],v.height)+v.y],b=he(h,Math.min(v.width,v.height)),!isNaN(x[0])&&!isNaN(x[1])&&!isNaN(b)&&(m=!0));var T;if(m)T={},y>1?(T.width=b,T.height=b/y):(T.height=b,T.width=b*y),T.y=x[1]-T.height/2,T.x=x[0]-T.width/2;else{var C=r.getBoxLayoutParams();C.aspect=y,T=Dt(C,v),T=vB(r,T,y)}this.setViewRect(T.x,T.y,T.width,T.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function pte(r,e){O(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var vte=(function(){function r(){this.dimensions=b4}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new ew(l+s,l,ae({nameMap:o.get("nameMap"),api:t,ecModel:e},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=oR,u.resize(o,t)}),e.eachSeries(function(o){Bh({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Bt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),O(i,function(o,s){var l=le(o,function(c){return c.get("nameMap")}),u=new ew(s,s,ae({nameMap:um(l),api:t,ecModel:e},a(o[0])));u.zoomLimit=Tr.apply(null,le(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=oR,u.resize(o[0],t),O(o,function(c){c.coordinateSystem=u,pte(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=be(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=qi.load(t,n,a);return O(l.regions,function(u){var c=u.name,f=o.get(c),d=u.properties&&u.properties.echartsStyle;f||(f={name:c},i.push(f)),d&&Ye(f,d)}),i},r})(),w4=new vte,gte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a);var i=qi.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color=t.defaultItemStyleColor||ee.color.backgroundTint)}_l(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=w4.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=Qn(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new rt(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},be()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new rt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var a=this.getRegionModel(t),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:t};if(Me(i))return o.status=n,i(o);if(pe(i))return i.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,a=n.selectedMode;if(a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:ee.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ee.color.border},emphasis:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},select:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},regions:[]},e})(Je),yte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,a,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new _4(a));var o=this._mapDraw;o.draw(t,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,a)},e.prototype._handleRegionClick=function(t){var n;cl(t.target,function(a){return(n=Ne(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,a){var i=this;this._mapDraw.group.traverse(function(o){var s=Ne(o).eventData;if(s)return i._model.isSelected(s.name)?a.enterSelect(o):a.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e})(Ct);function mte(r,e,t){qi.registerMap(r,e,t)}function T4(r){r.registerCoordinateSystem("geo",w4),r.registerComponentModel(gte),r.registerComponentView(yte),r.registerImpl("registerMap",mte),r.registerImpl("getMap",function(t){return qi.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(a,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:a},function(l){l[t](a.name);var u=l.coordinateSystem;O(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];O(o,function(f,d){o[d]&&c.push(d)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:a.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,a){var i=t.componentType;i||(t.geoId!=null?i="geo":t.seriesId!=null&&(i="series")),i||(i="series"),n.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=jm(s,t,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&O(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function xte(r){Ze(T4),r.registerChartView(lte),r.registerSeriesModel(ute),r.registerLayout(dte),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,fte),ij("map",r.registerAction)}function Ste(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,a;n=t.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function _te(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){wte(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=Tte(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function bte(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function sR(r){return arguments.length?r:kte}function _d(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function wte(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function Tte(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=vS(s),i=gS(i),s&&i;){a=vS(a),o=gS(o),a.hierNode.ancestor=r;var d=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);d>0&&(Mte(Cte(s,r,t),r,d),u+=d,l+=d),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!vS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!gS(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function vS(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function gS(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function Cte(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function Mte(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function kte(r,e){return r.parentNode===e.parentNode?1:2}var Lte=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),Ate=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Lte},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,d=he(n.forkPosition,1),h=[];h[c]=o[c],h[f]=o[f]+(l[f]-o[f])*d,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[c]=s[c],t.lineTo(h[0],h[1]),h[c]=l[c],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var v=1;v<i-1;v++){var y=a[v];t.moveTo(y[0],y[1]),h[c]=y[c],t.lineTo(h[0],h[1])}},e})(nt),Ite=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Ae,t}return e.prototype.init=function(t,n){this._controller=new jl(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,a),this._updateController(t,null,n,a);var u=this._data;i.diff(u).add(function(c){lR(i,c)&&uR(i,c,null,s,t)}).update(function(c,f){var d=u.getItemGraphicEl(f);if(!lR(i,c)){d&&fR(u,f,d,s,t);return}uR(i,c,d,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&fR(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,n){var a=t.getData(),i=[];a.each(function(f){var d=a.getItemLayout(f);d&&!isNaN(d.x)&&!isNaN(d.y)&&i.push([+d.x,+d.y])});var o=[],s=[];Sm(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=t.coordinateSystem=new Fl(null,{api:n,ecModel:t.ecModel});c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center")),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,a,i){var o=this;v4(t,i,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),a=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var a=this._nodeScaleRatio,i=n.scaleX||1,o=n.getZoom(),s=(o-1)*a+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e})(mt);function lR(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function uR(r,e,t,n,a){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:ee.color.neutral00,c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,d=r.getItemGraphicEl(f.dataIndex),h=f.getLayout(),v=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:h,y=o.getLayout();i?(t=new Vh(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=v.x,t.y=v.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=y.rawX,t.__radialRawY=y.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ct(t,{x:y.x,y:y.y},a);var m=t.getSymbolPath();if(a.get("layout")==="radial"){var x=c.children[0],b=x.getLayout(),T=x.children.length,C=void 0,k=void 0;if(y.x===b.x&&o.isExpand===!0&&x.children.length){var L={x:(x.children[0].getLayout().x+x.children[T-1].getLayout().x)/2,y:(x.children[0].getLayout().y+x.children[T-1].getLayout().y)/2};C=Math.atan2(L.y-b.y,L.x-b.x),C<0&&(C=Math.PI*2+C),k=L.x<b.x,k&&(C=C-Math.PI)}else C=Math.atan2(y.y-b.y,y.x-b.x),C<0&&(C=Math.PI*2+C),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(k=y.x<b.x,k&&(C=C-Math.PI)):(k=y.x>b.x,k||(C=C-Math.PI));var A=k?"left":"right",D=s.getModel("label"),P=D.get("rotate"),R=P*(Math.PI/180),z=m.getTextContent();z&&(m.setTextConfig({position:D.get("position")||A,rotation:P==null?-C:R,origin:"center"}),z.setStyle("verticalAlign","middle"))}var B=s.get(["emphasis","focus"]),N=B==="relative"?ic(o.getAncestorsIndices(),o.getDescendantIndices()):B==="ancestor"?o.getAncestorsIndices():B==="descendant"?o.getDescendantIndices():null;N&&(Ne(t).focus=N),Dte(a,o,c,t,v,h,y,n),t.__edge&&(t.onHoverStateChange=function(W){if(W!=="blur"){var $=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);$&&$.hoverState===Ph||oy(t.__edge,W)}})}function Dte(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),d=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),y=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(y||(y=n.__edge=new Ac({shape:tw(c,f,d,a,a)})),ct(y,{shape:tw(c,f,d,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,x=[],b=0;b<m.length;b++){var T=m[b].getLayout();x.push([T.x,T.y])}y||(y=n.__edge=new Ate({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:h}})),ct(y,{shape:{parentPoint:[o.x,o.y],childPoints:x}},r)}y&&!(u==="polyline"&&!e.isExpand)&&(y.useStyle(De({strokeNoScale:!0,fill:null},v)),or(y,l,"lineStyle"),Tl(y),s.add(y))}function cR(r,e,t,n,a){var i=e.tree.root,o=C4(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,d=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),h=n.get("edgeShape"),v=n.get("layout"),y=n.get("orient"),m=n.get(["lineStyle","curveness"]);d&&(h==="curve"?Ko(d,{shape:tw(v,y,m,l,l),style:{opacity:0}},n,{cb:function(){t.remove(d)},removeOpt:a}):h==="polyline"&&n.get("layout")==="orthogonal"&&Ko(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(d)},removeOpt:a}))}}function C4(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function fR(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=C4(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};Ko(t,{x:s.x+1,y:s.y+1},a,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){cR(u,r,n,a,l)}),cR(i,r,n,a,l)}function tw(r,e,t,n,a){var i,o,s,l,u,c,f,d;if(r==="radial"){u=n.rawX,f=n.rawY,c=a.rawX,d=a.rawY;var h=_d(u,f),v=_d(u,f+(d-f)*t),y=_d(c,d+(f-d)*t),m=_d(c,d);return{x1:h.x||0,y1:h.y||0,x2:m.x||0,y2:m.y||0,cpx1:v.x||0,cpy1:v.y||0,cpx2:y.x||0,cpy2:y.y||0}}else u=n.x,f=n.y,c=a.x,d=a.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*t,o=f,s=c+(u-c)*t,l=d),(e==="TB"||e==="BT")&&(i=u,o=f+(d-f)*t,s=c,l=d+(f-d)*t);return{x1:u,y1:f,x2:c,y2:d,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var qn=et();function M4(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,k4(e,t,r),O(t,function(n){O(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,He(Pte,r))})}),e.wrapMethod("cloneShallow",He(Ete,r)),O(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,He(Rte,r))}),Rr(t[e.dataType]===e)}function Pte(r,e){if(Nte(this)){var t=ae({},qn(this).datas);t[this.dataType]=e,k4(e,t,r)}else zC(e,this.dataType,qn(this).mainData,r);return e}function Rte(r,e){return r.struct&&r.struct.update(),e}function Ete(r,e){return O(qn(e).datas,function(t,n){t!==e&&zC(t.cloneShallow(),n,e,r)}),e}function zte(r){var e=qn(this).mainData;return r==null||e==null?e:qn(e).datas[r]}function Ote(){var r=qn(this).mainData;return r==null?[{data:r}]:le(ot(qn(r).datas),function(e){return{type:e,data:qn(r).datas[e]}})}function Nte(r){return qn(r).mainData===r}function k4(r,e,t){qn(r).datas={},O(e,function(n,a){zC(n,a,r,t)})}function zC(r,e,t,n){qn(t).datas[e]=r,qn(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=zte,r.getLinkedDataAll=Ote}var Bte=(function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){Me(e)&&(n=t,t=e,e=null),e=e||{},pe(e)&&(e={order:e});var a=e.order||"preorder",i=this[e.attr||"children"],o;a==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,n);a==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r})(),OC=(function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,a=t.length;n<a;n++)t[n].dataIndex=-1;for(var n=0,a=e.count();n<a;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var a=new r(t),i=[],o=1;s(e);function s(c,f){var d=c.value;o=Math.max(o,se(d)?d.length:1),i.push(c);var h=new Bte(ir(c.name,""),a);f?jte(h,f):a.root=h,a._nodes.push(h);var v=c.children;if(v)for(var y=0;y<v.length;y++)s(v[y],h)}a.root.updateDepthAndHeight(0);var l=jc(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Ur(l,t);return u.initData(i),n&&n(u),M4({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r})();function jte(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function gh(r,e,t){if(r&&Ue(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(pe(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function L4(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function NC(r,e){var t=L4(r);return Ue(t,e)>=0}function Vm(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var Fte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new rt(a,this,this.ecModel),o=OC.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(d,h){var v=o.getNodeByDataIndex(h);return v&&v.children.length&&v.isExpand||(d.parentModel=i),d})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var d=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=d&&d.collapsed!=null?!d.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return rr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Vm(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:ee.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(St);function Vte(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;i=a.pop();)e(i,t)}function Jf(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)t.push(a[i])}}function Gte(r,e){r.eachSeriesByType("tree",function(t){Wte(t,e)})}function Wte(r,e){var t=lr(r,e).refContainer,n=Dt(r.getBoxLayoutParams(),t);r.layoutInfo=n;var a=r.get("layout"),i=0,o=0,s=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,s=sR(function(C,k){return(C.parentNode===k.parentNode?1:2)/C.depth})):(i=n.width,o=n.height,s=sR());var l=r.getData().tree.root,u=l.children[0];if(u){Ste(l),Vte(u,_te,s),l.hierNode.modifier=-u.hierNode.prelim,Jf(u,bte);var c=u,f=u,d=u;Jf(u,function(C){var k=C.getLayout().x;k<c.getLayout().x&&(c=C),k>f.getLayout().x&&(f=C),C.depth>d.depth&&(d=C)});var h=c===f?1:s(c,f)/2,v=h-c.getLayout().x,y=0,m=0,x=0,b=0;if(a==="radial")y=i/(f.getLayout().x+h+v),m=o/(d.depth-1||1),Jf(u,function(C){x=(C.getLayout().x+v)*y,b=(C.depth-1)*m;var k=_d(x,b);C.setLayout({x:k.x,y:k.y,rawX:x,rawY:b},!0)});else{var T=r.getOrient();T==="RL"||T==="LR"?(m=o/(f.getLayout().x+h+v),y=i/(d.depth-1||1),Jf(u,function(C){b=(C.getLayout().x+v)*m,x=T==="LR"?(C.depth-1)*y:i-(C.depth-1)*y,C.setLayout({x,y:b},!0)})):(T==="TB"||T==="BT")&&(y=i/(f.getLayout().x+h+v),m=o/(d.depth-1||1),Jf(u,function(C){x=(C.getLayout().x+v)*y,b=T==="TB"?(C.depth-1)*m:o-(C.depth-1)*m,C.setLayout({x,y:b},!0)}))}}}function Hte(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");ae(s,o)})})}function $te(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=jm(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}function Ute(r){r.registerChartView(Ite),r.registerSeriesModel(Fte),r.registerLayout(Gte),r.registerVisual(Hte),$te(r)}var dR=["treemapZoomToNode","treemapRender","treemapMove"];function Yte(r){for(var e=0;e<dR.length;e++)r.registerAction({type:dR[e],update:"updateView"},Vt);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},a);function a(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=gh(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=NC(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function A4(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=mb(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var Xte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};I4(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new rt({itemStyle:o},this,n);i=t.levels=Zte(i,n);var l=le(i||[],function(f){return new rt(f,s,n)},this),u=OC.createTree(a,this,c);function c(f){f.wrapMethod("getItemModel",function(d,h){var v=u.getNodeByDataIndex(h),y=v?l[v.depth]:null;return d.parentModel=y||s,d})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return rr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Vm(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},ae(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=be(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){A4(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:ee.size.l,top:ee.size.xxxl,right:ee.size.l,bottom:ee.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:ee.size.m,emptyItemWidth:25,itemStyle:{color:ee.color.backgroundShade,textStyle:{color:ee.color.secondary}},emphasis:{itemStyle:{color:ee.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:ee.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:ee.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e})(St);function I4(r){var e=0;O(r.children,function(n){I4(n);var a=n.value;se(a)&&(a=a[0]),e+=a});var t=r.value;se(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),se(r.value)?r.value[0]=t:r.value=t}function Zte(r,e){var t=Tt(e.get("color")),n=Tt(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;O(r,function(s){var l=new rt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var Kte=8,hR=8,yS=5,qte=(function(){function r(e){this.group=new Ae,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=lr(e,t).refContainer,d={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},h={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},v=Dt(d,f);this._prepare(n,h,u),this._renderContent(e,h,v,s,l,u,c,a),Lm(o,d,f)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=ir(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+Kte*2,t.emptyItemWidth);t.totalWidth+=s+hR,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s,l){for(var u=0,c=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),d=t.totalWidth,h=t.renderList,v=i.getModel("itemStyle").getItemStyle(),y=h.length-1;y>=0;y--){var m=h[y],x=m.node,b=m.width,T=m.text;d>n.width&&(d-=b-c,b=c,T=null);var C=new zr({shape:{points:Qte(u,0,b,f,y===h.length-1,y===0)},style:De(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new st({style:wt(o,{text:T})}),textConfig:{position:"inside"},z2:kc*1e4,onclick:He(l,x)});C.disableLabelAnimation=!0,C.getTextContent().ensureState("emphasis").style=wt(s,{text:T}),C.ensureState("emphasis").style=v,Pt(C,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(C),Jte(C,e,x),u+=b+hR}},r.prototype.remove=function(){this.group.removeAll()},r})();function Qte(r,e,t,n,a,i){var o=[[a?r:r-yS,e],[r+t,e],[r+t,e+n],[a?r:r-yS,e+n]];return!i&&o.splice(2,0,[r+t+yS,e+n/2]),!a&&o.push([r,e+n/2]),o}function Jte(r,e,t){Ne(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Vm(t,e)}}var ere=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r})();function tre(){return new ere}var rw=Ae,pR=Qe,vR=3,gR="label",yR="upperLabel",rre=kc*10,nre=kc*2,are=kc*3,Qs=wl([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),mR=function(r){var e=Qs(r);return e.stroke=e.fill=e.lineWidth=null,e},Ey=et(),ire=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=ed(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ue(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=gh(i,s,t),u=i&&i.type,c=t.layoutInfo,f=!this._oldTree,d=this._storage,h=u==="treemapRootToNode"&&l&&d?{rootNodeGroup:d.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,v=this._giveContainerGroup(c),y=t.get("animation"),m=this._doRender(v,t,h);y&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(v,m,t,h):m.renderFinally(),this._resetController(a),this._renderBreadcrumb(t,a,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new rw,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,a){var i=n.getData().tree,o=this._oldTree,s=ed(),l=ed(),u=this._storage,c=[];function f(b,T,C,k){return ore(n,l,u,a,s,c,b,T,C,k)}y(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var d=m(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var h=this.seriesModel.layoutInfo,v=i.root.getLayout();v.width===h.width&&v.height===h.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:d,renderFinally:x};function y(b,T,C,k,L){k?(T=b,O(b,function(P,R){!P.isRemoved()&&D(R,R)})):new Xi(T,b,A,A).add(D).update(D).remove(He(D,null)).execute();function A(P){return P.getId()}function D(P,R){var z=P!=null?b[P]:null,B=R!=null?T[R]:null,N=f(z,B,C,L);N&&y(z&&z.viewChildren||[],B&&B.viewChildren||[],N,k,L+1)}}function m(b){var T=ed();return b&&O(b,function(C,k){var L=T[k];O(C,function(A){A&&(L.push(A),Ey(A).willDelete=!0)})}),T}function x(){O(d,function(b){O(b,function(T){T.parent&&T.parent.remove(T)})}),O(c,function(b){b.invisible=!0,b.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(Me(o)?0:o)||0,u=(Me(s)?null:s)||"cubicOut",c=tre();O(n.willDeleteEls,function(f,d){O(f,function(h,v){if(!h.invisible){var y=h.parent,m,x=Ey(y);if(i&&i.direction==="drillDown")m=y===i.rootNodeGroup?{shape:{x:0,y:0,width:x.nodeWidth,height:x.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var b=0,T=0;x.willDelete||(b=x.nodeWidth/2,T=x.nodeHeight/2),m=d==="nodeGroup"?{x:b,y:T,style:{opacity:0}}:{shape:{x:b,y:T,width:0,height:0},style:{opacity:0}}}m&&c.add(h,m,l,0,u)}})}),O(this._storage,function(f,d){O(f,function(h,v){var y=n.lastsForAnimation[d][v],m={};y&&(h instanceof Ae?y.oldX!=null&&(m.x=h.x,m.y=h.y,h.x=y.oldX,h.y=y.oldY):(y.oldShape&&(m.shape=ae({},h.shape),h.setShape(y.oldShape)),y.fadein?(h.setStyle("opacity",0),m.style={opacity:1}):h.style.opacity!==1&&(m.style={opacity:1})),c.add(h,m,l,0,u))})},this),this._state="animating",c.finished(ge(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this,a=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var o=this.seriesModel;a||(a=this._controller=new jl(t.getZr()),a.on("pan",ge(this._onPan,this)),a.on("zoom",ge(this._onZoom,this))),a.enable(o.get("roam"),{api:t,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.get("zoom")},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>vR||Math.abs(t.dy)>vR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ze(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=i,u){var d=u.min||0,h=u.max||1/0;f=Math.max(Math.min(h,f),d)}var v=f/c.zoom;c.zoom=f;var y=this.seriesModel.layoutInfo;n-=y.x,a-=y.y;var m=hr();Ta(m,m,[-n,-a]),dm(m,m,[v,v]),Ta(m,m,[n,a]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&cy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new qte(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(NC(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ed(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e})(mt);function ed(){return{nodeGroup:[],background:[],content:[]}}function ore(r,e,t,n,a,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),d=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var h=c.width,v=c.height,y=c.borderWidth,m=c.invisible,x=o.getRawIndex(),b=s&&s.getRawIndex(),T=o.viewChildren,C=c.upperHeight,k=T&&T.length,L=d.getModel("itemStyle"),A=d.getModel(["emphasis","itemStyle"]),D=d.getModel(["blur","itemStyle"]),P=d.getModel(["select","itemStyle"]),R=L.get("borderRadius")||0,z=fe("nodeGroup",rw);if(!z)return;if(l.add(z),z.x=c.x||0,z.y=c.y||0,z.markRedraw(),Ey(z).nodeWidth=h,Ey(z).nodeHeight=v,c.isAboveViewRoot)return z;var B=fe("background",pR,u,nre);B&&K(z,B,k&&c.upperLabelHeight);var N=d.getModel("emphasis"),W=N.get("focus"),$=N.get("blurScope"),H=N.get("disabled"),U=W==="ancestor"?o.getAncestorsIndices():W==="descendant"?o.getDescendantIndices():W;if(k)th(z)&&ll(z,!1),B&&(ll(B,!H),f.setItemGraphicEl(o.dataIndex,B),sb(B,U,$));else{var G=fe("content",pR,u,are);G&&V(z,G),B.disableMorphing=!0,B&&th(B)&&ll(B,!1),ll(z,!H),f.setItemGraphicEl(o.dataIndex,z);var X=d.getShallow("cursor");X&&G.attr("cursor",X),sb(z,U,$)}return z;function K(ye,ce,we){var xe=Ne(ce);if(xe.dataIndex=o.dataIndex,xe.seriesIndex=r.seriesIndex,ce.setShape({x:0,y:0,width:h,height:v,r:R}),m)Y(ce);else{ce.invisible=!1;var Ie=o.getVisual("style"),dt=Ie.stroke,ke=mR(L);ke.fill=dt;var $e=Qs(A);$e.fill=A.get("borderColor");var tt=Qs(D);tt.fill=D.get("borderColor");var bt=Qs(P);if(bt.fill=P.get("borderColor"),we){var Or=h-2*y;ne(ce,dt,Ie.opacity,{x:y,y:0,width:Or,height:C})}else ce.removeTextContent();ce.setStyle(ke),ce.ensureState("emphasis").style=$e,ce.ensureState("blur").style=tt,ce.ensureState("select").style=bt,Tl(ce)}ye.add(ce)}function V(ye,ce){var we=Ne(ce);we.dataIndex=o.dataIndex,we.seriesIndex=r.seriesIndex;var xe=Math.max(h-2*y,0),Ie=Math.max(v-2*y,0);if(ce.culling=!0,ce.setShape({x:y,y,width:xe,height:Ie,r:R}),m)Y(ce);else{ce.invisible=!1;var dt=o.getVisual("style"),ke=dt.fill,$e=mR(L);$e.fill=ke,$e.decal=dt.decal;var tt=Qs(A),bt=Qs(D),Or=Qs(P);ne(ce,ke,dt.opacity,null),ce.setStyle($e),ce.ensureState("emphasis").style=tt,ce.ensureState("blur").style=bt,ce.ensureState("select").style=Or,Tl(ce)}ye.add(ce)}function Y(ye){!ye.invisible&&i.push(ye)}function ne(ye,ce,we,xe){var Ie=d.getModel(xe?yR:gR),dt=ir(d.get("name"),null),ke=Ie.getShallow("show");vr(ye,sr(d,xe?yR:gR),{defaultText:ke?dt:null,inheritColor:ce,defaultOpacity:we,labelFetcher:r,labelDataIndex:o.dataIndex});var $e=ye.getTextContent();if($e){var tt=$e.style,bt=kh(tt.padding||0);xe&&(ye.setTextConfig({layoutRect:xe}),$e.disableLabelLayout=!0),$e.beforeUpdate=function(){var yr=Math.max((xe?xe.width:ye.shape.width)-bt[1]-bt[3],0),vn=Math.max((xe?xe.height:ye.shape.height)-bt[0]-bt[2],0);(tt.width!==yr||tt.height!==vn)&&$e.setStyle({width:yr,height:vn})},tt.truncateMinChar=2,tt.lineOverflow="truncate",ue(tt,xe,c);var Or=$e.getState("emphasis");ue(Or?Or.style:null,xe,c)}}function ue(ye,ce,we){var xe=ye?ye.text:null;if(!ce&&we.isLeafRoot&&xe!=null){var Ie=r.get("drillDownIcon",!0);ye.text=Ie?Ie+" "+xe:xe}}function fe(ye,ce,we,xe){var Ie=b!=null&&t[ye][b],dt=a[ye];return Ie?(t[ye][b]=null,Ce(dt,Ie)):m||(Ie=new ce,Ie instanceof ea&&(Ie.z2=sre(we,xe)),Be(dt,Ie)),e[ye][x]=Ie}function Ce(ye,ce){var we=ye[x]={};ce instanceof rw?(we.oldX=ce.x,we.oldY=ce.y):we.oldShape=ae({},ce.shape)}function Be(ye,ce){var we=ye[x]={},xe=o.parentNode,Ie=ce instanceof Ae;if(xe&&(!n||n.direction==="drillDown")){var dt=0,ke=0,$e=a.background[xe.getRawIndex()];!n&&$e&&$e.oldShape&&(dt=$e.oldShape.width,ke=$e.oldShape.height),Ie?(we.oldX=0,we.oldY=ke):we.oldShape={x:dt,y:ke,width:0,height:0}}we.fadein=!Ie}}function sre(r,e){return r*rre+e}var yh=O,lre=Pe,zy=-1,pr=(function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=Le(e);this.type=n,this.mappingMethod=t,this._normalizeData=fre[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(mS(a),ure(a)):t==="category"?a.categories?cre(a):mS(a,!0):(Rr(t!=="linear"||a.dataExtent),mS(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ge(this._normalizeData,this)},r.listVisualTypes=function(){return ot(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){Pe(e)?O(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=se(e)?[]:Pe(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&yh(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(se(e))e=e.slice();else if(lre(e)){var t=[];yh(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||pe(l)&&l===e+"")return o;n&&d(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(eg(f[1],e,c[1]))return o}else if(c[1]===1/0){if(eg(f[0],c[0],e))return o}else if(eg(f[0],c[0],e)&&eg(f[1],e,c[1]))return o;n&&d(c[0],o),n&&d(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function d(h,v){var y=Math.abs(h-e);y<i&&(i=y,a=v)}},r.visualHandlers={color:{applyVisual:td("color"),getColorMapper:function(){var e=this.option;return ge(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),bd.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=Rd(t,e.parsedVisual,a),i?a:Kn(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Kn(Rd(e,this.option.parsedVisual),"rgba")},category:bd,piecewise:function(e,t){var n=aw.call(this,t);return n==null&&(n=Kn(Rd(e,this.option.parsedVisual),"rgba")),n},fixed:Js}},colorHue:Jv(function(e,t){return Bi(e,t)}),colorSaturation:Jv(function(e,t){return Bi(e,null,t)}),colorLightness:Jv(function(e,t){return Bi(e,null,null,t)}),colorAlpha:Jv(function(e,t){return Kd(e,t)}),decal:{applyVisual:td("decal"),_normalizedToVisual:{linear:null,category:bd,piecewise:null,fixed:null}},opacity:{applyVisual:td("opacity"),_normalizedToVisual:nw([0,1])},liftZ:{applyVisual:td("liftZ"),_normalizedToVisual:{linear:Js,category:Js,piecewise:Js,fixed:Js}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:xR,category:bd,piecewise:function(e,t){var n=aw.call(this,t);return n==null&&(n=xR.call(this,e)),n},fixed:Js}},symbolSize:{applyVisual:td("symbolSize"),_normalizedToVisual:nw([0,1])}},r})();function ure(r){var e=r.pieceList;r.hasSpecialVisual=!1,O(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function cre(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(yh(e,function(o,s){t[o]=s}),!se(n)){var a=[];Pe(n)?yh(n,function(o,s){var l=t[s];a[l??zy]=o}):a[zy]=n,n=D4(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function mS(r,e){var t=r.visual,n=[];Pe(t)?yh(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),D4(r,n)}function Jv(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:nw([0,1])}}function xR(r){var e=this.option.visual;return e[Math.round(vt(r,[0,1],[0,e.length-1],!0))]||{}}function td(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function bd(r){var e=this.option.visual;return e[this.option.loop&&r!==zy?r%e.length:r]}function Js(){return this.option.visual[0]}function nw(r){return{linear:function(e){return vt(e,r,this.option.visual,!0)},category:bd,piecewise:function(e,t){var n=aw.call(this,t);return n==null&&(n=vt(e,r,this.option.visual,!0)),n},fixed:Js}}function aw(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=pr.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function D4(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=le(e,function(t){var n=$r(t);return n||[0,0,0,1]})),e}var fre={linear:function(r){return vt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=pr.findPieceIndex(r,e,!0);if(t!=null)return vt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??zy},fixed:Vt};function eg(r,e,t){return r?e<=t:e<t}var dre="itemStyle",P4=et();const hre={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||R4(t,{},r.getViewRoot().getAncestors(),r)}};function R4(r,e,t,n){var a=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=a.getModel(dre),l=pre(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),d;f!=null&&(d=SR(l),c=vre(f,d)),u.stroke=c;var h=r.viewChildren;if(!h||!h.length)d=SR(l),u.fill=d;else{var v=gre(r,a,i,s,l,h);O(h,function(y,m){if(y.depth>=t.length||y===t[y.depth]){var x=yre(a,l,y,m,v,n);R4(y,x,t,n)}})}}}function pre(r,e,t){var n=ae({},e),a=t.designatedVisualItemStyle;return O(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function SR(r){var e=xS(r,"color");if(e){var t=xS(r,"colorAlpha"),n=xS(r,"colorSaturation");return n&&(e=Bi(e,null,null,n)),t&&(e=Kd(e,t)),e}}function vre(r,e){return e!=null?Bi(e,null,null,r):null}function xS(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function gre(r,e,t,n,a,i){if(!(!i||!i.length)){var o=SS(e,"color")||a.color!=null&&a.color!=="none"&&(SS(e,"colorAlpha")||SS(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var d=new pr(f);return P4(d).drColorMappingBy=c,d}}}function SS(r,e){var t=r.get(e);return se(t)&&t.length?{name:e,range:t}:null}function yre(r,e,t,n,a,i){var o=ae({},e);if(a){var s=a.type,l=s==="color"&&P4(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var mh=Math.max,Oy=Math.min,_R=Tr,BC=O,E4=["itemStyle","borderWidth"],mre=["itemStyle","gapWidth"],xre=["upperLabel","show"],Sre=["upperLabel","height"];const _re={seriesType:"treemap",reset:function(r,e,t,n){var a=r.option,i=lr(r,t).refContainer,o=Dt(r.getBoxLayoutParams(),i),s=a.size||[],l=he(_R(o.width,s[0]),i.width),u=he(_R(o.height,s[1]),i.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],d=gh(n,f,r),h=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,v=r.getViewRoot(),y=L4(v);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?kre(r,d,v,l,u):h?[h.width,h.height]:[l,u],x=a.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var b={squareRatio:a.squareRatio,sort:x,leafDepth:a.leafDepth};v.hostTree.clearLayouts();var T={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(T),z4(v,b,!1,0),T=v.getLayout(),BC(y,function(k,L){var A=(y[L+1]||v).getValue();k.setLayout(ae({dataExtent:[A,A],borderWidth:0,upperHeight:0},T))})}var C=r.getData().tree.root;C.setLayout(Lre(o,h,d),!0),r.setLayoutInfo(o),O4(C,new ze(-o.x,-o.y,t.getWidth(),t.getHeight()),y,v,0)}};function z4(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(E4),u=s.get(mre)/2,c=N4(s),f=Math.max(l,c),d=l-u,h=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=mh(a-2*d,0),i=mh(i-d-h,0);var v=a*i,y=bre(r,s,v,e,t,n);if(y.length){var m={x:d,y:h,width:a,height:i},x=Oy(a,i),b=1/0,T=[];T.area=0;for(var C=0,k=y.length;C<k;){var L=y[C];T.push(L),T.area+=L.getLayout().area;var A=Mre(T,x,e.squareRatio);A<=b?(C++,b=A):(T.area-=T.pop().getLayout().area,bR(T,x,m,u,!1),x=Oy(m.width,m.height),T.length=T.area=0,b=1/0)}if(T.length&&bR(T,x,m,u,!0),!t){var D=s.get("childrenVisibleMin");D!=null&&v<D&&(t=!0)}for(var C=0,k=y.length;C<k;C++)z4(y[C],e,t,n+1)}}}function bre(r,e,t,n,a,i){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!l)return r.viewChildren=[];o=ht(o,function(h){return!h.isRemoved()}),Tre(o,s);var u=Cre(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=wre(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var d=o[c].getValue()/u.sum*t;o[c].setLayout({area:d})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function wre(r,e,t,n,a){if(!n)return t;for(var i=r.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return n==="asc"?a.splice(0,o-s):a.splice(s,o-s),t}function Tre(r,e){return e&&r.sort(function(t,n){var a=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return a===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a}),r}function Cre(r,e,t){for(var n=0,a=0,i=e.length;a<i;a++)n+=e[a].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],BC(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Mre(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?mh(u*n/l,l/(u*a)):1/0}function bR(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(a||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,d=r.length;f<d;f++){var h=r[f],v={},y=c?h.getLayout().area/c:0,m=v[l[o]]=mh(c-2*n,0),x=t[s[i]]+t[l[i]]-u,b=f===d-1||x<y?x:y,T=v[l[i]]=mh(b-2*n,0);v[s[o]]=t[s[o]]+Oy(n,m/2),v[s[i]]=u+Oy(n,T/2),u+=b,h.setLayout(v,!0)}t[s[o]]+=c,t[l[o]]-=c}function kre(r,e,t,n,a){var i=(e||{}).node,o=[n,a];if(!i||i===t)return o;for(var s,l=n*a,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var c=0,f=s.children,d=0,h=f.length;d<h;d++)c+=f[d].getValue();var v=i.getValue();if(v===0)return o;u*=c/v;var y=s.getModel(),m=y.get(E4),x=Math.max(m,N4(y));u+=4*m*m+(3*m+x)*Math.pow(u,.5),u>K_&&(u=K_),i=s}u<l&&(u=l);var b=Math.pow(u/l,.5);return[n*b,a*b]}function Lre(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var a=t.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function O4(r,e,t,n,a){var i=r.getLayout(),o=t[a],s=o&&o===r;if(!(o&&!s||a===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new ze(e.x-i.x,e.y-i.y,e.width,e.height);BC(r.viewChildren||[],function(u){O4(u,l,t,n,a+1)})}}function N4(r){return r.get(xre)?r.get(Sre):0}function Are(r){r.registerSeriesModel(Xte),r.registerChartView(ire),r.registerVisual(hre),r.registerLayout(_re),Yte(r)}function Ire(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){lt(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function Dre(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(o){var s=n.getName(o);i["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var d=l.getShallow(c[f],!0);d!=null&&n.setItemVisual(o,c[f],d)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){pe(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),c=a.ensureUniqueItemVisual(o,"style");ae(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],d=0;d<f.length;d++)a.setItemVisual(o,f[d],n.getItemVisual(l,f[d]))}})})}function tg(r){return r instanceof Array||(r=[r,r]),r}function Pre(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=tg(e.get("edgeSymbol")),i=tg(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=tg(s.getShallow("symbol",!0)),c=tg(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),d=n.ensureUniqueItemVisual(o,"style");switch(ae(d,f),d.stroke){case"source":{var h=l.node1.getVisual("style");d.stroke=h&&h.fill;break}case"target":{var h=l.node2.getVisual("style");d.stroke=h&&h.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var iw="-->",Gm=function(r){return r.get("autoCurveness")||null},B4=function(r,e){var t=Gm(r),n=20,a=[];if(lt(t))n=t;else if(se(t)){r.__curvenessList=t;return}e>n&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=a},xh=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(iw)},j4=function(r){var e=r.split(iw);return[e[0],e[2],e[1]].join(iw)},Rre=function(r,e){var t=xh(r.node1,r.node2,e);return e.__edgeMap[t]},Ere=function(r,e){var t=ow(xh(r.node1,r.node2,e),e),n=ow(xh(r.node2,r.node1,e),e);return t+n},ow=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function zre(r){Gm(r)&&(r.__curvenessList=[],r.__edgeMap={},B4(r))}function Ore(r,e,t,n){if(Gm(t)){var a=xh(r,e,t),i=t.__edgeMap,o=i[j4(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function jC(r,e,t,n){var a=Gm(e),i=se(a);if(!a)return null;var o=Rre(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=Ere(r,e);B4(e,u),r.lineStyle=r.lineStyle||{};var c=xh(r.node1,r.node2,e),f=e.__curvenessList,d=i||u%2?0:1;if(o.isForward)return f[d+s];var h=j4(c),v=ow(h,e),y=f[s+v+d];return n?i?a&&a[0]===0?(v+d)%2?y:-y:((v%2?0:1)+d)%2?y:-y:(v+d)%2?y:-y:f[s+v+d]}function F4(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),FC(t,r)}}function FC(r,e){r.eachEdge(function(t,n){var a=hn(t.getModel().get(["lineStyle","curveness"]),-jC(t,e,n,!0),0),i=ei(t.node1.getLayout()),o=ei(t.node2.getLayout()),s=[i,o];+a&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(s)})}function Nre(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),a=t.coordinateSystem;if(a&&a.type!=="view"){var i=t.getData(),o=[];O(a.dimensions,function(d){o=o.concat(i.mapDimensionsAll(d))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=i.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}FC(i.graph,t)}else(!n||n==="none")&&F4(t)})}function wd(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,a=e.getZoom(),i=(a-1)*t+1;return i/n}function Td(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var wR=Math.PI,_S=[];function VC(r,e,t,n){var a=r.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var d=a.pointToData(n),h=d[0],v=d[1],y=[h-l,v-u];Pl(y,y),Ad(y,y,c),t.setLayout([l+y[0],u+y[1]],!0);var m=r.get(["circular","rotateLabel"]);V4(t,m,l,u)}Bre[e](r,s,o,c,l,u,f),s.eachEdge(function(x,b){var T=hn(x.getModel().get(["lineStyle","curveness"]),jC(x,r,b),0),C=ei(x.node1.getLayout()),k=ei(x.node2.getLayout()),L,A=(C[0]+k[0])/2,D=(C[1]+k[1])/2;+T&&(T*=3,L=[l*T+A*(1-T),u*T+D*(1-T)]),x.setLayout([C,k,L])})}}}var Bre={value:function(r,e,t,n,a,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),d=u*(l?f:1)/2;s+=d,c.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=d})},symbolSize:function(r,e,t,n,a,i,o){var s=0;_S.length=o;var l=wd(r);e.eachNode(function(f){var d=Td(f);isNaN(d)&&(d=2),d<0&&(d=0),d*=l;var h=Math.asin(d/2/n);isNaN(h)&&(h=wR/2),_S[f.dataIndex]=h,s+=h*2});var u=(2*wR-s)/o/2,c=0;e.eachNode(function(f){var d=u+_S[f.dataIndex];c+=d,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=d})}};function V4(r,e,t,n){var a=r.getGraphicEl();if(a){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=a.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var d=s.ensureState("emphasis");ae(d.textConfig||(d.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function jre(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&VC(e,"symbolSize")})}var ku=Hg;function Fre(r,e,t){for(var n=r,a=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=as(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=ei(f.p),f.edges=null}var d=t.friction==null?.6:t.friction,h=d,v,y;return{warmUp:function(){h=d*.8},setFixed:function(m){n[m].fixed=!0},setUnfixed:function(m){n[m].fixed=!1},beforeStep:function(m){v=m},afterStep:function(m){y=m},step:function(m){v&&v(n,a);for(var x=[],b=n.length,T=0;T<a.length;T++){var C=a[T];if(!C.ignoreForceLayout){var k=C.n1,L=C.n2;Eo(x,L.p,k.p);var A=Yd(x)-C.d,D=L.w/(k.w+L.w);isNaN(D)&&(D=0),Pl(x,x),!k.fixed&&ku(k.p,k.p,x,D*A*h),!L.fixed&&ku(L.p,L.p,x,-(1-D)*A*h)}}for(var T=0;T<b;T++){var P=n[T];P.fixed||(Eo(x,l,P.p),ku(P.p,P.p,x,u*h))}for(var T=0;T<b;T++)for(var k=n[T],R=T+1;R<b;R++){var L=n[R];Eo(x,L.p,k.p);var A=Yd(x);A===0&&(fm(x,Math.random()-.5,Math.random()-.5),A=1);var z=(k.rep+L.rep)/A/A;!k.fixed&&ku(k.pp,k.pp,x,z),!L.fixed&&ku(L.pp,L.pp,x,-z)}for(var B=[],T=0;T<b;T++){var P=n[T];P.fixed||(Eo(B,P.p,P.pp),ku(P.p,P.p,B,h),Gr(P.pp,P.p))}h=h*.992;var N=h<.01;y&&y(n,a,N),m&&m(N)}}}function Vre(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},a=e.getGraph(),i=a.data,o=a.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(T){var C=i.getId(T);i.setItemLayout(T,n[C]||[NaN,NaN])}):!l||l==="none"?F4(e):l==="circular"&&VC(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),d=s.get("edgeLength"),h=se(f)?f:[f,f],v=se(d)?d:[d,d];v=[v[1],v[0]];var y=i.mapArray("value",function(T,C){var k=i.getItemLayout(C),L=vt(T,u,h);return isNaN(L)&&(L=(h[0]+h[1])/2),{w:L,rep:L,fixed:i.getItemModel(C).get("fixed"),p:!k||isNaN(k[0])||isNaN(k[1])?null:k}}),m=o.mapArray("value",function(T,C){var k=a.getEdgeByIndex(C),L=vt(T,c,v);isNaN(L)&&(L=(v[0]+v[1])/2);var A=k.getModel(),D=hn(k.getModel().get(["lineStyle","curveness"]),-jC(k,e,C,!0),0);return{n1:y[k.node1.dataIndex],n2:y[k.node2.dataIndex],d:L,curveness:D,ignoreForceLayout:A.get("ignoreForceLayout")}}),x=t.getBoundingRect(),b=Fre(y,m,{rect:x,gravity:s.get("gravity"),friction:s.get("friction")});b.beforeStep(function(T,C){for(var k=0,L=T.length;k<L;k++)T[k].fixed&&Gr(T[k].p,a.getNodeByIndex(k).getLayout())}),b.afterStep(function(T,C,k){for(var L=0,A=T.length;L<A;L++)T[L].fixed||a.getNodeByIndex(L).setLayout(T[L].p),n[i.getId(L)]=T[L].p;for(var L=0,A=C.length;L<A;L++){var D=C[L],P=a.getEdgeByIndex(L),R=D.n1.p,z=D.n2.p,B=P.getLayout();B=B?B.slice():[],B[0]=B[0]||[],B[1]=B[1]||[],Gr(B[0],R),Gr(B[1],z),+D.curveness&&(B[2]=[(R[0]+z[0])/2-(R[1]-z[1])*D.curveness,(R[1]+z[1])/2-(z[0]-R[0])*D.curveness]),P.setLayout(B)}}),e.forceLayout=b,e.preservedPoints=n,b.step()}else e.forceLayout=null})}function Gre(r,e,t){var n=lr(r,e),a=ae(r.getBoxLayoutParams(),{aspect:t}),i=Dt(a,n.refContainer);return vB(r,i,t)}function Wre(r,e){var t=[];return r.eachSeriesByType("graph",function(n){Bh({targetModel:n,coordSysType:"view",coordSysProvider:a,isDefaultDataCoordSys:!0});function a(){var i=n.getData(),o=i.mapArray(function(v){var y=i.getItemModel(v);return[+y.get("x"),+y.get("y")]}),s=[],l=[];Sm(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=Gre(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],d=l[1]-s[1],h=new Fl(null,{api:e,ecModel:r});return h.zoomLimit=n.get("scaleLimit"),h.setBoundingRect(s[0],s[1],f,d),h.setViewRect(c.x,c.y,c.width,c.height),h.setCenter(n.get("center")),h.setZoom(n.get("zoom")),t.push(h),h}}),t}var TR=Zt.prototype,bS=Ac.prototype,G4=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(G4);function wS(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var W4=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new G4},e.prototype.buildPath=function(t,n){wS(n)?TR.buildPath.call(this,t,n):bS.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return wS(this.shape)?TR.pointAt.call(this,t):bS.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=wS(n)?[n.x2-n.x1,n.y2-n.y1]:bS.tangentAt.call(this,t);return Pl(a,a)},e})(nt),TS=["fromSymbol","toSymbol"];function CR(r){return"_"+r+"Type"}function MR(r,e,t){var n=e.getItemVisual(t,r);if(!n||n==="none")return n;var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Bc(a),u=Nl(o||0,l);return n+l+u+(i||"")+(s||"")}function kR(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Bc(a),u=Nl(o||0,l),c=Kt(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=r,c}}function Hre(r){var e=new W4({name:"line",subPixelOptimize:!0});return sw(e.shape,r),e}function sw(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var GC=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createLine(t,n,a),i}return e.prototype._createLine=function(t,n,a){var i=t.hostModel,o=t.getItemLayout(n),s=t.getItemVisual(n,"z2"),l=Hre(o);l.shape.percent=0,It(l,{z2:Te(s,0),shape:{percent:1}},i,n),this.add(l),O(TS,function(u){var c=kR(u,t,n);this.add(c),this[CR(u)]=MR(u,t,n)},this),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};sw(l.shape,s),ct(o,l,i,n),O(TS,function(u){var c=MR(u,t,n),f=CR(u);if(this[f]!==c){this.remove(this.childOfName(u));var d=kR(u,t,n);this.add(d)}this[f]=c},this),this._updateCommonStl(t,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=a&&a.emphasisLineStyle,l=a&&a.blurLineStyle,u=a&&a.selectLineStyle,c=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,d=a&&a.focus,h=a&&a.blurScope;if(!a||t.hasItemOption){var v=t.getItemModel(n),y=v.getModel("emphasis");s=y.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),f=y.get("disabled"),d=y.get("focus"),h=y.get("blurScope"),c=sr(v)}var m=t.getItemVisual(n,"style"),x=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,O(TS,function(L){var A=this.childOfName(L);if(A){A.setColor(x),A.style.opacity=m.opacity;for(var D=0;D<tn.length;D++){var P=tn[D],R=o.getState(P);if(R){var z=R.style||{},B=A.ensureState(P),N=B.style||(B.style={});z.stroke!=null&&(N[A.__isEmptyBrush?"stroke":"fill"]=z.stroke),z.opacity!=null&&(N.opacity=z.opacity)}}A.markRedraw()}},this);var b=i.getRawValue(n);vr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(L,A){return i.getFormattedLabel(L,A,t.dataType)}},inheritColor:x||ee.color.neutral99,defaultOpacity:m.opacity,defaultText:(b==null?t.getName(n):isFinite(b)?Xt(b):b)+""});var T=this.getTextContent();if(T){var C=c.normal;T.__align=T.style.align,T.__verticalAlign=T.style.verticalAlign,T.__position=C.get("position")||"middle";var k=C.get("distance");se(k)||(k=[k,k]),T.__labelDistance=k}this.setTextConfig({position:null,local:!0,inside:!1}),Pt(this,d,h,f)},e.prototype.highlight=function(){Ui(this)},e.prototype.downplay=function(){Yi(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");sw(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),a=t.childOfName("toSymbol"),i=t.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),d=Eo([],f,c);Pl(d,d);function h(R,z){var B=R.__specifiedRotation;if(B==null){var N=l.tangentAt(z);R.attr("rotation",(z===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else R.attr("rotation",B)}if(n&&(n.setPosition(c),h(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),h(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var v=void 0,y=void 0,m=i.__labelDistance,x=m[0]*o,b=m[1]*o,T=u/2,C=l.tangentAt(T),k=[C[1],-C[0]],L=l.pointAt(T);k[1]>0&&(k[0]=-k[0],k[1]=-k[1]);var A=C[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var D=-Math.atan2(C[1],C[0]);f[0]<c[0]&&(D=Math.PI+D),i.rotation=D}var P=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":P=-b,y="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":P=b,y="top";break;default:P=0,y="middle"}switch(i.__position){case"end":i.x=d[0]*x+f[0],i.y=d[1]*b+f[1],v=d[0]>.8?"left":d[0]<-.8?"right":"center",y=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":i.x=-d[0]*x+c[0],i.y=-d[1]*b+c[1],v=d[0]>.8?"right":d[0]<-.8?"left":"center",y=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=x*A+c[0],i.y=c[1]+P,v=C[0]<0?"right":"left",i.originX=-x*A,i.originY=-P;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=L[0],i.y=L[1]+P,v="center",i.originY=-P;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-x*A+f[0],i.y=f[1]+P,v=C[0]>=0?"right":"left",i.originX=x*A,i.originY=-P;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||y,align:i.__align||v})}},e})(Ae),WC=(function(){function r(e){this.group=new Ae,this._LineCtor=e||GC}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=LR(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=LR(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!$re(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(CS(i)){var o=new this._LineCtor(t,a,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){is(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(CS(a)){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,n,a,i){var o=e.getItemGraphicEl(n);if(!CS(t.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(t,a,i):o=new this._LineCtor(t,a,i),t.setItemGraphicEl(a,o),this.group.add(o)},r})();function $re(r){return r.animators&&r.animators.length>0}function LR(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:sr(e)}}function AR(r){return isNaN(r[0])||isNaN(r[1])}function CS(r){return r&&!AR(r[0])&&!AR(r[1])}var MS=[],kS=[],LS=[],Lu=wr,AS=Vo,IR=Math.abs;function DR(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){MS[0]=Lu(n[0],a[0],i[0],c),MS[1]=Lu(n[1],a[1],i[1],c);var f=IR(AS(MS,e)-l);f<o&&(o=f,s=c)}for(var d=0;d<32;d++){var h=s+u;kS[0]=Lu(n[0],a[0],i[0],s),kS[1]=Lu(n[1],a[1],i[1],s),LS[0]=Lu(n[0],a[0],i[0],h),LS[1]=Lu(n[1],a[1],i[1],h);var f=AS(kS,e)-l;if(IR(f)<.01)break;var v=AS(LS,e)-l;u/=2,f<0?v>=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function IS(r,e){var t=[],n=Xd,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ei(u[0]),ei(u[1])],u[2]&&u.__original.push(ei(u[2])));var d=u.__original;if(u[2]!=null){if(Gr(a[0],d[0]),Gr(a[1],d[2]),Gr(a[2],d[1]),c&&c!=="none"){var h=Td(s.node1),v=DR(a,d[0],h*e);n(a[0][0],a[1][0],a[2][0],v,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],v,t),a[0][1]=t[3],a[1][1]=t[4]}if(f&&f!=="none"){var h=Td(s.node2),v=DR(a,d[1],h*e);n(a[0][0],a[1][0],a[2][0],v,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],v,t),a[1][1]=t[1],a[2][1]=t[2]}Gr(u[0],a[0]),Gr(u[1],a[2]),Gr(u[2],a[1])}else{if(Gr(i[0],d[0]),Gr(i[1],d[1]),Eo(o,i[1],i[0]),Pl(o,o),c&&c!=="none"){var h=Td(s.node1);Hg(i[0],i[0],o,h*e)}if(f&&f!=="none"){var h=Td(s.node2);Hg(i[1],i[1],o,-h*e)}Gr(u[0],i[0]),Gr(u[1],i[1])}})}var H4=et();function Ure(r){if(r)return H4(r).bridge}function PR(r,e){r&&(H4(r).bridge=e)}function RR(r){return r.type==="view"}var Yre=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new Gh,i=new WC,o=this.group,s=new Ae;this._controller=new jl(n.getZr()),this._controllerHost={target:s},s.add(a.group),s.add(i.group),o.add(s),this._symbolDraw=a,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=a,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(a);var u=this._symbolDraw,c=this._lineDraw;if(RR(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):ct(this._mainGroup,f,t)}IS(t.getGraph(),wd(t));var d=t.getData();u.updateData(d);var h=t.getEdgeData();c.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,t,a),clearTimeout(this._layoutTimeout);var v=t.forceLayout,y=t.get(["force","layoutAnimation"]);v&&(s=!0,this._startForceLayoutIteration(v,a,y));var m=t.get("layout");d.graph.eachNode(function(C){var k=C.dataIndex,L=C.getGraphicEl(),A=C.getModel();if(L){L.off("drag").off("dragend");var D=A.get("draggable");D&&L.on("drag",function(R){switch(m){case"force":v.warmUp(),!i._layouting&&i._startForceLayoutIteration(v,a,y),v.setFixed(k),d.setItemLayout(k,[L.x,L.y]);break;case"circular":d.setItemLayout(k,[L.x,L.y]),C.setLayout({fixed:!0},!0),VC(t,"symbolSize",C,[R.offsetX,R.offsetY]),i.updateLayout(t);break;case"none":default:d.setItemLayout(k,[L.x,L.y]),FC(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){v&&v.setUnfixed(k)}),L.setDraggable(D,!!A.get("cursor"));var P=A.get(["emphasis","focus"]);P==="adjacency"&&(Ne(L).focus=C.getAdjacentDataIndices())}}),d.graph.eachEdge(function(C){var k=C.getGraphicEl(),L=C.getModel().get(["emphasis","focus"]);k&&L==="adjacency"&&(Ne(k).focus={edge:[C.dataIndex],node:[C.node1.dataIndex,C.node2.dataIndex]})});var x=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),b=d.getLayout("cx"),T=d.getLayout("cy");d.graph.eachNode(function(C){V4(C,x,b,T)}),this._firstRender=!1,s||this._renderThumbnail(t,a,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n,a){var i=this,o=!1;(function s(){t.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,n,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(a?i._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,n,a){var i=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!RR(s)){i.disable();return}i.enable(n.get("roam"),{api:a,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!t||t.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,n,a){this._active&&(DC(this._controllerHost,a.dx,a.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,n,a){this._active&&(PC(this._controllerHost,a.zoom,a.originX,a.originY),this._updateNodeAndLinkScale(),IS(t.getGraph(),wd(t)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=wd(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){this._active&&(IS(t.getGraph(),wd(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,n=t.coordinateSystem;if(n.type==="view"){var a=Ure(t);if(a)return{bridge:a,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,n,a,i){var o=this._getThumbnailInfo();if(o){var s=new Ae,l=a.group.children(),u=i.group.children(),c=new Ae,f=new Ae;s.add(f),s.add(c);for(var d=0;d<l.length;d++){var h=l[d],v=h.children()[0],y=h.x,m=h.y,x=Le(v.shape),b=ae(x,{width:v.scaleX,height:v.scaleY,x:y-v.scaleX/2,y:m-v.scaleY/2}),T=Le(v.style),C=new v.constructor({shape:b,style:T,z2:151});f.add(C)}for(var d=0;d<u.length;d++){var h=u[d],k=h.children()[0],T=Le(k.style),b=Le(k.shape),L=new W4({style:T,shape:b,z2:151});c.add(L)}o.bridge.renderContent({api:n,roamType:t.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e})(mt);function Au(r){return"_EC_"+r}var Xre=(function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[Au(e)]){var a=new el(e,t);return a.hostGraph=this,this.nodes.push(a),n[Au(e)]=a,a}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Au(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(lt(e)&&(e=this.nodes[e]),lt(t)&&(t=this.nodes[t]),e instanceof el||(e=a[Au(e)]),t instanceof el||(t=a[Au(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new $4(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof el&&(e=e.id),t instanceof el&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof el||(t=this._nodesMap[Au(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(a,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(a,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=a[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,a=0;a<t.length;a++)e.addNode(t[a].id,t[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r})(),el=(function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=be(),t=be(),n=0,a=this.edges.length;n<a;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var o=[i.node1],s=[i.node2],l=0;l<o.length;){var u=o[l];l++,t.set(u.dataIndex,!0);for(var c=u.inEdges,f=0,d=c.length,h=void 0,v=void 0;f<d;f++)h=c[f],v=h.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(h.node1))}for(l=0;l<s.length;){var y=s[l];l++,t.set(y.dataIndex,!0);for(var m=y.outEdges,f=0,x=m.length,b=void 0,T=void 0;f<x;f++)b=m[f],T=b.dataIndex,T>=0&&!e.hasKey(T)&&(e.set(T,!0),s.push(b.node2))}}}return{edge:e.keys(),node:t.keys()}},r})(),$4=(function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=be(),t=be();e.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i<n.length;){var o=n[i];i++,t.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,f=void 0;l<u;l++)c=o.inEdges[l],f=c.dataIndex,f>=0&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(i=0;i<a.length;){var d=a[i];i++,t.set(d.dataIndex,!0);for(var h=d.outEdges,l=0,u=h.length,v=void 0,y=void 0;l<u;l++)v=d.outEdges[l],y=v.dataIndex,y>=0&&!e.hasKey(y)&&(e.set(y,!0),a.push(v.node2))}return{edge:e.keys(),node:t.keys()}},r})();function U4(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Wt(el,U4("hostGraph","data"));Wt($4,U4("hostGraph","edgeData"));function HC(r,e,t,n,a){for(var i=new Xre(n),o=0;o<r.length;o++)i.addNode(Tr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,d=c.target;i.addEdge(f,d,u)&&(l.push(c),s.push(Tr(ir(c.id,null),f+" > "+d)),u++)}var h=t.get("coordinateSystem"),v;if(h==="cartesian2d"||h==="polar"||h==="matrix")v=di(r,t);else{var y=zc.get(h),m=y?y.dimensions||[]:[];Ue(m,"value")<0&&m.concat(["value"]);var x=jc(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;v=new Ur(x,t),v.initData(r)}var b=new Ur(["value"],t);return b.initData(l,s),a&&a(v,b),M4({mainData:v,struct:i,structAttr:"graph",datas:{node:v,edge:b},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Zre=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new Hc(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),_l(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){zre(this);var s=HC(i,a,this,!0,l);return O(s.edges,function(u){Ore(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(v){var y=o._categoriesModels,m=v.getShallow("category"),x=y[m];return x&&(x.parentModel=v.parentModel,v.parentModel=x),v});var f=rt.prototype.getModel;function d(v,y){var m=f.call(this,v,y);return m.resolveParentPath=h,m}c.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=d,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var y=v.slice();return v[0]==="label"?y[0]="edgeLabel":v[1]==="label"&&(y[1]="edgeLabel"),y}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=ZB({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=le(this.option.categories||[],function(a){return a.value!=null?a:ae({value:0},a)}),n=new Ur(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:ee.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:ee.color.primary}}},e})(St);function Kre(r){r.registerChartView(Yre),r.registerSeriesModel(Zre),r.registerProcessor(Ire),r.registerVisual(Dre),r.registerVisual(Pre),r.registerLayout(Nre),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,jre),r.registerLayout(Vre),r.registerCoordinateSystem("graphView",{dimensions:Fl.dimensions,create:Wre}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Vt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Vt),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=n.getViewOfSeriesModel(a);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(a,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(a,n,e));var o=a.coordinateSystem,s=jm(o,e,a.get("scaleLimit"));a.setCenter&&a.setCenter(s.center),a.setZoom&&a.setZoom(s.zoom)})})}var ER=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;Ne(i).dataType="node",i.z2=2;var o=new st;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.graph.getNodeByIndex(n),l=t.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=t.getItemLayout(n),d=ae(qa(u.getModel("itemStyle"),f,!0),f),h=this;if(isNaN(d.startAngle)){h.setShape(d);return}i?h.setShape(d):ct(h,{shape:d},l,n);var v=ae(qa(u.getModel("itemStyle"),f,!0),f);o.setShape(v),o.useStyle(t.getItemVisual(n,"style")),or(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(n,h),or(h,u,"itemStyle");var y=c.get("focus");Pt(this,y==="adjacency"?s.getAdjacentDataIndices():y,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this.getTextContent(),o=a.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");i.ignore=!c.get("show");var f=sr(n),d=a.getVisual("style");vr(i,f,{labelFetcher:{getFormattedLabel:function(b,T,C,k,L,A){return t.getFormattedLabel(b,T,"node",k,hn(L,f.normal&&f.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:a.dataIndex,defaultText:a.dataIndex+"",inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:"startArc"});var h=c.get("position")||"outside",v=c.get("distance")||0,y;h==="outside"?y=o.r+v:y=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var m=h!=="outside"?c.get("align")||"center":l>0?"left":"right",x=h!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*y+o.cx,y:u*y+o.cy,rotation:0,style:{align:m,verticalAlign:x}})},e})(Er),qre=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this)||this;return Ne(o).dataType="edge",o.updateData(t,n,a,i,!0),o}return e.prototype.buildPath=function(t,n){t.moveTo(n.s1[0],n.s1[1]);var a=.7,i=n.clockwise;t.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!i),t.bezierCurveTo((n.cx-n.s2[0])*a+n.s2[0],(n.cy-n.s2[1])*a+n.s2[1],(n.cx-n.t1[0])*a+n.t1[0],(n.cy-n.t1[1])*a+n.t1[1],n.t1[0],n.t1[1]),t.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!i),t.bezierCurveTo((n.cx-n.t2[0])*a+n.t2[0],(n.cy-n.t2[1])*a+n.t2[1],(n.cx-n.s1[0])*a+n.s1[0],(n.cy-n.s1[1])*a+n.s1[1],n.s1[0],n.s1[1]),t.closePath()},e.prototype.updateData=function(t,n,a,i,o){var s=t.hostModel,l=n.graph.getEdgeByIndex(a),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),d=f.getModel("lineStyle"),h=f.getModel("emphasis"),v=h.get("focus"),y=ae(qa(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(y.sStartAngle)||isNaN(y.tStartAngle)){m.setShape(y);return}o?(m.setShape(y),zR(m,l,t,d)):(ta(m),zR(m,l,t,d),ct(m,{shape:y},s,a)),Pt(this,v==="adjacency"?l.getAdjacentDataIndices():v,h.get("blurScope"),h.get("disabled")),or(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e})(nt);function zR(r,e,t,n){var a=e.node1,i=e.node2,o=r.style;r.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=t.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(a.dataIndex,"style").fill,u=t.getItemVisual(i.dataIndex,"style").fill;if(pe(l)&&pe(u)){var c=r.shape,f=(c.s1[0]+c.s2[0])/2,d=(c.s1[1]+c.s2[1])/2,h=(c.t1[0]+c.t2[0])/2,v=(c.t1[1]+c.t2[1])/2;o.fill=new Rl(f,d,h,v,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Qre=Math.PI/180,Jre=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*Qre;if(i.diff(o).add(function(c){var f=i.getItemLayout(c);if(f){var d=new ER(i,c,l);Ne(d).dataIndex=c,s.add(d)}}).update(function(c,f){var d=o.getItemGraphicEl(f),h=i.getItemLayout(c);if(!h){d&&ji(d,t,f);return}d?d.updateData(i,c,l):d=new ER(i,c,l),s.add(d)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&ji(f,t,c)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=he(u[0],a.getWidth()),this.group.originY=he(u[1],a.getHeight()),It(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,n){var a=t.getData(),i=t.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new qre(a,i,l,n);Ne(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,i,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&ji(u,t,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e})(mt),ene=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new Hc(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&a){var o=HC(i,a,this,!0,s);return o.data}function s(l,u){var c=rt.prototype.getModel;function f(h,v){var y=c.call(this,h,v);return y.resolveParentPath=d,y}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=d,h.getModel=f,h});function d(h){if(h&&(h[0]==="label"||h[1]==="label")){var v=h.slice();return h[0]==="label"?v[0]="edgeLabel":h[1]==="label"&&(v[1]="edgeLabel"),v}return h}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){var i=this.getDataParams(t,a);if(a==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:i.value,noValue:i.value==null})}return rr("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(n==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(t);if(a.name==null&&(a.name=i.getName(t)),a.value==null){var s=o.getLayout().value;a.value=s}}return a},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e})(St),DS=Math.PI/180;function tne(r,e){r.eachSeriesByType("chord",function(t){rne(t,e)})}function rne(r,e){var t=r.getData(),n=t.graph,a=r.getEdgeData(),i=a.count();if(i){var o=pB(r,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((r.get("padAngle")||0)*DS,0),d=Math.max((r.get("minAngle")||0)*DS,0),h=-r.get("startAngle")*DS,v=h+Math.PI*2,y=r.get("clockwise"),m=y?1:-1,x=[h,v];_m(x,!y);var b=x[0],T=x[1],C=T-b,k=t.getSum("value")===0&&a.getSum("value")===0,L=[],A=0;n.eachEdge(function(G){var X=k?1:G.getValue("value");k&&(X>0||d)&&(A+=2);var K=G.node1.dataIndex,V=G.node2.dataIndex;L[K]=(L[K]||0)+X,L[V]=(L[V]||0)+X});var D=0;if(n.eachNode(function(G){var X=G.getValue("value");isNaN(X)||(L[G.dataIndex]=Math.max(X,L[G.dataIndex]||0)),!k&&(L[G.dataIndex]>0||d)&&A++,D+=L[G.dataIndex]||0}),!(A===0||D===0)){f*A>=Math.abs(C)&&(f=Math.max(0,(Math.abs(C)-d*A)/A)),(f+d)*A>=Math.abs(C)&&(d=(Math.abs(C)-f*A)/A);var P=(C-f*A*m)/D,R=0,z=0,B=0;n.eachNode(function(G){var X=L[G.dataIndex]||0,K=P*(D?X:1)*m;Math.abs(K)<d?R+=d-Math.abs(K):(z+=Math.abs(K)-d,B+=Math.abs(K)),G.setLayout({angle:K,value:X})});var N=!1;if(R>z){var W=R/z;n.eachNode(function(G){var X=G.getLayout().angle;Math.abs(X)>=d?G.setLayout({angle:X*W,ratio:W},!0):G.setLayout({angle:d,ratio:d===0?1:X/d},!0)})}else n.eachNode(function(G){if(!N){var X=G.getLayout().angle,K=Math.min(X/B,1),V=K*R;X-V<d&&(N=!0)}});var $=R;n.eachNode(function(G){if(!($<=0)){var X=G.getLayout().angle;if(X>d&&d>0){var K=N?1:Math.min(X/B,1),V=X-d,Y=Math.min(V,Math.min($,R*K));$-=Y,G.setLayout({angle:X-Y,ratio:(X-Y)/X},!0)}else d>0&&G.setLayout({angle:d,ratio:X===0?1:d/X},!0)}});var H=b,U=[];n.eachNode(function(G){var X=Math.max(G.getLayout().angle,d);G.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:H,endAngle:H+X*m,clockwise:y},!0),U[G.dataIndex]=H,H+=(X+f)*m}),n.eachEdge(function(G){var X=k?1:G.getValue("value"),K=P*(D?X:1)*m,V=G.node1.dataIndex,Y=U[V]||0,ne=Math.abs((G.node1.getLayout().ratio||1)*K),ue=Y+ne*m,fe=[s+c*Math.cos(Y),l+c*Math.sin(Y)],Ce=[s+c*Math.cos(ue),l+c*Math.sin(ue)],Be=G.node2.dataIndex,ye=U[Be]||0,ce=Math.abs((G.node2.getLayout().ratio||1)*K),we=ye+ce*m,xe=[s+c*Math.cos(ye),l+c*Math.sin(ye)],Ie=[s+c*Math.cos(we),l+c*Math.sin(we)];G.setLayout({s1:fe,s2:Ce,sStartAngle:Y,sEndAngle:ue,t1:xe,t2:Ie,tStartAngle:ye,tEndAngle:we,cx:s,cy:l,r:c,value:X,clockwise:y}),U[V]=ue,U[Be]=we})}}}function nne(r){r.registerChartView(Jre),r.registerSeriesModel(ene),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,tne),r.registerProcessor(Gc("chord"))}var ane=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),ine=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new ane},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),c=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,c)},e})(nt);function one(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=he(t[0],e.getWidth()),s=he(t[1],e.getHeight()),l=he(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function rg(r,e){var t=r==null?"":r+"";return e&&(pe(e)?t=e.replace("{value}",t):Me(e)&&(t=e(r))),t}var sne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=one(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),d=f.get("roundCap"),h=d?Ay:Er,v=f.get("show"),y=f.getModel("lineStyle"),m=y.get("width"),x=[u,c];_m(x,!l),u=x[0],c=x[1];for(var b=c-u,T=u,C=[],k=0;v&&k<i.length;k++){var L=Math.min(Math.max(i[k][0],0),1);c=u+b*L;var A=new h({shape:{startAngle:T,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-m,r:o.r},silent:!0});A.setStyle({fill:i[k][1]}),A.setStyle(y.getLineStyle(["color","width"])),C.push(A),T=c}C.reverse(),O(C,function(P){return s.add(P)});var D=function(P){if(P<=0)return i[0][1];var R;for(R=0;R<i.length;R++)if(i[R][0]>=P&&(R===0?0:i[R-1][0])<P)return i[R][1];return i[R-1][1]};this._renderTicks(t,n,a,D,o,u,c,l,m),this._renderTitleAndDetail(t,n,a,D,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,D,o,u,c,l,m)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,c){for(var f=this.group,d=o.cx,h=o.cy,v=o.r,y=+t.get("min"),m=+t.get("max"),x=t.getModel("splitLine"),b=t.getModel("axisTick"),T=t.getModel("axisLabel"),C=t.get("splitNumber"),k=b.get("splitNumber"),L=he(x.get("length"),v),A=he(b.get("length"),v),D=s,P=(l-s)/C,R=P/k,z=x.getModel("lineStyle").getLineStyle(),B=b.getModel("lineStyle").getLineStyle(),N=x.get("distance"),W,$,H=0;H<=C;H++){if(W=Math.cos(D),$=Math.sin(D),x.get("show")){var U=N?N+c:c,G=new Zt({shape:{x1:W*(v-U)+d,y1:$*(v-U)+h,x2:W*(v-L-U)+d,y2:$*(v-L-U)+h},style:z,silent:!0});z.stroke==="auto"&&G.setStyle({stroke:i(H/C)}),f.add(G)}if(T.get("show")){var U=T.get("distance")+N,X=rg(Xt(H/C*(m-y)+y),T.get("formatter")),K=i(H/C),V=W*(v-L-U)+d,Y=$*(v-L-U)+h,ne=T.get("rotate"),ue=0;ne==="radial"?(ue=-D+2*Math.PI,ue>Math.PI/2&&(ue+=Math.PI)):ne==="tangential"?ue=-D-Math.PI/2:lt(ne)&&(ue=ne*Math.PI/180),ue===0?f.add(new st({style:wt(T,{text:X,x:V,y:Y,verticalAlign:$<-.8?"top":$>.8?"bottom":"middle",align:W<-.4?"left":W>.4?"right":"center"},{inheritColor:K}),silent:!0})):f.add(new st({style:wt(T,{text:X,x:V,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:K}),silent:!0,originX:V,originY:Y,rotation:ue}))}if(b.get("show")&&H!==C){var U=b.get("distance");U=U?U+c:c;for(var fe=0;fe<=k;fe++){W=Math.cos(D),$=Math.sin(D);var Ce=new Zt({shape:{x1:W*(v-U)+d,y1:$*(v-U)+h,x2:W*(v-A-U)+d,y2:$*(v-A-U)+h},silent:!0,style:B});B.stroke==="auto"&&Ce.setStyle({stroke:i((H+fe/k)/C)}),f.add(Ce),D+=R}D-=R}else D+=P}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,c){var f=this.group,d=this._data,h=this._progressEls,v=[],y=t.get(["pointer","show"]),m=t.getModel("progress"),x=m.get("show"),b=t.getData(),T=b.mapDimension("value"),C=+t.get("min"),k=+t.get("max"),L=[C,k],A=[s,l];function D(R,z){var B=b.getItemModel(R),N=B.getModel("pointer"),W=he(N.get("width"),o.r),$=he(N.get("length"),o.r),H=t.get(["pointer","icon"]),U=N.get("offsetCenter"),G=he(U[0],o.r),X=he(U[1],o.r),K=N.get("keepAspect"),V;return H?V=Kt(H,G-W/2,X-$,W,$,null,K):V=new ine({shape:{angle:-Math.PI/2,width:W,r:$,x:G,y:X}}),V.rotation=-(z+Math.PI/2),V.x=o.cx,V.y=o.cy,V}function P(R,z){var B=m.get("roundCap"),N=B?Ay:Er,W=m.get("overlap"),$=W?m.get("width"):c/b.count(),H=W?o.r-$:o.r-(R+1)*$,U=W?o.r:o.r-R*$,G=new N({shape:{startAngle:s,endAngle:z,cx:o.cx,cy:o.cy,clockwise:u,r0:H,r:U}});return W&&(G.z2=vt(b.get(T,R),[C,k],[100,0],!0)),G}(x||y)&&(b.diff(d).add(function(R){var z=b.get(T,R);if(y){var B=D(R,s);It(B,{rotation:-((isNaN(+z)?A[0]:vt(z,L,A,!0))+Math.PI/2)},t),f.add(B),b.setItemGraphicEl(R,B)}if(x){var N=P(R,s),W=m.get("clip");It(N,{shape:{endAngle:vt(z,L,A,W)}},t),f.add(N),nb(t.seriesIndex,b.dataType,R,N),v[R]=N}}).update(function(R,z){var B=b.get(T,R);if(y){var N=d.getItemGraphicEl(z),W=N?N.rotation:s,$=D(R,W);$.rotation=W,ct($,{rotation:-((isNaN(+B)?A[0]:vt(B,L,A,!0))+Math.PI/2)},t),f.add($),b.setItemGraphicEl(R,$)}if(x){var H=h[z],U=H?H.shape.endAngle:s,G=P(R,U),X=m.get("clip");ct(G,{shape:{endAngle:vt(B,L,A,X)}},t),f.add(G),nb(t.seriesIndex,b.dataType,R,G),v[R]=G}}).execute(),b.each(function(R){var z=b.getItemModel(R),B=z.getModel("emphasis"),N=B.get("focus"),W=B.get("blurScope"),$=B.get("disabled");if(y){var H=b.getItemGraphicEl(R),U=b.getItemVisual(R,"style"),G=U.fill;if(H instanceof gr){var X=H.style;H.useStyle(ae({image:X.image,x:X.x,y:X.y,width:X.width,height:X.height},U))}else H.useStyle(U),H.type!=="pointer"&&H.setColor(G);H.setStyle(z.getModel(["pointer","itemStyle"]).getItemStyle()),H.style.fill==="auto"&&H.setStyle("fill",i(vt(b.get(T,R),L,[0,1],!0))),H.z2EmphasisLift=0,or(H,z),Pt(H,N,W,$)}if(x){var K=v[R];K.useStyle(b.getItemVisual(R,"style")),K.setStyle(z.getModel(["progress","itemStyle"]).getItemStyle()),K.z2EmphasisLift=0,or(K,z),Pt(K,N,W,$)}}),this._progressEls=v)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),c=Kt(s,n.cx-o/2+he(l[0],n.r),n.cy-o/2+he(l[1],n.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),d=new Ae,h=[],v=[],y=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(x){h[x]=new st({silent:!0}),v[x]=new st({silent:!0})}).update(function(x,b){h[x]=s._titleEls[b],v[x]=s._detailEls[b]}).execute(),l.each(function(x){var b=l.getItemModel(x),T=l.get(u,x),C=new Ae,k=i(vt(T,[c,f],[0,1],!0)),L=b.getModel("title");if(L.get("show")){var A=L.get("offsetCenter"),D=o.cx+he(A[0],o.r),P=o.cy+he(A[1],o.r),R=h[x];R.attr({z2:m?0:2,style:wt(L,{x:D,y:P,text:l.getName(x),align:"center",verticalAlign:"middle"},{inheritColor:k})}),C.add(R)}var z=b.getModel("detail");if(z.get("show")){var B=z.get("offsetCenter"),N=o.cx+he(B[0],o.r),W=o.cy+he(B[1],o.r),$=he(z.get("width"),o.r),H=he(z.get("height"),o.r),U=t.get(["progress","show"])?l.getItemVisual(x,"style").fill:k,R=v[x],G=z.get("formatter");R.attr({z2:m?0:2,style:wt(z,{x:N,y:W,text:rg(T,G),width:isNaN($)?null:$,height:isNaN(H)?null:H,align:"center",verticalAlign:"middle"},{inheritColor:U})}),K5(R,{normal:z},T,function(K){return rg(K,G)}),y&&q5(R,x,l,t,{getFormattedLabel:function(K,V,Y,ne,ue,fe){return rg(fe?fe.interpolatedValue:T,G)}}),C.add(R)}d.add(C)}),this.group.add(d),this._titleEls=h,this._detailEls=v},e.type="gauge",e})(mt),lne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Wc(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,ee.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:ee.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:ee.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:ee.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:ee.color.neutral00,borderWidth:0,borderColor:ee.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:ee.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:ee.color.transparent,borderWidth:0,borderColor:ee.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:ee.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(St);function une(r){r.registerChartView(sne),r.registerSeriesModel(lne)}var cne=["itemStyle","opacity"],fne=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Cr,s=new st;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(cne);c=c??1,a||ta(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,It(i,{style:{opacity:c}},o,n)):ct(i,{style:{opacity:c},shape:{points:l.points}},o,n),or(i,s),this._updateLabel(t,n),Pt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),d=f.fill;vr(o,sr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var h=l.getModel("label"),v=h.get("color"),y=v==="inherit"?d:null;a.setTextConfig({local:!0,inside:!!c.inside,insideStroke:y,outsideFill:y});var m=c.linePoints;i.setShape({points:m}),a.textGuideLineConfig={anchor:m?new Ee(m[0][0],m[0][1]):null},ct(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),yC(a,mC(l),{stroke:d})},e})(zr),dne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new fne(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);ji(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(mt),hne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Hc(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Wc(this,{coordDimensions:["value"],encodeDefaulter:He($T,this)})},e.prototype._defaultLabelLine=function(t){_l(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:ee.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:ee.color.primary}}},e})(St);function pne(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o<s;o++)a[o]=o;return Me(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function vne(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var a=r.getItemModel(n),i=a.getModel("label"),o=i.get("position"),s=a.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,d,h,v;if(c)o==="insideLeft"?(d=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(d=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,f="right"):(d=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),v=[[d,h],[d,h]];else{var y=void 0,m=void 0,x=void 0,b=void 0,T=s.get("length");o==="left"?(y=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,x=y-T,d=x-5,f="right"):o==="right"?(y=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,x=y+T,d=x+5,f="left"):o==="top"?(y=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,b=m-T,h=b-5,f="center"):o==="bottom"?(y=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,b=m+T,h=b+5,f="center"):o==="rightTop"?(y=t==="horizontal"?u[3][0]:u[1][0],m=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(b=m-T,h=b-5,f="center"):(x=y+T,d=x+5,f="top")):o==="rightBottom"?(y=u[2][0],m=u[2][1],t==="horizontal"?(b=m+T,h=b+5,f="center"):(x=y+T,d=x+5,f="bottom")):o==="leftTop"?(y=u[0][0],m=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(b=m-T,h=b-5,f="center"):(x=y-T,d=x-5,f="right")):o==="leftBottom"?(y=t==="horizontal"?u[1][0]:u[3][0],m=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(b=m+T,h=b+5,f="center"):(x=y-T,d=x-5,f="right")):(y=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,t==="horizontal"?(b=m+T,h=b+5,f="center"):(x=y+T,d=x+5,f="left")),t==="horizontal"?(x=y,d=x):(b=m,h=b),v=[[y,m],[x,b]]}l.label={linePoints:v,x:d,y:h,verticalAlign:"middle",textAlign:f,inside:c}})}function gne(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=lr(t,e),s=Dt(t.getBoxLayoutParams(),o.refContainer),l=t.get("orient"),u=s.width,c=s.height,f=pne(n,i),d=s.x,h=s.y,v=l==="horizontal"?[he(t.get("minSize"),c),he(t.get("maxSize"),c)]:[he(t.get("minSize"),u),he(t.get("maxSize"),u)],y=n.getDataExtent(a),m=t.get("min"),x=t.get("max");m==null&&(m=Math.min(y[0],0)),x==null&&(x=y[1]);var b=t.get("funnelAlign"),T=t.get("gap"),C=l==="horizontal"?u:c,k=(C-T*(n.count()-1))/n.count(),L=function($,H){if(l==="horizontal"){var U=n.get(a,$)||0,G=vt(U,[m,x],v,!0),X=void 0;switch(b){case"top":X=h;break;case"center":X=h+(c-G)/2;break;case"bottom":X=h+(c-G);break}return[[H,X],[H,X+G]]}var K=n.get(a,$)||0,V=vt(K,[m,x],v,!0),Y;switch(b){case"left":Y=d;break;case"center":Y=d+(u-V)/2;break;case"right":Y=d+u-V;break}return[[Y,H],[Y+V,H]]};i==="ascending"&&(k=-k,T=-T,l==="horizontal"?d+=u:h+=c,f=f.reverse());for(var A=0;A<f.length;A++){var D=f[A],P=f[A+1],R=n.getItemModel(D);if(l==="horizontal"){var z=R.get(["itemStyle","width"]);z==null?z=k:(z=he(z,u),i==="ascending"&&(z=-z));var B=L(D,d),N=L(P,d+z);d+=z+T,n.setItemLayout(D,{points:B.concat(N.slice().reverse())})}else{var W=R.get(["itemStyle","height"]);W==null?W=k:(W=he(W,c),i==="ascending"&&(W=-W));var B=L(D,h),N=L(P,h+W);h+=W+T,n.setItemLayout(D,{points:B.concat(N.slice().reverse())})}}vne(n)})}function yne(r){r.registerChartView(dne),r.registerSeriesModel(hne),r.registerLayout(gne),r.registerProcessor(Gc("funnel"))}var mne=.3,xne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Ae,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=NR(t);s.diff(l).add(d).update(h).remove(v).execute();function d(m){var x=OR(s,o,m,c,u);PS(x,s,m,f)}function h(m,x){var b=l.getItemGraphicEl(x),T=Y4(s,m,c,u);s.setItemGraphicEl(m,b),ct(b,{shape:{points:T}},t,m),ta(b),PS(b,s,m,f)}function v(m){var x=l.getItemGraphicEl(m);o.remove(x)}if(!this._initialized){this._initialized=!0;var y=Sne(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(y)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,a){for(var i=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=NR(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=OR(i,this._dataGroup,c,s,o);f.incremental=!0,PS(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(mt);function Sne(r,e,t){var n=r.model,a=r.getRect(),i=new Qe({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),It(i,{shape:{width:a.width,height:a.height}},e,t),i}function Y4(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);_ne(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function OR(r,e,t,n,a){var i=Y4(r,t,n,a),o=new Cr({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function NR(r){var e=r.get("smooth",!0);return e===!0&&(e=mne),e=ai(e),Dr(e)&&(e=0),{smooth:e}}function PS(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var a=e.getItemModel(t),i=a.getModel("emphasis");or(r,a,"lineStyle"),Pt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function _ne(r,e){return e==="category"?r==null:r==null||isNaN(r)}var bne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:ge(wne,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,s){t===o&&i.push(a.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e})(St);function wne(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return O(e.dimensions,function(n){var a=Tne(n);t[n]=a}),t}}function Tne(r){return+r.replace("dim","")}var Cne=["lineStyle","opacity"],Mne={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(a,i){t.eachActiveState(i,function(o,s){var l=n[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(Cne,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},a.start,a.end)}}}};function kne(r){Lne(r),Ane(r)}function Lne(r){if(!r.parallel){var e=!1;O(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function Ane(r){var e=Tt(r.parallelAxis);O(e,function(t){if(Pe(t)){var n=t.parallelIndex||0,a=Tt(r.parallel)[n];a&&a.parallelAxisDefault&&Ye(t,a.parallelAxisDefault,!1)}})}var Ine=5,Dne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this._model=t,this._api=a,this._handlers||(this._handlers={},O(Pne,function(i,o){a.getZr().on(o,this._handlers[o]=ge(i,this))},this)),Nc(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){oh(this,"_throttledDispatchExpand"),O(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(ae({type:"parallelAxisExpand"},t))},e.type="parallel",e})(Ct),Pne={mousedown:function(r){RS(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(RS(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>Ine)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!RS(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function RS(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var Rne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Ye(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){O(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=ht(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);O(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e})(Je),Ene=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(aa);function Qo(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Iu(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Iu(s,[0,o]),a=i=Iu(s,[a,i]),n=0}e[0]=Iu(e[0],t),e[1]=Iu(e[1],t);var l=ES(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Iu(e[n],c);var f;return f=ES(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=ES(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function ES(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Iu(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var zS=O,X4=Math.min,Z4=Math.max,BR=Math.floor,zne=Math.ceil,jR=Xt,One=Math.PI,Nne=(function(){function r(e,t,n){this.type="parallel",this._axesMap=be(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;zS(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Ene(o,Fh(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var a=n.getData();zS(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),Ll(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var n=lr(e,t).refContainer;this._rect=Dt(e.getBoxLayoutParams(),n),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,c=ng(e.get("axisExpandWidth"),l),f=ng(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,h=e.get("axisExpandWindow"),v;if(h)v=ng(h[1]-h[0],l),h[1]=h[0]+v;else{v=ng(c*(f-1),l);var y=e.get("axisExpandCenter")||BR(u/2);h=[c*y-v/2],h[1]=h[0]+v}var m=(s-v)/(u-f);m<3&&(m=0);var x=[BR(jR(h[0]/c,1))+1,zne(jR(h[1]/c,1))-1],b=m/c*h[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:h,axisCount:u,winInnerIndices:x,axisExpandWindow0Pos:b}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),zS(n,function(o,s){var l=(a.axisExpandable?jne:Bne)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},c={horizontal:One/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],d=c[i],h=hr();Qi(h,h,d),Ta(h,h,f),this._axesLayout[o]={position:f,rotation:d,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];O(o,function(m){s.push(e.mapDimension(m)),l.push(i.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;c<a;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var d=e.getValues(s,c),h=0,v=o.length;h<v;h++){var y=l[h].getActiveState(d[h]);if(y==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,a=0,i=e.length;a<i;a++)t.get(e[a]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return ba([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return Le(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,a=t.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),d=f[0]!=null;if(c)d&&c&&s<i*f[0]?(u="jump",l=s-i*f[2]):d&&c&&s>i*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Qo(l,a,o,"all"):u="none";else{var h=a[1]-a[0],v=o[1]*s/h;a=[Z4(0,v-h/2)],a[1]=X4(o[1],a[0]+h),a[0]=a[1]-h}return{axisExpandWindow:a,behavior:u}},r})();function ng(r,e){return X4(Z4(r,e[0]),e[1])}function Bne(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function jne(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r<o[0]?(s=r*i,c=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function Fne(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new Nne(n,r,e);i.name="parallel_"+a,i.resize(n,e),n.coordinateSystem=i,i.model=n,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var a=n.getReferringComponents("parallel",Bt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var Vne={create:Fne},lw=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return wl([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=Le(t);if(n)for(var a=n.length-1;a>=0;a--)kn(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=t&&t<=n[i][1])return"active";return"inactive"},e})(Je);Wt(lw,Vc);var Al=!0,Sh=Math.min,xc=Math.max,Gne=Math.pow,Wne=1e4,Hne=6,$ne=6,FR="globalPan",Une={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Yne={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},VR={brushStyle:{lineWidth:2,stroke:ee.color.backgroundTint,fill:ee.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Xne=0,$C=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Ae,n._uid="brushController_"+Xne++,O(tae,function(a,i){this._handlers[i]=ge(a,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||Dee(n,FR,this._uid),O(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=Ye(Le(VR),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;Pee(t,FR,this._uid),O(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};O(t,function(a){n[a.panelId]=Le(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=le(t,function(d){return Ye(Le(VR),d,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Xi(a,t,u,l).add(c).update(c).remove(f).execute(),this;function l(d,h){return(d.id!=null?d.id:n+h)+"-"+d.brushType}function u(d,h){return l(d.__brushOption,h)}function c(d,h){var v=t[d];if(h!=null&&a[h]===s)i[d]=a[h];else{var y=i[d]=h!=null?(a[h].__brushOption=v,a[h]):q4(o,K4(o,v));UC(o,y)}}function f(d){a[d]!==s&&o.group.remove(a[d])}},e.prototype.unmount=function(){return this.enableBrush(!1),uw(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e})(ra);function K4(r,e){var t=Wm[e.brushType].createCover(r,e);return t.__brushOption=e,J4(t,e),r.group.add(t),t}function q4(r,e){var t=YC(e);return t.endCreating&&(t.endCreating(r,e),J4(e,e.__brushOption)),e}function Q4(r,e){var t=e.__brushOption;YC(e).updateCoverShape(r,e,t.range,t)}function J4(r,e){var t=e.z;t==null&&(t=Wne),r.traverse(function(n){n.z=t,n.z2=t})}function UC(r,e){YC(e).updateCommon(r,e),Q4(r,e)}function YC(r){return Wm[r.__brushOption.brushType]}function XC(r,e,t){var n=r._panels;if(!n)return Al;var a,i=r._transform;return O(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function eF(r,e){var t=r._panels;if(!t)return Al;var n=e.__brushOption.panelId;return n!=null?t[n]:Al}function uw(r){var e=r._covers,t=e.length;return O(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function Il(r,e){var t=le(r._covers,function(n){var a=n.__brushOption,i=Le(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Zne(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=Gne(a*a+i*i,.5);return o>Hne}function tF(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function rF(r,e,t,n){var a=new Ae;return a.add(new Qe({name:"main",style:ZC(t),silent:!0,draggable:!0,cursor:"move",drift:He(GR,r,e,a,["n","s","w","e"]),ondragend:He(Il,e,{isEnd:!0})})),O(n,function(i){a.add(new Qe({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:He(GR,r,e,a,i),ondragend:He(Il,e,{isEnd:!0})}))}),a}function nF(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=xc(a,$ne),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],d=c-i+a/2,h=f-i+a/2,v=c-o,y=f-s,m=v+a,x=y+a;Ci(r,e,"main",o,s,v,y),n.transformable&&(Ci(r,e,"w",l,u,i,x),Ci(r,e,"e",d,u,i,x),Ci(r,e,"n",l,u,m,i),Ci(r,e,"s",l,h,m,i),Ci(r,e,"nw",l,u,i,i),Ci(r,e,"ne",d,u,i,i),Ci(r,e,"sw",l,h,i,i),Ci(r,e,"se",d,h,i,i))}function cw(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(ZC(t)),a.attr({silent:!n,cursor:n?"move":"default"}),O([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?fw(r,i[0]):qne(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?Yne[s]+"-resize":null})})}function Ci(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(Jne(KC(r,e,[[n,a],[n+i,a+o]])))}function ZC(r){return De({strokeNoScale:!0},r.brushStyle)}function aF(r,e,t,n){var a=[Sh(r,t),Sh(e,n)],i=[xc(r,t),xc(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function Kne(r){return $o(r.group)}function fw(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Cm(t[e],Kne(r));return n[a]}function qne(r,e){var t=[fw(r,e[0]),fw(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function GR(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=iF(e,a,i);O(n,function(u){var c=Une[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(aF(s[0][0],s[1][0],s[0][1],s[1][1])),UC(e,t),Il(e,{isEnd:!1})}function Qne(r,e,t,n){var a=e.__brushOption.range,i=iF(r,t,n);O(a,function(o){o[0]+=i[0],o[1]+=i[1]}),UC(r,e),Il(r,{isEnd:!1})}function iF(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function KC(r,e,t){var n=eF(r,e);return n&&n!==Al?n.clipPath(t,r._transform):Le(t)}function Jne(r){var e=Sh(r[0][0],r[1][0]),t=Sh(r[0][1],r[1][1]),n=xc(r[0][0],r[1][0]),a=xc(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function eae(r,e,t){if(!(!r._brushType||rae(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=XC(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===Al||s.panelId===i.panelId)&&Wm[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function dw(r){var e=r.event;e.preventDefault&&e.preventDefault()}function hw(r,e,t){return r.childOfName("main").contain(e,t)}function oF(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),Zne(r)||a){if(i&&!a){o.brushMode==="single"&&uw(r);var l=Le(o);l.brushType=WR(l.brushType,i),l.panelId=i===Al?null:i.panelId,a=r._creatingCover=K4(r,l),r._covers.push(a)}if(a){var u=Wm[WR(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(KC(r,a,r._track)),n&&(q4(r,a),u.updateCommon(r,a)),Q4(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&XC(r,e,t)&&uw(r)&&(s={isEnd:n,removeOnClick:!0});return s}function WR(r,e){return r==="auto"?e.defaultBrushType:r}var tae={mousedown:function(r){if(this._dragging)HR(this,r);else if(!r.target||!r.target.draggable){dw(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=XC(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(eae(this,r,n),this._dragging){dw(r);var a=oF(this,r,n,!1);a&&Il(this,a)}},mouseup:function(r){HR(this,r)}};function HR(r,e){if(r._dragging){dw(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=oF(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&Il(r,i)}}function rae(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var Wm={lineX:$R(0),lineY:$R(1),rect:{createCover:function(r,e){function t(n){return n}return rF({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=tF(r);return aF(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){nF(r,e,t,n)},updateCommon:cw,contain:hw},polygon:{createCover:function(r,e){var t=new Ae;return t.add(new Cr({name:"main",style:ZC(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new zr({name:"main",draggable:!0,drift:He(Qne,r,e),ondragend:He(Il,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:KC(r,e,t)})},updateCommon:cw,contain:hw}};function $R(r){return{createCover:function(e,t){return rF({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=tF(e),n=Sh(t[0][r],t[1][r]),a=xc(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=eF(e,t);if(o!==Al&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),nF(e,t,l,a)},updateCommon:cw,contain:hw}}function sF(r){return r=qC(r),function(e){return MT(e,r)}}function lF(r,e){return r=qC(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function uF(r,e,t){var n=qC(r);return function(a,i){return n.contain(i[0],i[1])&&!p4(a,e,t)}}function qC(r){return ze.create(r)}var nae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new $C(n.getZr())).on("brush",ge(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!aae(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ae,this.group.add(this._axisGroup),!!t.get("show")){var s=oae(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,d=l.getAxisLayout(f),h=ae({strokeContainThreshold:c},d),v=new Jr(t,a,h);v.build(),this._axisGroup.add(v.group),this._refreshBrushController(h,u,t,s,c,a),Oh(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=ze.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:sF(f),isTargetByCursor:uF(f,s,i),getLinearBrushOtherExtent:lF(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(iae(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=le(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(Ct);function aae(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function iae(r){var e=r.axis;return le(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function oae(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var sae={type:"axisAreaSelect",event:"axisAreaSelected"};function lae(r){r.registerAction(sae,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var uae={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function cF(r){r.registerComponentView(Dne),r.registerComponentModel(Rne),r.registerCoordinateSystem("parallel",Vne),r.registerPreprocessor(kne),r.registerComponentModel(lw),r.registerComponentView(nae),yc(r,"parallel",lw,uae),lae(r)}function cae(r){Ze(cF),r.registerChartView(xne),r.registerSeriesModel(bne),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Mne)}var fae=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r})(),dae=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new fae},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){Ui(this)},e.prototype.downplay=function(){Yi(this)},e})(nt),hae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Ae,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,n){this._controller=new jl(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),d=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,a),v4(t,a,s,this._controller,this._controllerHost,null),o.eachEdge(function(v){var y=new dae,m=Ne(y);m.dataIndex=v.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var x=v.getModel(),b=x.getModel("lineStyle"),T=b.get("curveness"),C=v.node1.getLayout(),k=v.node1.getModel(),L=k.get("localX"),A=k.get("localY"),D=v.node2.getLayout(),P=v.node2.getModel(),R=P.get("localX"),z=P.get("localY"),B=v.getLayout(),N,W,$,H,U,G,X,K;y.shape.extent=Math.max(1,B.dy),y.shape.orient=h,h==="vertical"?(N=(L!=null?L*u:C.x)+B.sy,W=(A!=null?A*c:C.y)+C.dy,$=(R!=null?R*u:D.x)+B.ty,H=z!=null?z*c:D.y,U=N,G=W*(1-T)+H*T,X=$,K=W*T+H*(1-T)):(N=(L!=null?L*u:C.x)+C.dx,W=(A!=null?A*c:C.y)+B.sy,$=R!=null?R*u:D.x,H=(z!=null?z*c:D.y)+B.ty,U=N*(1-T)+$*T,G=W,X=N*T+$*(1-T),K=H),y.setShape({x1:N,y1:W,x2:$,y2:H,cpx1:U,cpy1:G,cpx2:X,cpy2:K}),y.useStyle(b.getItemStyle()),UR(y.style,h,v);var V=""+x.get("value"),Y=sr(x,"edgeLabel");vr(y,Y,{labelFetcher:{getFormattedLabel:function(fe,Ce,Be,ye,ce,we){return t.getFormattedLabel(fe,Ce,"edge",ye,hn(ce,Y.normal&&Y.normal.get("formatter"),V),we)}},labelDataIndex:v.dataIndex,defaultText:V}),y.setTextConfig({position:"inside"});var ne=x.getModel("emphasis");or(y,x,"lineStyle",function(fe){var Ce=fe.getItemStyle();return UR(Ce,h,v),Ce}),s.add(y),d.setItemGraphicEl(v.dataIndex,y);var ue=ne.get("focus");Pt(y,ue==="adjacency"?v.getAdjacentDataIndices():ue==="trajectory"?v.getTrajectoryDataIndices():ue,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(v){var y=v.getLayout(),m=v.getModel(),x=m.get("localX"),b=m.get("localY"),T=m.getModel("emphasis"),C=m.get(["itemStyle","borderRadius"])||0,k=new Qe({shape:{x:x!=null?x*u:y.x,y:b!=null?b*c:y.y,width:y.dx,height:y.dy,r:C},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(k,sr(m),{labelFetcher:{getFormattedLabel:function(A,D){return t.getFormattedLabel(A,D,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),k.disableLabelAnimation=!0,k.setStyle("fill",v.getVisual("color")),k.setStyle("decal",v.getVisual("style").decal),or(k,m),s.add(k),f.setItemGraphicEl(v.dataIndex,k),Ne(k).dataType="node";var L=T.get("focus");Pt(k,L==="adjacency"?v.getAdjacentDataIndices():L==="trajectory"?v.getTrajectoryDataIndices():L,T.get("blurScope"),T.get("disabled"))}),f.eachItemGraphicEl(function(v,y){var m=f.getItemModel(y);m.get("draggable")&&(v.drift=function(x,b){i._focusAdjacencyDisabled=!0,this.shape.x+=x,this.shape.y+=b,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(y),localX:this.shape.x/u,localY:this.shape.y/c})},v.ondragend=function(){i._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(pae(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,n){var a=t.layoutInfo,i=a.width,o=a.height,s=t.coordinateSystem=new Fl(null,{api:n,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(mt);function UR(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),a=t.node2.getVisual("color");pe(n)&&pe(a)&&(r.fill=new Rl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function pae(r,e,t){var n=new Qe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return It(n,{shape:{width:r.width+20}},e,t),n}var vae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new rt(o[l],this,n));var u=HC(i,a,this,!0,c);return u.data;function c(f,d){f.wrapMethod("getItemModel",function(h,v){var y=h.parentModel,m=y.getData().getItemLayout(v);if(m){var x=m.depth,b=y.levelModels[x];b&&(h.parentModel=b)}return h}),d.wrapMethod("getItemModel",function(h,v){var y=h.parentModel,m=y.getGraph().getEdgeByIndex(v),x=m.node1.getLayout();if(x){var b=x.depth,T=y.levelModels[b];T&&(h.parentModel=T)}return h})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(h){return isNaN(h)||h==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return rr("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,d=this.getDataParams(t,a).data.name;return rr("nameValue",{name:d!=null?d+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:ee.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:ee.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(St);function gae(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=lr(t,e).refContainer,o=Dt(t.getBoxLayoutParams(),i);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),c=u.nodes,f=u.edges;mae(c);var d=ht(c,function(m){return m.getLayout().value===0}),h=d.length!==0?0:t.get("layoutIterations"),v=t.get("orient"),y=t.get("nodeAlign");yae(c,f,n,a,s,l,h,v,y)})}function yae(r,e,t,n,a,i,o,s,l){xae(r,e,t,a,i,s,l),wae(r,e,i,a,n,o,s),Pae(r,s)}function mae(r){O(r,function(e){var t=Xo(e.outEdges,Ny),n=Xo(e.inEdges,Ny),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function xae(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],c=[],f=0,d=0;d<e.length;d++)s[d]=1;for(var d=0;d<r.length;d++)l[d]=r[d].inEdges.length,l[d]===0&&u.push(r[d]);for(var h=-1;u.length;){for(var v=0;v<u.length;v++){var y=u[v],m=y.hostGraph.data.getRawDataItem(y.dataIndex),x=m.depth!=null&&m.depth>=0;x&&m.depth>h&&(h=m.depth),y.setLayout({depth:x?m.depth:f},!0),i==="vertical"?y.setLayout({dy:t},!0):y.setLayout({dx:t},!0);for(var b=0;b<y.outEdges.length;b++){var T=y.outEdges[b],C=e.indexOf(T);s[C]=0;var k=T.node2,L=r.indexOf(k);--l[L]===0&&c.indexOf(k)<0&&c.push(k)}}++f,u=c,c=[]}for(var d=0;d<s.length;d++)if(s[d]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var A=h>f-1?h:f-1;o&&o!=="left"&&Sae(r,o,i,A);var D=i==="vertical"?(a-t)/A:(n-t)/A;bae(r,D,i)}function fF(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Sae(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}i=a,a=[],++o}O(r,function(f){fF(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&_ae(r,n)}function _ae(r,e){O(r,function(t){!fF(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function bae(r,e,t){O(r,function(n){var a=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function wae(r,e,t,n,a,i,o){var s=Tae(r,o);Cae(s,e,t,n,a,o),OS(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,Mae(s,l,o),OS(s,a,t,n,o),Dae(s,l,o),OS(s,a,t,n,o)}function Tae(r,e){var t=[],n=e==="vertical"?"y":"x",a=Q_(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),O(a.keys,function(i){t.push(a.buckets.get(i))}),t}function Cae(r,e,t,n,a,i){var o=1/0;O(r,function(s){var l=s.length,u=0;O(s,function(f){u+=f.getLayout().value});var c=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;c<o&&(o=c)}),O(r,function(s){O(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),O(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function OS(r,e,t,n,a){var i=a==="vertical"?"x":"y";O(r,function(o){o.sort(function(y,m){return y.getLayout()[i]-m.getLayout()[i]});for(var s,l,u,c=0,f=o.length,d=a==="vertical"?"dx":"dy",h=0;h<f;h++)l=o[h],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[d]+e;var v=a==="vertical"?n:t;if(u=c-e-v,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var h=f-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[d]+e-c,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function Mae(r,e,t){O(r.slice().reverse(),function(n){O(n,function(a){if(a.outEdges.length){var i=Xo(a.outEdges,kae,t)/Xo(a.outEdges,Ny);if(isNaN(i)){var o=a.outEdges.length;i=o?Xo(a.outEdges,Lae,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-Jo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-Jo(a,t))*e;a.setLayout({y:l},!0)}}})})}function kae(r,e){return Jo(r.node2,e)*r.getValue()}function Lae(r,e){return Jo(r.node2,e)}function Aae(r,e){return Jo(r.node1,e)*r.getValue()}function Iae(r,e){return Jo(r.node1,e)}function Jo(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ny(r){return r.getValue()}function Xo(r,e,t){for(var n=0,a=r.length,i=-1;++i<a;){var o=+e(r[i],t);isNaN(o)||(n+=o)}return n}function Dae(r,e,t){O(r,function(n){O(n,function(a){if(a.inEdges.length){var i=Xo(a.inEdges,Aae,t)/Xo(a.inEdges,Ny);if(isNaN(i)){var o=a.inEdges.length;i=o?Xo(a.inEdges,Iae,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-Jo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-Jo(a,t))*e;a.setLayout({y:l},!0)}}})})}function Pae(r,e){var t=e==="vertical"?"x":"y";O(r,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[t]-i.node2.getLayout()[t]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[t]-i.node1.getLayout()[t]})}),O(r,function(n){var a=0,i=0;O(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),O(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function Rae(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,a=t.edges;if(n.length){var i=1/0,o=-1/0;O(n,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),O(n,function(s){var l=new pr({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&O(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Eae(r){r.registerChartView(hae),r.registerSeriesModel(vae),r.registerLayout(gae),r.registerVisual(Rae),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){var i=a.coordinateSystem,o=jm(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}var dF=(function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],d=u[1-c],h=[a,i],v=h[c].get("type"),y=h[1-c].get("type"),m=e.data;if(m&&l){var x=[];O(m,function(C,k){var L;se(C)?(L=C.slice(),C.unshift(k)):se(C.value)?(L=ae({},C),L.value=L.value.slice(),C.value.unshift(k)):L=C,x.push(L)}),e.data=x}var b=this.defaultValueDimensions,T=[{name:f,type:Sy(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:Sy(y),dimsDef:b.slice()}];return Wc(this,{coordDimensions:T,dimensionsCount:b.length+1,encodeDefaulter:He(bB,T,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})(),hF=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:ee.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ee.color.shadow}},animationDuration:800},e})(St);Wt(hF,dF,!0);var zae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),f=YR(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var d=i.getItemLayout(u);f?(ta(f),pF(d,f,i,u)):f=YR(d,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e})(mt),Oae=(function(){function r(){}return r})(),Nae=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Oae},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();i<a.length;i++)t.moveTo(a[i][0],a[i][1]),i++,t.lineTo(a[i][0],a[i][1])},e})(nt);function YR(r,e,t,n,a){var i=r.ends,o=new Nae({shape:{points:a?Bae(i,n,r):i}});return pF(r,o,e,t,a),o}function pF(r,e,t,n,a){var i=t.hostModel,o=El[a?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");or(e,s),Pt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Bae(r,e,t){return le(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Vd=O;function jae(r){var e=Fae(r);Vd(e,function(t){var n=t.seriesModels;n.length&&(Vae(t),Vd(n,function(a,i){Gae(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Fae(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=Ue(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function Vae(r){var e=r.axis,t=r.seriesModels,n=t.length,a=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Vd(t,function(v){l=Math.max(l,v.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Vd(t,function(v){var y=v.get("boxWidth");se(y)||(y=[y,y]),o.push([he(y[0],s)||0,he(y[1],s)||0])});var c=s*.8-2,f=c/n*.3,d=(c-f*(n-1))/n,h=d/2-c/2;Vd(t,function(v,y){i.push(h),h+=f+d,a.push(Math.min(Math.max(d,o[y][0]),o[y][1]))})}function Gae(r,e,t){var n=r.coordinateSystem,a=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<a.count();f++){var d=a.get(u,f),h=T(d,c[2],f),v=T(d,c[0],f),y=T(d,c[1],f),m=T(d,c[3],f),x=T(d,c[4],f),b=[];C(b,y,!1),C(b,m,!0),b.push(v,y,x,m),k(b,v),k(b,x),k(b,h),a.setItemLayout(f,{initBaseline:h[s],ends:b})}function T(L,A,D){var P=a.get(A,D),R=[];R[o]=L,R[s]=P;var z;return isNaN(L)||isNaN(P)?z=[NaN,NaN]:(z=n.dataToPoint(R),z[o]+=e),z}function C(L,A,D){var P=A.slice(),R=A.slice();P[o]+=i,R[o]-=i,D?L.push(P,R):L.push(R,P)}function k(L,A){var D=A.slice(),P=A.slice();D[o]-=i,P[o]+=i,L.push(D,P)}}function Wae(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=kn(r[o].slice()),l=Mg(s,.25),u=Mg(s,.5),c=Mg(s,.75),f=s[0],d=s[s.length-1],h=(a??1.5)*(c-l),v=i?f:Math.max(f,l-h),y=i?d:Math.min(d,c+h),m=e.itemNameFormatter,x=Me(m)?m({value:o}):pe(m)?m.replace("{value}",o+""):o+"";t.push([x,v,l,u,c,y]);for(var b=0;b<s.length;b++){var T=s[b];if(T<v||T>y){var C=[x,T];n.push(C)}}}return{boxData:t,outliers:n}}var Hae={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Mr){var n="";gt(n)}var a=Wae(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function $ae(r){r.registerSeriesModel(hF),r.registerChartView(zae),r.registerLayout(jae),r.registerTransform(Hae)}var Uae=["itemStyle","borderColor"],Yae=["itemStyle","borderColor0"],Xae=["itemStyle","borderColorDoji"],Zae=["itemStyle","color"],Kae=["itemStyle","color0"];function QC(r,e){return e.get(r>0?Zae:Kae)}function JC(r,e){return e.get(r===0?Xae:r>0?Uae:Yae)}var qae={seriesType:"candlestick",plan:Oc(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=QC(s,o),l.stroke=JC(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");ae(u,l)}}}}}},Qae=["color","borderColor"],Jae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){is(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&XR(u,f))return;var d=NS(f,c,!0);It(d,{shape:{points:f.ends}},t,c),BS(d,n,c,o),i.add(d),n.setItemGraphicEl(c,d)}}).update(function(c,f){var d=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(d);return}var h=n.getItemLayout(c);if(s&&XR(u,h)){i.remove(d);return}d?(ct(d,{shape:{points:h.ends}},t,c),ta(d)):d=NS(h),BS(d,n,c,o),i.add(d),n.setItemGraphicEl(c,d)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),ZR(t,this.group);var n=t.get("clip",!0)?Wh(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=NS(s);BS(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){ZR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e})(mt),eie=(function(){function r(){}return r})(),tie=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new eie},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e})(nt);function NS(r,e,t){var n=r.ends;return new tie({shape:{points:t?rie(n,r):n},z2:100})}function XR(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function BS(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,or(r,a);var i=e.getItemLayout(t).sign;O(r.states,function(s,l){var u=a.getModel(l),c=QC(i,u),f=JC(i,u)||c,d=s.style||(s.style={});c&&(d.fill=c),f&&(d.stroke=f)});var o=a.getModel("emphasis");Pt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function rie(r,e){return le(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var nie=(function(){function r(){}return r})(),jS=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new nie},e.prototype.buildPath=function(t,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];t.moveTo(o,a[i++]),t.lineTo(o,a[i++])}else i+=3},e})(nt);function ZR(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new jS({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new jS({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new jS({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),FS(1,o,r),FS(-1,s,r),FS(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function FS(r,e,t,n){var a=JC(r,t)||QC(r,t),i=t.getModel("itemStyle").getItemStyle(Qae);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var vF=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e})(St);Wt(vF,dF,!0);function aie(r){!r||!se(r.series)||O(r.series,function(e){Pe(e)&&e.type==="k"&&(e.type="candlestick")})}var iie={seriesType:"candlestick",plan:Oc(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=oie(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=le(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],d=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?v:h};function h(y,m){for(var x,b=m.getStore();(x=y.next())!=null;){var T=b.get(s,x),C=b.get(u,x),k=b.get(c,x),L=b.get(f,x),A=b.get(d,x),D=Math.min(C,k),P=Math.max(C,k),R=U(D,T),z=U(P,T),B=U(L,T),N=U(A,T),W=[];G(W,z,0),G(W,R,1),W.push(K(N),K(z),K(B),K(R));var $=m.getItemModel(x),H=!!$.get(["itemStyle","borderColorDoji"]);m.setItemLayout(x,{sign:KR(b,x,C,k,c,H),initBaseline:C>k?z[i]:R[i],ends:W,brushRect:X(L,A,T)})}function U(V,Y){var ne=[];return ne[a]=Y,ne[i]=V,isNaN(Y)||isNaN(V)?[NaN,NaN]:e.dataToPoint(ne)}function G(V,Y,ne){var ue=Y.slice(),fe=Y.slice();ue[a]=Lg(ue[a]+n/2,1,!1),fe[a]=Lg(fe[a]-n/2,1,!0),ne?V.push(ue,fe):V.push(fe,ue)}function X(V,Y,ne){var ue=U(V,ne),fe=U(Y,ne);return ue[a]-=n/2,fe[a]-=n/2,{x:ue[0],y:ue[1],width:n,height:fe[1]-ue[1]}}function K(V){return V[a]=Lg(V[a],1),V}}function v(y,m){for(var x=Za(y.count*4),b=0,T,C=[],k=[],L,A=m.getStore(),D=!!r.get(["itemStyle","borderColorDoji"]);(L=y.next())!=null;){var P=A.get(s,L),R=A.get(u,L),z=A.get(c,L),B=A.get(f,L),N=A.get(d,L);if(isNaN(P)||isNaN(B)||isNaN(N)){x[b++]=NaN,b+=3;continue}x[b++]=KR(A,L,R,z,c,D),C[a]=P,C[i]=B,T=e.dataToPoint(C,null,k),x[b++]=T?T[0]:NaN,x[b++]=T?T[1]:NaN,C[i]=N,T=e.dataToPoint(C,null,k),x[b++]=T?T[1]:NaN}m.setLayout("largePoints",x)}}};function KR(r,e,t,n,a,i){var o;return t>n?o=-1:t<n?o=1:o=i?0:e>0?r.get(a,e-1)<=n?1:-1:1,o}function oie(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=he(Te(r.get("barMaxWidth"),a),a),o=he(Te(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?he(s,a):Math.max(Math.min(a/2,i),o)}function sie(r){r.registerChartView(Jae),r.registerSeriesModel(vF),r.registerPreprocessor(aie),r.registerVisual(qae),r.registerLayout(iie)}function qR(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var lie=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this,i=new Vh(t,n),o=new Ae;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=Kt(n,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}qR(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}qR(a,t)},e.prototype.highlight=function(){Ui(this)},e.prototype.downplay=function(){Yi(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var a=this,i=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=Bc(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,d=s.getModel("emphasis");o.setScale(u),o.traverse(function(m){m.setStyle("fill",f)});var h=Nl(t.getItemVisual(n,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var v=t.getItemVisual(n,"symbolRotate");o.rotation=(v||0)*Math.PI/180||0;var y={};y.showEffectOn=i.get("showEffectOn"),y.rippleScale=s.get(["rippleEffect","scale"]),y.brushType=s.get(["rippleEffect","brushType"]),y.period=s.get(["rippleEffect","period"])*1e3,y.effectOffset=n/t.count(),y.z=i.getShallow("z")||0,y.zlevel=i.getShallow("zlevel")||0,y.symbolType=l,y.color=f,y.rippleEffectColor=s.get(["rippleEffect","color"]),y.rippleNumber=s.get(["rippleEffect","number"]),y.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(y):this.startEffectAnimation(y),this._effectCfg=y):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(m){m==="emphasis"?y.showEffectOn!=="render"&&a.startEffectAnimation(y):m==="normal"&&y.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=y,Pt(this,d.get("focus"),d.get("blurScope"),d.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e})(Ae),uie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Gh(lie)},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype.updateTransform=function(t,n,a){var i=t.getData();this.group.dirty();var o=Hh("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=wN(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(mt),cie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e})(St);function fie(r){r.registerChartView(uie),r.registerSeriesModel(cie),r.registerLayout(Hh("effectScatter"))}var gF=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;return i.add(i.createLine(t,n,a)),i._updateEffectSymbol(t,n),i}return e.prototype.createLine=function(t,n,a){return new GC(t,n,a)},e.prototype._updateEffectSymbol=function(t,n){var a=t.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");se(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=Kt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,n))},e.prototype._updateEffectAnimation=function(t,n,a){var i=this.childAt(1);if(i){var o=t.getItemLayout(a),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=Tr(n.get("delay"),function(h){return h/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var d=void 0;Me(f)?d=f(a):d=f,i.__t>0&&(d=-s*i.__t),this._animateSymbol(i,s,d,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Pi(t.__p1,t.__cp1)+Pi(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=wr,c=O_;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var f=t.__t<1?c(n[0],i[0],a[0],o):c(a[0],i[0],n[0],1-o),d=t.__t<1?c(n[1],i[1],a[1],o):c(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(d,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Pi(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Pi(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var a=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,a,n)},e})(Ae),yF=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createPolyline(t,n,a),i}return e.prototype._createPolyline=function(t,n,a){var i=t.getItemLayout(n),o=new Cr({shape:{points:i}});this.add(o),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};ct(o,s,i,n),this._updateCommonStl(t,n,a)},e.prototype._updateCommonStl=function(t,n,a){var i=this.childAt(0),o=t.getItemModel(n),s=a&&a.emphasisLineStyle,l=a&&a.focus,u=a&&a.blurScope,c=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var d=i.ensureState("emphasis");d.style=s,Pt(this,l,u,c)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e})(Ae),die=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,a){return new yF(t,n,a)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];i+=Pi(s,l),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,a=this._points,i=this._offsets,o=a.length;if(i){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-i[l])/(i[l+1]-i[l]),f=a[l],d=a[l+1];t.x=f[0]*(1-c)+c*d[0],t.y=f[1]*(1-c)+c*d[1];var h=t.__t<1?d[0]-f[0]:f[0]-d[0],v=t.__t<1?d[1]-f[1]:f[1]-d[1];t.rotation=-Math.atan2(v,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e})(gF),hie=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),pie=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new hie},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var s=a[o++];if(s>0){t.moveTo(a[o++],a[o++]);for(var l=1;l<s;l++)t.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var u=a[o++],c=a[o++],f=a[o++],d=a[o++];if(t.moveTo(u,c),i>0){var h=(u+f)/2-(c-d)*i,v=(c+d)/2-(f-u)*i;t.quadraticCurveTo(h,v,f,d)}else t.lineTo(f,d)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u<i.length;){var c=i[u++];if(c>0)for(var f=i[u++],d=i[u++],h=1;h<c;h++){var v=i[u++],y=i[u++];if(Po(f,d,v,y,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],d=i[u++],v=i[u++],y=i[u++];if(o>0){var m=(f+v)/2-(d-y)*o,x=(d+y)/2-(v-f)*o;if(y5(f,d,m,x,v,y,s,t,n))return l}else if(Po(f,d,v,y,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<a.length;){var c=a[u++],f=a[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new ze(i,o,s,l)}return t},e})(nt),vie=(function(){function r(){this.group=new Ae}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],a=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+a.length);s.set(i),s.set(a,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new pie({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=Ne(e);o.seriesIndex=a.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),mF={seriesType:"lines",plan:Oc(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,c=a.start;c<a.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,d=[],c=a.start;c<a.end;c++){var h=r.getLineCoords(c,o);t&&(s[f++]=h);for(var v=0;v<h;v++)d=e.dataToPoint(o[v],!1,d),s[f++]=d[0],s[f++]=d[1]}i.setLayout("linesPoints",s)}else for(var c=a.start;c<a.end;c++){var y=i.getItemModel(c),h=r.getLineCoords(c,o),m=[];if(t)for(var x=0;x<h;x++)m.push(e.dataToPoint(o[x]));else{m[0]=e.dataToPoint(o[0]),m[1]=e.dataToPoint(o[1]);var b=y.get(["lineStyle","curveness"]);+b&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*b,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*b])}i.setItemLayout(c,m)}}}}}},gie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=a.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&Wh(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=mF.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new vie:new WC(o?i?die:yF:i?gF:GC),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e})(mt),yie=typeof Uint32Array>"u"?Array:Uint32Array,mie=typeof Float64Array>"u"?Array:Float64Array;function QR(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=le(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),um([a,t[0],t[1]])}))}var xie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],QR(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(QR(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=ic(this._flatCoords,n.flatCoords),this._flatCoordsOffset=ic(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),lt(t[0])){for(var a=t.length,i=new yie(a),o=new mie(a),s=0,l=0,u=0,c=0;c<a;){u++;var f=t[c++];i[l++]=s+n,i[l++]=f;for(var d=0;d<f;d++){var h=t[c++],v=t[c++];o[s++]=h,o[s++]=v}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var a=new Ur(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;a.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),a},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e})(St);function ag(r){return r instanceof Array||(r=[r,r]),r}var Sie={seriesType:"lines",reset:function(r){var e=ag(r.get("symbol")),t=ag(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=ag(s.getShallow("symbol",!0)),u=ag(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}};function _ie(r){r.registerChartView(gie),r.registerSeriesModel(xie),r.registerLayout(mF),r.registerVisual(Sie)}var bie=256,wie=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=pn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,d=f.getContext("2d"),h=e.length;f.width=t,f.height=n;for(var v=0;v<h;++v){var y=e[v],m=y[0],x=y[1],b=y[2],T=a(b);d.globalAlpha=T,d.drawImage(s,m-c,x-c)}if(!f.width||!f.height)return f;for(var C=d.getImageData(0,0,f.width,f.height),k=C.data,L=0,A=k.length,D=this.minOpacity,P=this.maxOpacity,R=P-D;L<A;){var T=k[L+3]/256,z=Math.floor(T*(bie-1))*4;if(T>0){var B=o(T)?l:u;T>0&&(T=T*R+D),k[L++]=B[z],k[L++]=B[z+1],k[L++]=B[z+2],k[L++]=B[z+3]*T*256}else L+=4}return d.putImageData(C,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=pn.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=ee.color.neutral99,a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r})();function Tie(r,e,t){var n=r[1]-r[0];e=le(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s<a;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===a)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<a&&t[s]}}function Cie(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function JR(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Mie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,a,0,t.getData().count()):JR(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(JR(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnGridLike(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){is(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,n,a,i,o){var s=t.coordinateSystem,l=qo(s,"cartesian2d"),u=qo(s,"matrix"),c,f,d,h;if(l){var v=s.getAxis("x"),y=s.getAxis("y");c=v.getBandWidth()+.5,f=y.getBandWidth()+.5,d=v.scale.getExtent(),h=y.scale.getExtent()}for(var m=this.group,x=t.getData(),b=t.getModel(["emphasis","itemStyle"]).getItemStyle(),T=t.getModel(["blur","itemStyle"]).getItemStyle(),C=t.getModel(["select","itemStyle"]).getItemStyle(),k=t.get(["itemStyle","borderRadius"]),L=sr(t),A=t.getModel("emphasis"),D=A.get("focus"),P=A.get("blurScope"),R=A.get("disabled"),z=l||u?[x.mapDimension("x"),x.mapDimension("y"),x.mapDimension("value")]:[x.mapDimension("time"),x.mapDimension("value")],B=a;B<i;B++){var N=void 0,W=x.getItemVisual(B,"style");if(l){var $=x.get(z[0],B),H=x.get(z[1],B);if(isNaN(x.get(z[2],B))||isNaN($)||isNaN(H)||$<d[0]||$>d[1]||H<h[0]||H>h[1])continue;var U=s.dataToPoint([$,H]);N=new Qe({shape:{x:U[0]-c/2,y:U[1]-f/2,width:c,height:f},style:W})}else if(u){var G=s.dataToLayout([x.get(z[0],B),x.get(z[1],B)]).rect;if(Dr(G.x))continue;N=new Qe({z2:1,shape:G,style:W})}else{if(isNaN(x.get(z[1],B)))continue;var X=s.dataToLayout([x.get(z[0],B)]),G=X.contentRect||X.rect;if(Dr(G.x)||Dr(G.y))continue;N=new Qe({z2:1,shape:G,style:W})}if(x.hasItemOption){var K=x.getItemModel(B),V=K.getModel("emphasis");b=V.getModel("itemStyle").getItemStyle(),T=K.getModel(["blur","itemStyle"]).getItemStyle(),C=K.getModel(["select","itemStyle"]).getItemStyle(),k=K.get(["itemStyle","borderRadius"]),D=V.get("focus"),P=V.get("blurScope"),R=V.get("disabled"),L=sr(K)}N.shape.r=k;var Y=t.getRawValue(B),ne="-";Y&&Y[2]!=null&&(ne=Y[2]+""),vr(N,L,{labelFetcher:t,labelDataIndex:B,defaultOpacity:W.opacity,defaultText:ne}),N.ensureState("emphasis").style=b,N.ensureState("blur").style=T,N.ensureState("select").style=C,Pt(N,D,P,R),N.incremental=o,o&&(N.states.emphasis.hoverLayer=!0),m.add(N),x.setItemGraphicEl(B,N),this._progressiveEls&&this._progressiveEls.push(N)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new wie;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var d=Math.max(c.x,0),h=Math.max(c.y,0),v=Math.min(c.width+c.x,i.getWidth()),y=Math.min(c.height+c.y,i.getHeight()),m=v-d,x=y-h,b=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],T=l.mapArray(b,function(A,D,P){var R=t.dataToPoint([A,D]);return R[0]-=d,R[1]-=h,R.push(P),R}),C=a.getExtent(),k=a.type==="visualMap.continuous"?Cie(C,a.option.range):Tie(C,a.getPieceList(),a.option.selected);u.update(T,m,x,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},k);var L=new gr({style:{width:m,height:x,x:d,y:h,image:u.canvas},silent:!0});this.group.add(L)},e.type="heatmap",e})(mt),kie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=zc.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:ee.color.primary}}},e})(St);function Lie(r){r.registerChartView(Mie),r.registerSeriesModel(kie)}var Aie=["itemStyle","borderWidth"],eE=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],VS=new fi,Iie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),d={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:eE[+c],categoryDim:eE[1-+c]};o.diff(s).add(function(v){if(o.hasValue(v)){var y=rE(o,v),m=tE(o,v,y,d),x=nE(o,d,m);o.setItemGraphicEl(v,x),i.add(x),iE(x,d,m)}}).update(function(v,y){var m=s.getItemGraphicEl(y);if(!o.hasValue(v)){i.remove(m);return}var x=rE(o,v),b=tE(o,v,x,d),T=TF(o,b);m&&T!==m.__pictorialShapeStr&&(i.remove(m),o.setItemGraphicEl(v,null),m=null),m?Nie(m,d,b):m=nE(o,d,b,!0),o.setItemGraphicEl(v,m),m.__pictorialSymbolMeta=b,i.add(m),iE(m,d,b)}).remove(function(v){var y=s.getItemGraphicEl(v);y&&aE(s,v,y.__pictorialSymbolMeta.animationModel,y)}).execute();var h=t.get("clip",!0)?Wh(t.coordinateSystem,!1,t):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){aE(i,Ne(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e})(mt);function tE(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),d={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};Die(t,i,a,n,d),Pie(r,e,a,i,o,d.boundingLength,d.pxSign,c,n,d),Rie(t,d.symbolScale,u,n,d);var h=d.symbolSize,v=Nl(t.get("symbolOffset"),h);return Eie(t,h,a,i,o,v,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function Die(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(se(o)){var f=[GS(s,o[0])-l,GS(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=GS(s,o)-l:e?c=n.coordSysExtent[i.index][u]-l:c=t[i.wh];a.boundingLength=c,e&&(a.repeatCutLength=t[i.wh]);var d=i.xy==="x",h=s.inverse;a.pxSign=d&&!h||!d&&h?c>=0?1:-1:c>0?1:-1}function GS(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function Pie(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,d=Math.abs(t[f.wh]),h=r.getItemVisual(e,"symbolSize"),v;se(h)?v=h.slice():h==null?v=["100%","100%"]:v=[h,h],v[f.index]=he(v[f.index],d),v[c.index]=he(v[c.index],n?d:Math.abs(i)),u.symbolSize=v;var y=u.symbolScale=[v[0]/s,v[1]/s];y[c.index]*=(l.isHorizontal?-1:1)*o}function Rie(r,e,t,n,a){var i=r.get(Aie)||0;i&&(VS.attr({scaleX:e[0],scaleY:e[1],rotation:t}),VS.updateTransform(),i/=VS.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function Eie(r,e,t,n,a,i,o,s,l,u,c,f){var d=c.categoryDim,h=c.valueDim,v=f.pxSign,y=Math.max(e[h.index]+s,0),m=y;if(n){var x=Math.abs(l),b=Tr(r.get("symbolMargin"),"15%")+"",T=!1;b.lastIndexOf("!")===b.length-1&&(T=!0,b=b.slice(0,b.length-1));var C=he(b,e[h.index]),k=Math.max(y+C*2,0),L=T?0:C*2,A=uT(n),D=A?n:oE((x+L)/k),P=x-D*y;C=P/2/(T?D:Math.max(D-1,1)),k=y+C*2,L=T?0:C*2,!A&&n!=="fixed"&&(D=u?oE((Math.abs(u)+L)/k):0),m=D*k-L,f.repeatTimes=D,f.symbolMargin=C}var R=v*(m/2),z=f.pathPosition=[];z[d.index]=t[d.wh]/2,z[h.index]=o==="start"?R:o==="end"?l-R:l/2,i&&(z[0]+=i[0],z[1]+=i[1]);var B=f.bundlePosition=[];B[d.index]=t[d.xy],B[h.index]=t[h.xy];var N=f.barRectShape=ae({},t);N[h.wh]=v*Math.max(Math.abs(t[h.wh]),Math.abs(z[h.index]+R)),N[d.wh]=t[d.wh];var W=f.clipShape={};W[d.xy]=-t[d.xy],W[d.wh]=c.ecSize[d.wh],W[h.xy]=0,W[h.wh]=t[h.wh]}function xF(r){var e=r.symbolPatternSize,t=Kt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function SF(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(e2(r,function(y){y.__pictorialAnimationIndex=c,y.__pictorialRepeatTimes=u,c<u?tc(y,null,v(c),t,n):tc(y,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(y)}),c++});c<u;c++){var d=xF(t);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var h=v(c);tc(d,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},t,n)}function v(y){var m=s.slice(),x=t.pxSign,b=y;return(t.symbolRepeatDirection==="start"?x>0:x<0)&&(b=u-1-y),m[l.index]=f*(b-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function _F(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?tc(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=xF(t),a.add(i),tc(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function bF(r,e,t){var n=ae({},e.barRectShape),a=r.__pictorialBarRect;a?tc(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Qe({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function wF(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=ae({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)ct(a,{shape:i},s,l);else{i[o.wh]=0,a=new Qe({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],El[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function rE(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=zie,t.isAnimationEnabled=Oie,t}function zie(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Oie(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function nE(r,e,t,n){var a=new Ae,i=new Ae;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?SF(a,e,t):_F(a,e,t),bF(a,t,n),wF(a,e,t,n),a.__pictorialShapeStr=TF(r,t),a.__pictorialSymbolMeta=t,a}function Nie(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;ct(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?SF(r,e,t,!0):_F(r,e,t,!0),bF(r,t,!0),wF(r,e,t,!0)}function aE(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];e2(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),O(i,function(o){Ko(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function TF(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function e2(r,e,t){O(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function tc(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&El[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function iE(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),d=i.get("scale");e2(r,function(y){if(y instanceof gr){var m=y.style;y.useStyle(ae({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else y.useStyle(t.style);var x=y.ensureState("emphasis");x.style=o,d&&(x.scaleX=y.scaleX*1.1,x.scaleY=y.scaleY*1.1),y.ensureState("blur").style=s,y.ensureState("select").style=l,u&&(y.cursor=u),y.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],v=r.__pictorialBarRect;v.ignoreClip=!0,vr(v,sr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:gc(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Pt(r,c,f,i.get("disabled"))}function oE(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var Bie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=os(ph.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:ee.color.primary}}}),e})(ph);function jie(r){r.registerChartView(Iie),r.registerSeriesModel(Bie),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,He(Hj,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$j("pictorialBar"))}var Fie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function d(m){return m.name}var h=new Xi(this._layersSeries||[],l,d,d),v=[];h.add(ge(y,this,"add")).update(ge(y,this,"update")).remove(ge(y,this,"remove")).execute();function y(m,x,b){var T=o._layers;if(m==="remove"){s.remove(T[x]);return}for(var C=[],k=[],L,A=l[x].indices,D=0;D<A.length;D++){var P=i.getItemLayout(A[D]),R=P.x,z=P.y0,B=P.y;C.push(R,z),k.push(R,z+B),L=i.getItemVisual(A[D],"style")}var N,W=i.getItemLayout(A[0]),$=t.getModel("label"),H=$.get("margin"),U=t.getModel("emphasis");if(m==="add"){var G=v[x]=new Ae;N=new z3({shape:{points:C,stackedOnPoints:k,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),G.add(N),s.add(G),t.isAnimationEnabled()&&N.setClipPath(Vie(N.getBoundingRect(),t,function(){N.removeClipPath()}))}else{var G=T[b];N=G.childAt(0),s.add(G),v[x]=G,ct(N,{shape:{points:C,stackedOnPoints:k}},t),ta(N)}vr(N,sr(t),{labelDataIndex:A[D-1],defaultText:i.getName(A[D-1]),inheritColor:L.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var X=N.getTextContent();X&&(X.x=W.x-H,X.y=W.y0+W.y/2),N.useStyle(L),i.setItemGraphicEl(x,N),or(N,t),Pt(N,U.get("focus"),U.get("blurScope"),U.get("disabled"))}this._layersSeries=l,this._layers=v},e.type="themeRiver",e})(mt);function Vie(r,e,t){var n=new Qe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return It(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var WS=2,Gie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Hc(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=Q_(t,function(d){return a.hasOwnProperty(d[0]+"")||(a[d[0]+""]=-1),d[2]}),o=[];i.buckets.each(function(d,h){o.push({name:h,dataList:d})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";a[f]=l}for(var f in a)a.hasOwnProperty(f)&&a[f]!==l&&(a[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var a=this.getReferringComponents("singleAxis",Bt).models[0],i=a.get("type"),o=ht(t.data,function(v){return v[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=be(),c=0,f=0;f<s.length;++f)l.push(s[f][WS]),u.get(s[f][WS])||(u.set(s[f][WS],c),c++);var d=jc(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Sy(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new Ur(d,this);return h.initData(s),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),a=[],i=0;i<n;++i)a[i]=i;var o=t.mapDimension("single"),s=Q_(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,d){return t.get(o,f)-t.get(o,d)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){se(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,d=-1,h=o[c].indices.length,v=0;v<h;++v){var y=i.get(t[0],o[c].indices[v]),m=Math.abs(y-n);m<=f&&(u=y,f=m,d=o[c].indices[v])}s.push(d)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return rr("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e})(St);function Wie(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),a=t.coordinateSystem,i={},o=a.getRect();i.rect=o;var s=t.get("boundaryGap"),l=a.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=he(s[0],o.height),s[1]=he(s[1],o.height);var u=o.height-s[0]-s[1];sE(n,t,u)}else{s[0]=he(s[0],o.width),s[1]=he(s[1],o.width);var c=o.width-s[0]-s[1];sE(n,t,c)}n.setLayout("layoutInfo",i)})}function sE(r,e,t){if(r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=le(a,function(m){return le(m.indices,function(x){var b=n.dataToPoint(r.get(i,x));return b[1]=r.get(o,x),b})}),l=Hie(s),u=l.y0,c=t/l.max,f=a.length,d=a[0].indices.length,h,v=0;v<d;++v){h=u[v]*c,r.setItemLayout(a[0].indices[v],{layerIndex:0,x:s[0][v][0],y0:h,y:s[0][v][1]*c});for(var y=1;y<f;++y)h+=s[y-1][v][1]*c,r.setItemLayout(a[y].indices[v],{layerIndex:y,x:s[y][v][0],y0:h,y:s[y][v][1]*c})}}function Hie(r){for(var e=r.length,t=r[0].length,n=[],a=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),n.push(s)}for(var u=0;u<t;++u)a[u]=(i-n[u])/2;i=0;for(var c=0;c<t;++c){var f=n[c]+a[c];f>i&&(i=f)}return{y0:a,max:i}}function $ie(r){r.registerChartView(Fie),r.registerSeriesModel(Gie),r.registerLayout(Wie),r.registerProcessor(Gc("themeRiver"))}var Uie=2,Yie=4,lE=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=Uie,o.textConfig={inside:!0},Ne(o).seriesIndex=n.seriesIndex;var s=new st({z2:Yie,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;Ne(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=ae({},c);f.label=null;var d=n.getVisual("style");d.lineJoin="bevel";var h=n.getVisual("decal");h&&(d.decal=hc(h,o));var v=qa(l.getModel("itemStyle"),f,!0);ae(f,v),O(tn,function(b){var T=s.ensureState(b),C=l.getModel([b,"itemStyle"]);T.style=C.getItemStyle();var k=qa(C,f);k&&(T.shape=k)}),t?(s.setShape(f),s.shape.r=c.r0,It(s,{shape:{r:c.r}},a,n.dataIndex)):(ct(s,{shape:f},a),ta(s)),s.useStyle(d),this._updateLabel(a);var y=l.getShallow("cursor");y&&s.attr("cursor",y),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var m=u.get("focus"),x=m==="relative"?ic(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;Pt(this,x,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,d=f.getTextContent(),h=this.node.dataIndex,v=i.get("minAngle")/180*Math.PI,y=i.get("show")&&!(v!=null&&Math.abs(s)<v);d.ignore=!y,O(eh,function(x){var b=x==="normal"?a.getModel("label"):a.getModel([x,"label"]),T=x==="normal",C=T?d:d.ensureState(x),k=t.getFormattedLabel(h,x);T&&(k=k||n.node.name),C.style=wt(b,{},null,x!=="normal",!0),k&&(C.style.text=k);var L=b.get("show");L!=null&&!T&&(C.ignore=!L);var A=m(b,"position"),D=T?f:f.states[x],P=D.style.fill;D.textConfig={outsideFill:b.get("color")==="inherit"?P:null,inside:A!=="outside"};var R,z=m(b,"distance")||0,B=m(b,"align"),N=m(b,"rotate"),W=Math.PI*.5,$=Math.PI*1.5,H=Ln(N==="tangential"?Math.PI/2-l:l),U=H>W&&!lc(H-W)&&H<$;A==="outside"?(R=o.r+z,B=U?"right":"left"):!B||B==="center"?(s===2*Math.PI&&o.r0===0?R=0:R=(o.r+o.r0)/2,B="center"):B==="left"?(R=o.r0+z,B=U?"right":"left"):B==="right"&&(R=o.r-z,B=U?"left":"right"),C.style.align=B,C.style.verticalAlign=m(b,"verticalAlign")||"middle",C.x=R*u+o.cx,C.y=R*c+o.cy;var G=0;N==="radial"?G=Ln(-l)+(U?Math.PI:0):N==="tangential"?G=Ln(Math.PI/2-l)+(U?Math.PI:0):lt(N)&&(G=N*Math.PI/180),C.rotation=Ln(G)});function m(x,b){var T=x.get(b);return T??i.get(b)}d.dirtyStyle()},e})(Er),pw="sunburstRootToNode",uE="sunburstHighlight",Xie="sunburstUnhighlight";function Zie(r){r.registerAction({type:pw,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=gh(e,[pw],a);if(o){var s=a.getViewRoot();s&&(e.direction=NC(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:uE,update:"none"},function(e,t,n){e=ae({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=gh(e,[uE],i);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(ae(e,{type:"highlight"}))}),r.registerAction({type:Xie,update:"updateView"},function(e,t,n){e=ae({},e),n.dispatchAction(ae(e,{type:"downplay"}))})}var Kie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(b){d.push(b)});var h=this._oldChildren||[];v(d,h),x(l,u),this._initEvents(),this._oldChildren=d;function v(b,T){if(b.length===0&&T.length===0)return;new Xi(T,b,C,C).add(k).update(k).remove(He(k,null)).execute();function C(L){return L.getId()}function k(L,A){var D=L==null?null:b[L],P=A==null?null:T[A];y(D,P)}}function y(b,T){if(!f&&b&&!b.getValue()&&(b=null),b!==l&&T!==l){if(T&&T.piece)b?(T.piece.updateData(!1,b,t,n,a),s.setItemGraphicEl(b.dataIndex,T.piece)):m(T);else if(b){var C=new lE(b,t,n,a);c.add(C),s.setItemGraphicEl(b.dataIndex,C)}}}function m(b){b&&b.piece&&(c.remove(b.piece),b.piece=null)}function x(b,T){T.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,b,t,n,a):(o.virtualPiece=new lE(b,t,n,a),c.add(o.virtualPiece)),T.piece.off("click"),o.virtualPiece.on("click",function(C){o._rootToNode(T.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";cy(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:pw,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e})(mt),qie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};CF(a);var i=this._levelModels=le(t.levels||[],function(l){return new rt(l,this,n)},this),o=OC.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),d=i[f.depth];return d&&(u.parentModel=d),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=Vm(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){A4(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e})(St);function CF(r){var e=0;O(r.children,function(n){CF(n);var a=n.value;se(a)&&(a=a[0]),e+=a});var t=r.value;se(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),se(r.value)?r.value[0]=t:r.value=t}var cE=Math.PI/180;function Qie(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");se(i)||(i=[0,i]),se(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=he(a[0],o),c=he(a[1],s),f=he(i[0],l/2),d=he(i[1],l/2),h=-n.get("startAngle")*cE,v=n.get("minAngle")*cE,y=n.getData().tree.root,m=n.getViewRoot(),x=m.depth,b=n.get("sort");b!=null&&MF(m,b);var T=0;O(m.children,function(H){!isNaN(H.getValue())&&T++});var C=m.getValue(),k=Math.PI/(C||T)*2,L=m.depth>0,A=m.height-(L?-1:1),D=(d-f)/(A||1),P=n.get("clockwise"),R=n.get("stillShowZeroSum"),z=P?1:-1,B=function(H,U){if(H){var G=U;if(H!==y){var X=H.getValue(),K=C===0&&R?k:X*k;K<v&&(K=v),G=U+z*K;var V=H.depth-x-(L?-1:1),Y=f+D*V,ne=f+D*(V+1),ue=n.getLevelModel(H);if(ue){var fe=ue.get("r0",!0),Ce=ue.get("r",!0),Be=ue.get("radius",!0);Be!=null&&(fe=Be[0],Ce=Be[1]),fe!=null&&(Y=he(fe,l/2)),Ce!=null&&(ne=he(Ce,l/2))}H.setLayout({angle:K,startAngle:U,endAngle:G,clockwise:P,cx:u,cy:c,r0:Y,r:ne})}if(H.children&&H.children.length){var ye=0;O(H.children,function(ce){ye+=B(ce,U+ye)})}return G-U}};if(L){var N=f,W=f+D,$=Math.PI*2;y.setLayout({angle:$,startAngle:h,endAngle:h+$,clockwise:P,cx:u,cy:c,r0:N,r:W})}B(m,h)})}function MF(r,e){var t=r.children||[];r.children=Jie(t,e),t.length&&O(r.children,function(n){MF(n,e)})}function Jie(r,e){if(Me(e)){var t=le(r,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(a,i){return e(a.params,i.params)}),le(t,function(a){return r[a.index]})}else{var n=e==="asc";return r.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function eoe(r){var e={};function t(n,a,i){if(n.depth===0)return ee.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&pe(s)&&(s=Kg(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");ae(u,l)})})}function toe(r){r.registerChartView(Kie),r.registerSeriesModel(qie),r.registerLayout(He(Qie,"sunburst")),r.registerProcessor(He(Gc,"sunburst")),r.registerVisual(eoe),Zie(r)}var fE={color:"fill",borderColor:"stroke"},roe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Fi=et(),noe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return di(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=Fi(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(St);function aoe(r,e){return e=e||[0,0],le(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function ioe(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ge(aoe,r)}}}function ooe(r,e){return e=e||[0,0],le([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function soe(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:ge(ooe,r)}}}function loe(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function uoe(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ge(loe,r)}}}function coe(r,e){return e=e||[0,0],le(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function foe(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:ge(coe,r)}}}function doe(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)},layout:function(n,a){return r.dataToLayout(n,a)}}}}function hoe(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,n){return r.dataToPoint(t,n)},layout:function(t,n){return r.dataToLayout(t,n)}}}}function kF(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||Se(r,"text")))}function LF(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},Se(n,"text")&&(o.text=n.text),Se(n,"rich")&&(o.rich=n.rich),Se(n,"textFill")&&(o.fill=n.textFill),Se(n,"textStroke")&&(o.stroke=n.textStroke),Se(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Se(n,"fontSize")&&(o.fontSize=n.fontSize),Se(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Se(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=Se(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),Se(n,"textPosition")&&(a.position=n.textPosition),Se(n,"textOffset")&&(a.offset=n.textOffset),Se(n,"textRotation")&&(a.rotation=n.textRotation),Se(n,"textDistance")&&(a.distance=n.textDistance)}return dE(o,r),O(o.rich,function(l){dE(l,l)}),{textConfig:a,textContent:i}}function dE(r,e){e&&(e.font=e.textFont||e.font,Se(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Se(e,"textAlign")&&(r.align=e.textAlign),Se(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Se(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Se(e,"textWidth")&&(r.width=e.textWidth),Se(e,"textHeight")&&(r.height=e.textHeight),Se(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Se(e,"textPadding")&&(r.padding=e.textPadding),Se(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Se(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Se(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Se(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Se(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Se(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Se(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function hE(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||ee.color.neutral99;pE(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||ee.color.neutral00,!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||ee.color.neutral00),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,O(e.rich,function(s){pE(s,s)}),n}function pE(r,e){e&&(Se(e,"fill")&&(r.textFill=e.fill),Se(e,"stroke")&&(r.textStroke=e.fill),Se(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Se(e,"font")&&(r.font=e.font),Se(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Se(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Se(e,"fontSize")&&(r.fontSize=e.fontSize),Se(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Se(e,"align")&&(r.textAlign=e.align),Se(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Se(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Se(e,"width")&&(r.textWidth=e.width),Se(e,"height")&&(r.textHeight=e.height),Se(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Se(e,"padding")&&(r.textPadding=e.padding),Se(e,"borderColor")&&(r.textBorderColor=e.borderColor),Se(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Se(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Se(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Se(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Se(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Se(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Se(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Se(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Se(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Se(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var AF={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},vE=ot(AF);Qn(ni,function(r,e){return r[e]=1,r},{});ni.join(", ");var By=["","style","shape","extra"],Sc=et();function t2(r,e,t,n,a){var i=r+"Animation",o=Ic(r,n,a)||{},s=Sc(e).userDuring;return o.duration>0&&(o.during=s?ge(moe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),ae(o,t[i]),o}function Og(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Sc(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Soe(r,e,f),r.type==="compound")for(var d=r.shape.paths,h=e.shape.paths,v=0;v<h.length;v++){var y=h[v];HS("shape",y,d[v])}else HS("shape",e,f),HS("extra",e,f);if(!i&&s&&(xoe(r,e,c),gE("shape",r,e,c),gE("extra",r,e,c),_oe(r,e,u,c)),f.style=u,poe(r,f,o),goe(r,e),s)if(i){var m={};O(By,function(b){var T=b?e[b]:e;T&&T.enterFrom&&(b&&(m[b]=m[b]||{}),ae(b?m[b]:m,T.enterFrom))});var x=t2("enter",r,e,t,a);x.duration>0&&r.animateFrom(m,x)}else voe(r,e,a||0,t,c);IF(r,e),u?r.dirty():r.markRedraw()}function IF(r,e){for(var t=Sc(r).leaveToProps,n=0;n<By.length;n++){var a=By[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Sc(r).leaveToProps={}),a&&(t[a]=t[a]||{}),ae(a?t[a]:t,i.leaveTo))}}function Hm(r,e,t,n){if(r){var a=r.parent,i=Sc(r).leaveToProps;if(i){var o=t2("update",r,e,t,0);o.done=function(){a&&a.remove(r)},r.animateTo(i,o)}else a&&a.remove(r)}}function xl(r){return r==="all"}function poe(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function voe(r,e,t,n,a){if(a){var i=t2("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function goe(r,e){Se(e,"silent")&&(r.silent=e.silent),Se(e,"ignore")&&(r.ignore=e.ignore),r instanceof ea&&Se(e,"invisible")&&(r.invisible=e.invisible),r instanceof nt&&Se(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Va={},yoe={setTransform:function(r,e){return Va.el[r]=e,this},getTransform:function(r){return Va.el[r]},setShape:function(r,e){var t=Va.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Va.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Va.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Va.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Va.el.extra||(Va.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Va.el.extra;if(e)return e[r]}};function moe(){var r=this,e=r.el;if(e){var t=Sc(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Va.el=e,n(yoe)}}function gE(r,e,t,n){var a=t[r];if(a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),xl(l))ae(o,i);else for(var u=Tt(l),c=0;c<u.length;c++){var f=u[c],d=i[f];o[f]=d}else if(xl(s)||Ue(s,r)>=0){!o&&(o=n[r]={});for(var h=ot(i),c=0;c<h.length;c++){var f=h[c],d=i[f];boe(a[f],d)&&(o[f]=d)}}}}}function HS(r,e,t){var n=e[r];if(n)for(var a=t[r]={},i=ot(n),o=0;o<i.length;o++){var s=i[o];a[s]=Ed(n[s])}}function xoe(r,e,t){for(var n=e.transition,a=xl(n)?ni:Tt(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function Soe(r,e,t){for(var n=0;n<vE.length;n++){var a=vE[n],i=AF[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<ni.length;n++){var s=ni[n];e[s]!=null&&(t[s]=e[s])}}function _oe(r,e,t,n){if(t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!xl(o)){var l=Tt(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=a[c];i[c]=f}}else if(r.getAnimationStyleProps&&(xl(s)||xl(o)||Ue(s,"style")>=0)){var d=r.getAnimationStyleProps(),h=d?d.style:null;if(h){!i&&(i=n.style={});for(var v=ot(t),u=0;u<v.length;u++){var c=v[u];if(h[c]){var f=a[c];i[c]=f}}}}}}}function boe(r,e){return Pr(r)?r!==e:r!=null&&isFinite(r)}var DF=et(),woe=["percent","easing","shape","style","extra"];function PF(r){r.stopAnimation("keyframe"),r.attr(DF(r))}function jy(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(se(e)){O(e,function(s){jy(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Ic("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=DF(r);O(By,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),O(n,function(u){var c=r.animators,f=s?u[s]:u;if(f){var d=ot(f);if(s||(d=ht(d,function(y){return Ue(woe,y)<0})),!!d.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var h=0;h<c.length;h++)c[h]!==l&&c[h].targetName===l.targetName&&c[h].stopTracks(d);s&&(o[s]=o[s]||{});var v=s?o[s]:o;O(d,function(y){v[y]=((s?r[s]:r)||{})[y]}),l.whenWithKeys(a*u.percent,f,d,u.easing)}}}),l&&l.delay(e.delay||0).duration(a).start(e.easing)}})}}}var Vi="emphasis",jo="normal",r2="blur",n2="select",es=[jo,Vi,r2,n2],$S={normal:["itemStyle"],emphasis:[Vi,"itemStyle"],blur:[r2,"itemStyle"],select:[n2,"itemStyle"]},US={normal:["label"],emphasis:[Vi,"label"],blur:[r2,"label"],select:[n2,"label"]},Toe=["x","y"],Coe="e\0\0",Vn={normal:{},emphasis:{},blur:{},select:{}},Moe={cartesian2d:ioe,geo:soe,single:uoe,polar:foe,calendar:doe,matrix:hoe};function vw(r){return r instanceof nt}function gw(r){return r instanceof ea}function koe(r,e){e.copyTransform(r),gw(e)&&gw(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,vw(e)&&vw(r)&&e.setShape(r.shape))}var Loe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=yE(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){YS(a,null,f,u(f,i),t,l,s)}).remove(function(f){var d=o.getItemGraphicEl(f);d&&Hm(d,Fi(d).option,t)}).update(function(f,d){var h=o.getItemGraphicEl(d);YS(a,h,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?Wh(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,a,i,o){var s=n.getData(),l=yE(n,s,a,i),u=this._progressiveEls=[];function c(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var d=YS(null,null,f,l(f,o),n,this.group,s);d&&(d.traverse(c),u.push(d))}},e.prototype.eachRendered=function(t){is(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},e.type="custom",e})(mt);function a2(r){var e=r.type,t;if(e==="path"){var n=r.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=zF(n);t=cc(i,null,a,n.layout||"center"),Fi(t).customPathData=i}else if(e==="image")t=new gr({}),Fi(t).customImagePath=r.style.image;else if(e==="text")t=new st({});else if(e==="group")t=new Ae;else if(e==="compoundPath"){var n=r.shape;if(!n||!n.paths){var o="";gt(o)}var s=le(n.paths,function(c){if(c.type==="path")return cc(c.shape.pathData,c,null);var f=rh(c.type);if(!f){var d="";gt(d)}return new f});t=new zh({shape:{paths:s}})}else{var l=rh(e);if(!l){var o="";gt(o)}t=new l}return Fi(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function i2(r,e,t,n,a,i,o){PF(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=Toe);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;Se(u,"textFill")&&(u.fill=u.textFill),Se(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=vw(e)?l.decal:null;r&&f&&(f.dirty=!0,c=hc(f,r)),l.__decalPattern=c}if(gw(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Og(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),jy(e,n.keyframeAnimation,i)}function RF(r,e,t,n,a){var i=e.isGroup?null:e,o=a&&a[r].cfg;if(i){var s=i.ensureState(r);if(n===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),Tl(i)}}function Aoe(r,e,t){if(!r.isGroup){var n=r,a=t.currentZ,i=t.currentZLevel;n.z=a,n.zlevel=i;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<es.length;s++)Ioe(n,e,es[s])}}function Ioe(r,e,t){var n=t===jo,a=n?e:Fy(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function yE(r,e,t,n){var a=r.get("renderItem");if(typeof a=="string"){var i=wZ(a);i&&(a=i)}var o=r.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):Moe[o.type](o));for(var l=De({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:k,style:A,ordinalRawValue:L,styleEmphasis:D,visual:z,barLayout:B,currentSeriesIndices:N,font:W},s.api||{}),u={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:Doe(r.getData()),itemPayload:r.get("itemPayload")||{}},c,f,d={},h={},v={},y={},m=0;m<es.length;m++){var x=es[m];v[x]=r.getModel($S[x]),y[x]=r.getModel(US[x])}function b($){return $===c?f||(f=e.getItemModel($)):e.getItemModel($)}function T($,H){return e.hasItemOption?$===c?d[H]||(d[H]=b($).getModel($S[H])):b($).getModel($S[H]):v[H]}function C($,H){return e.hasItemOption?$===c?h[H]||(h[H]=b($).getModel(US[H])):b($).getModel(US[H]):y[H]}return function($,H){return c=$,f=null,d={},h={},a&&a(De({dataIndexInside:$,dataIndex:e.getRawIndex($),actionType:H?H.type:null},u),l)};function k($,H){return H==null&&(H=c),e.getStore().get(e.getDimensionIndex($||0),H)}function L($,H){H==null&&(H=c),$=$||0;var U=e.getDimensionInfo($);if(!U){var G=e.getDimensionIndex($);return G>=0?e.getStore().get(G,H):void 0}var X=e.get(U.name,H),K=U&&U.ordinalMeta;return K?K.categories[X]:X}function A($,H){H==null&&(H=c);var U=e.getItemVisual(H,"style"),G=U&&U.fill,X=U&&U.opacity,K=T(H,jo).getItemStyle();G!=null&&(K.fill=G),X!=null&&(K.opacity=X);var V={inheritColor:pe(G)?G:ee.color.neutral99},Y=C(H,jo),ne=wt(Y,null,V,!1,!0);ne.text=Y.getShallow("show")?Te(r.getFormattedLabel(H,jo),gc(e,H)):null;var ue=sy(Y,V,!1);return R($,K),K=hE(K,ne,ue),$&&P(K,$),K.legacy=!0,K}function D($,H){H==null&&(H=c);var U=T(H,Vi).getItemStyle(),G=C(H,Vi),X=wt(G,null,null,!0,!0);X.text=G.getShallow("show")?hn(r.getFormattedLabel(H,Vi),r.getFormattedLabel(H,jo),gc(e,H)):null;var K=sy(G,null,!0);return R($,U),U=hE(U,X,K),$&&P(U,$),U.legacy=!0,U}function P($,H){for(var U in H)Se(H,U)&&($[U]=H[U])}function R($,H){$&&($.textFill&&(H.textFill=$.textFill),$.textPosition&&(H.textPosition=$.textPosition))}function z($,H){if(H==null&&(H=c),Se(fE,$)){var U=e.getItemVisual(H,"style");return U?U[fE[$]]:null}if(Se(roe,$))return e.getItemVisual(H,$)}function B($){if(o.type==="cartesian2d"){var H=o.getBaseAxis();return MK(De({axis:H},$))}}function N(){return t.getCurrentSeriesIndices()}function W($){return AT($,t)}}function Doe(r){var e={};return O(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function YS(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=o2(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Pt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function o2(r,e,t,n,a,i){var o=-1,s=e;e&&EF(e,n,a)&&(o=Ue(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=a2(n),s&&koe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Vn.normal.cfg=Vn.normal.conOpt=Vn.emphasis.cfg=Vn.emphasis.conOpt=Vn.blur.cfg=Vn.blur.conOpt=Vn.select.cfg=Vn.select.conOpt=null,Vn.isLegacy=!1,Roe(u,t,n,a,l,Vn),Poe(u,t,n,a,l),i2(r,u,t,n,Vn,a,l),Se(n,"info")&&(Fi(u).info=n.info);for(var c=0;c<es.length;c++){var f=es[c];if(f!==jo){var d=Fy(n,f),h=s2(n,d,f);RF(f,u,d,h,Vn)}}return Aoe(u,n,a),n.type==="group"&&Eoe(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function EF(r,e,t){var n=Fi(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&Boe(i)&&zF(i)!==n.customPathData||a==="image"&&Se(o,"image")&&o.image!==n.customImagePath}function Poe(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&EF(o,i,n)&&(o=null),o||(o=a2(i),r.setClipPath(o)),i2(null,o,e,i,null,n,a)}}function Roe(r,e,t,n,a,i){if(!(r.isGroup||r.type==="compoundPath")){mE(t,null,i),mE(t,Vi,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=a2(o),r.setTextContent(c)),i2(null,c,e,o,null,n,a);for(var f=o&&o.style,d=0;d<es.length;d++){var h=es[d];if(h!==jo){var v=i[h].conOpt;RF(h,c,v,s2(o,v,h),null)}}f?c.dirty():c.markRedraw()}}}}function mE(r,e,t){var n=e?Fy(r,e):r,a=e?s2(r,n,Vi):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?Fy(s,e):s:null;if(a&&(t.isLegacy||kF(a,i,!!o,!!l))){t.isLegacy=!0;var u=LF(a,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function Fy(r,e){return e?r?r[e]:null:r}function s2(r,e,t){var n=e&&e.style;return n==null&&t===Vi&&r&&(n=r.styleEmphasis),n}function Eoe(r,e,t,n,a){var i=n.children,o=i?i.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Ooe({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=i[c],d=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),o2(r,d,t,f,a,e)):d.ignore=!0}for(var h=e.childCount()-1;h>=c;h--){var v=e.childAt(h);zoe(e,v,a)}}}function zoe(r,e,t){e&&Hm(e,Fi(r).option,t)}function Ooe(r){new Xi(r.oldChildren,r.newChildren,xE,xE,r).add(SE).update(SE).remove(Noe).execute()}function xE(r,e){var t=r&&r.name;return t??Coe+e}function SE(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;o2(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function Noe(r){var e=this.context,t=e.oldChildren[r];t&&Hm(t,Fi(t).option,e.seriesModel)}function zF(r){return r&&(r.pathData||r.d)}function Boe(r){return r&&(Se(r,"pathData")||Se(r,"d"))}function joe(r){r.registerChartView(Loe),r.registerSeriesModel(noe)}var al=et(),_E=Le,XS=ge,l2=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Ae,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var d=He(bE,t,f);this.updatePointerEl(s,u,d),this.updateLabelEl(s,u,d,t)}TE(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=AC(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=al(e).pointerEl=new El[i.type](_E(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=al(e).labelEl=new st(_E(t.label));e.add(i),wE(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=al(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=al(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),wE(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Dc(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){$i(u.event)},onmousedown:XS(this._onHandleDragMove,this,0,0),drift:XS(this._onHandleDragMove,this),ondragend:XS(this._onHandleDragEnd,this)}),n.add(a)),TE(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");se(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Nc(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){bE(this._axisPointerModel,!t&&this._moveAnimation,this._handle,ZS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(ZS(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(ZS(a)),al(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),oh(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r})();function bE(r,e,t,n){OF(al(t).lastProp,n)||(al(t).lastProp=n,e?ct(t,n,r):(t.stopAnimation(),t.attr(n)))}function OF(r,e){if(Pe(r)&&Pe(e)){var t=!0;return O(e,function(n,a){t=t&&OF(r[a],n)}),!!t}else return r===e}function wE(r,e){r[e.get(["label","show"])?"show":"hide"]()}function ZS(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function TE(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}function u2(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function NF(r,e,t,n,a){var i=t.get("value"),o=BF(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Ec(s.get("padding")||0),u=s.getFont(),c=pm(o,u),f=a.position,d=c.width+l[1]+l[3],h=c.height+l[0]+l[2],v=a.align;v==="right"&&(f[0]-=d),v==="center"&&(f[0]-=d/2);var y=a.verticalAlign;y==="bottom"&&(f[1]-=h),y==="middle"&&(f[1]-=h/2),Foe(f,d,h,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:wt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Foe(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function BF(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:_y(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};O(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),pe(o)?i=o.replace("{value}",i):Me(o)&&(i=o(s))}return i}function c2(r,e,t){var n=hr();return Qi(n,n,t.rotation),Ta(n,n,t.position),ba([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function jF(r,e,t,n,a,i){var o=Jr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),NF(e,n,a,i,{position:c2(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function f2(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function FF(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function CE(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var Voe=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=ME(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var d=u2(i),h=Goe[u](s,f,c);h.style=d,t.graphicKey=h.type,t.pointer=h}var v=Dy(l.getRect(),a);jF(n,t,v,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Dy(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=c2(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=ME(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var d=(u[1]+u[0])/2,h=[d,d];h[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:v[c]}},e})(l2);function ME(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Goe={line:function(r,e,t){var n=f2([e,t[0]],[e,t[1]],kE(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:FF([e-n/2,t[0]],[n,a],kE(r))}}};function kE(r){return r.dim==="x"?0:1}var Woe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:ee.color.border,width:1,type:"dashed"},shadowStyle:{color:ee.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:ee.color.neutral00,padding:[5,7,5,7],backgroundColor:ee.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:ee.color.accent40,throttle:40}},e})(Je),Oi=et(),Hoe=O;function VF(r,e,t){if(!it.node){var n=e.getZr();Oi(n).records||(Oi(n).records={}),$oe(n,e);var a=Oi(n).records[r]||(Oi(n).records[r]={});a.handler=t}}function $oe(r,e){if(Oi(r).initialized)return;Oi(r).initialized=!0,t("click",He(LE,"click")),t("mousemove",He(LE,"mousemove")),t("globalout",Yoe);function t(n,a){r.on(n,function(i){var o=Xoe(e);Hoe(Oi(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Uoe(o.pendings,e)})}}function Uoe(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function Yoe(r,e,t){r.handler("leave",null,t)}function LE(r,e,t,n){e.handler(r,t,n)}function Xoe(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function yw(r,e){if(!it.node){var t=e.getZr(),n=(Oi(t).records||{})[r];n&&(Oi(t).records[r]=null)}}var Zoe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";VF("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){yw("axisPointer",n)},e.prototype.dispose=function(t,n){yw("axisPointer",n)},e.type="axisPointer",e})(Ct);function GF(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=bl(i,r);if(o==null||o<0||se(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,d=u.dim,h=f==="x"||f==="radius"?1:0,v=i.mapDimension(d),y=[];y[h]=i.get(v,o),y[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(y)||[]}else t=l.dataToPoint(i.getValues(le(l.dimensions,function(x){return i.mapDimension(x)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var AE=et();function Koe(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||ge(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Ng(a)&&(a=GF({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Ng(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||Ng(a),d={},h={},v={list:[],map:{}},y={showPointer:He(Qoe,h),showTooltip:He(Joe,v)};O(s.coordSysMap,function(x,b){var T=l||x.containPoint(a);O(s.coordSysAxesInfo[b],function(C,k){var L=C.axis,A=nse(u,C);if(!f&&T&&(!u||A)){var D=A&&A.value;D==null&&!l&&(D=L.pointToData(a)),D!=null&&IE(C,D,y,!1,d)}})});var m={};return O(c,function(x,b){var T=x.linkGroup;T&&!h[b]&&O(T.axesInfo,function(C,k){var L=h[k];if(C!==x&&L){var A=L.value;T.mapper&&(A=x.axis.scale.parse(T.mapper(A,DE(C),DE(x)))),m[x.key]=A}})}),O(m,function(x,b){IE(c[b],x,y,!0,d)}),ese(h,c,d),tse(v,a,r,o),rse(c,o,t),d}}function IE(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=qoe(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&ae(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function qoe(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return O(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,d;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,t);d=h.dataIndices,f=h.nestestValue}else{if(d=l.indicesOfNearest(n,c[0],r,t.type==="category"?.5:null),!d.length)return;f=l.getData().get(c[0],d[0])}if(!(f==null||!isFinite(f))){var v=r-f,y=Math.abs(v);y<=o&&((y<o||v>=0&&s<0)&&(o=y,s=v,a=f,i.length=0),O(d,function(m){i.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:i,snapToValue:a}}function Qoe(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function Joe(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=vh(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function ese(r,e,t){var n=t.axesInfo=[];O(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function tse(r,e,t,n){if(Ng(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function rse(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=AE(n)[a]||{},o=AE(n)[a]={};O(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&O(f.seriesDataIndices,function(d){var h=d.seriesIndex+" | "+d.dataIndex;o[h]=d})});var s=[],l=[];O(i,function(u,c){!o[c]&&l.push(u)}),O(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function nse(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function DE(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Ng(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Uh(r){Bl.registerAxisPointerClass("CartesianAxisPointer",Voe),r.registerComponentModel(Woe),r.registerComponentView(Zoe),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!se(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=aee(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Koe)}function ase(r){Ze(d4),Ze(Uh)}var ise=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),d=i.get("type");if(d&&d!=="none"){var h=u2(i),v=sse[d](s,l,f,c);v.style=h,t.graphicKey=v.type,t.pointer=v}var y=i.get(["label","margin"]),m=ose(n,a,i,l,y);NF(t,a,i,o,m)},e})(l2);function ose(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var d=hr();Qi(d,d,s),Ta(d,d,[n.cx,n.cy]),u=ba([o,-a],d);var h=e.getModel("axisLabel").get("rotate")||0,v=Jr.innerTextLayout(s,h*Math.PI/180,-1);c=v.textAlign,f=v.textVerticalAlign}else{var y=l[1];u=n.coordToPoint([y+a,o]);var m=n.cx,x=n.cy;c=Math.abs(u[0]-m)/y<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-x)/y<.3?"middle":u[1]>x?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var sse={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:f2(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:CE(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:CE(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},lse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(Je),d2=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Bt).models[0]},e.type="polarAxis",e})(Je);Wt(d2,Vc);var use=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(d2),cse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(d2),h2=(function(r){Q(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e})(aa);h2.prototype.dataToRadius=aa.prototype.dataToCoord;h2.prototype.radiusToData=aa.prototype.coordToData;var fse=et(),p2=(function(r){Q(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=pm(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),d=f/u;isNaN(d)&&(d=1/0);var h=Math.max(0,Math.floor(d)),v=fse(t.model),y=v.lastAutoInterval,m=v.lastTickCount;return y!=null&&m!=null&&Math.abs(y-h)<=1&&Math.abs(m-o)<=1&&y>h?h=y:(v.lastTickCount=o,v.lastAutoInterval=h),h},e})(aa);p2.prototype.dataToAngle=aa.prototype.dataToCoord;p2.prototype.angleToData=aa.prototype.coordToData;var WF=["radius","angle"],dse=(function(){function r(e){this.dimensions=WF,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new h2,this._angleAxis=new p2,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(a[0],t),n[1]=this._angleAxis.angleToData(a[1],t),n},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var n=e[0],a=e[1]/180*Math.PI;return t[0]=Math.cos(a)*n+this.cx,t[1]=-Math.sin(a)*n+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,d=this.r,h=this.r0;return d!==h&&f-o<=d*d&&f+o>=h*h},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},r.prototype.convertToPixel=function(e,t,n){var a=PE(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=PE(t);return a===this?this.pointToData(n):null},r})();function PE(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function hse(r,e,t){var n=e.get("center"),a=lr(e,t).refContainer;r.cx=he(n[0],a.width)+a.x,r.cy=he(n[1],a.height)+a.y;var i=r.getRadiusAxis(),o=Math.min(a.width,a.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:se(s)||(s=[0,s]);var l=[he(s[0],o),he(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function pse(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();O(by(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),O(by(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Ll(n.scale,n.model),Ll(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function vse(r){return r.mainType==="angleAxis"}function RE(r,e){var t;if(r.type=e.get("type"),r.scale=Fh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),vse(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,a)}e.axis=r,r.model=e}var gse={dimensions:WF,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new dse(a+"");i.update=pse;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");RE(o,l),RE(s,u),hse(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",Bt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},yse=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function ig(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function og(r){var e=r.getRadiusAxis();return e.inverse?0:1}function EE(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var mse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords({breakTicks:"none"}),l=a.getMinorTicksCoords(),u=le(a.getViewLabels(),function(c){c=Le(c);var f=a.scale,d=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(d),c});EE(u),EE(s),O(yse,function(c){t.get([c,"show"])&&(!a.scale.isBlank()||c==="axisLine")&&xse[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e})(Bl),xse={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=og(t),f=c?0:1,d,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?d=new El[h]({shape:{cx:t.cx,cy:t.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):d=new Lc({shape:{cx:t.cx,cy:t.cy,r:i[c],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),d.style.fill=null,r.add(d)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[og(t)],u=le(n,function(c){return new Zt({shape:ig(t,[l,l+s],c.coord)})});r.add(Cn(u,{style:De(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[og(t)],c=[],f=0;f<a.length;f++)for(var d=0;d<a[f].length;d++)c.push(new Zt({shape:ig(t,[u,u+l],a[f][d].coord)}));r.add(Cn(c,{style:De(s.getModel("lineStyle").getLineStyle(),De(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,a,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");O(o,function(f,d){var h=l,v=f.tickValue,y=i[og(t)],m=t.coordToPoint([y+u,f.coord]),x=t.cx,b=t.cy,T=Math.abs(m[0]-x)/y<.3?"center":m[0]>x?"left":"right",C=Math.abs(m[1]-b)/y<.3?"middle":m[1]>b?"top":"bottom";if(s&&s[v]){var k=s[v];Pe(k)&&k.textStyle&&(h=new rt(k.textStyle,l,l.ecModel))}var L=new st({silent:Jr.isLabelSilent(e),style:wt(h,{x:m[0],y:m[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:T,verticalAlign:C})});if(r.add(L),eo({el:L,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:f.rawLabel,tickIndex:d}}),c){var A=Jr.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=f.rawLabel,Ne(L).eventData=A}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Zt({shape:ig(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(Cn(c[f],{style:De({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new Zt({shape:ig(t,i,a[u][c].coord)}));r.add(Cn(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,a,i){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,d=-n[0].coord*f,h=Math.min(i[0],i[1]),v=Math.max(i[0],i[1]),y=e.get("clockwise"),m=1,x=n.length;m<=x;m++){var b=m===x?n[0].coord:n[m].coord,T=u++%l.length;c[T]=c[T]||[],c[T].push(new Er({shape:{cx:t.cx,cy:t.cy,r0:h,r:v,startAngle:d,endAngle:-b*f,clockwise:y},silent:!0})),d=-b*f}for(var m=0;m<c.length;m++)r.add(Cn(c[m],{style:De({fill:l[m%l.length]},s.getAreaStyle()),silent:!0}))}}},Sse=["splitLine","splitArea","minorSplitLine"],_se=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this._axisGroup,o=this._axisGroup=new Ae;this.group.add(o);var s=t.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),f=s.getMinorTicksCoords(),d=u.getExtent()[0],h=s.getExtent(),v=wse(l,t,d),y=new Jr(t,a,v);y.build(),o.add(y.group),Oh(i,o,t),O(Sse,function(m){t.get([m,"show"])&&!s.scale.isBlank()&&bse[m](this.group,t,l,d,h,c,f)},this)}},e.type="radiusAxis",e})(Bl),bse={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),f=Math.PI/180,d=c.getExtent(),h=Math.abs(d[1]-d[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var v=[],y=0;y<i.length;y++){var m=u++%l.length;v[m]=v[m]||[],v[m].push(new El[h]({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[y].coord,0),startAngle:-d[0]*f,endAngle:-d[1]*f,clockwise:c.inverse}}))}for(var y=0;y<v.length;y++)r.add(Cn(v[y],{style:De({stroke:l[y%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,a,i,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new fi({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(Cn(u,{style:De({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,a,i){if(i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=i[0].coord,d=1;d<i.length;d++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new Er({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[d].coord}for(var d=0;d<c.length;d++)r.add(Cn(c[d],{style:De({fill:l[d%l.length]},s.getAreaStyle()),silent:!0}))}}};function wse(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function HF(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function $F(r,e){return e.dim+r.model.componentIndex}function Tse(r,e,t){var n={},a=Cse(ht(e.getSeriesByType(r),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=$F(s,l),c=HF(i),f=a[u][c],d=f.offset,h=f.width,v=s.getOtherAxis(l),y=i.coordinateSystem.cx,m=i.coordinateSystem.cy,x=i.get("barMinHeight")||0,b=i.get("barMinAngle")||0;n[c]=n[c]||[];for(var T=o.mapDimension(v.dim),C=o.mapDimension(l.dim),k=Zi(o,T),L=l.dim!=="radius"||!i.get("roundCap",!0),A=v.model,D=A.get("startValue"),P=v.dataToCoord(D||0),R=0,z=o.count();R<z;R++){var B=o.get(T,R),N=o.get(C,R),W=B>=0?"p":"n",$=P;k&&(n[c][N]||(n[c][N]={p:P,n:P}),$=n[c][N][W]);var H=void 0,U=void 0,G=void 0,X=void 0;if(v.dim==="radius"){var K=v.dataToCoord(B)-P,V=l.dataToCoord(N);Math.abs(K)<x&&(K=(K<0?-1:1)*x),H=$,U=$+K,G=V-d,X=G-h,k&&(n[c][N][W]=U)}else{var Y=v.dataToCoord(B,L)-P,ne=l.dataToCoord(N);Math.abs(Y)<b&&(Y=(Y<0?-1:1)*b),H=ne+d,U=H+h,G=$,X=$+Y,k&&(n[c][N][W]=X)}o.setItemLayout(R,{cx:y,cy:m,r0:H,r:U,startAngle:-G*Math.PI/180,endAngle:-X*Math.PI/180,clockwise:G>=X})}}})}function Cse(r){var e={};O(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=$F(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},d=f.stacks;e[l]=f;var h=HF(n);d[h]||f.autoWidthCount++,d[h]=d[h]||{width:0,maxWidth:0};var v=he(n.get("barWidth"),c),y=he(n.get("barMaxWidth"),c),m=n.get("barGap"),x=n.get("barCategoryGap");v&&!d[h].width&&(v=Math.min(f.remainedWidth,v),d[h].width=v,f.remainedWidth-=v),y&&(d[h].maxWidth=y),m!=null&&(f.gap=m),x!=null&&(f.categoryGap=x)});var t={};return O(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=he(n.categoryGap,o),l=he(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),O(i,function(y,m){var x=y.maxWidth;x&&x<f&&(x=Math.min(x,u),y.width&&(x=Math.min(x,y.width)),u-=x,y.width=x,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var d=0,h;O(i,function(y,m){y.width||(y.width=f),h=y,d+=y.width*(1+l)}),h&&(d-=h.width*l);var v=-d/2;O(i,function(y,m){t[a][m]=t[a][m]||{offset:v,width:y.width},v+=y.width*(1+l)})}),t}var Mse={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},kse={splitNumber:5},Lse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(Ct);function Ase(r){Ze(Uh),Bl.registerAxisPointerClass("PolarAxisPointer",ise),r.registerCoordinateSystem("polar",gse),r.registerComponentModel(lse),r.registerComponentView(Lse),yc(r,"angle",use,Mse),yc(r,"radius",cse,kse),r.registerComponentView(mse),r.registerComponentView(_se),r.registerLayout(He(Tse,"bar"))}function mw(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,a={},i=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var c={horizontal:0,vertical:1};a.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[i],r.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Tr(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var d=r.get(["axisLabel","rotate"]);return a.labelRotate=i==="top"?-d:d,a.z2=1,a}var Ise=["splitArea","splitLine","breakArea"],Dse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,a,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Ae;var l=mw(t),u=new Jr(t,a,l);u.build(),o.add(this._axisGroup),o.add(u.group),O(Ise,function(c){t.get([c,"show"])&&Pse[c](this,this.group,this._axisGroup,t,a)},this),Oh(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){u4(this)},e.type="singleAxis",e})(Bl),Pse={splitLine:function(r,e,t,n,a){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=n.coordinateSystem.getRect(),f=i.isHorizontal(),d=[],h=0,v=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],m=[],x=0;x<v.length;++x){var b=i.toGlobalCoord(v[x].coord);f?(y[0]=b,y[1]=c.y,m[0]=b,m[1]=c.y+c.height):(y[0]=c.x,y[1]=b,m[0]=c.x+c.width,m[1]=b);var T=new Zt({shape:{x1:y[0],y1:y[1],x2:m[0],y2:m[1]},silent:!0});fc(T.shape,u);var C=h++%l.length;d[C]=d[C]||[],d[C].push(T)}for(var k=s.getLineStyle(["color"]),x=0;x<d.length;++x)e.add(Cn(d[x],{style:De({stroke:l[x%l.length]},k),silent:!0}))}},splitArea:function(r,e,t,n,a){l4(r,t,n,n)},breakArea:function(r,e,t,n,a){var i=$h(),o=n.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,r,n,n.coordinateSystem.getRect(),a)}},Bg=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},e})(Je);Wt(Bg,Vc.prototype);var Rse=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e})(aa),UF=["single"],Ese=(function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=UF,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=this.dimension,i=new Rse(a,Fh(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var a=n.getData();O(a.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Ll(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){var n=lr(e,t).refContainer;this._rect=Dt(e.getBoxLayoutParams(),n),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),a=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(a[i],a[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),a=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return a-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(e[a.orient==="horizontal"?0:1])),n},r.prototype.dataToPoint=function(e,t,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o=a.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+e)),n[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,n){var a=zE(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=zE(t);return a===this?this.pointToData(n):null},r})();function zE(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function zse(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new Ese(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",Bt).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var Ose={create:zse,dimensions:UF},OE=["x","y"],Nse=["width","height"],Bse=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=KS(l,1-Vy(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var d=u2(i),h=jse[f](s,c,u);h.style=d,t.graphicKey=h.type,t.pointer=h}var v=mw(a);jF(n,t,v,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=mw(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=c2(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=Vy(o),u=KS(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=KS(s,1-l),d=(f[1]+f[0])/2,h=[d,d];return h[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e})(l2),jse={line:function(r,e,t){var n=f2([e,t[0]],[e,t[1]],Vy(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:FF([e-n/2,t[0]],[n,a],Vy(r))}}};function Vy(r){return r.isHorizontal()?0:1}function KS(r,e){var t=r.getRect();return[t[OE[e]],t[OE[e]]+t[Nse[e]]]}var Fse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(Ct);function Vse(r){Ze(Uh),Bl.registerAxisPointerClass("SingleAxisPointer",Bse),r.registerComponentView(Fse),r.registerComponentView(Dse),r.registerComponentModel(Bg),yc(r,"single",Bg,Bg.defaultOption),r.registerCoordinateSystem("single",Ose)}var Gse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=zl(t);r.prototype.init.apply(this,arguments),NE(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),NE(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:ee.color.axisLine,width:1,type:"solid"}},itemStyle:{color:ee.color.neutral00,borderWidth:1,borderColor:ee.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:ee.size.s,color:ee.color.secondary},monthLabel:{show:!0,position:"start",margin:ee.size.s,align:"center",formatter:null,color:ee.color.secondary},yearLabel:{show:!0,position:null,margin:ee.size.xl,formatter:null,color:ee.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(Je);function NE(r,e){var t=r.cellSize,n;se(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=le([0,1],function(i){return cY(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});oi(r,e,{type:"box",ignoreSize:a})}var Wse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToCalendarLayout([u],!1).tl,f=new Qe({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});a.add(f)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,d=0;f.time<=n.end.time;d++){v(f.formatedDate),d===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var h=f.date;h.setMonth(h.getMonth()+1),f=s.getDateInfo(h)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(y){o._firstDayOfMonth.push(s.getDateInfo(y)),o._firstDayPoints.push(s.dataToCalendarLayout([y],!1).tl);var m=o._getLinePointsOfOneWeek(t,y,a);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Cr({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return pe(t)&&t?nY(t,n):Me(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,d=a==="horizontal"?0:1,h={top:[c,u[d][1]],bottom:[c,u[1-d][1]],left:[u[1-d][0],f],right:[u[d][0],f]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var y=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:v},x=this._formatterLabel(y,m),b=new st({z2:30,style:wt(o,{text:x}),silent:o.get("silent")});b.attr(this._yearTextPositionControl(b,h[l],a,l,s)),i.add(b)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],c=t[1];return a==="horizontal"?(c=c+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||pe(s))&&(s&&(n=hb(s)||n),s=n.get(["time","monthAbbr"])||[]);var d=u==="start"?0:1,h=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=c==="center",y=o.get("silent"),m=0;m<f[d].length-1;m++){var x=f[d][m].slice(),b=this._firstDayOfMonth[m];if(v){var T=this._firstDayPoints[m];x[h]=(T[h]+f[0][m+1][h])/2}var C=o.get("formatter"),k=s[+b.m-1],L={yyyy:b.y,yy:(b.y+"").slice(2),MM:b.m,M:+b.m,nameMap:k},A=this._formatterLabel(C,L),D=new st({z2:30,style:ae(wt(o,{text:A}),this._monthTextPositionControl(x,v,a,u,l)),silent:y});i.add(D)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],c=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,a,i,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),d=l.getFirstDayOfWeek();if(!c||pe(c)){c&&(n=hb(c)||n);var h=n.get(["time","dayOfWeekShort"]);c=h||le(n.get(["time","dayOfWeekAbbr"]),function(L){return L[0]})}var v=l.getNextNDay(a.end.time,7-a.lweek).time,y=[l.getCellWidth(),l.getCellHeight()];f=he(f,Math.min(y[1],y[0])),u==="start"&&(v=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var m=s.get("silent"),x=0;x<7;x++){var b=l.getNextNDay(v,x),T=l.dataToCalendarLayout([b.time],!1).center,C=x;C=Math.abs((x+d)%7);var k=new st({z2:30,style:ae(wt(s,{text:c[C]}),this._weekTextPositionControl(T,i,u,f,y)),silent:m});o.add(k)}}},e.type="calendar",e})(Ct),qS=864e5,Hse=(function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e,this._update(t,n)}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=ci(e);var t=e.getFullYear(),n=e.getMonth()+1,a=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];O([0,1],function(f){c(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Dt(o,l);O([0,1],function(f){c(i,f)||(i[f]=u[a[f]]/s[f])});function c(f,d){return f[d]!=null&&f[d]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t,n){n=n||[],se(e)&&(e=e[0]),t==null&&(t=!0);var a=this.getDateInfo(e),i=this._rangeInfo,o=a.formatedDate;if(t&&!(a.time>=i.start.time&&a.time<i.end.time+qS))return n[0]=n[1]=NaN,n;var s=a.day,l=this._getRangeInfo([i.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2),n},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToLayout=function(e,t,n){n=n||{};var a=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},o=this.dataToPoint(e,t);return a.x=o[0]-this._sw/2,a.y=o[1]-this._sh/2,a.width=this._sw,a.height=this._sh,ze.copy(i,a),Cl(i,this._lineWidth/2,!0,!0),n},r.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,a):this._getDateByWeeksAndDay(t,n-1,a)},r.prototype.convertToPixel=function(e,t,n){var a=QS(t);return a===this?a.dataToPoint(n):null},r.prototype.convertToLayout=function(e,t,n){var a=QS(t);return a===this?a.dataToLayout(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=QS(t);return a===this?a.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(se(e)&&e.length===1&&(e=e[0]),se(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/qS)-Math.floor(t[0].time/qS)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var c=Math.floor((a+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Bh({targetModel:i,coordSysType:"calendar",coordSysProvider:fB})}),n},r.dimensions=["time","value"],r})();function QS(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function $se(r){r.registerComponentModel(Gse),r.registerComponentView(Wse),r.registerCoordinateSystem("calendar",Hse)}var Di={level:1,leaf:2,nonLeaf:3},Gi={none:0,all:1,body:2,corner:3};function xw(r,e,t){var n=e[Ge[t]].getCell(r);return!n&<(r)&&r<0&&(n=e[Ge[1-t]].getUnitLayoutInfo(t,Math.round(r))),n}function YF(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function XF(r,e,t,n,a){BE(r[0],e,a,t,n,0),BE(r[1],e,a,t,n,1)}function BE(r,e,t,n,a,i){r[0]=1/0,r[1]=-1/0;var o=n[i],s=se(o)?o:[o],l=s.length,u=!!t;if(l>=1?(jE(r,e,s,u,a,i,0),l>1&&jE(r,e,s,u,a,i,l-1)):r[0]=r[1]=NaN,u){var c=-a[Ge[1-i]].getLocatorCount(i),f=a[Ge[i]].getLocatorCount(i)-1;t===Gi.body?c=Yt(0,c):t===Gi.corner&&(f=In(-1,f)),f<c&&(c=f=NaN),Dr(r[0])&&(r[0]=c),Dr(r[1])&&(r[1]=f),r[0]=Yt(In(r[0],f),c),r[1]=Yt(In(r[1],f),c)}}function jE(r,e,t,n,a,i,o){var s=xw(t[o],a,i);if(!s){r[0]=r[1]=NaN;return}var l=s.id[Ge[i]],u=l,c=Zse(s);c&&(u+=c.span[Ge[i]]-1),r[0]=In(r[0],l,u),r[1]=Yt(r[1],l,u)}function sg(r,e){return Dr(r[e][0])||Dr(r[e][1])}function FE(r,e,t,n){e=e||Use;for(var a=0;a<n;a++)e[a]=!1;for(;;){for(var i=!1,a=0;a<n;a++){var o=t[a];!e[a]&&o.cellMergeOwner&&Yse(r,o.locatorRange)&&(e[a]=!0,i=!0)}if(!i)break}}var Use=[];function Yse(r,e){return!VE(r[0],e[0])||!VE(r[1],e[1])?!1:(r[0][0]=In(r[0][0],e[0][0]),r[0][1]=Yt(r[0][1],e[0][1]),r[1][0]=In(r[1][0],e[1][0]),r[1][1]=Yt(r[1][1],e[1][1]),!0)}function VE(r,e){return r[1]>=e[0]&&r[0]<=e[1]}function GE(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function Xse(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function WE(r,e,t,n){var a=xw(e[n][0],t,n),i=xw(e[n][1],t,n);r[Ge[n]]=r[tr[n]]=NaN,a&&i&&(r[Ge[n]]=a.xy,r[tr[n]]=i.xy+i.wh-a.xy)}function rd(r,e,t,n){return r[Ge[e]]=t,r[Ge[1-e]]=n,r}function Zse(r){return r&&(r.type===Di.leaf||r.type===Di.nonLeaf)?r:null}function Gy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var HE=(function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=Kse(e);var n=t.get("data",!0);n!=null&&!se(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,n=t._cells,a=t._levels,i=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,c,f){var d=0;return u&&O(u,function(h,v){var y;pe(h)?y={value:h}:Pe(h)?(y=h,h.value!=null&&!pe(h.value)&&(y={value:null})):y={value:null};var m={type:Di.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Ee,span:rd(new Ee,t.dimIdx,1,1),option:y,xy:NaN,wh:NaN,dim:t,rect:Gy()};o++,(i[c]||(i[c]=[])).push(m),a[f]||(a[f]={type:Di.level,xy:NaN,wh:NaN,option:null,id:new Ee,dim:t});var x=s(y.children,c,f+1),b=Math.max(1,x);m.span[Ge[t.dimIdx]]=b,d+=b,c+=b}),d}function l(){for(var u=[];n.length<o;)for(var c=0;c<i.length;c++){var f=i[c].pop();if(f){f.ordinal=u.length;var d=f.option.value;u.push(d),n.push(f),t._uniqueValueGen.calcDupBase(d)}}t._uniqueValueGen.ensureValueUnique(u,n);var h=t._ordinalMeta=new ch({categories:u,needCollect:!1,deduplication:!1});t._scale=new pc({ordinalMeta:h});for(var v=0;v<t._leavesCount;v++){var y=t._cells[v];y.type=Di.leaf,y.span[Ge[1-t.dimIdx]]=t._levels.length-y.level}t._initCellsId(),t._initLevelIdOptions()}},r.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Di.level,xy:NaN,wh:NaN,option:null,id:new Ee,dim:e}],e._initLevelIdOptions();var t=e._ordinalMeta=new ch({needCollect:!0,deduplication:!0,onCollect:function(n,a){var i=e._cells[a]={type:Di.leaf,ordinal:a,level:0,firstLeafLocator:a,id:new Ee,span:rd(new Ee,e.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:e,rect:Gy()};e._leavesCount++,e._setCellId(i)}});e._scale=new pc({ordinalMeta:t})},r.prototype._setCellId=function(e){var t=this._levels.length,n=this.dimIdx;rd(e.id,n,e.firstLeafLocator,e.level-t)},r.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;O(this._cells,function(n){rd(n.id,t,n.firstLeafLocator,n.level-e)})},r.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,n=this._model.get("levels",!0);n=se(n)?n:[],O(this._levels,function(a,i){rd(a.id,t,0,i-e),a.option=n[i]})},r.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},r.prototype.resetLayoutIterator=function(e,t,n,a){if(e=e||new Wo,t===this.dimIdx){var i=this._leavesCount,o=n!=null?Math.max(0,n):0;a=a!=null?Math.min(a,i):i,e.reset(this._cells,o,o+a)}else{var i=this._levels.length,o=n!=null?Math.max(0,n+i):0;a=a!=null?Math.min(a,i):i,e.reset(this._levels,o,o+a)}return e},r.prototype.resetCellIterator=function(e){return(e||new Wo).reset(this._cells,0)},r.prototype.resetLevelIterator=function(e){return(e||new Wo).reset(this._levels,0)},r.prototype.getLayout=function(e,t,n){var a=this.getUnitLayoutInfo(t,n);e[Ge[t]]=a?a.xy:NaN,e[tr[t]]=a?a.wh:NaN},r.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},r.prototype.getCell=function(e){var t=this._scale.parse(e);return Dr(t)?void 0:this._cells[t]},r.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r})();function Kse(r){var e=r.toUpperCase(),t=new RegExp("^"+e+"([0-9]+)$"),n=0;function a(s){var l;s!=null&&(l=s.match(t))&&(n=Yt(n,+l[1]+1))}function i(){return""+e+n++}function o(s,l){for(var u=be(),c=0;c<s.length;c++){var f=s[c];(f==null||u.get(f)!=null)&&(s[c]=f=i(),l[c].option=De({value:f},l[c].option)),u.set(f,!0)}}return{calcDupBase:a,ensureValueUnique:o}}var $E=(function(){function r(e,t,n){this._model=t,this._dims=n,this._kind=e,this._cellMergeOwnerList=[]}return r.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=be(),n()),t;function n(){var i=[],o=e._model.getShallow("data");o&&!se(o)&&(o=null),O(o,function(v,y){if(!(!Pe(v)||!se(v.coord))){var m=YF([]),x=null;if(XF(m,x,v.coord,e._dims,v.coordClamp?Gi[e._kind]:Gi.none),!(sg(m,0)||sg(m,1))){var b=v&&v.mergeCells,T={id:new Ee,span:new Ee,locatorRange:m,option:v,cellMergeOwner:b};GE(T,m),i.push(T)}}});for(var s=[],l=0;l<i.length;l++){var u=i[l];if(u.cellMergeOwner){var c=u.locatorRange;FE(c,s,i,l);for(var f=0;f<l;f++)s[f]&&(i[f].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var d=ae({},u.option);d.coord=null;var h={id:new Ee,span:new Ee,locatorRange:c,option:d,cellMergeOwner:!0};GE(h,c),i.push(h)}}}O(i,function(v){var y=a(v.id.x,v.id.y);if(v.cellMergeOwner&&(y.cellMergeOwner=!0,y.span=v.span,y.locatorRange=v.locatorRange,y.spanRect=Gy(),e._cellMergeOwnerList.push(y)),!(!v.cellMergeOwner&&!v.option))for(var m=0;m<v.span.y;m++)for(var x=0;x<v.span.x;x++){var b=a(v.id.x+x,v.id.y+m);b.option=v.option,v.cellMergeOwner&&(b.inSpanOf=y)}})}function a(i,o){var s=UE(i,o),l=t.get(s);return l||(l=t.set(s,{id:new Ee(i,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},r.prototype.getCell=function(e){return this._ensureCellMap().get(UE(e[0],e[1]))},r.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},r.prototype.expandRangeByCellMerge=function(e){if(!sg(e,0)&&!sg(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){JS[0]=e[0][0],JS[1]=e[1][0];var t=this.getCell(JS),n=t&&t.inSpanOf;if(n){Xse(e,n.locatorRange);return}}var a=this._cellMergeOwnerList;FE(e,null,a,a.length)},r})(),JS=[];function UE(r,e){return r+"|"+e}var v2={show:!0,color:ee.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function g2(r){return{color:"none",borderWidth:1,borderColor:r?"none":ee.color.borderTint}}var YE={show:!0,label:v2,itemStyle:g2(!1),silent:void 0,dividerLineStyle:{width:1,color:ee.color.border}},qse={label:v2,itemStyle:g2(!1),silent:void 0},Qse={label:v2,itemStyle:g2(!0),silent:void 0},Jse={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:YE,y:YE,body:qse,corner:Qse,backgroundStyle:{color:"none",borderColor:ee.color.axisLine,borderWidth:1}},ele=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this._dimModels={x:new XE(this.get("x",!0)||{}),y:new XE(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var n=t.x.dim=new HE("x",t.x),a=t.y.dim=new HE("y",t.y),i={x:n,y:a};this._body=new $E("body",new rt(this.getShallow("body")),i),this._corner=new $E("corner",new rt(this.getShallow("corner")),i)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=Jse,e})(Je),XE=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e})(rt),lg=Math.round,tle=0,rle=99,nle={normal:25,special:100},ale={normal:50,special:125},ile=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n){this.group.removeAll();var a=this.group,i=t.coordinateSystem,o=i.getRect(),s=t.getDimensionModel("x"),l=t.getDimensionModel("y"),u=s.dim,c=l.dim;ole(a,t,n),sle(a,t,u,c,n);var f=t.getShallow("borderZ2",!0),d=Te(f,rle),h=d-1,v=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);v.lineWidth=0;var y=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);y.fill="none";var m=Sw(o.clone(),v,tle),x=Sw(o.clone(),y,d);m.silent=!0,x.silent=!0,a.add(m),a.add(x);var b=u.getUnitLayoutInfo(0,0),T=c.getUnitLayoutInfo(1,0);b&&T&&(u.shouldShow()&&a.add(ZE({x1:o.x,y1:T.xy,x2:o.x+o.width,y2:T.xy},s.getModel("dividerLineStyle").getLineStyle(),h)),c.shouldShow()&&a.add(ZE({x1:b.xy,y1:o.y,x2:b.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),h)))},e.type="matrix",e})(Ct);function ole(r,e,t){n(0),n(1);function n(a){var i=e.getDimensionModel(Ge[a]),o=i.dim;if(o.shouldShow())for(var s=i.getModel("itemStyle"),l=i.getModel("label"),u=e.getShallow("tooltip",!0),c=[],f=o.resetCellIterator();f.next();){var d=f.item,h={};ze.copy(h,d.rect),fm(c,d.id.x,d.id.y),ZF(c,e,r,t,d.option,s,l,i,h,d.option.value,ale,u)}}}function sle(r,e,t,n,a){i("body",e.getBody(),t,n),t.shouldShow()&&n.shouldShow()&&i("corner",e.getCorner(),n,t);function i(o,s,l,u){var c=new rt(e.getShallow(o,!0)),f=c.getModel("itemStyle"),d=c.getModel("label"),h=new Wo,v=new Wo,y=[],m=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(v,1);v.next();)for(l.resetLayoutIterator(h,0);h.next();){var x=h.item,b=v.item;fm(y,x.id.x,b.id.y);var T=s.getCell(y);if(!(T&&T.inSpanOf&&T.inSpanOf!==T)){var C={};T&&T.span?ze.copy(C,T.spanRect):(x.dim.getLayout(C,0,y[0]),b.dim.getLayout(C,1,y[1]));var k=T?T.option:null;ZF(y,e,r,a,k,f,d,c,C,k?k.value:null,nle,m)}}}}function ZF(r,e,t,n,a,i,o,s,l,u,c,f){var d;ug.option=a?a.itemStyle:null,ug.parentModel=i,Du.option=a,Du.parentModel=s;var h=Te(Du.getShallow("z2"),a&&a.itemStyle?c.special:c.normal),v=f&&f.show,y=Sw(l,ug.getItemStyle(),h);t.add(y);var m=Du.get("cursor");m!=null&&y.attr("cursor",m);var x;if(u!=null){var b=u+"";if(Pu.option=a?a.label:null,Pu.parentModel=o,Pu.ecModel=n,vr(y,{normal:Pu},{defaultText:b,autoOverflowArea:!0,layoutRect:Le(y.shape)}),x=y.getTextContent(),x){x.z2=h+1;var T=x.style;if(T&&T.overflow&&T.overflow!=="none"&&T.lineOverflow){var C={};ze.copy(C,l),Cl(C,(((d=y.style)===null||d===void 0?void 0:d.lineWidth)||0)/2,!0,!0),y.updateInnerText(),x.getLocalTransform(cg),Jn(cg,cg),ze.applyTransform(C,C,cg),x.setClipPath(new Qe({shape:C}))}}eo({el:y,componentModel:e,itemName:b,itemTooltipOption:f,formatterParamsExtra:{xyLocator:r.slice()}})}if(x){var k=Pu.get("silent");k==null&&(k=!v),x.silent=k,x.ignoreHostSilent=!0}var L=Du.get("silent");L==null&&(L=!y.style||y.style.fill==="none"||!y.style.fill),y.silent=L,d1(Du),d1(ug),d1(Pu)}var Du=new rt,ug=new rt,Pu=new rt,cg=[];function Sw(r,e,t){var n=e.lineWidth;if(n){var a=r.x+r.width,i=r.y+r.height;r.x=An(r.x,n,!0),r.y=An(r.y,n,!0),r.width=An(a,n,!0)-r.x,r.height=An(i,n,!0)-r.y}return new Qe({shape:r,style:e,z2:t})}function ZE(r,e,t){var n=e.lineWidth;return n&&(lg(r.x1*2)===lg(r.x2*2)&&(r.x1=r.x2=An(r.x1,n,!0)),lg(r.y1*2)===lg(r.y2*2)&&(r.y1=r.y2=An(r.y1,n,!0))),new Zt({shape:r,style:e,silent:!0,z2:t})}var lle=(function(){function r(e,t,n){this.dimensions=r.dimensions,this.type="matrix",this._model=e;var a=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:a.x.dim,y:a.y.dim},this._resize(e,n)}return r.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},r.create=function(e,t){var n=[];return e.eachComponent("matrix",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Bh({targetModel:i,coordSysType:"matrix",coordSysProvider:fB})}),n},r.prototype.getRect=function(){return this._rect},r.prototype._resize=function(e,t){var n=this._dims,a=this._dimModels,i=this._rect=Dt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});KE(a,n,i,0),KE(a,n,i,1),qE(0,n),qE(1,n),QE(this._model.getBody(),n),QE(this._model.getCorner(),n)},r.prototype.dataToPoint=function(e,t,n){return n=n||[],this.dataToLayout(e,t,nd),n[0]=nd.rect.x+nd.rect.width/2,n[1]=nd.rect.y+nd.rect.height/2,n},r.prototype.dataToLayout=function(e,t,n){var a=this._dims;n=n||{};var i=n.rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;var o=n.matrixXYLocatorRange=YF(n.matrixXYLocatorRange);return se(e)&&(XF(o,null,e,a,Te(t&&t.clamp,Gi.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==Gi.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!t||t.clamp!==Gi.body)&&this._model.getCorner().expandRangeByCellMerge(o)),WE(i,o,a,0),WE(i,o,a,1)),n},r.prototype.pointToData=function(e,t,n){var a=this._dims;return JE(ja,0,a,e,t&&t.clamp),JE(ja,1,a,e,t&&t.clamp),n=n||[],n[0]=n[1]=NaN,ja.y===Ir.inCorner&&ja.x===Ir.inBody?ez(ja,n,0,a):ja.x===Ir.inCorner&&ja.y===Ir.inBody?ez(ja,n,1,a):(tz(ja,n,0,a),tz(ja,n,1,a)),n},r.prototype.convertToPixel=function(e,t,n,a){var i=t_(t);return i===this?i.dataToPoint(n,a):void 0},r.prototype.convertToLayout=function(e,t,n,a){var i=t_(t);return i===this?i.dataToLayout(n,a):void 0},r.prototype.convertFromPixel=function(e,t,n,a){var i=t_(t);return i===this?i.pointToData(n,a):void 0},r.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},r.dimensions=["x","y","value"],r})(),nd={rect:Gy()},fg=new Wo,e_=new Wo;function KE(r,e,t,n){for(var a=1-n,i=e[Ge[n]],o=e[Ge[a]],s=o.shouldShow(),l=i.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,n);u.next();)u.item.wh=u.item.xy=NaN;for(var c=t[tr[n]],f=i.getLocatorCount(n)+o.getLocatorCount(n),d=new rt,h=o.resetLevelIterator();h.next();)d.option=h.item.option,d.parentModel=r[Ge[a]],m(h.item,s?d.get("levelSize"):0);for(var v=new rt,y=i.resetCellIterator();y.next();)y.item.type===Di.leaf&&(v.option=y.item.option,v.parentModel=void 0,m(y.item,v.get("size")));function m(A,D){var P=ule(D,n,t);Dr(P)||(A.wh=_w(P,c),c=_w(c-A.wh),f--)}var x=f?c/f:0,b=!f&&c>=1,T=t[Ge[n]],C=i.getLocatorCount(n)-1,k=new Wo;for(o.resetLayoutIterator(k,n);k.next();)L(k.item);for(i.resetLayoutIterator(k,n);k.next();)L(k.item);function L(A){Dr(A.wh)&&(A.wh=x),A.xy=T,A.id[Ge[n]]===C&&!b&&(A.wh=t[Ge[n]]+t[tr[n]]-A.xy),T+=A.wh}}function qE(r,e){for(var t=e[Ge[r]].resetCellIterator();t.next();){var n=t.item;Wy(n.rect,r,n.id,n.span,e),Wy(n.rect,1-r,n.id,n.span,e),n.type===Di.nonLeaf&&(n.xy=n.rect[Ge[r]],n.wh=n.rect[tr[r]])}}function QE(r,e){r.travelExistingCells(function(t){var n=t.span;if(n){var a=t.spanRect,i=t.id;Wy(a,0,i,n,e),Wy(a,1,i,n,e)}})}function Wy(r,e,t,n,a){r[tr[e]]=0;var i=t[Ge[e]],o=i<0?a[Ge[1-e]]:a[Ge[e]],s=o.getUnitLayoutInfo(e,t[Ge[e]]);if(r[Ge[e]]=s.xy,r[tr[e]]=s.wh,n[Ge[e]]>1){var l=o.getUnitLayoutInfo(e,t[Ge[e]]+n[Ge[e]]-1);r[tr[e]]=l.xy+l.wh-s.xy}}function ule(r,e,t){var n=ry(r,t[tr[e]]);return _w(n,t[tr[e]])}function _w(r,e){return Math.max(Math.min(r,Te(e,1/0)),0)}function t_(r){var e=r.matrixModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}var Ir={inBody:1,inCorner:2,outside:3},ja={x:null,y:null,point:[]};function JE(r,e,t,n,a){var i=t[Ge[e]],o=t[Ge[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=r.point[e]=n[e];if(!l&&!c){r[Ge[e]]=Ir.outside;return}if(a===Gi.body){l?(r[Ge[e]]=Ir.inBody,f=In(s.xy+s.wh,Yt(l.xy,f)),r.point[e]=f):r[Ge[e]]=Ir.outside;return}else if(a===Gi.corner){c?(r[Ge[e]]=Ir.inCorner,f=In(c.xy+c.wh,Yt(u.xy,f)),r.point[e]=f):r[Ge[e]]=Ir.outside;return}var d=l?l.xy:c?c.xy+c.wh:NaN,h=u?u.xy:d,v=s?s.xy+s.wh:d;if(f<h){if(!a){r[Ge[e]]=Ir.outside;return}f=h}else if(f>v){if(!a){r[Ge[e]]=Ir.outside;return}f=v}r.point[e]=f,r[Ge[e]]=d<=f&&f<=v?Ir.inBody:h<=f&&f<=d?Ir.inCorner:Ir.outside}function ez(r,e,t,n){var a=1-t;if(r[Ge[t]]!==Ir.outside)for(n[Ge[t]].resetCellIterator(e_);e_.next();){var i=e_.item;if(rz(r.point[t],i.rect,t)&&rz(r.point[a],i.rect,a)){e[t]=i.ordinal,e[a]=i.id[Ge[a]];return}}}function tz(r,e,t,n){if(r[Ge[t]]!==Ir.outside){var a=r[Ge[t]]===Ir.inCorner?n[Ge[1-t]]:n[Ge[t]];for(a.resetLayoutIterator(fg,t);fg.next();)if(cle(r.point[t],fg.item)){e[t]=fg.item.id[Ge[t]];return}}}function cle(r,e){return e.xy<=r&&r<=e.xy+e.wh}function rz(r,e,t){return e[Ge[t]]<=r&&r<=e[Ge[t]]+e[tr[t]]}function fle(r){r.registerComponentModel(ele),r.registerComponentView(ile),r.registerCoordinateSystem("matrix",lle)}function dle(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function nz(r,e){var t;return O(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function hle(r,e,t){var n=ae({},t),a=r[e],i=t.$action||"merge";i==="merge"?a?(Ye(a,n,!0),oi(a,n,{ignoreSize:!0}),gB(t,a),dg(t,a),dg(t,a,"shape"),dg(t,a,"style"),dg(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var KF=["transition","enterFrom","leaveTo"],ple=KF.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function dg(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?KF:ple,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function vle(r,e){if(r&&(r.hv=e.hv=[nz(e,["left","right"]),nz(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var gle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var a=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=a},e.prototype.optionUpdated=function(t,n){var a=this.option,i=(n?a:t).elements,o=a.elements=n?[]:a.elements,s=[];this._flatten(i,s,null);var l=o5(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];O(l,function(c,f){var d=c.newOption;d&&(u.push(d),dle(c,d),hle(o,f,d),vle(o[f],d))},this),a.elements=ht(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,a){O(t,function(i){if(i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(Je),az={path:null,compoundPath:null,group:Ae,image:gr,text:st},Un=et(),yle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=be()},e.prototype.render=function(t,n,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var a=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");O(n,function(l){var u=ir(l.id,null),c=u!=null?a.get(u):null,f=ir(l.parentId,null),d=f!=null?a.get(f):i,h=l.type,v=l.style;h==="text"&&v&&l.hv&&l.hv[1]&&(v.textVerticalAlign=v.textBaseline=v.verticalAlign=v.align=null);var y=l.textContent,m=l.textConfig;if(v&&kF(v,h,!!m,!!y)){var x=LF(v,h,!0);!m&&x.textConfig&&(m=l.textConfig=x.textConfig),!y&&x.textContent&&(y=x.textContent)}var b=mle(l),T=l.$action||"merge",C=T==="merge",k=T==="replace";if(C){var L=!c,A=c;L?A=iz(u,d,l.type,a):(A&&(Un(A).isNew=!1),PF(A)),A&&(Og(A,b,t,{isInit:L}),oz(A,l,o,s))}else if(k){jg(c,l,a,t);var D=iz(u,d,l.type,a);D&&(Og(D,b,t,{isInit:!0}),oz(D,l,o,s))}else T==="remove"&&(IF(c,l),jg(c,l,a,t));var P=a.get(u);if(P&&y)if(C){var R=P.getTextContent();R?R.attr(y):P.setTextContent(new st(y))}else k&&P.setTextContent(new st(y));if(P){var z=l.clipPath;if(z){var B=z.type,N=void 0,L=!1;if(C){var W=P.getClipPath();L=!W||Un(W).type!==B,N=L?bw(B):W}else k&&(L=!0,N=bw(B));P.setClipPath(N),Og(N,z,t,{isInit:L}),jy(N,z.keyframeAnimation,t)}var $=Un(P);P.setTextConfig(m),$.option=l,xle(P,t,l),eo({el:P,componentModel:t,itemName:P.name,itemTooltipOption:l.tooltip}),jy(P,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var a=t.option.elements,i=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<a.length;c++){var f=a[c],d=ir(f.id,null),h=d!=null?o.get(d):null;if(!(!h||!h.isGroup)){var v=h.parent,y=v===i,m=Un(h),x=Un(v);m.width=he(m.option.width,y?s:x.width)||0,m.height=he(m.option.height,y?l:x.height)||0}}for(var c=a.length-1;c>=0;c--){var f=a[c],d=ir(f.id,null),h=d!=null?o.get(d):null;if(h){var v=h.parent,x=Un(v),b=v===i?{width:s,height:l}:{width:x.width,height:x.height},T={},C=Lm(h,f,b,null,{hv:f.hv,boundingMode:f.bounding},T);if(!Un(h).isNew&&C){for(var k=f.transition,L={},A=0;A<u.length;A++){var D=u[A],P=T[D];k&&(xl(k)||Ue(k,D)>=0)?L[D]=P:h[D]=P}ct(h,L,t,0)}else h.attr(T)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){jg(a,Un(a).option,n,t._lastGraphicModel)}),this._elMap=be()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(Ct);function bw(r){var e=Se(az,r)?az[r]:rh(r),t=new e({});return Un(t).type=r,t}function iz(r,e,t,n){var a=bw(t);return e.add(a),n.set(r,a),Un(a).id=r,Un(a).isNew=!0,a}function jg(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){jg(i,e,t,n)}),Hm(r,e,n),t.removeKey(Un(r).id))}function oz(r,e,t,n){r.isGroup||O([["cursor",ea.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];Se(e,i)?r[i]=Te(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),O(ot(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=Me(i)?i:null}}),Se(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function mle(r){return r=ae({},r),O(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(dB),function(e){delete r[e]}),r}function xle(r,e,t){var n=Ne(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Ne(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function Sle(r){r.registerComponentModel(gle),r.registerComponentView(yle),r.registerPreprocessor(function(e){var t=e.graphic;se(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var sz=["x","y","radius","angle","single"],_le=["cartesian2d","polar","singleAxis"];function ble(r){var e=r.get("coordinateSystem");return Ue(_le,e)>=0}function Fo(r){return r+"Axis"}function wle(r,e){var t=be(),n=[],a=be();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(d,h){var v=t.get(d);v&&v[h]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,d){(t.get(f)||t.set(f,[]))[d]=!0})}return n}function qF(r){var e=r.ecModel,t={infoList:[],infoMap:be()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(Fo(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var r_=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),_h=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=lz(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=lz(t);Ye(this.option,t,!0),Ye(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;O([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=be(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return O(sz,function(a){var i=this.getReferringComponents(Fo(a),V7);if(i.specified){n=!0;var o=new r_;O(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var d=new r_;if(d.add(f.componentIndex),t.set(c,d),i=!1,c==="x"||c==="y"){var h=f.getReferringComponents("grid",Bt).models[0];h&&O(u,function(v){f.componentIndex!==v.componentIndex&&h===v.getReferringComponents("grid",Bt).models[0]&&d.add(v.componentIndex)})}}}i&&O(sz,function(u){if(i){var c=a.findComponents({mainType:Fo(u),filter:function(d){return d.get("type",!0)==="category"}});if(c[0]){var f=new r_;f.add(c[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");O([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(Fo(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){O(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(Fo(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;O([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;O(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(Je);function lz(r){var e={};return O(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var Tle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(_h),y2=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.dataZoomModel=t,this.ecModel=n,this.api=a},e.type="dataZoom",e})(Ct),Cle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(y2),Fu=O,uz=kn,Mle=(function(){function r(e,t,n,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(ble(t)){var n=Fo(this._dimName),a=t.getReferringComponents(n,Bt).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Le(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Fu(["start","end"],function(d,h){var v=e[d],y=e[d+"Value"];i[h]==="percent"?(v==null&&(v=o[h]),y=a.parse(vt(v,o,t))):(u=!0,y=y==null?t[h]:a.parse(y),v=vt(y,t,o)),l[h]=y==null||isNaN(y)?t[h]:y,s[h]=v==null||isNaN(v)?o[h]:v}),uz(l),uz(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(d,h,v,y,m){var x=m?"Span":"ValueSpan";Qo(0,d,v,"all",c["min"+x],c["max"+x]);for(var b=0;b<2;b++)h[b]=vt(d[b],v,y,!0),m&&(h[b]=a.parse(h[b]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=kle(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;Fu(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(i==="weakFilter"){var f=u.getStore(),d=le(c,function(h){return u.getDimensionIndex(h)},u);u.filterSelf(function(h){for(var v,y,m,x=0;x<c.length;x++){var b=f.get(d[x],h),T=!isNaN(b),C=b<o[0],k=b>o[1];if(T&&!C&&!k)return!0;T&&(m=!0),C&&(v=!0),k&&(y=!0)}return m&&v&&y})}else Fu(c,function(h){if(i==="empty")l.setData(u=u.map(h,function(y){return s(y)?y:NaN}));else{var v={};v[h]=o,u.selectRange(v)}});Fu(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Fu(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=vt(n[0]+o,n,[0,100],!0):i!=null&&(o=vt(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=oT(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r})();function kle(r,e,t){var n=[1/0,-1/0];Fu(t,function(o){$K(n,o.getData(),e)});var a=r.getAxisModel(),i=Kj(a.axis.scale,a,n).calculate();return[i.min,i.max]}var Lle={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Fo(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Mle(a,i,s,r),t.push(o.__dzAxisProxy))});var n=be();return O(t,function(a){O(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function Ale(r){r.registerAction("dataZoom",function(e,t){var n=wle(t,e);O(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var cz=!1;function m2(r){cz||(cz=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Lle),Ale(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Ile(r){r.registerComponentModel(Tle),r.registerComponentView(Cle),m2(r)}var Xn=(function(){function r(){}return r})(),QF={};function Vu(r,e){QF[r]=e}function JF(r){return QF[r]}var Dle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;O(this.option.feature,function(n,a){var i=JF(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Ye(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:ee.color.border,borderRadius:0,borderWidth:0,padding:ee.size.m,itemSize:15,itemGap:ee.size.s,showTitle:!0,iconStyle:{borderColor:ee.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:ee.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(Je);function e6(r,e){var t=Ec(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var a=new Qe({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var Ple=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];O(u,function(b,T){f.push(T)}),new Xi(this._featureNames||[],f).add(d).update(d).remove(He(d,null)).execute(),this._featureNames=f;function d(b,T){var C=f[b],k=f[T],L=u[C],A=new rt(L,t,t.ecModel),D;if(i&&i.newTitle!=null&&i.featureName===C&&(L.title=i.newTitle),C&&!k){if(Rle(C))D={onclick:A.option.onclick,featureName:C};else{var P=JF(C);if(!P)return;D=new P}c[C]=D}else if(D=c[k],!D)return;D.uid=Rc("toolbox-feature"),D.model=A,D.ecModel=n,D.api=a;var R=D instanceof Xn;if(!C&&k){R&&D.dispose&&D.dispose(n,a);return}if(!A.get("show")||R&&D.unusable){R&&D.remove&&D.remove(n,a);return}h(A,D,C),A.setIconStatus=function(z,B){var N=this.option,W=this.iconPaths;N.iconStatus=N.iconStatus||{},N.iconStatus[z]=B,W[z]&&(B==="emphasis"?Ui:Yi)(W[z])},D instanceof Xn&&D.render&&D.render(A,n,a,i)}function h(b,T,C){var k=b.getModel("iconStyle"),L=b.getModel(["emphasis","iconStyle"]),A=T instanceof Xn&&T.getIcons?T.getIcons():b.get("icon"),D=b.get("title")||{},P,R;pe(A)?(P={},P[C]=A):P=A,pe(D)?(R={},R[C]=D):R=D;var z=b.iconPaths={};O(P,function(B,N){var W=Dc(B,{},{x:-s/2,y:-s/2,width:s,height:s});W.setStyle(k.getItemStyle());var $=W.ensureState("emphasis");$.style=L.getItemStyle();var H=new st({style:{text:R[N],align:L.get("textAlign"),borderRadius:L.get("textBorderRadius"),padding:L.get("textPadding"),fill:null,font:AT({fontStyle:L.get("textFontStyle"),fontFamily:L.get("textFontFamily"),fontSize:L.get("textFontSize"),fontWeight:L.get("textFontWeight")},n)},ignore:!0});W.setTextContent(H),eo({el:W,componentModel:t,itemName:N,formatterParamsExtra:{title:R[N]}}),W.__title=R[N],W.on("mouseover",function(){var U=L.getItemStyle(),G=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";H.setStyle({fill:L.get("textFill")||U.fill||U.stroke||ee.color.neutral99,backgroundColor:L.get("textBackgroundColor")}),W.setTextConfig({position:L.get("textPosition")||G}),H.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){b.get(["iconStatus",N])!=="emphasis"&&a.leaveEmphasis(this),H.hide()}),(b.get(["iconStatus",N])==="emphasis"?Ui:Yi)(W),o.add(W),W.on("click",ge(T.onclick,T,n,a,N)),z[N]=W})}var v=lr(t,a).refContainer,y=t.getBoxLayoutParams(),m=t.get("padding"),x=Dt(y,v,m);gl(t.get("orient"),o,t.get("itemGap"),x.width,x.height),Lm(o,y,v,m),o.add(e6(o.getBoundingRect(),t)),l||o.eachChild(function(b){var T=b.__title,C=b.ensureState("emphasis"),k=C.textConfig||(C.textConfig={}),L=b.getTextContent(),A=L&&L.ensureState("emphasis");if(A&&!Me(A)&&T){var D=A.style||(A.style={}),P=pm(T,st.makeFont(D)),R=b.x+o.x,z=b.y+o.y+s,B=!1;z+P.height>a.getHeight()&&(k.position="top",B=!0);var N=B?-5-P.height:s+10;R+P.width/2>a.getWidth()?(k.position=["100%",N],D.align="right"):R-P.width/2<0&&(k.position=[0,N],D.align="left")}})},e.prototype.updateView=function(t,n,a,i){O(this._features,function(o){o instanceof Xn&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){O(this._features,function(a){a instanceof Xn&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){O(this._features,function(a){a instanceof Xn&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e})(Ct);function Rle(r){return r.indexOf("my")===0}var Ele=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||ee.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=it.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var d=l.split(","),h=d[0].indexOf("base64")>-1,v=o?decodeURIComponent(d[1]):d[1];h&&(v=window.atob(v));var y=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,x=new Uint8Array(m);m--;)x[m]=v.charCodeAt(m);var b=new Blob([x]);window.navigator.msSaveOrOpenBlob(b,y)}else{var T=document.createElement("iframe");document.body.appendChild(T);var C=T.contentWindow,k=C.document;k.open("image/svg+xml","replace"),k.write(v),k.close(),C.focus(),k.execCommand("SaveAs",!0,y),document.body.removeChild(T)}}else{var L=a.get("lang"),A='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(L&&L[0]||"")+'" /></body>',D=window.open();D.document.write(A),D.document.title=i}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:ee.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e})(Xn),fz="__ec_magicType_stack__",zle=[["line","bar"],["stack"]],Ole=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return O(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(dz[a]){var s={series:[]},l=function(f){var d=f.subType,h=f.id,v=dz[a](d,h,f,i);v&&(De(v,f.option),s.series.push(v));var y=f.coordinateSystem;if(y&&y.type==="cartesian2d"&&(a==="line"||a==="bar")){var m=y.getAxesByScale("ordinal")[0];if(m){var x=m.dim,b=x+"Axis",T=f.getReferringComponents(b,Bt).models[0],C=T.componentIndex;s[b]=s[b]||[];for(var k=0;k<=C;k++)s[b][C]=s[b][C]||{};s[b][C].boundaryGap=a==="bar"}}};O(zle,function(f){Ue(f,a)>=0&&O(f,function(d){i.setIconStatus(d,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=Ye({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e})(Xn),dz={line:function(r,e,t,n){if(r==="bar")return Ye({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Ye({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===fz;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Ye({id:e,stack:a?"":fz},n.get(["option","stack"])||{},!0)}};La({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var $m=new Array(60).join("-"),_c=" ";function Nle(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Ble(r){var e=[];return O(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(le(t.series,function(h){return h.name})),l=[a.model.getCategories()];O(t.series,function(h){var v=h.getRawData();l.push(h.getRawData().mapArray(v.mapDimension(o),function(y){return y}))});for(var u=[s.join(_c)],c=0;c<l[0].length;c++){for(var f=[],d=0;d<l.length;d++)f.push(l[d][c]);u.push(f.join(_c))}e.push(u.join(`
|
|
58
|
-
`))}),e.join(`
|
|
59
|
-
|
|
60
|
-
`+$m+`
|
|
61
|
-
|
|
62
|
-
`)}function jle(r){return le(r,function(e){var t=e.getRawData(),n=[e.name],a=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)a[l]=arguments[l];n.push((s?s+_c:"")+a.join(_c))}),n.join(`
|
|
63
|
-
`)}).join(`
|
|
64
|
-
|
|
65
|
-
`+$m+`
|
|
66
|
-
|
|
67
|
-
`)}function Fle(r){var e=Nle(r);return{value:ht([Ble(e.seriesGroupByCategoryAxis),jle(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
|
68
|
-
|
|
69
|
-
`+$m+`
|
|
70
|
-
|
|
71
|
-
`),meta:e.meta}}function Hy(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Vle(r){var e=r.slice(0,r.indexOf(`
|
|
72
|
-
`));if(e.indexOf(_c)>=0)return!0}var ww=new RegExp("["+_c+"]+","g");function Gle(r){for(var e=r.split(/\n+/g),t=Hy(e.shift()).split(ww),n=[],a=le(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=Hy(e[i]).split(ww);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[i]=o[s])}return{series:a,categories:n}}function Wle(r){for(var e=r.split(/\n+/g),t=Hy(e.shift()),n=[],a=0;a<e.length;a++){var i=Hy(e[a]);if(i){var o=i.split(ww),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},l=n[a].value):l=n[a]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:t,data:n}}function Hle(r,e){var t=r.split(new RegExp(`
|
|
73
|
-
*`+$m+`
|
|
74
|
-
*`,"g")),n={series:[]};return O(t,function(a,i){if(Vle(a)){var o=Gle(a),s=e[i],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=Wle(a);n.series.push(o)}}),n}var $le=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||ee.color.neutral00;var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=i.get("optionToContent"),d=i.get("contentToOption"),h=Fle(t);if(Me(f)){var v=f(n.getOption());pe(v)?u.innerHTML=v:Sl(v)&&u.appendChild(v)}else{c.readOnly=i.get("readOnly");var y=c.style;y.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",y.color=i.get("textColor"),y.borderColor=i.get("textareaBorderColor"),y.backgroundColor=i.get("textareaColor"),c.value=h.value,u.appendChild(c)}var m=h.meta,x=document.createElement("div");x.style.cssText="position:absolute;bottom:5px;left:0;right:0";var b="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",T=document.createElement("div"),C=document.createElement("div");b+=";background-color:"+i.get("buttonColor"),b+=";color:"+i.get("buttonTextColor");var k=this;function L(){a.removeChild(o),k._dom=null}R_(T,"click",L),R_(C,"click",function(){if(d==null&&f!=null||d!=null&&f==null){L();return}var A;try{Me(d)?A=d(u,n.getOption()):A=Hle(c.value,m)}catch(D){throw L(),new Error("Data view format error "+D)}A&&n.dispatchAction({type:"changeDataView",newOption:A}),L()}),T.innerHTML=l[1],C.innerHTML=l[2],C.style.cssText=T.style.cssText=b,!i.get("readOnly")&&x.appendChild(C),x.appendChild(T),o.appendChild(s),o.appendChild(u),o.appendChild(x),u.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){var n={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:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:ee.color.background,textColor:ee.color.primary,textareaColor:ee.color.background,textareaBorderColor:ee.color.border,buttonColor:ee.color.accent50,buttonTextColor:ee.color.neutral00};return n},e})(Xn);function Ule(r,e){return le(r,function(t,n){var a=e&&e[n];if(Pe(a)&&!se(a)){var i=Pe(t)&&!se(t);i||(t={value:t});var o=a.name!=null&&t.name==null;return t=De(t,a),o&&delete t.name,t}else return t})}La({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];O(r.newOption.series,function(n){var a=e.getSeriesByName(n.name)[0];if(!a)t.push(ae({type:"scatter"},n));else{var i=a.get("data");t.push({name:n.name,data:Ule(n.data,i)})}}),e.mergeOption(De({series:t},r.newOption))});var t6=O,r6=et();function Yle(r,e){var t=x2(r);t6(e,function(n,a){for(var i=t.length-1;i>=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function Xle(r){var e=x2(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return t6(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function Zle(r){r6(r).snapshots=null}function Kle(r){return x2(r).length}function x2(r){var e=r6(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var qle=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){Zle(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e})(Xn);La({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var Qle=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],S2=(function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=hz(t,e);O(Jle,function(o,s){(!n||!n.include||Ue(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=n_[n.brushType](0,i,a);n.__rangeOffset={offset:yz[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){O(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&O(i.coordSyses,function(o){var s=n_[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){O(e,function(n){var a=this.findTargetInfo(n,t);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=n_[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?yz[n.brushType](i.values,o.offset,eue(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return le(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:sF(a),isTargetByCursor:uF(a,e,n.coordSysModel),getLinearBrushOtherExtent:lF(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&Ue(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=hz(t,e),i=0;i<n.length;i++){var o=n[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<pz.length;l++)if(pz[l](a,o))return o}return!0},r})();function Tw(r){return r[0]>r[1]&&r.reverse(),r}function hz(r,e){return Qu(r,e,{includeMainTypes:Qle})}var Jle={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=be(),o={},s={};!t&&!n&&!a||(O(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),O(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),O(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];O(u.getCartesians(),function(f,d){(Ue(t,f.getAxis("x").model)>=0||Ue(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:vz.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){O(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:vz.geo})})}},pz=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],vz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform($o(r)),e}},n_={lineX:He(gz,0),lineY:He(gz,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[Tw([a[0],i[0]]),Tw([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=le(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function gz(r,e,t,n){var a=t.getAxis(["x","y"][r]),i=Tw(le([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var yz={lineX:He(mz,0),lineY:He(mz,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return le(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function mz(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function eue(r,e){var t=xz(r),n=xz(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function xz(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Cw=O,tue=O7("toolbox-dataZoom_"),rue=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new $C(a.getZr()),this._brushController.on("brush",ge(this._onBrush,this)).mount()),iue(t,n,this,i,a),aue(t,n)},e.prototype.onclick=function(t,n,a){nue[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new S2(_2(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var d=u.brushType;d==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[d],f,c)}}),Yle(i,a),this._dispatchZoomAction(a);function s(u,c,f){var d=c.getAxis(u),h=d.model,v=l(u,h,i),y=v.findRepresentativeAxisProxy(h).getMinMaxSpan();(y.minValueSpan!=null||y.maxValueSpan!=null)&&(f=Qo(0,f.slice(),d.scale.getExtent(),0,y.minValueSpan,y.maxValueSpan)),v&&(a[v.id]={dataZoomId:v.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var d;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var v=h.getAxisModel(u,c.componentIndex);v&&(d=h)}),d}},e.prototype._dispatchZoomAction=function(t){var n=[];Cw(t,function(a,i){n.push(Le(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:ee.color.backgroundTint}};return n},e})(Xn),nue={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Xle(this.ecModel))}};function _2(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function aue(r,e){r.setIconStatus("back",Kle(e)>1?"emphasis":"normal")}function iue(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new S2(_2(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}yY("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=_2(n),o=Qu(r,i);Cw(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Cw(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,d={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:tue+u+f};d[c]=f,a.push(d)}return a});function oue(r){r.registerComponentModel(Dle),r.registerComponentView(Ple),Vu("saveAsImage",Ele),Vu("magicType",Ole),Vu("dataView",$le),Vu("dataZoom",rue),Vu("restore",qle),Ze(Ile)}var sue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:ee.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:ee.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:ee.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:ee.color.tertiary,fontSize:14}},e})(Je);function n6(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function a6(r){if(it.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var i6=a6(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),lue=a6(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function o6(r,e){if(!r)return e;e=GT(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function uue(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var cue=o6(lue,"transition"),b2=o6(i6,"transform"),fue="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(it.transform3dSupported?"will-change:transform;":"");function due(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function hue(r,e,t){if(!pe(t)||t==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");e=kl(e);var i=due(t),o=Math.max(Math.round(a)*1.5,6),s="",l=b2+":",u;Ue(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+a,d=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((d-Math.SQRT2*a)/2+Math.SQRT2*a-(d-f)/2)*100)/100;s+=";"+i+":-"+h+"px";var v=e+" solid "+a+"px;",y=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'<div style="'+y.join("")+'"></div>'}function pue(r,e,t){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return t&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),e||(a=" "+r+"s "+n,i+=(i.length?",":"")+(it.transformSupported?""+b2+a:",left"+a+",top"+a)),cue+":"+i}function Sz(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!it.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=it.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+b2+":"+o+";":[["top",0],["left",0],[i6,o]]}function vue(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=Te(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),O(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function gue(r,e,t,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),d=XB(r,"html"),h=u+"px "+c+"px "+s+"px "+l;return a.push("box-shadow:"+h),e&&i>0&&a.push(pue(i,t,n)),o&&a.push("background-color:"+o),O(["width","color","radius"],function(v){var y="border-"+v,m=GT(y),x=r.get(m);x!=null&&a.push(y+":"+x+(v==="color"?"":"px"))}),a.push(vue(f)),d!=null&&a.push("padding:"+Ec(d).join("px ")+"px"),a.join(";")+";"}function _z(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&t$(r,o,t,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var yue=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,it.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),i=t.appendTo,o=i&&(pe(i)?document.querySelector(i):Sl(i)?i:Me(i)&&i(e.getDom()));_z(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,c=a.painter.getViewportRoot();Wn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=uue(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=fue+gue(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Sz(i[0],i[1],!0)+("border-color:"+kl(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(pe(i)&&n.get("trigger")==="item"&&!n6(n)&&(s=hue(n,a,i)),pe(e))o.innerHTML=e+s;else if(e){o.innerHTML="",se(e)||(e=[e]);for(var l=0;l<e.length;l++)Sl(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(_z(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var a=this.el.style,i=Sz(n[0],n[1]);O(i,function(o){a[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",it.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ge(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;r$(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},r})(),mue=(function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),wz(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,a,i){var o=this;Pe(e)&>(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new st({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:XB(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),O(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),O(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=bz(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var a=this._styleCoord;wz(a,this._zr,e,t),e=a[0],t=a[1];var i=n.style,o=Do(i.borderWidth||0),s=bz(i);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ge(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function Do(r){return Math.max(0,r)}function bz(r){var e=Do(r.shadowBlur||0),t=Do(r.shadowOffsetX||0),n=Do(r.shadowOffsetY||0);return{left:Do(e-t),right:Do(e+t),top:Do(e-n),bottom:Do(e+n)}}function wz(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var xue=new Qe({shape:{x:-1,y:-1,width:2,height:2}}),Sue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){if(!(it.node||!n.getDom())){var a=t.getComponent("tooltip"),i=this._renderMode=W7(a.get("renderMode"));this._tooltipContent=i==="richText"?new mue(n):new yue(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},e.prototype.render=function(t,n,a){if(!(it.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=a;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Nc(this,"_updatePosition",50,"fixRate"):oh(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");VF("itemTooltip",this._api,ge(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||it.node||!a.getDom())){var o=Tz(i,a);this._ticket="";var s=i.dataByCoordSys,l=Tue(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=xue;c.x=i.x,c.y=i.y,c.update(),Ne(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var f=GF(i,n),d=f.point[0],h=f.point[1];d!=null&&h!=null&&this._tryShow({offsetX:d,offsetY:h,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Tz(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=ad([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=Ne(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;cl(a,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Ne(c).dataIndex!=null?l=c:Ne(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=ge(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ad([n.tooltipOption],i),l=this._renderMode,u=[],c=rr("section",{blocks:[],noHeader:!0}),f=[],d=new B1;O(t,function(b){O(b.dataByAxis,function(T){var C=a.getComponent(T.axisDim+"Axis",T.axisIndex),k=T.value;if(!(!C||k==null)){var L=BF(k,C.axis,a,T.seriesDataIndices,T.valueLabelOpt),A=rr("section",{header:L,noHeader:!Mn(L),sortBlocks:!0,blocks:[]});c.blocks.push(A),O(T.seriesDataIndices,function(D){var P=a.getSeriesByIndex(D.seriesIndex),R=D.dataIndexInside,z=P.getDataParams(R);if(!(z.dataIndex<0)){z.axisDim=T.axisDim,z.axisIndex=T.axisIndex,z.axisType=T.axisType,z.axisId=T.axisId,z.axisValue=_y(C.axis,{value:k}),z.axisValueLabel=L,z.marker=d.makeTooltipMarker("item",kl(z.color),l);var B=FI(P.formatTooltip(R,!0,null)),N=B.frag;if(N){var W=ad([P],i).get("valueFormatter");A.blocks.push(W?ae({valueFormatter:W},N):N)}B.text&&f.push(B.text),u.push(z)}})}})}),c.blocks.reverse(),f.reverse();var h=n.position,v=s.get("order"),y=UI(c,d,l,v,a.get("useUTC"),s.get("textStyle"));y&&f.unshift(y);var m=l==="richText"?`
|
|
75
|
-
|
|
76
|
-
`:"<br/>",x=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,x,u,Math.random()+"",o[0],o[1],h,null,d)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=Ne(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,v=t.positionDefault,y=ad([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=y.get("trigger");if(!(m!=null&&m!=="item")){var x=u.getDataParams(c,f),b=new B1;x.marker=b.makeTooltipMarker("item",kl(x.color),h);var T=FI(u.formatTooltip(c,!1,f)),C=y.get("order"),k=y.get("valueFormatter"),L=T.frag,A=L?UI(k?ae({valueFormatter:k},L):L,b,h,C,i.get("useUTC"),y.get("textStyle")):T.text,D="item_"+u.name+"_"+c;this._showOrMove(y,function(){this._showTooltipContent(y,A,x,D,t.offsetX,t.offsetY,t.position,t.target,b)}),a({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=Ne(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(pe(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=Le(l),l.content=Hr(l.content));var f=[l],d=this._ecModel.getComponent(o.componentMainType,o.componentIndex);d&&f.push(d),f.push({formatter:l.content});var h=t.positionDefault,v=ad(f,this._tooltipModel,h?{position:h}:null),y=v.get("content"),m=Math.random()+"",x=new B1;this._showOrMove(v,function(){var b=Le(v.get("formatterParams")||{});this._showTooltipContent(v,y,b,m,t.offsetX,t.offsetY,t.position,n,x)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var d=t.get("formatter");l=l||t.get("position");var h=n,v=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),y=v.color;if(d)if(pe(d)){var m=t.ecModel.get("useUTC"),x=se(a)?a[0]:a,b=x&&x.axisType&&x.axisType.indexOf("time")>=0;h=d,b&&(h=Nh(x.axisValue,h,m)),h=WT(h,a,!0)}else if(Me(d)){var T=ge(function(C,k){C===this._ticket&&(f.setContent(k,c,t,y,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,h=d(a,i,T)}else h=d;f.setContent(h,c,t,y,l),f.show(t,y),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i,o){if(a==="axis"||se(n))return{color:i||o};if(!se(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),d=t.get("align"),h=t.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Me(n)&&(n=n([a,i],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),se(n))a=he(n[0],u),i=he(n[1],c);else if(Pe(n)){var y=n;y.width=f[0],y.height=f[1];var m=Dt(y,{width:u,height:c});a=m.x,i=m.y,d=null,h=null}else if(pe(n)&&l){var x=wue(n,v,f,t.get("borderWidth"));a=x[0],i=x[1]}else{var x=_ue(a,i,o,u,c,d?null:20,h?null:20);a=x[0],i=x[1]}if(d&&(a-=Cz(d)?f[0]/2:d==="right"?f[0]:0),h&&(i-=Cz(h)?f[1]/2:h==="bottom"?f[1]:0),n6(t)){var x=bue(a,i,o,u,c);a=x[0],i=x[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&O(a,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&O(u,function(d,h){var v=f[h]||{},y=d.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&d.value===v.value&&d.axisType===v.axisType&&d.axisId===v.axisId&&y.length===m.length,o&&O(y,function(x,b){var T=m[b];o=o&&x.seriesIndex===T.seriesIndex&&x.dataIndex===T.dataIndex}),i&&O(d.seriesDataIndices,function(x){var b=x.seriesIndex,T=n[b],C=i[b];T&&C&&C.data!==T.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){it.node||!n.getDom()||(oh(this,"_updatePosition"),this._tooltipContent.dispose(),yw("itemTooltip",n))},e.type="tooltip",e})(Ct);function ad(r,e,t){var n=e.ecModel,a;t?(a=new rt(t,n,n),a=new rt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof rt&&(o=o.get("tooltip",!0)),pe(o)&&(o={formatter:o}),o&&(a=new rt(o,a,n)))}return a}function Tz(r,e){return r.dispatchAction||ge(e.dispatchAction,e)}function _ue(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function bue(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function wue(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function Cz(r){return r==="center"||r==="middle"}function Tue(r,e,t){var n=fT(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Mc(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ne(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function Cue(r){Ze(Uh),r.registerComponentModel(sue),r.registerComponentView(Sue),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Vt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Vt)}var Mue=["rect","polygon","keep","clear"];function kue(r,e){var t=Tt(r?r.brush:[]);if(t.length){var n=[];O(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;se(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Lue(s),e&&!s.length&&s.push.apply(s,Mue)}}function Lue(r){var e={};O(r,function(t){e[t]=1}),r.length=0,O(e,function(t,n){r.push(n)})}var Mz=O;function kz(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Mw(r,e,t){var n={};return Mz(e,function(i){var o=n[i]=a();Mz(r[i],function(s,l){if(pr.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new pr(u),l==="opacity"&&(u=Le(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new pr(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function s6(r,e,t){var n;O(t,function(a){e.hasOwnProperty(a)&&kz(e[a])&&(n=!0)}),n&&O(t,function(a){e.hasOwnProperty(a)&&kz(e[a])?r[a]=Le(e[a]):delete r[a]})}function Aue(r,e,t,n,a,i){var o={};O(r,function(f){var d=pr.prepareVisualTypes(e[f]);o[f]=d});var s;function l(f){return JT(t,s,f)}function u(f,d){aj(t,s,f,d)}t.each(c);function c(f,d){s=f;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var v=n.call(a,f),y=e[v],m=o[v],x=0,b=m.length;x<b;x++){var T=m[x];y[T]&&y[T].applyVisual(f,l,u)}}}function Iue(r,e,t,n){var a={};return O(r,function(i){var o=pr.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(k){return JT(s,f,k)}function c(k,L){aj(s,f,k,L)}for(var f,d=s.getStore();(f=o.next())!=null;){var h=s.getRawDataItem(f);if(!(h&&h.visualMap===!1))for(var v=n!=null?d.get(l,f):f,y=t(v),m=e[y],x=a[y],b=0,T=x.length;b<T;b++){var C=x[b];m[C]&&m[C].applyVisual(v,u,c)}}}}}function Due(r){var e=r.brushType,t={point:function(n){return Lz[e].point(n,t,r)},rect:function(n){return Lz[e].rect(n,t,r)}};return t}var Lz={lineX:Az(0),lineY:Az(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&rl(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var a=r.x,i=r.y,o=r.width,s=r.height,l=n[0];if(rl(n,a,i)||rl(n,a+o,i)||rl(n,a,i+s)||rl(n,a+o,i+s)||ze.create(r).contain(l[0],l[1])||gd(a,i,a+o,i,n)||gd(a,i,a,i+s,n)||gd(a+o,i,a+o,i+s,n)||gd(a,i+s,a+o,i+s,n))return!0}}};function Az(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return id(s,o)}},rect:function(n,a,i){if(n){var o=i.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),id(s[0],o)||id(s[1],o)||id(o[0],s)||id(o[1],s)}}}}function id(r,e){return e[0]<=r&&r<=e[1]}var Iz=["inBrush","outOfBrush"],a_="__ecBrushSelect",kw="__ecInBrushSelectEvent";function l6(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new S2(e.option,r);t.setInputRanges(e.areas,r)})}function Pue(r,e,t){var n=[],a,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),l6(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Le(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],d=[],h=[],v=!1;s||(a=u.throttleType,i=u.throttleDelay);var y=le(o.areas,function(k){var L=Oue[k.brushType],A=De({boundingRect:L?L(k):void 0},k);return A.selectors=Due(A),A}),m=Mw(o.option,Iz,function(k){k.mappingMethod="fixed"});se(c)&&O(c,function(k){f[k]=1});function x(k){return c==="all"||!!f[k]}function b(k){return!!k.length}r.eachSeries(function(k,L){var A=h[L]=[];k.subType==="parallel"?T(k,L):C(k,L,A)});function T(k,L){var A=k.coordinateSystem;v=v||A.hasAxisBrushed(),x(L)&&A.eachActiveState(k.getData(),function(D,P){D==="active"&&(d[P]=1)})}function C(k,L,A){if(!(!k.brushSelector||zue(o,L))&&(O(y,function(P){o.brushTargetManager.controlSeries(P,k,r)&&A.push(P),v=v||b(A)}),x(L)&&b(A))){var D=k.getData();D.each(function(P){Dz(k,A,D,P)&&(d[P]=1)})}}r.eachSeries(function(k,L){var A={seriesId:k.id,seriesIndex:L,seriesName:k.name,dataIndex:[]};l.selected.push(A);var D=h[L],P=k.getData(),R=x(L)?function(z){return d[z]?(A.dataIndex.push(P.getRawIndex(z)),"inBrush"):"outOfBrush"}:function(z){return Dz(k,D,P,z)?(A.dataIndex.push(P.getRawIndex(z)),"inBrush"):"outOfBrush"};(x(L)?v:b(D))&&Aue(Iz,m,P,R)})}),Rue(e,a,i,n,t)}function Rue(r,e,t,n,a){if(a){var i=r.getZr();if(!i[kw]){i[a_]||(i[a_]=Eue);var o=Nc(i,a_,t,e);o(r,n)}}}function Eue(r,e){if(!r.isDisposed()){var t=r.getZr();t[kw]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[kw]=!1}}function Dz(r,e,t,n){for(var a=0,i=e.length;a<i;a++){var o=e[a];if(r.brushSelector(n,t,o.selectors,o))return!0}}function zue(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(se(t)?Ue(t,e)<0:e!==t)}var Oue={rect:function(r){return Pz(r.range)},polygon:function(r){for(var e,t=r.range,n=0,a=t.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[n];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&Pz(e)}};function Pz(r){return new ze(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Nue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new $C(n.getZr())).on("brush",ge(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){l6(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Le(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Le(a),$from:n})},e.type="brush",e})(Ct),Bue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&s6(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=le(t,function(n){return Rz(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Rz(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:ee.color.backgroundTint,borderColor:ee.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:ee.color.disabled},e})(Je);function Rz(r,e){return Ye({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new rt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var jue=["rect","polygon","lineX","lineY","keep","clear"],Fue=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,O(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return O(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:jue.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e})(Xn);function Vue(r){r.registerComponentView(Nue),r.registerComponentModel(Bue),r.registerPreprocessor(kue),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Pue),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Vt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Vt),Vu("brush",Fue)}var Gue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:ee.size.m,backgroundColor:ee.color.transparent,borderColor:ee.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:ee.color.primary},subtextStyle:{fontSize:12,color:ee.color.quaternary}},e})(Je),Wue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Te(t.get("textBaseline"),t.get("textVerticalAlign")),c=new st({style:wt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=t.get("subtext"),h=new st({style:wt(s,{text:d,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=t.get("link"),y=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!v&&!m,h.silent=!y&&!m,v&&c.on("click",function(){cy(v,"_"+t.get("target"))}),y&&h.on("click",function(){cy(y,"_"+t.get("subtarget"))}),Ne(c).eventData=Ne(h).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),d&&i.add(h);var x=i.getBoundingRect(),b=t.getBoxLayoutParams();b.width=x.width,b.height=x.height;var T=lr(t,a),C=Dt(b,T.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?C.x+=C.width:l==="center"&&(C.x+=C.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?C.y+=C.height:u==="middle"&&(C.y+=C.height/2),u=u||"top"),i.x=C.x,i.y=C.y,i.markRedraw();var k={align:l,verticalAlign:u};c.setStyle(k),h.setStyle(k),x=i.getBoundingRect();var L=C.margin,A=t.getItemStyle(["color","opacity"]);A.fill=t.get("backgroundColor");var D=new Qe({shape:{x:x.x-L[3],y:x.y-L[0],width:x.width+L[1]+L[3],height:x.height+L[0]+L[2],r:t.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});i.add(D)}},e.type="title",e})(Ct);function Hue(r){r.registerComponentModel(Gue),r.registerComponentView(Wue)}var Ez=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],O(n,function(u,c){var f=ir(Cc(u),""),d;Pe(u)?(d=Le(u),d.value=c):d=c,o.push(d),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Ur([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:ee.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:ee.color.secondary},data:[]},e})(Je),u6=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=os(Ez.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:ee.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:ee.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:ee.color.tertiary},itemStyle:{color:ee.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:ee.color.accent50,borderColor:ee.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:ee.color.accent50,borderColor:ee.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:ee.color.accent60},itemStyle:{color:ee.color.accent60,borderColor:ee.color.accent60},controlStyle:{color:ee.color.accent70,borderColor:ee.color.accent70}},progress:{lineStyle:{color:ee.color.accent30},itemStyle:{color:ee.color.accent40}},data:[]}),e})(Ez);Wt(u6,Im.prototype);var $ue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(Ct),Uue=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(aa),i_=Math.PI,zz=et(),Yue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return rr("nameValue",{noName:!0,value:c})},O(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=Zue(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":pe(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:i_/2},f=i==="vertical"?o.height:o.width,d=t.getModel("controlStyle"),h=d.get("show",!0),v=h?d.get("itemSize"):0,y=h?d.get("itemGap"):0,m=v+y,x=t.get(["label","rotate"])||0;x=x*i_/180;var b,T,C,k=d.get("position",!0),L=h&&d.get("showPlayBtn",!0),A=h&&d.get("showPrevBtn",!0),D=h&&d.get("showNextBtn",!0),P=0,R=f;k==="left"||k==="bottom"?(L&&(b=[0,0],P+=m),A&&(T=[P,0],P+=m),D&&(C=[R-v,0],R-=m)):(L&&(b=[R-v,0],R-=m),A&&(T=[0,0],P+=m),D&&(C=[R-v,0],R-=m));var z=[P,R];return t.get("inverse")&&z.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:x,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:b,prevBtnPosition:T,nextBtnPosition:C,axisExtent:z,controlSize:v,controlGap:y}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=hr(),l=o.x,u=o.y+o.height;Ta(s,s,[-l,-u]),Qi(s,s,-i_/2),Ta(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=b(o),f=b(a.getBoundingRect()),d=b(i.getBoundingRect()),h=[a.x,a.y],v=[i.x,i.y];v[0]=h[0]=c[0][0];var y=t.labelPosOpt;if(y==null||pe(y)){var m=y==="+"?0:1;T(h,f,c,1,m),T(v,d,c,1,1-m)}else{var m=y>=0?0:1;T(h,f,c,1,m),v[1]=h[1]+y}a.setPosition(h),i.setPosition(v),a.rotation=i.rotation=t.rotation,x(a),x(i);function x(C){C.originX=c[0][0]-C.x,C.originY=c[1][0]-C.y}function b(C){return[[C.x,C.x+C.width],[C.y,C.y+C.height]]}function T(C,k,L,A,D){C[A]+=L[A][D]-k[A][D]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=Xue(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Uue("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new Ae;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new Zt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:ae({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Zt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:De({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],O(l,function(u){var c=a.dataToCoord(u.value),f=s.getItemModel(u.value),d=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),v=f.getModel(["progress","itemStyle"]),y={x:c,y:0,onclick:ge(o._changeTimeline,o,u.value)},m=Oz(f,d,n,y);m.ensureState("emphasis").style=h.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),Ho(m);var x=Ne(m);f.get("tooltip")?(x.dataIndex=u.value,x.dataModel=i):x.dataIndex=x.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],O(u,function(c){var f=c.tickValue,d=l.getItemModel(f),h=d.getModel("label"),v=d.getModel(["emphasis","label"]),y=d.getModel(["progress","label"]),m=a.dataToCoord(c.tickValue),x=new st({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:ge(o._changeTimeline,o,f),silent:!1,style:wt(h,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});x.ensureState("emphasis").style=wt(v),x.ensureState("progress").style=wt(y),n.add(x),Ho(x),zz(x).dataIndex=f,o._tickLabels.push(x)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);d(t.nextBtnPosition,"next",ge(this._changeTimeline,this,f?"-":"+")),d(t.prevBtnPosition,"prev",ge(this._changeTimeline,this,f?"+":"-")),d(t.playPosition,c?"stop":"play",ge(this._handlePlayClick,this,!c),!0);function d(h,v,y,m){if(h){var x=Ca(Te(i.get(["controlStyle",v+"BtnSize"]),o),o),b=[0,-x/2,x,x],T=Kue(i,v+"Icon",b,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:y});T.ensureState("emphasis").style=u,n.add(T),Ho(T)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ge(u._handlePointerDrag,u),f.ondragend=ge(u._handlePointerDragend,u),Nz(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){Nz(f,u._progressLine,s,a,i)}};this._currentPointer=Oz(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=kn(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return ba(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<a&&(a=c,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<t);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",zz(a[i]).dataIndex<=t)},e.type="timeline.slider",e})($ue);function Xue(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new pc({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new vC({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Ki}}function Zue(r,e){return Dt(r.getBoxLayoutParams(),lr(r,e).refContainer,r.get("padding"))}function Kue(r,e,t,n){var a=n.style,i=Dc(r.get(["controlStyle",e]),n||{},new ze(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function Oz(r,e,t,n,a,i){var o=e.get("color");if(a)a.setColor(o),t.add(a),i&&i.onUpdate(a);else{var s=r.get("symbol");a=Kt(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),i&&i.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),n=Ye({rectHover:!0,z2:100},n,!0);var u=Bc(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Nl(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function Nz(r,e,t,n,a,i){if(!r.dragging){var o=a.getModel("checkpointStyle"),s=n.dataToCoord(a.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function que(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),De({currentIndex:a.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function Que(r){var e=r&&r.timeline;se(e)||(e=e?[e]:[]),O(e,function(t){t&&Jue(t)})}function Jue(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),Bz(r),il(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});il(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!il(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}O(r.data||[],function(a){Pe(a)&&!se(a)&&(!il(a,"value")&&il(a,"name")&&(a.value=a.name),Bz(a))})}function Bz(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};O(n,function(o,s){!i[s]&&!il(a,s)&&(a[s]=o)}),t.label&&!il(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function il(r,e){return r.hasOwnProperty(e)}function ece(r){r.registerComponentModel(u6),r.registerComponentView(Yue),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),que(r),r.registerPreprocessor(Que)}function w2(r,e){if(!r)return!1;for(var t=se(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function hg(r){_l(r,"label",["show"])}var pg=et(),li=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(it.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,a,i){var o=this.mainType;a||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=pg(s)[o];if(!l||!l.data){pg(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&hg(l),O(l.data,function(c){c instanceof Array?(hg(c[0]),hg(c[1])):hg(c)}),u=this.createMarkerModelFromSeries(l,this,n),ae(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),pg(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return rr("section",{header:this.name,blocks:[rr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,n){var a=Im.prototype.getDataParams.call(this,t,n),i=this.__hostSeries;return i&&(a.seriesId=i.id,a.seriesName=i.name,a.seriesType=i.subType),a},e.getMarkerModelFromSeries=function(t,n){return pg(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(Je);Wt(li,Im.prototype);var tce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(li);function Lw(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function rce(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function vg(r,e,t,n,a,i,o){var s=[],l=Zi(e,a),u=l?e.getCalculationInfo("stackResultDimension"):a,c=$y(e,u,r),f=e.hostModel,d=f.indicesOfNearest(t,u,c)[0];s[i]=e.get(n,d),s[o]=e.get(u,d);var h=e.get(a,d),v=ma(e.get(a,d));return v=Math.min(v,20),v>=0&&(s[o]=+s[o].toFixed(v)),[s,h]}var gg={min:He(vg,"min"),max:He(vg,"max"),average:He(vg,"average"),median:He(vg,"median")};function bh(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!rce(e)&&!se(e.coord)&&se(a)){var i=c6(e,t,n,r);if(e=Le(e),e.type&&gg[e.type]&&i.baseAxis&&i.valueAxis){var o=Ue(a,i.baseAxis.dim),s=Ue(a,i.valueAxis.dim),l=gg[e.type](t,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!se(a)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&gg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=$y(t,t.mapDimension(c.dim),e.type))}}else for(var f=e.coord,d=0;d<2;d++)gg[f[d]]&&(f[d]=$y(t,t.mapDimension(a[d]),f[d]));return e}}function c6(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(nce(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function nce(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function wh(r,e){return r&&r.containData&&e.coord&&!Lw(e)?r.containData(e.coord):!0}function ace(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Lw(e)&&!Lw(t)?r.containZone(e.coord,t.coord):!0}function f6(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Yo(o,e[i])}:function(t,n,a,i){return Yo(t.value,e[i])}}function $y(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var o_=et(),T2=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=be()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){o_(s).keep=!1}),n.eachSeries(function(s){var l=li.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!o_(s).keep&&i.group.remove(s.group)}),ice(n,o,this.type)},e.prototype.markKeep=function(t){o_(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;O(t,function(i){var o=li.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?M5(l):xT(l))})}})},e.type="marker",e})(Ct);function ice(r,e,t){r.eachSeries(function(n){var a=li.getMarkerModelFromSeries(n,t),i=e.get(n.id);if(a&&i&&i.group){var o=Ml(a),s=o.z,l=o.zlevel;Mm(i.group,s,l)}})}function jz(r,e,t){var n=e.coordinateSystem,a=t.getWidth(),i=t.getHeight(),o=n&&n.getArea&&n.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:a,f=u?o?o.height:0:i,d=u&&o?o.x:0,h=u&&o?o.y:0,v,y=he(l.get("x"),c)+d,m=he(l.get("y"),f)+h;if(!isNaN(y)&&!isNaN(m))v=[y,m];else if(e.getMarkerPosition)v=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(n){var x=r.get(n.dimensions[0],s),b=r.get(n.dimensions[1],s);v=n.dataToPoint([x,b])}isNaN(y)||(v[0]=y),isNaN(m)||(v[1]=m),r.setItemLayout(s,v)})}var oce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=li.getMarkerModelFromSeries(i,"markPoint");o&&(jz(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Gh),f=sce(o,t,n);n.setData(f),jz(n.getData(),t,i),f.each(function(d){var h=f.getItemModel(d),v=h.getShallow("symbol"),y=h.getShallow("symbolSize"),m=h.getShallow("symbolRotate"),x=h.getShallow("symbolOffset"),b=h.getShallow("symbolKeepAspect");if(Me(v)||Me(y)||Me(m)||Me(x)){var T=n.getRawValue(d),C=n.getDataParams(d);Me(v)&&(v=v(T,C)),Me(y)&&(y=y(T,C)),Me(m)&&(m=m(T,C)),Me(x)&&(x=x(T,C))}var k=h.getModel("itemStyle").getItemStyle(),L=h.get("z2"),A=jh(l,"color");k.fill||(k.fill=A),f.setItemVisual(d,{z2:Te(L,0),symbol:v,symbolSize:y,symbolRotate:m,symbolOffset:x,symbolKeepAspect:b,style:k})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(d){d.traverse(function(h){Ne(h).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e})(T2);function sce(r,e,t){var n;r?n=le(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return ae(ae({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ur(n,t),i=le(t.get("data"),He(bh,e));r&&(i=ht(i,He(wh,r)));var o=f6(!!r,n);return a.initData(i,null,o),a}function lce(r){r.registerComponentModel(tce),r.registerComponentView(oce),r.registerPreprocessor(function(e){w2(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var uce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(li),yg=et(),cce=function(r,e,t,n){var a=r.getData(),i;if(se(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Tr(n.yAxis,n.xAxis);else{var u=c6(n,a,e,r);s=u.valueAxis;var c=dC(a,u.valueDataDim);l=$y(a,c,o)}var f=s.dim==="x"?0:1,d=1-f,h=Le(n),v={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,v.coord[d]=1/0;var y=t.get("precision");y>=0&<(l)&&(l=+l.toFixed(Math.min(y,20))),h.coord[f]=v.coord[f]=l,i=[h,v,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var m=[bh(r,i[0]),bh(r,i[1]),ae({},i[2])];return m[2].type=m[2].type||null,Ye(m[2],m[0]),Ye(m[2],m[1]),m};function Uy(r){return!isNaN(r)&&!isFinite(r)}function Fz(r,e,t,n){var a=1-r,i=n.dimensions[r];return Uy(e[a])&&Uy(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function fce(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(Fz(1,t,n,r)||Fz(0,t,n,r)))return!0}return wh(r,e[0])&&wh(r,e[1])}function s_(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=he(o.get("x"),a.getWidth()),u=he(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,f=r.get(c[0],e),d=r.get(c[1],e);s=i.dataToPoint([f,d])}if(qo(i,"cartesian2d")){var h=i.getAxis("x"),v=i.getAxis("y"),c=i.dimensions;Uy(r.get(c[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):Uy(r.get(c[1],e))&&(s[1]=v.toGlobalCoord(v.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var dce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=li.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=yg(o).from,u=yg(o).to;l.each(function(c){s_(l,c,!0,i,a),s_(u,c,!1,i,a)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new WC);this.group.add(c.group);var f=hce(o,t,n),d=f.from,h=f.to,v=f.line;yg(n).from=d,yg(n).to=h,n.setData(v);var y=n.get("symbol"),m=n.get("symbolSize"),x=n.get("symbolRotate"),b=n.get("symbolOffset");se(y)||(y=[y,y]),se(m)||(m=[m,m]),se(x)||(x=[x,x]),se(b)||(b=[b,b]),f.from.each(function(C){T(d,C,!0),T(h,C,!1)}),v.each(function(C){var k=v.getItemModel(C),L=k.getModel("lineStyle").getLineStyle();v.setItemLayout(C,[d.getItemLayout(C),h.getItemLayout(C)]);var A=k.get("z2");L.stroke==null&&(L.stroke=d.getItemVisual(C,"style").fill),v.setItemVisual(C,{z2:Te(A,0),fromSymbolKeepAspect:d.getItemVisual(C,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(C,"symbolOffset"),fromSymbolRotate:d.getItemVisual(C,"symbolRotate"),fromSymbolSize:d.getItemVisual(C,"symbolSize"),fromSymbol:d.getItemVisual(C,"symbol"),toSymbolKeepAspect:h.getItemVisual(C,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(C,"symbolOffset"),toSymbolRotate:h.getItemVisual(C,"symbolRotate"),toSymbolSize:h.getItemVisual(C,"symbolSize"),toSymbol:h.getItemVisual(C,"symbol"),style:L})}),c.updateData(v),f.line.eachItemGraphicEl(function(C){Ne(C).dataModel=n,C.traverse(function(k){Ne(k).dataModel=n})});function T(C,k,L){var A=C.getItemModel(k);s_(C,k,L,t,i);var D=A.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=jh(l,"color")),C.setItemVisual(k,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:Te(A.get("symbolOffset",!0),b[L?0:1]),symbolRotate:Te(A.get("symbolRotate",!0),x[L?0:1]),symbolSize:Te(A.get("symbolSize"),m[L?0:1]),symbol:Te(A.get("symbol",!0),y[L?0:1]),style:D})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e})(T2);function hce(r,e,t){var n;r?n=le(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return ae(ae({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ur(n,t),i=new Ur(n,t),o=new Ur([],t),s=le(t.get("data"),He(cce,e,r,t));r&&(s=ht(s,He(fce,r)));var l=f6(!!r,n);return a.initData(le(s,function(u){return u[0]}),null,l),i.initData(le(s,function(u){return u[1]}),null,l),o.initData(le(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function pce(r){r.registerComponentModel(uce),r.registerComponentView(dce),r.registerPreprocessor(function(e){w2(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var vce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(li),mg=et(),gce=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=bh(r,a),s=bh(r,i),l=o.coord,u=s.coord;l[0]=Tr(l[0],-1/0),l[1]=Tr(l[1],-1/0),u[0]=Tr(u[0],1/0),u[1]=Tr(u[1],1/0);var c=um([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Yy(r){return!isNaN(r)&&!isFinite(r)}function Vz(r,e,t,n){var a=1-r;return Yy(e[a])&&Yy(t[a])}function yce(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return qo(r,"cartesian2d")?t&&n&&(Vz(1,t,n)||Vz(0,t,n))?!0:ace(r,a,i):wh(r,a)||wh(r,i)}function Gz(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=he(o.get(t[0]),a.getWidth()),u=he(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),d=i.clampData(c),h=i.clampData(f),v=[];t[0]==="x0"?v[0]=d[0]>h[0]?f[0]:c[0]:v[0]=d[0]>h[0]?c[0]:f[0],t[1]==="y0"?v[1]=d[1]>h[1]?f[1]:c[1]:v[1]=d[1]>h[1]?c[1]:f[1],s=n.getMarkerPosition(v,t,!0)}else{var y=r.get(t[0],e),m=r.get(t[1],e),x=[y,m];i.clampData&&i.clampData(x,x),s=i.dataToPoint(x,!0)}if(qo(i,"cartesian2d")){var b=i.getAxis("x"),T=i.getAxis("y"),y=r.get(t[0],e),m=r.get(t[1],e);Yy(y)?s[0]=b.toGlobalCoord(b.getExtent()[t[0]==="x0"?0:1]):Yy(m)&&(s[1]=T.toGlobalCoord(T.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Wz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],mce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=li.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=le(Wz,function(f){return Gz(s,l,f,i,a)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ae});this.group.add(c.group),this.markKeep(c);var f=xce(o,t,n);n.setData(f),f.each(function(d){var h=le(Wz,function(R){return Gz(f,d,R,t,i)}),v=o.getAxis("x").scale,y=o.getAxis("y").scale,m=v.getExtent(),x=y.getExtent(),b=[v.parse(f.get("x0",d)),v.parse(f.get("x1",d))],T=[y.parse(f.get("y0",d)),y.parse(f.get("y1",d))];kn(b),kn(T);var C=!(m[0]>b[1]||m[1]<b[0]||x[0]>T[1]||x[1]<T[0]),k=!C;f.setItemLayout(d,{points:h,allClipped:k});var L=f.getItemModel(d),A=L.getModel("itemStyle").getItemStyle(),D=L.get("z2"),P=jh(l,"color");A.fill||(A.fill=P,pe(A.fill)&&(A.fill=Kd(A.fill,.4))),A.stroke||(A.stroke=P),f.setItemVisual(d,"style",A),f.setItemVisual(d,"z2",Te(D,0))}),f.diff(mg(c).data).add(function(d){var h=f.getItemLayout(d),v=f.getItemVisual(d,"z2");if(!h.allClipped){var y=new zr({z2:Te(v,0),shape:{points:h.points}});f.setItemGraphicEl(d,y),c.group.add(y)}}).update(function(d,h){var v=mg(c).data.getItemGraphicEl(h),y=f.getItemLayout(d),m=f.getItemVisual(d,"z2");y.allClipped?v&&c.group.remove(v):(v?ct(v,{z2:Te(m,0),shape:{points:y.points}},n,d):v=new zr({shape:{points:y.points}}),f.setItemGraphicEl(d,v),c.group.add(v))}).remove(function(d){var h=mg(c).data.getItemGraphicEl(d);c.group.remove(h)}).execute(),f.eachItemGraphicEl(function(d,h){var v=f.getItemModel(h),y=f.getItemVisual(h,"style");d.useStyle(f.getItemVisual(h,"style")),vr(d,sr(v),{labelFetcher:n,labelDataIndex:h,defaultText:f.getName(h)||"",inheritColor:pe(y.fill)?Kd(y.fill,1):ee.color.neutral99}),or(d,v),Pt(d,null,null,v.get(["emphasis","disabled"])),Ne(d).dataModel=n}),mg(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e})(T2);function xce(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=le(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return ae(ae({},f),{name:u,ordinalMeta:null})});a=le(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Ur(a,t)}else a=[{name:"value",type:"float"}],n=new Ur(a,t);var s=le(t.get("data"),He(gce,e,r,t));r&&(s=ht(s,He(yce,r)));var l=r?function(u,c,f,d){var h=u.coord[Math.floor(d/2)][d%2];return Yo(h,a[d])}:function(u,c,f,d){return Yo(u.value,a[d])};return n.initData(s,null,l),n.hasItemOption=!0,n}function Sce(r){r.registerComponentModel(vce),r.registerComponentView(mce),r.registerPreprocessor(function(e){w2(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var _ce=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Aw=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),se(n)&&O(n,function(i,o){pe(i)&&(i={type:i}),n[o]=Ye(i,_ce(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<t.length;a++){var i=t[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],a=[];t.eachRawSeries(function(l){var u=l.name;a.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&cT(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=be(),s=le(i,function(l){return(pe(l)||lt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new rt(l,this,this.ecModel))},this);this._data=ht(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;O(i,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;O(t,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;O(t,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&Ue(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:ee.size.m,align:"auto",backgroundColor:ee.color.transparent,borderColor:ee.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:ee.color.disabled,inactiveBorderColor:ee.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:ee.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:ee.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:ee.color.tertiary,borderWidth:1,borderColor:ee.color.border},emphasis:{selectorLabel:{show:!0,color:ee.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Je),Ru=He,Iw=O,xg=Ae,d6=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new xg),this.group.add(this._selectorGroup=new xg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var c=lr(t,a).refContainer,f=t.getBoxLayoutParams(),d=t.get("padding"),h=Dt(f,c,d),v=this.layoutInner(t,o,h,i,l,u),y=Dt(De({width:v.width,height:v.height},f),c,d);this.group.x=y.x-v.x,this.group.y=y.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=e6(v,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),c=be(),f=n.get("selectedMode"),d=n.get("triggerEvent"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Iw(n.getData(),function(v,y){var m=this,x=v.get("name");if(!this.newlineDisabled&&(x===""||x===`
|
|
77
|
-
`)){var b=new xg;b.newline=!0,u.add(b);return}var T=a.getSeriesByName(x)[0];if(!c.get(x))if(T){var C=T.getData(),k=C.getVisual("legendLineStyle")||{},L=C.getVisual("legendIcon"),A=C.getVisual("style"),D=this._createItem(T,x,y,v,n,t,k,A,L,f,i);D.on("click",Ru(Hz,x,null,i,h)).on("mouseover",Ru(Dw,T.name,null,i,h)).on("mouseout",Ru(Pw,T.name,null,i,h)),a.ssr&&D.eachChild(function(P){var R=Ne(P);R.seriesIndex=T.seriesIndex,R.dataIndex=y,R.ssrType="legend"}),d&&D.eachChild(function(P){m.packEventData(P,n,T,y,x)}),c.set(x,!0)}else a.eachRawSeries(function(P){var R=this;if(!c.get(x)&&P.legendVisualProvider){var z=P.legendVisualProvider;if(!z.containName(x))return;var B=z.indexOfName(x),N=z.getItemVisual(B,"style"),W=z.getItemVisual(B,"legendIcon"),$=$r(N.fill);$&&$[3]===0&&($[3]=.2,N=ae(ae({},N),{fill:Kn($,"rgba")}));var H=this._createItem(P,x,y,v,n,t,{},N,W,f,i);H.on("click",Ru(Hz,null,x,i,h)).on("mouseover",Ru(Dw,null,x,i,h)).on("mouseout",Ru(Pw,null,x,i,h)),a.ssr&&H.eachChild(function(U){var G=Ne(U);G.seriesIndex=P.seriesIndex,G.dataIndex=y,G.ssrType="legend"}),d&&H.eachChild(function(U){R.packEventData(U,n,P,y,x)}),c.set(x,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype.packEventData=function(t,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};Ne(t).eventData=s},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Iw(t,function(u){var c=u.type,f=new st({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);vr(f,{normal:d,emphasis:h},{defaultText:u.title}),Ho(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,d){var h=t.visualDrawType,v=o.get("itemWidth"),y=o.get("itemHeight"),m=o.isSelected(n),x=i.get("symbolRotate"),b=i.get("symbolKeepAspect"),T=i.get("icon");c=T||c||"roundRect";var C=bce(c,i,l,u,h,m,d),k=new xg,L=i.getModel("textStyle");if(Me(t.getLegendIcon)&&(!T||T==="inherit"))k.add(t.getLegendIcon({itemWidth:v,itemHeight:y,icon:c,iconRotate:x,itemStyle:C.itemStyle,lineStyle:C.lineStyle,symbolKeepAspect:b}));else{var A=T==="inherit"&&t.getData().getVisual("symbol")?x==="inherit"?t.getData().getVisual("symbolRotate"):x:0;k.add(wce({itemWidth:v,itemHeight:y,icon:c,iconRotate:A,itemStyle:C.itemStyle,symbolKeepAspect:b}))}var D=s==="left"?v+5:-5,P=s,R=o.get("formatter"),z=n;pe(R)&&R?z=R.replace("{name}",n??""):Me(R)&&(z=R(n));var B=m?L.getTextColor():i.get("inactiveColor");k.add(new st({style:wt(L,{text:z,x:D,y:y/2,fill:B,align:P,verticalAlign:"middle"},{inheritColor:B})}));var N=new Qe({shape:k.getBoundingRect(),style:{fill:"transparent"}}),W=i.getModel("tooltip");return W.get("show")&&eo({el:N,componentModel:o,itemName:n,itemTooltipOption:W.option}),k.add(N),k.eachChild(function($){$.silent=!0}),N.silent=!f,this.getContentGroup().add(k),Ho(k),k.__legendDataIndex=a,k},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();gl(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){gl("horizontal",u,t.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=t.get("selectorButtonGap",!0),y=t.getOrient().index,m=y===0?"width":"height",x=y===0?"height":"width",b=y===0?"y":"x";s==="end"?h[y]+=c[m]+v:f[y]+=d[m]+v,h[1-y]+=c[x]/2-d[x]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var T={x:0,y:0};return T[m]=c[m]+v+d[m],T[x]=Math.max(c[x],d[x]),T[b]=Math.min(0,d[b]+h[1-y]),T}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(Ct);function bce(r,e,t,n,a,i,o){function s(m,x){m.lineWidth==="auto"&&(m.lineWidth=x.lineWidth>0?2:0),Iw(m,function(b,T){m[T]==="inherit"&&(m[T]=x[T])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:hc(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var d=e.getModel("lineStyle"),h=d.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!i){var v=e.get("inactiveBorderWidth"),y=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&y?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function wce(r){var e=r.icon||"roundRect",t=Kt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=ee.color.neutral00,t.style.lineWidth=2),t}function Hz(r,e,t,n){Pw(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Dw(r,e,t,n)}function h6(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;n<a&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function Dw(r,e,t,n){h6(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Pw(r,e,t,n){h6(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function Tce(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function od(r,e,t){var n=r==="allSelect"||r==="inverseSelect",a={},i=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),$z(s,a),i.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){O(a,function(l,u){s[l?"select":"unSelect"](u)}),$z(s,o)}),n?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function $z(r,e){var t=e||{};return O(r.getData(),function(n){var a=n.get("name");if(!(a===`
|
|
78
|
-
`||a==="")){var i=r.isSelected(a);Se(t,a)?t[a]=t[a]&&i:t[a]=i}}),t}function Cce(r){r.registerAction("legendToggleSelect","legendselectchanged",He(od,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",He(od,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",He(od,"inverseSelect")),r.registerAction("legendSelect","legendselected",He(od,"select")),r.registerAction("legendUnSelect","legendunselected",He(od,"unSelect"))}function p6(r){r.registerComponentModel(Aw),r.registerComponentView(d6),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Tce),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Cce(r)}var Mce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=zl(t);r.prototype.init.call(this,t,n,a),Uz(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),Uz(this,this.option,t)},e.type="legend.scroll",e.defaultOption=os(Aw.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:ee.color.accent50,pageIconInactiveColor:ee.color.accent10,pageIconSize:15,pageTextStyle:{color:ee.color.tertiary},animationDurationUpdate:800}),e})(Aw);function Uz(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,oi(e,t,{type:"box",ignoreSize:!!a})}var Yz=Ae,l_=["width","height"],u_=["x","y"],kce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new Yz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Yz)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=se(f)?f:[f,f];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new st({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(y,m){var x=y+"DataIndex",b=Dc(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:ge(u._pageGo,u,x,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});b.name=y,c.add(b)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=l_[u],f=u_[u],d=l_[1-u],h=u_[1-u];o&&gl("horizontal",l,t.get("selectorItemGap",!0));var v=t.get("selectorButtonGap",!0),y=l.getBoundingRect(),m=[-y.x,-y.y],x=Le(a);o&&(x[c]=a[c]-y[c]-v);var b=this._layoutContentAndController(t,i,x,u,c,d,h,f);if(o){if(s==="end")m[u]+=b[c]+v;else{var T=y[c]+v;m[u]-=T,b[f]-=T}b[c]+=y[c]+v,m[1-u]+=b[h]+b[d]/2-y[d]/2,b[d]=Math.max(b[d],y[d]),b[h]=Math.min(b[h],y[h]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return b},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;gl(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),gl("horizontal",d,t.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),v=d.getBoundingRect(),y=this._showController=h[o]>a[o],m=[-h.x,-h.y];n||(m[i]=c[u]);var x=[0,0],b=[-v.x,-v.y],T=Te(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(y){var C=t.get("pageButtonPosition",!0);C==="end"?b[i]+=a[o]-v[o]:x[i]+=v[o]+T}b[1-i]+=h[s]/2-v[s]/2,c.setPosition(m),f.setPosition(x),d.setPosition(b);var k={x:0,y:0};if(k[o]=y?a[o]:h[o],k[s]=Math.max(h[s],v[s]),k[l]=Math.min(0,v[l]+b[1-i]),f.__rectSize=a[o],y){var L={x:0,y:0};L[o]=Math.max(a[o]-v[o]-T,0),L[s]=k[s],f.setClipPath(new Qe({shape:L})),f.__rectSize=L[o]}else d.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(t);return A.pageIndex!=null&&ct(c,{x:A.contentPosition[0],y:A.contentPosition[1]},y?t:null),this._updatePageInfoView(t,A),k},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;O(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=a.childOfName(c);h&&(h.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",pe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=l_[o],l=u_[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[a.x,a.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var y=C(f);v.contentPosition[o]=-y.s;for(var m=u+1,x=y,b=y,T=null;m<=d;++m)T=C(c[m]),(!T&&b.e>x.s+i||T&&!k(T,x.s))&&(b.i>x.i?x=b:x=T,x&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=x.i),++v.pageCount)),b=T;for(var m=u-1,x=y,b=y,T=null;m>=-1;--m)T=C(c[m]),(!T||!k(b,T.s))&&x.i<b.i&&(b=x,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=x.i),++v.pageCount,++v.pageIndex),x=T;return v;function C(L){if(L){var A=L.getBoundingRect(),D=A[l]+L[l];return{s:D,e:D+A[s],i:L.__legendDataIndex}}}function k(L,A){return L.e>=A&&L.s<=A+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e})(d6);function Lce(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Ace(r){Ze(p6),r.registerComponentModel(Mce),r.registerComponentView(kce),Lce(r)}function Ice(r){Ze(p6),Ze(Ace)}var Dce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=os(_h.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(_h),C2=et();function Pce(r,e,t){C2(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Rce(r,e){for(var t=C2(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||v6(t,o))}}}function v6(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Ece(r,e){var t={model:e,containsPoint:He(Oce,e),dispatchAction:He(zce,r),dataZoomInfoMap:null,controller:null},n=t.controller=new jl(r.getZr());return O(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function zce(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Oce(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function Nce(r,e,t){var n,a="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[a+u]>i[a+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Bce(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=C2(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=be());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=qF(i);O(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Ece(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=be());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){v6(a,i);return}var c=Nce(l,i,t);o.enable(c.controlType,c.opt),Nc(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var jce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Pce(a,t,{pan:ge(c_.pan,this),zoom:ge(c_.zoom,this),scrollMove:ge(c_.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Rce(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(y2),c_={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=f_[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Qo(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:Xz(function(r,e,t,n,a,i){var o=f_[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Xz(function(r,e,t,n,a,i){var o=f_[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Xz(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(Qo(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var f_={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function g6(r){m2(r),r.registerComponentModel(Dce),r.registerComponentView(jce),Bce(r)}var Fce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=os(_h.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:ee.color.accent10,borderRadius:0,backgroundColor:ee.color.transparent,dataBackground:{lineStyle:{color:ee.color.accent30,width:.5},areaStyle:{color:ee.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:ee.color.accent40,width:.5},areaStyle:{color:ee.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:ee.color.neutral00,borderColor:ee.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:ee.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:ee.color.tertiary},brushSelect:!0,brushStyle:{color:ee.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:ee.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(_h),sd=Qe,Vce=1,d_=30,Gce=7,ld="horizontal",Zz="vertical",Wce=5,Hce=["line","bar","candlestick","scatter"],$ce={easing:"cubicOut",duration:100,delay:0},Uce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=ge(this._onBrush,this),this._onBrushEnd=ge(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),Nc(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){oh(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Ae;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?Gce:0,o=lr(t,n).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===ld?{right:o.width-s.x-s.width,top:o.height-d_-l-i,width:s.width,height:d_}:{right:l,top:s.y,width:d_,height:s.height},c=zl(t.option);O(["right","top","width","height"],function(d){c[d]==="ph"&&(c[d]=u[d])});var f=Dt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Zz&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===ld&&!o?{scaleY:l?1:-1,scaleX:1}:a===ld&&o?{scaleY:l?1:-1,scaleX:-1}:a===Zz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new sd({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new sd({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ge(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(t.thisDim),d=o.getDataExtent(l),h=(d[1]-d[0])*.3;d=[d[0]-h,d[1]+h];var v=[0,n[1]],y=[0,n[0]],m=[[n[0],0],[0,0]],x=[],b=y[1]/Math.max(1,o.count()-1),T=n[0]/(f[1]-f[0]),C=t.thisAxis.type==="time",k=-b,L=Math.round(o.count()/n[0]),A;o.each([t.thisDim,l],function(B,N,W){if(L>0&&W%L){C||(k+=b);return}k=C?(+B-f[0])*T:k+b;var $=N==null||isNaN(N)||N==="",H=$?0:vt(N,d,v,!0);$&&!A&&W?(m.push([m[m.length-1][0],0]),x.push([x[x.length-1][0],0])):!$&&A&&(m.push([k,0]),x.push([k,0])),$||(m.push([k,H]),x.push([k,H])),A=$}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=x}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function P(B){var N=D.getModel(B?"selectedDataBackground":"dataBackground"),W=new Ae,$=new zr({shape:{points:u},segmentIgnoreThreshold:1,style:N.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),H=new Cr({shape:{points:c},segmentIgnoreThreshold:1,style:N.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return W.add($),W.add(H),W}for(var R=0;R<3;R++){var z=P(R===1);this._displayables.sliderGroup.add(z),this._displayables.dataShadowSegs.push(z)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();O(l,function(u){if(!a&&!(n!==!0&&Ue(Hce,u.get("type"))<0)){var c=i.getComponent(Fo(o),s).axis,f=Yce(o),d,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(d=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var v=u.getData().mapDimension(o);a={thisAxis:c,series:u,thisDim:v,otherDim:f,otherAxisInverse:d}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),d=n.filler=new sd({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new sd({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Vce,fill:ee.color.transparent}})),O([0,1],function(T){var C=l.get("handleIcon");!hy[C]&&C.indexOf("path://")<0&&C.indexOf("image://")<0&&(C="path://"+C);var k=Kt(C,-1,0,2,2,null,!0);k.attr({cursor:Xce(this._orient),draggable:!0,drift:ge(this._onDragMove,this,T),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1),z2:5});var L=k.getBoundingRect(),A=l.get("handleSize");this._handleHeight=he(A,this._size[1]),this._handleWidth=L.width/L.height*this._handleHeight,k.setStyle(l.getModel("handleStyle").getItemStyle()),k.style.strokeNoScale=!0,k.rectHover=!0,k.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ho(k);var D=l.get("handleColor");D!=null&&(k.style.fill=D),o.add(a[T]=k);var P=l.getModel("textStyle"),R=l.get("handleLabel")||{},z=R.show||!1;t.add(i[T]=new st({silent:!0,invisible:!z,style:wt(P,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:P.getTextColor(),font:P.getFont()}),z2:10}))},this);var h=d;if(f){var v=he(l.get("moveHandleSize"),s[1]),y=n.moveHandle=new Qe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,x=n.moveHandleIcon=Kt(l.get("moveHandleIcon"),-m/2,-m/2,m,m,ee.color.neutral00,!0);x.silent=!0,x.y=s[1]+v/2-.5,y.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var b=Math.min(s[1]/2,Math.max(v,10));h=n.moveZone=new Qe({invisible:!0,shape:{y:s[1]-b,height:v+b}}),h.on("mouseover",function(){u.enterEmphasis(y)}).on("mouseout",function(){u.leaveEmphasis(y)}),o.add(y),o.add(x),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:ge(this._onDragMove,this,"all"),ondragstart:ge(this._showDataInfo,this,!0),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[vt(t[0],[0,100],n,!0),vt(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Qo(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?vt(s.minSpan,l,o,!0):null,s.maxSpan!=null?vt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=kn([vt(i[0],o,l,!0),vt(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=kn(a.slice()),o=this._size;O([0,1],function(h){var v=n.handles[h],y=this._handleHeight;v.attr({scaleX:y/2,scaleY:y/2,x:a[h]+(h?-1:1),y:o[1]/2-y/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],d=f.getClipPath();d||(d=new Qe,f.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var d=kn(this._handleEnds.slice());h.call(this,0),h.call(this,1);function h(v){var y=$o(a.handles[v].parent,this.group),m=Cm(v===0?"right":"left",y),x=this._handleWidth/2+Wce,b=ba([d[v]+(v===0?-x:x),this._size[1]/2],y);i[v].setStyle({x:b[0],y:b[1],verticalAlign:o===ld?"middle":m,align:o===ld?m:"center",text:s[v]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return Me(i)?i(t,s):pe(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},a=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=t||this._dragging?o:a,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,$i(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=ba([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new Ee(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[a.x,a.x+a.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Qo(0,l,o,0,u.minSpan!=null?vt(u.minSpan,s,o,!0):null,u.maxSpan!=null?vt(u.maxSpan,s,o,!0):null),this._range=kn([vt(l[0],o,s,!0),vt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&($i(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new sd({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?$ce:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=qF(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(y2);function Yce(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Xce(r){return r==="vertical"?"ns-resize":"ew-resize"}function y6(r){r.registerComponentModel(Fce),r.registerComponentView(Uce),m2(r)}function Zce(r){Ze(g6),Ze(y6)}var m6={get:function(r,e,t){var n=Le((Kce[r]||{})[e]);return t&&se(n)?n[n.length-1]:n}},Kce={color:{active:["#006edd","#e0ffff"],inactive:[ee.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Kz=pr.mapVisual,qce=pr.eachVisual,Qce=se,qz=O,Jce=kn,efe=vt,Xy=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&s6(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=ge(t,this),this.controllerVisuals=Mw(this.option.controller,n,t),this.targetVisuals=Mw(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,n=this.option.seriesIndex;n==null&&t==null&&(n="all");var a=Mc(this.ecModel,"series",{index:n,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return le(a,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(t,n){O(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],se(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(pe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Me(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(d){return d===s[0]?"min":d===s[1]?"max":(+d).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=Jce([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Ye(i,a),Ye(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){Qce(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,d,h){var v=f[d],y=f[h];v&&!y&&(y=f[h]={},qz(v,function(m,x){if(pr.isValidType(x)){var b=m6.get(x,"inactive",s);b!=null&&(y[x]=b,x==="color"&&!y.hasOwnProperty("opacity")&&!y.hasOwnProperty("colorAlpha")&&(y.opacity=[0,0]))}}))}function c(f){var d=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),y=this.getItemSymbol(),m=y||"roundRect";qz(this.stateList,function(x){var b=this.itemSize,T=f[x];T||(T=f[x]={color:s?v:[v]}),T.symbol==null&&(T.symbol=d&&Le(d)||(s?m:[m])),T.symbolSize==null&&(T.symbolSize=h&&Le(h)||(s?b[0]:[b[0],b[0]])),T.symbol=Kz(T.symbol,function(L){return L==="none"?m:L});var C=T.symbolSize;if(C!=null){var k=-1/0;qce(C,function(L){L>k&&(k=L)}),T.symbolSize=Kz(C,function(L){return efe(L,[0,k],[0,b[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:ee.color.transparent,borderColor:ee.color.borderTint,contentColor:ee.color.theme[0],inactiveColor:ee.color.disabled,borderWidth:0,padding:ee.size.m,textGap:10,precision:0,textStyle:{color:ee.color.secondary}},e})(Je),Qz=[20,140],tfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Qz[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Qz[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):se(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),O(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=kn((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent(),i=Te(this.option.unboundedRange,!0);return(i&&n[0]<=a[0]||n[0]<=t)&&(i&&n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=Jz(this,"outOfRange",this.getExtent()),a=Jz(this,"inRange",this.option.range.slice()),i=[];function o(h,v){i.push({value:h,color:t(h,v)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var d=i.length;return{stops:i,outerColors:[d?i[0].color:"transparent",d?i[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=os(Xy.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:ee.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:ee.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ee.color.shadow}}),e})(Xy);function Jz(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var x6=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=Ec(n.get("padding")||0),i=t.getBoundingRect();t.add(new Qe({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function c(h,v){s[h]=v}var f=o.controllerVisuals[i||o.getValueState(t)],d=pr.prepareVisualTypes(f);return O(d,function(h){var v=f[h];a.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",v=f.__alphaForOpacity),pr.dependsOn(h,n)&&v&&v.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api,i=lr(n,a).refContainer;Lm(t,n.getBoxLayoutParams(),i)},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e})(Ct),eO=[["left","right","width"],["top","bottom","height"]];function S6(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=eO[o],l=[0,null,10],u={},c=0;c<3;c++)u[eO[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],d=Dt(u,i,n.padding);return s[(d.margin[f[2]]||0)+d[f[0]]+d[f[1]]*.5<i[f[1]]*.5?0:1]}function Fg(r,e){return O(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Ga=vt,rfe=O,tO=Math.min,h_=Math.max,nfe=12,afe=6,ife=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=ge(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ge(this._hideIndicator,this)},e.prototype.doRender=function(t,n,a,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),d=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new st({style:wt(h,{x:c[0],y:c[1],verticalAlign:h.get("verticalAlign")||(d==="horizontal"?"middle":f),align:h.get("align")||(d==="horizontal"?f:"center"),text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=S6(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Ae;u.add(c),c.add(a.outOfRange=rO()),c.add(a.inRange=rO(null,s?aO(this._orient):null,ge(this._dragHandle,this,"all",!1),ge(this._dragHandle,this,"all",!0))),c.setClipPath(new Qe({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),d=h_(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,d,o),this._createHandle(n,u,1,i,d,o)),this._createIndicator(n,u,i,d,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=ge(this._dragHandle,this,a,!1),u=ge(this._dragHandle,this,a,!0),c=Ca(t.get("handleSize"),i[0]),f=Kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=aO(this._orient);f.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(x){$i(x.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ll(f,!0),n.add(f);var h=this.visualMapModel.textStyleModel,v=new st({cursor:d,draggable:!0,drift:l,onmousemove:function(x){$i(x.event)},ondragend:u,style:wt(h,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var y=[c,0],m=this._shapes;m.handleThumbs[a]=f,m.handleLabelPoints[a]=y,m.handleLabels[a]=v},e.prototype._createIndicator=function(t,n,a,i,o){var s=Ca(t.get("indicatorSize"),a[0]),l=Kt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof gr){var c=l.style;l.useStyle(ae({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,d=new st({silent:!0,invisible:!0,style:wt(f,{x:0,y:0,text:""})});this.group.add(d);var h=[(o==="horizontal"?i/2:afe)+a[0]/2,0],v=this._shapes;v.indicator=l,v.indicatorLabel=d,v.indicatorLabelPoint=h,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():nO(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Ga(n[0],a,i,!0),Ga(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Qo(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[Ga(i[0],o,s,!0),Ga(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new Rl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new Ae(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",a.mainGroup);rfe([0,1],function(f){var d=o[f];d.setStyle("fill",n.handlesColor[f]),d.y=t[f];var h=Ga(t[f],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");d.scaleX=d.scaleY=v/l[0],d.x=l[0]-v/2;var y=ba(a.handleLabelPoints[f],$o(d,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-v)/2:(l[0]-v)/-2;y[1]+=m}s[f].setStyle({x:y[0],y:y[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var d={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",d),v=this.getControllerVisual(t,"symbolSize"),y=Ga(t,s,u,!0),m=l[0]-v/2,x={x:f.x,y:f.y};f.y=y,f.x=m;var b=ba(c.indicatorLabelPoint,$o(f,this.group)),T=c.indicatorLabel;T.attr("invisible",!1);var C=this._applyTransform("left",c.mainGroup),k=this._orient,L=k==="horizontal";T.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:L?C:"middle",align:L?"center":C});var A={x:m,y,style:{fill:h}},D={style:{x:b[0],y:b[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var P={duration:100,easing:"cubicInOut",additive:!0};f.x=x.x,f.y=x.y,f.animateTo(A,P),T.animateTo(D,P)}else f.attr(A),T.attr(D);this._firstShowIndicator=!1;var R=this._shapes.handleLabels;if(R)for(var z=0;z<R.length;z++)this.api.enterBlur(R[z])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=tO(h_(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=tO(h_(o[0],t),o[1]);var l=ofe(a,s,o),u=[t-l,t+l],c=Ga(t,o,s,!0),f=[Ga(u[0],o,s,!0),Ga(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var d=this._hoverLinkDataIndices,h=[];(n||nO(a))&&(h=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var v=j7(d,h);this._dispatchHighDown("downplay",Fg(v[0],a)),this._dispatchHighDown("highlight",Fg(v[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(cl(t.target,function(l){var u=Ne(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this.api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Fg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=$o(n,i?null:this.group);return se(t)?ba(t,o,a):Cm(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(x6);function rO(r,e,t,n){return new zr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){$i(a.event)},ondragend:n})}function ofe(r,e,t){var n=nfe/2,a=r.get("hoverLinkDataSize");return a&&(n=Ga(a,e,t,!0)/2),n}function nO(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function aO(r){return r==="vertical"?"ns-resize":"ew-resize"}var sfe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},lfe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},ufe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(Iue(n.stateList,n.targetVisuals,ge(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(ge(cfe,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function cfe(r,e,t,n){for(var a=e.targetVisuals[n],i=pr.prepareVisualTypes(a),o={color:jh(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,d)}return o.color;function f(h){return o[h]}function d(h,v){o[h]=v}}var iO=O;function ffe(r){var e=r&&r.visualMap;se(e)||(e=e?[e]:[]),iO(e,function(t){if(t){Eu(t,"splitList")&&!Eu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&se(n)&&iO(n,function(a){Pe(a)&&(Eu(a,"start")&&!Eu(a,"min")&&(a.min=a.start),Eu(a,"end")&&!Eu(a,"max")&&(a.max=a.end))})}})}function Eu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var oO=!1;function _6(r){oO||(oO=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(sfe,lfe),O(ufe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(ffe))}function b6(r){r.registerComponentModel(tfe),r.registerComponentView(ife),_6(r)}var dfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],hfe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=Le(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=le(this._pieceList,function(l){return l=Le(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=pr.listVisualTypes(),i=this.isCategory();O(t.pieces,function(s){O(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),O(n,function(s,l){var u=!1;O(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&O(this.stateList,function(c){(t[c]||(t[c]={}))[l]=m6.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,O(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;O(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Le(t)},e.prototype.getValueState=function(t){var n=pr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=pr.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var d=i.getRepresentValue({interval:c});f||(f=i.getValueState(d));var h=t(d,f);c[0]===-1/0?a[0]=h:c[1]===1/0?a[1]=h:n.push({value:c[0],color:h},{value:c[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return O(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=os(Xy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e})(Xy),hfe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),q_(r),O(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;O(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),sO(e,r)},pieces:function(r){var e=this.option;O(e.pieces,function(t,n){Pe(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],h=0;h<3&&o[f]==null;h++)o[f]=t[d[h]],s[f]=l[h],c[f]=h===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=pr.retrieveVisuals(t),r.push(a)},this),sO(e,r),q_(r),O(r,function(t){var n=t.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function sO(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var pfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Tr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(t,u[0],s,c,o),O(l.viewPieceList,function(d){var h=d.piece,v=new Ae;v.onclick=ge(this._onItemClick,this,h),this._enableHoverLink(v,d.indexInModelPieceList);var y=n.getRepresentValue(h);if(this._createItemSymbol(v,y,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(y),x=i.get("align")||o;v.add(new st({style:wt(i,{x:x==="right"?-a:s[0]+a,y:s[1]/2,text:h.text,verticalAlign:i.get("verticalAlign")||"middle",align:x,opacity:Te(i.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}t.add(v)},this),u&&this._renderEndsText(t,u[1],s,c,o),gl(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Fg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return S6(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new Ae,l=this.visualMapModel.textStyleModel;s.add(new st({style:wt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=le(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a,i){var o=Kt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=Le(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,O(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e})(x6);function w6(r){r.registerComponentModel(dfe),r.registerComponentView(pfe),_6(r)}function vfe(r){Ze(b6),Ze(w6)}var gfe=(function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Y5(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r})(),yfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,n){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new gfe(this);if(this._target=null,this.ecModel.eachSeries(function(a){PR(a,null)}),this.shouldShow()){var n=this.getTarget();PR(n.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:ee.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:ee.color.neutral30,borderColor:ee.color.neutral40,opacity:.3},z:10},e})(Je),mfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this._api=a,this._model=t,this._coordSys||(this._coordSys=new Fl),!this._isEnabled()){this._clear();return}this._renderVersion=a.getMainProcessVersion();var i=this.group;i.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||ee.color.neutral00);var l=lr(t,a).refContainer,u=Dt(hB(t,!0),l),c=s.lineWidth||0,f=this._contentRect=Cl(u.clone(),c/2,!0,!0),d=new Ae;i.add(d),d.setClipPath(new Qe({shape:f.plain()}));var h=this._targetGroup=new Ae;d.add(h);var v=u.plain();v.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Qe({style:s,shape:v,silent:!1,cursor:"grab"}));var y=t.getModel("windowStyle"),m=y.getShallow("borderRadius",!0);d.add(this._windowRect=new Qe({shape:{x:0,y:0,width:0,height:0,r:m},style:y.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),uO(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),uO(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=this._targetGroup,a=this._coordSys,i=this._contentRect;if(n.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=t.z2Range.min-10,a.setBoundingRect(s.x,s.y,s.width,s.height);var l=Dt({left:"center",top:"center",aspect:s.width/s.height},i);a.setViewRect(l.x,l.y,l.width,l.height),o.attr(a.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var n=this._bridgeRendered;n&&n.renderVersion===t.renderVersion&&(n.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=Jn([],t.targetTrans),a=Sa([],this._coordSys.transform,n);this._transThisToTarget=Jn([],a);var i=t.viewportRect;i?i=i.clone():i=new ze(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(a);var o=this._windowRect,s=o.shape.r;o.setShape(De({r:s},i))}},e.prototype._resetRoamController=function(t){var n=this,a=this._api,i=this._roamController;if(i||(i=this._roamController=new jl(a.getZr())),!t||!this._isEnabled()){i.disable();return}i.enable(t,{api:a,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",ge(this._onPan,this)).on("zoom",ge(this._onZoom,this))},e.prototype._onPan=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Gt([],[t.oldX,t.oldY],n),i=Gt([],[t.oldX-t.dx,t.oldY-t.dy],n);this._api.dispatchAction(lO(this._model.getTarget().baseMapProvider,{dx:i[0]-a[0],dy:i[1]-a[1]}))}},e.prototype._onZoom=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Gt([],[t.originX,t.originY],n);this._api.dispatchAction(lO(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:a[0],originY:a[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var n=t.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(Ct);function lO(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",n={type:t};return n[r.mainType+"Id"]=r.id,ae(n,e),n}function uO(r,e){var t=Ml(r);Mm(e.group,t.z,t.zlevel)}function xfe(r){r.registerComponentModel(yfe),r.registerComponentView(mfe)}var Sfe={label:{enabled:!0},decal:{show:!1}},cO=et(),_fe={};function bfe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Le(Sfe);Ye(n.label,r.getLocaleModel().get("aria"),!1),Ye(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=be();r.eachSeries(function(d){if(!d.isColorBySeries()){var h=f.get(d.type);h||(h={},f.set(d.type,h)),cO(d).scope=h}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(Me(d.enableAriaDecal)){d.enableAriaDecal();return}var h=d.getData();if(d.isColorBySeries()){var b=mb(d.ecModel,d.name,_fe,r.getSeriesCount()),T=h.getVisual("decal");h.setVisual("decal",C(T,b))}else{var v=d.getRawData(),y={},m=cO(d).scope;h.each(function(k){var L=h.getRawIndex(k);y[L]=k});var x=v.count();v.each(function(k){var L=y[k],A=v.getName(k)||k+"",D=mb(d.ecModel,A,m,x),P=h.getItemVisual(L,"decal");h.setItemVisual(L,"decal",C(P,D))})}function C(k,L){var A=k?ae(ae({},L),k):L;return A.dirty=!0,A}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=De(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var d=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,v=f.get(["series","maxCount"])||10,y=Math.min(d,v),m;if(!(d<1)){var x=s();if(x){var b=f.get(["general","withTitle"]);m=o(b,{title:x})}else m=f.get(["general","withoutTitle"]);var T=[],C=d>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(C,{seriesCount:d}),r.eachSeries(function(D,P){if(P<y){var R=void 0,z=D.get("name"),B=z?"withName":"withoutName";R=d>1?f.get(["series","multiple",B]):f.get(["series","single",B]),R=o(R,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var N=D.getData();if(N.count()>h){var W=f.get(["data","partialData"]);R+=o(W,{displayCnt:h})}else R+=f.get(["data","allData"]);for(var $=f.get(["data","separator","middle"]),H=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),G=[],X=0;X<N.count();X++)if(X<h){var K=N.getName(X),V=U?ht(N.getValues(X),function(ne,ue){return Ue(U,ue)===-1}):N.getValues(X),Y=f.get(["data",K?"withName":"withoutName"]);G.push(o(Y,{name:K,value:V.join($)}))}R+=G.join($)+H,T.push(R)}});var k=f.getModel(["series","multiple","separator"]),L=k.get("middle"),A=k.get("end");m+=T.join(L)+A,u.setAttribute("aria-label",m)}}}}function o(u,c){if(!pe(u))return u;var f=u;return O(c,function(d,h){f=f.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),d)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function wfe(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},O(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function Tfe(r){r.registerPreprocessor(wfe),r.registerVisual(r.PRIORITY.VISUAL.ARIA,bfe)}var fO={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Cfe=(function(){function r(e){var t=this._condVal=pe(e)?new RegExp(e):yN(e)?e:null;if(t==null){var n="";gt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return pe(t)?this._condVal.test(e):lt(t)?this._condVal.test(e+""):!1},r})(),Mfe=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),kfe=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r})(),Lfe=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r})(),Afe=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),Ife=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r})();function M2(r,e){if(r===!0||r===!1){var t=new Mfe;return t.value=r,t}var n="";return T6(r)||gt(n),r.and?dO("and",r,e):r.or?dO("or",r,e):r.not?Dfe(r,e):Pfe(r,e)}function dO(r,e,t){var n=e[r],a="";se(n)||gt(a),n.length||gt(a);var i=r==="and"?new kfe:new Lfe;return i.children=le(n,function(o){return M2(o,t)}),i.children.length||gt(a),i}function Dfe(r,e){var t=r.not,n="";T6(t)||gt(n);var a=new Afe;return a.child=M2(t,e),a.child||gt(n),a}function Pfe(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=ot(r),o=r.parser,s=o?zB(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=Se(fO,u)?fO[u]:u,f=r[u],d=s?s(f):f,h=QY(c,d)||c==="reg"&&new Cfe(d);h||gt(t),a.push(h)}}a.length||gt(t);var v=new Ife;return v.valueGetterParam=n,v.valueParser=s,v.getValue=e.getValue,v.subCondList=a,v}function T6(r){return Pe(r)&&!Pr(r)}var Rfe=(function(){function r(e,t){this._cond=M2(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function Efe(r,e){return new Rfe(r,e)}var zfe={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=Efe(r.config,{valueGetterAttrMap:be({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Se(s,"dimension")||gt(l);var c=e.getDimensionInfo(u);return c||gt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},Ofe={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=Tt(t);a.length||gt(n);var i=[];O(a,function(c){var f=c.dimension,d=c.order,h=c.parser,v=c.incomparable;if(f==null&>(n),d!=="asc"&&d!=="desc"&>(n),v&&v!=="min"&&v!=="max"){var y="";gt(y)}if(d!=="asc"&&d!=="desc"){var m="";gt(m)}var x=e.getDimensionInfo(f);x||gt(n);var b=h?zB(h):null;h&&!b&>(n),i.push({dimIdx:x.index,parser:b,comparator:new NB(d,v)})});var o=e.sourceFormat;o!==Mr&&o!==Pn&>(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var d=0;d<i.length;d++){var h=i[d],v=e.retrieveValueFromItem(c,h.dimIdx),y=e.retrieveValueFromItem(f,h.dimIdx);h.parser&&(v=h.parser(v),y=h.parser(y));var m=h.comparator.evaluate(v,y);if(m!==0)return m}return 0}),{data:s}}};function Nfe(r){r.registerTransform(zfe),r.registerTransform(Ofe)}var Bfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new VB(this),HI(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),HI(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:wa},e})(Je),jfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(Ct);function Ffe(r){r.registerComponentModel(Bfe),r.registerComponentView(jfe)}var Fa=ii.CMD;function Xu(r,e){return Math.abs(r-e)<1e-5}function Rw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(N,W){a&&a.length>2&&n.push(a),a=[N,W]}function c(N,W,$,H){Xu(N,$)&&Xu(W,H)||a.push(N,W,$,H,$,H)}function f(N,W,$,H,U,G){var X=Math.abs(W-N),K=Math.tan(X/4)*4/3,V=W<N?-1:1,Y=Math.cos(N),ne=Math.sin(N),ue=Math.cos(W),fe=Math.sin(W),Ce=Y*U+$,Be=ne*G+H,ye=ue*U+$,ce=fe*G+H,we=U*K*V,xe=G*K*V;a.push(Ce-we*ne,Be+xe*Y,ye+we*fe,ce-xe*ue,ye,ce)}for(var d,h,v,y,m=0;m<t;){var x=e[m++],b=m===1;switch(b&&(i=e[m],o=e[m+1],s=i,l=o,(x===Fa.L||x===Fa.C||x===Fa.Q)&&(a=[s,l])),x){case Fa.M:i=s=e[m++],o=l=e[m++],u(s,l);break;case Fa.L:d=e[m++],h=e[m++],c(i,o,d,h),i=d,o=h;break;case Fa.C:a.push(e[m++],e[m++],e[m++],e[m++],i=e[m++],o=e[m++]);break;case Fa.Q:d=e[m++],h=e[m++],v=e[m++],y=e[m++],a.push(i+2/3*(d-i),o+2/3*(h-o),v+2/3*(d-v),y+2/3*(h-y),v,y),i=v,o=y;break;case Fa.A:var T=e[m++],C=e[m++],k=e[m++],L=e[m++],A=e[m++],D=e[m++]+A;m+=1;var P=!e[m++];d=Math.cos(A)*k+T,h=Math.sin(A)*L+C,b?(s=d,l=h,u(s,l)):c(i,o,d,h),i=Math.cos(D)*k+T,o=Math.sin(D)*L+C;for(var R=(P?-1:1)*Math.PI/2,z=A;P?z>D:z<D;z+=R){var B=P?Math.max(z+R,D):Math.min(z+R,D);f(z,B,T,C,k,L)}break;case Fa.R:s=i=e[m++],l=o=e[m++],d=s+e[m++],h=l+e[m++],u(d,l),c(d,l,d,h),c(d,h,s,h),c(s,h,s,l),c(s,l,d,l);break;case Fa.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Ew(r,e,t,n,a,i,o,s,l,u){if(Xu(r,t)&&Xu(e,n)&&Xu(a,o)&&Xu(i,s)){l.push(o,s);return}var c=2/u,f=c*c,d=o-r,h=s-e,v=Math.sqrt(d*d+h*h);d/=v,h/=v;var y=t-r,m=n-e,x=a-o,b=i-s,T=y*y+m*m,C=x*x+b*b;if(T<f&&C<f){l.push(o,s);return}var k=d*y+h*m,L=-d*x-h*b,A=T-k*k,D=C-L*L;if(A<f&&k>=0&&D<f&&L>=0){l.push(o,s);return}var P=[],R=[];Zo(r,t,a,o,.5,P),Zo(e,n,i,s,.5,R),Ew(P[0],R[0],P[1],R[1],P[2],R[2],P[3],R[3],l,u),Ew(P[4],R[4],P[5],R[5],P[6],R[6],P[7],R[7],l,u)}function Vfe(r,e){var t=Rw(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],d=i[u++],h=i[u++],v=i[u++],y=i[u++];Ew(s,l,c,f,d,h,v,y,o,e),s=v,l=y}n.push(o)}return n}function C6(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function hO(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=C6([l,u],c?0:1,e),d=(c?s:u)/f.length,h=0;h<f.length;h++)for(var v=(c?u:s)/f[h],y=0;y<f[h];y++){var m={};c?(m.startAngle=i+d*h,m.endAngle=i+d*(h+1),m.r0=n+v*y,m.r=n+v*(y+1)):(m.startAngle=i+v*y,m.endAngle=i+v*(y+1),m.r0=n+d*h,m.r=n+d*(h+1)),m.clockwise=r.clockwise,m.cx=r.cx,m.cy=r.cy,t.push(m)}}function Gfe(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=C6([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,d=0;d<o.length;d++)for(var h=r[l]/o[d],v=0;v<o[d];v++){var y={};y[u]=d*f,y[c]=v*h,y[s]=f,y[l]=h,y.x+=r.x,y.y+=r.y,t.push(y)}}function pO(r,e,t,n){return r*n-t*e}function Wfe(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=pO(c,f,l,u);if(Math.abs(d)<1e-6)return null;var h=r-a,v=e-i,y=pO(h,v,c,f)/d;return y<0||y>1?null:new Ee(y*l+r,y*u+e)}function Hfe(r,e,t){var n=new Ee;Ee.sub(n,t,e),n.normalize();var a=new Ee;Ee.sub(a,r,e);var i=a.dot(n);return i}function zu(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function $fe(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=Wfe(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:Hfe(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(m,x){return m.projPt-x.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var d=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],v=[d],y=[h],i=u.idx+1;i<=c.idx;i++)zu(v,r[i].slice());zu(v,h),zu(v,d);for(var i=c.idx+1;i<=u.idx+n;i++)zu(y,r[i%n].slice());return zu(y,d),zu(y,h),[{points:v},{points:y}]}function vO(r){var e=r.points,t=[],n=[];Sm(e,t,n);var a=new ze(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new Ee,c=new Ee;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),$fe(e,u,c)}function Zy(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Zy(r,i[0],a,n),Zy(r,i[1],t-a,n)}return n}function Ufe(r,e){for(var t=[],n=0;n<e;n++)t.push(_T(r));return t}function Yfe(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function Xfe(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function Zfe(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":Gfe(n,e,t),a=Qe;break;case"sector":hO(n,e,t),a=Er;break;case"circle":hO({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Er;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=le(Vfe(r.getUpdatedPathProxy(),o),function(x){return Xfe(x)}),l=s.length;if(l===0)Zy(vO,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=le(s,function(x){var b=[],T=[];Sm(x,b,T);var C=(T[1]-b[1])*(T[0]-b[0]);return c+=C,{poly:x,area:C}});f.sort(function(x,b){return b.area-x.area});for(var d=e,u=0;u<l;u++){var h=f[u];if(d<=0)break;var v=u===l-1?d:Math.ceil(h.area/c*e);v<0||(Zy(vO,{points:h.poly},v,t),d-=v)}}a=zr;break}if(!a)return Ufe(r,e);for(var y=[],u=0;u<t.length;u++){var m=new a;m.setShape(t[u]),Yfe(r,m),y.push(m)}return y}function Kfe(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],d=l,h=2;h<s;){var v=o[h-2],y=o[h-1],m=o[h++],x=o[h++],b=o[h++],T=o[h++],C=o[h++],k=o[h++];if(d<=0){f.push(m,x,b,T,C,k);continue}for(var L=Math.min(d,c-1)+1,A=1;A<=L;A++){var D=A/L;Zo(v,m,b,C,D,a),Zo(y,x,T,k,D,i),v=a[3],y=i[3],f.push(a[1],i[1],a[2],i[2],v,y),m=a[5],x=i[5],b=a[6],T=i[6]}d-=L-1}return o===r?[f,e]:[r,f]}function gO(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function qfe(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=Kfe(l,u),c=t[0],f=t[1],n=c,a=f):(f=gO(a||l,l),c=l):(c=gO(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function yO(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function Qfe(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,d=0;d<s;d+=2){var h=d===0?c:(c+d-2)%l+2,v=r[h]-t[0],y=r[h+1]-t[1],m=e[d]-n[0],x=e[d+1]-n[1],b=m-v,T=x-y;f+=b*b+T*T}f<i&&(i=f,o=u)}return o}function Jfe(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function ede(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=yO(s),c=yO(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],d=[],h=0,v=1/0,y=[],m=s.length;i&&(s=Jfe(s));for(var x=Qfe(s,l,u,c)*6,b=m-2,T=0;T<b;T+=2){var C=(x+T)%b+2;f[T+2]=s[C]-u[0],f[T+3]=s[C+1]-u[1]}f[0]=s[x]-u[0],f[1]=s[x+1]-u[1];for(var k=n/t,L=-n/2;L<=n/2;L+=k){for(var A=Math.sin(L),D=Math.cos(L),P=0,T=0;T<s.length;T+=2){var R=f[T],z=f[T+1],B=l[T]-c[0],N=l[T+1]-c[1],W=B*D-N*A,$=B*A+N*D;y[T]=W,y[T+1]=$;var H=W-R,U=$-z;P+=H*H+U*U}if(P<v){v=P,h=L;for(var G=0;G<y.length;G++)d[G]=y[G]}}a.push({from:f,to:d,fromCp:u,toCp:c,rotation:-h})}return a}function Ky(r){return r.__isCombineMorphing}var M6="__mOriginal_";function qy(r,e,t){var n=M6+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function Gd(r,e){var t=M6+e;r[t]&&(r[e]=r[t],r[t]=null)}function mO(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function k6(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=qfe(Rw(t),Rw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&mO(i,s),l&&mO(o,l),qy(e,"updateTransform",{replace:u}),e.transform=null;var c=ede(i,o,10,Math.PI),f=[];qy(e,"buildPath",{replace:function(d){for(var h=e.__morphT,v=1-h,y=[],m=0;m<c.length;m++){var x=c[m],b=x.from,T=x.to,C=x.rotation*h,k=x.fromCp,L=x.toCp,A=Math.sin(C),D=Math.cos(C);Id(y,k,L,h);for(var P=0;P<b.length;P+=2){var R=b[P],z=b[P+1],B=T[P],N=T[P+1],W=R*v+B*h,$=z*v+N*h;f[P]=W*D-$*A+y[0],f[P+1]=W*A+$*D+y[1]}var H=f[0],U=f[1];d.moveTo(H,U);for(var P=2;P<b.length;){var B=f[P++],N=f[P++],G=f[P++],X=f[P++],K=f[P++],V=f[P++];H===B&&U===N&&G===K&&X===V?d.lineTo(K,V):d.bezierCurveTo(B,N,G,X,K,V),H=K,U=V}}}})}function k2(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;k6(r,e),e.__morphT=0;function i(){Gd(e,"buildPath"),Gd(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},De({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function tde(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Qy(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=le(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=le(i,function(s,l){return{cp:s,z:tde(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function L6(r){return Zfe(r.path,r.count)}function zw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function rde(r,e,t){var n=[];function a(k){for(var L=0;L<k.length;L++){var A=k[L];Ky(A)?a(A.childrenRef()):A instanceof nt&&n.push(A)}}a(r);var i=n.length;if(!i)return zw();var o=t.dividePath||L6,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),zw();n=Qy(n),s=Qy(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new zi,d=0;d<i;d++){var h=n[d],v=s[d];v.parent=e,v.copyTransform(f),c||k6(h,v)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function y(k){for(var L=0;L<s.length;L++)s[L].addSelfToZr(k)}qy(e,"addSelfToZr",{after:function(k){y(k)}}),qy(e,"removeSelfFromZr",{after:function(k){for(var L=0;L<s.length;L++)s[L].removeSelfFromZr(k)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Gd(e,"addSelfToZr"),Gd(e,"removeSelfFromZr")}var x=s.length;if(c)for(var b=x,T=function(){b--,b===0&&(m(),l&&l())},d=0;d<x;d++){var C=c?De({delay:(t.delay||0)+c(d,x,n[d],s[d]),done:T},t):t;k2(n[d],s[d],C)}else e.__morphT=0,e.animateTo({__morphT:1},De({during:function(k){for(var L=0;L<x;L++){var A=s[L];A.__morphT=e.__morphT,A.dirtyShape()}u&&u(k)},done:function(){m();for(var k=0;k<r.length;k++)Gd(r[k],"updateTransform");l&&l()}},t));return e.__zr&&y(e.__zr),{fromIndividuals:n,toIndividuals:s,count:x}}function nde(r,e,t){var n=e.length,a=[],i=t.dividePath||L6;function o(h){for(var v=0;v<h.length;v++){var y=h[v];Ky(y)?o(y.childrenRef()):y instanceof nt&&a.push(y)}}if(Ky(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(_T(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),zw()}a=Qy(a),e=Qy(e);for(var f=t.individualDelay,u=0;u<n;u++){var d=f?De({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;k2(a[u],e[u],d)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function xO(r){return se(r[0])}function SO(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var ade={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=_T(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function p_(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Ic("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;xO(r)&&(u=r,c=e),xO(e)&&(u=e,c=r);function f(x,b,T,C,k){var L=x.many,A=x.one;if(L.length===1&&!k){var D=b?L[0]:A,P=b?A:L[0];if(Ky(D))f({many:[D],one:P},!0,T,C,!0);else{var R=s?De({delay:s(T,C)},l):l;k2(D,P,R),i(D,P,D,P,R)}}else for(var z=De({dividePath:ade[t],individualDelay:s&&function(U,G,X,K){return s(U+T,C)}},l),B=b?rde(L,A,z):nde(A,L,z),N=B.fromIndividuals,W=B.toIndividuals,$=N.length,H=0;H<$;H++){var R=s?De({delay:s(H,$)},l):l;i(N[H],W[H],b?L[H]:x.one,b?x.one:L[H],R)}}for(var d=u?u===r:r.length>e.length,h=u?SO(c,u):SO(d?e:r,[d?r:e]),v=0,y=0;y<h.length;y++)v+=h[y].many.length;for(var m=0,y=0;y<h.length;y++)f(h[y],d,m,v),m+=h[y].many.length}function tl(r){if(!r)return[];if(se(r)){for(var e=[],t=0;t<r.length;t++)e.push(tl(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof nt&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var A6=1e4,ide=0,_O=1,bO=2,ode=et();function sde(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var a=r.getDimensionInfo(t[n]);if(a&&a.otherDims[e]===0)return t[n]}}function lde(r,e,t){var n=r.getDimensionInfo(t),a=n&&n.ordinalMeta;if(n){var i=r.get(n.name,e);return a&&a.categories[i]||i+""}}function wO(r,e,t,n){var a=n?"itemChildGroupId":"itemGroupId",i=sde(r,a);if(i){var o=lde(r,e,i);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function TO(r){var e=[];return O(r,function(t){var n=t.data,a=t.dataGroupId;if(!(n.count()>A6))for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:wO(n,o,a,!1),childGroupId:wO(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function v_(r,e,t){r.traverse(function(n){n instanceof nt&&It(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function g_(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ou(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function ude(r,e,t){var n=Ic("update",t,e);n&&r.traverse(function(a){if(a instanceof ea){var i=MU(a);i&&a.animateFrom({style:i},n)}})}function cde(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function I6(r,e,t){var n=TO(r),a=TO(e);function i(T,C,k,L,A){(k||T)&&C.animateFrom({style:k&&k!==T?ae(ae({},k.style),T.style):T.style},A)}var o=!1,s=ide,l=be(),u=be();n.forEach(function(T){T.groupId&&l.set(T.groupId,!0),T.childGroupId&&u.set(T.childGroupId,!0)});for(var c=0;c<a.length;c++){var f=a[c].groupId;if(u.get(f)){s=_O;break}var d=a[c].childGroupId;if(d&&l.get(d)){s=bO;break}}function h(T,C){return function(k){var L=k.data,A=k.dataIndex;return C?L.getId(A):T?s===_O?k.childGroupId:k.groupId:s===bO?k.childGroupId:k.groupId}}var v=cde(n,a),y={};if(!v)for(var c=0;c<a.length;c++){var m=a[c],x=m.data.getItemGraphicEl(m.dataIndex);x&&(y[x.id]=!0)}function b(T,C){var k=n[C],L=a[T],A=L.data.hostModel,D=k.data.getItemGraphicEl(k.dataIndex),P=L.data.getItemGraphicEl(L.dataIndex);if(D===P){P&&ude(P,L.dataIndex,A);return}D&&y[D.id]||P&&(Ou(P),D?(Ou(D),g_(D),o=!0,p_(tl(D),tl(P),L.divide,A,T,i)):v_(P,A,T))}new Xi(n,a,h(!0,v),h(!1,v),null,"multiple").update(b).updateManyToOne(function(T,C){var k=a[T],L=k.data,A=L.hostModel,D=L.getItemGraphicEl(k.dataIndex),P=ht(le(C,function(R){return n[R].data.getItemGraphicEl(n[R].dataIndex)}),function(R){return R&&R!==D&&!y[R.id]});D&&(Ou(D),P.length?(O(P,function(R){Ou(R),g_(R)}),o=!0,p_(tl(P),tl(D),k.divide,A,T,i)):v_(D,A,k.dataIndex))}).updateOneToMany(function(T,C){var k=n[C],L=k.data.getItemGraphicEl(k.dataIndex);if(!(L&&y[L.id])){var A=ht(le(T,function(P){return a[P].data.getItemGraphicEl(a[P].dataIndex)}),function(P){return P&&P!==L}),D=a[T[0]].data.hostModel;A.length&&(O(A,function(P){return Ou(P)}),L?(Ou(L),g_(L),o=!0,p_(tl(L),tl(A),k.divide,D,T[0],i)):O(A,function(P){return v_(P,D,T[0])}))}}).updateManyToMany(function(T,C){new Xi(C,T,function(k){return n[k].data.getId(n[k].dataIndex)},function(k){return a[k].data.getId(a[k].dataIndex)}).update(function(k,L){b(T[k],C[L])}).execute()}).execute(),o&&O(e,function(T){var C=T.data,k=C.hostModel,L=k&&t.getViewOfSeriesModel(k),A=Ic("update",k,0);L&&k.isAnimationEnabled()&&A&&A.duration>0&&L.group.traverse(function(D){D instanceof nt&&!D.animators.length&&D.animateFrom({style:{opacity:0}},A)})})}function CO(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function MO(r){return se(r)?r.sort().join(","):r}function Ro(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function fde(r,e){var t=be(),n=be(),a=be();return O(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=CO(i),c=MO(u);n.set(c,{dataGroupId:s,data:l}),se(u)&&O(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),O(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=CO(i),u=MO(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ro(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ro(s),data:s}]});else if(se(l)){var f=[];O(l,function(v){var y=n.get(v);y.data&&f.push({dataGroupId:y.dataGroupId,divide:Ro(y.data),data:y.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ro(s)}]})}else{var d=a.get(l);if(d){var h=t.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ro(d.data)}],newSeries:[]},t.set(d.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Ro(s)})}}}}),t}function kO(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function dde(r,e,t,n){var a=[],i=[];O(Tt(r.from),function(o){var s=kO(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ro(e.oldData[s]),groupIdDim:o.dimension})}),O(Tt(r.to),function(o){var s=kO(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ro(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&I6(a,i,n)}function hde(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){O(Tt(n.seriesTransition),function(a){O(Tt(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Rg]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=ode(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)O(Tt(i),function(h){dde(h,a,n,t)});else{var o=fde(a,n);O(o.keys(),function(h){var v=o.get(h);I6(v.oldSeries,v.newSeries,t)})}O(n.updatedSeries,function(h){h[Rg]&&(h[Rg]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var d=s[f].getData();d.count()<A6&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(d))}})}var pde=(function(){function r(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return r.prototype.setBreaks=function(e){this.breaks=e.breaks},r.prototype.update=function(e){gde(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},r.prototype.hasBreaks=function(){return!!this.breaks.length},r.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var a=this.breaks[n];if(a.vmin<e&&e<a.vmax){var i=t(e,a.vmax);return i}}return 0},r.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},r.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},r.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},r.prototype.elapse=function(e){for(var t=LO,n=AO,a=!0,i=0;i<this.breaks.length;i++){var o=this.breaks[i];if(e<=o.vmax){e>o.vmin?t+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-n,n=o.vmax,a=!1;break}t+=o.vmin-n+o.gapReal,n=o.vmax}return a&&(t+=e-n),t},r.prototype.unelapse=function(e){for(var t=LO,n=AO,a=!0,i=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=t+s.vmin-n,u=l+s.gapReal;if(e<=u){e>l?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=n+e-t,n=s.vmax,a=!1;break}t=u,n=s.vmax}return a&&(i=n+e-t),i},r})();function vde(){return new pde}var LO=0,AO=0;function gde(r,e){var t=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},a=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:a(),tpPrct:a()},E:{tpAbs:a(),tpPrct:a()}};O(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=L2(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,d=u.vmax-u.vmin;if(!(c&&f))if(c||f){var h=c?"S":"E";i[h][l.type].has=!0,i[h][l.type].span=d,i[h][l.type].inExtFrac=d/(s.vmax-s.vmin),i[h][l.type].val=l.val}else n[l.type].span+=d,n[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));O(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function yde(r,e,t,n,a,i){r!=="no"&&O(t,function(o){var s=L2(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=a*3/4;c>s.vmin-f&&c<s.vmax+f&&(r!=="preserve_extent_bound"||c!==i[0]&&c!==i[1])&&e.splice(l,1)}})}function mde(r,e,t,n){O(e,function(a){var i=L2(a,t);i&&(r.push({value:i.vmin,break:{type:"vmin",parsedBreak:i},time:n?n(i):void 0}),r.push({value:i.vmax,break:{type:"vmax",parsedBreak:i},time:n?n(i):void 0}))}),e.length&&r.sort(function(a,i){return a.value-i.value})}function L2(r,e){var t=Math.max(r.vmin,e[0]),n=Math.min(r.vmax,e[1]);return t<n||t===n&&t>e[0]&&t<e[1]?{vmin:t,vmax:n,breakOption:r.breakOption,gapParsed:r.gapParsed,gapReal:r.gapReal}:null}function Ow(r,e,t){var n=[];if(!r)return{breaks:n};function a(o,s){return o>=0&&o<1-1e-5}O(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:Le(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(pe(o.gap)){var u=Mn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;a(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&O(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var d=s.vmax;s.vmax=s.vmin,s.vmin=d}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return O(n,function(o,s){i>o.vmin&&(n[s]=null),i=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function A2(r,e){return Nw(e)===Nw(r)}function Nw(r){return r.start+"_\0_"+r.end}function xde(r,e,t){var n=[];O(r,function(i,o){var s=e(i);s&&s.type==="vmin"&&n.push([o])}),O(r,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=ns(n,function(u){return A2(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var a=[];return O(n,function(i){i.length===2&&a.push(t?i:[r[i[0]],r[i[1]]])}),a}function Sde(r,e,t,n){var a,i;if(r.break){var o=r.break.parsedBreak,s=ns(t,function(f){return A2(f.breakOption,r.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Xt(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};a={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:a}}function _de(r,e,t){var n={noNegative:!0},a=Ow(r,t,n),i=Ow(r,t,n),o=Math.log(e);return i.breaks=le(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:a,parsedLogged:i}}var bde={vmin:"start",vmax:"end"};function wde(r,e){return e&&(r=r||{},r.break={type:bde[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function Tde(){UU({createScaleBreakContext:vde,pruneTicksByBreak:yde,addBreaksToTicks:mde,parseAxisBreakOption:Ow,identifyAxisBreak:A2,serializeAxisBreakIdentifier:Nw,retrieveAxisBreakPairs:xde,getTicksLogTransformBreak:Sde,logarithmicParseBreaksFromOption:_de,makeAxisLabelFormatterParamBreak:wde})}var IO=et();function Cde(r,e){var t=ns(r,function(n){return er().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function Mde(r){O(r,function(e){return e.shouldRemove=!0})}function kde(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function Lde(r,e,t,n,a){var i=t.axis;if(i.scale.isBlank()||!er())return;var o=er().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(P){return P.break},!1);if(!o.length)return;var s=t.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),d=s.get("zigzagZ"),h=s.getModel("itemStyle"),v=h.getItemStyle(),y=v.stroke,m=v.lineWidth,x=v.lineDash,b=v.fill,T=new Ae({ignoreModelZ:!0}),C=i.isHorizontal(),k=IO(e).visualList||(IO(e).visualList=[]);Mde(k);for(var L=function(P){var R=o[P][0].break.parsedBreak,z=[];z[0]=i.toGlobalCoord(i.dataToCoord(R.vmin,!0)),z[1]=i.toGlobalCoord(i.dataToCoord(R.vmax,!0)),z[1]<z[0]&&z.reverse();var B=Cde(k,R);B.shouldRemove=!1;var N=new Ae;D(B.zigzagRandomList,N,z[0],z[1],C,R),f&&N.on("click",function(){var W={type:Nm,breaks:[{start:R.breakOption.start,end:R.breakOption.end}]};W[i.dim+"AxisIndex"]=t.componentIndex,a.dispatchAction(W)}),N.silent=!f,T.add(N)},A=0;A<o.length;A++)L(A);r.add(T),kde(k);function D(P,R,z,B,N,W){var $={stroke:y,lineWidth:m,lineDash:x,fill:"none"},H=N?0:1,U=1-H,G=n[Ge[U]]+n[tr[U]];function X(dt){var ke=[],$e=[];ke[H]=$e[H]=dt,ke[U]=n[Ge[U]],$e[U]=G;var tt={x1:ke[0],y1:ke[1],x2:$e[0],y2:$e[1]};return bm(tt,tt,{lineWidth:1}),ke[0]=tt.x1,ke[1]=tt.y1,ke[H]}z=X(z),B=X(B);for(var K=[],V=[],Y=!0,ne=n[Ge[U]],ue=0;;ue++){var fe=ne===n[Ge[U]],Ce=ne>=G;Ce&&(ne=G);var Be=[],ye=[];Be[H]=z,ye[H]=B,!fe&&!Ce&&(Be[H]+=Y?-l:l,ye[H]-=Y?l:-l),Be[U]=ne,ye[U]=ne,K.push(Be),V.push(ye);var ce=void 0;if(ue<P.length?ce=P[ue]:(ce=Math.random(),P.push(ce)),ne+=ce*(c-u)+u,Y=!Y,Ce)break}var we=er().serializeAxisBreakIdentifier(W.breakOption);if(R.add(new Cr({anid:"break_a_"+we,shape:{points:K},style:$,z:d})),W.gapReal!==0){R.add(new Cr({anid:"break_b_"+we,shape:{points:V},style:$,z:d}));var xe=V.slice();xe.reverse();var Ie=K.concat(xe);R.add(new zr({anid:"break_c_"+we,shape:{points:Ie},style:{fill:b,opacity:v.opacity},z:d}))}}}function Ade(r,e,t,n){var a=r.axis,i=t.transform;Rr(n.style);var o=a.getExtent();a.inverse&&(o=o.slice(),o.reverse());var s=er().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(m){return m.break},!1),l=le(s,function(m){var x=m[0].break.parsedBreak,b=[a.dataToCoord(x.vmin,!0),a.dataToCoord(x.vmax,!0)];return b[0]>b[1]&&b.reverse(),{coordPair:b,brkId:er().serializeAxisBreakIdentifier(x.breakOption)}});l.sort(function(m,x){return m.coordPair[0]-x.coordPair[0]});for(var u=o[0],c=null,f=0;f<l.length;f++){var d=l[f],h=Math.max(d.coordPair[0],o[0]),v=Math.min(d.coordPair[1],o[1]);u<=h&&y(u,h,c,d),u=v,c=d}u<=o[1]&&y(u,o[1],c,null);function y(m,x,b,T){function C(z,B){i&&(Gt(z,z,i),Gt(B,B,i))}function k(z,B){var N={x1:z[0],y1:z[1],x2:B[0],y2:B[1]};bm(N,N,n.style),z[0]=N.x1,z[1]=N.y1,B[0]=N.x2,B[1]=N.y2}var L=[m,0],A=[x,0],D=[m,5],P=[x,5];C(L,D),k(L,D),C(A,P),k(A,P),k(L,A);var R=new Zt(ae({shape:{x1:L[0],y1:L[1],x2:A[0],y2:A[1]}},n));e.add(R),R.anid="breakLine_"+(b?b.brkId:"\0")+"_\0_"+(T?T.brkId:"\0")}}function Ide(r,e,t){if(ns(t,function(b){return!b}))return;var n=new Ee;if(!zm(t[0],t[1],n,{direction:-(r?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var a=hr();Qi(a,a,-e);var i=le(t,function(b){return b.transform?Sa(hr(),a,b.transform):a});function o(b){var T=t[0].localRect,C=new Ee(T[tr[b]]*i[0][0],T[tr[b]]*i[0][1]);return Math.abs(C.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=le(t,function(b,T){var C=b.localRect.clone();return C.applyTransform(i[T]),C}),u=new Ee;u.copy(t[0].label).add(t[1].label).scale(.5),u.transform(a);var c=n.clone().transform(a),f=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),d=(f+c.x)/2-u.x,h=Math.min(d,d-c.x),v=Math.max(d,d-c.x),y=v<0?v:h>0?h:0;s=(d-y)/c.x}var m=new Ee,x=new Ee;Ee.scale(m,n,-s),Ee.scale(x,n,1-s),Bb(t[0],m),Bb(t[1],x)}function Dde(r,e){var t={breaks:[]};return O(e.breaks,function(n){if(n){var a=ns(r.get("breaks",!0),function(s){return er().identifyAxisBreak(s,n)});if(a){var i=e.type,o={isExpanded:!!a.isExpanded};a.isExpanded=i===Nm?!0:i===q3?!1:i===Q3?!a.isExpanded:a.isExpanded,t.breaks.push({start:a.start,end:a.end,isExpanded:!!a.isExpanded,old:o})}}}),t}function Pde(){kJ({adjustBreakLabelPair:Ide,buildAxisBreakLine:Ade,rectCoordBuildBreakAxis:Lde,updateModelAxisBreak:Dde})}function Rde(r){RJ(r),Tde(),Pde()}function Ede(){eee(zde)}function zde(r,e){O(r,function(t){if(!t.model.get(["axisLabel","inside"])){var n=Ode(t);if(n){var a=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[a]-=n[a]+i,t.position==="top"?e.y+=n.height+i:t.position==="left"&&(e.x+=n.width+i)}}})}function Ode(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var n,a,i=t.getExtent();t instanceof pc?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Fc(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c<a;c+=u){var f=n?n[c]:{value:i[0]+c},d=s(f,c),h=o.getTextRect(d),v=y(h,o.get("rotate")||0);l?l.union(v):l=v}return l;function y(m,x){var b=x*Math.PI/180,T=m.width,C=m.height,k=T*Math.abs(Math.cos(b))+Math.abs(C*Math.sin(b)),L=T*Math.abs(Math.sin(b))+Math.abs(C*Math.cos(b)),A=new ze(m.x,m.y,k,L);return A}}Ze([CQ]);Ze([SQ]);Ze([$Q,oJ,gJ,xee,Iee,xte,Ute,Are,Kre,nne,une,yne,cae,Eae,$ae,sie,fie,_ie,Lie,jie,$ie,toe,joe]);Ze(ase);Ze(Ase);Ze(T4);Ze(Vse);Ze(cF);Ze($se);Ze(fle);Ze(Sle);Ze(oue);Ze(Cue);Ze(Uh);Ze(Vue);Ze(Hue);Ze(ece);Ze(lce);Ze(pce);Ze(Sce);Ze(Ice);Ze(Zce);Ze(g6);Ze(y6);Ze(vfe);Ze(b6);Ze(w6);Ze(xfe);Ze(Tfe);Ze(Nfe);Ze(Ffe);Ze(hde);Ze(Fq);Ze(Rde);Ze(Ede);Ze(See);const Nde=Object.freeze(Object.defineProperty({__proto__:null,Axis:aa,ChartView:mt,ComponentModel:Je,ComponentView:Ct,List:Ur,Model:rt,PRIORITY:mj,SeriesModel:St,color:B$,connect:WZ,dataTool:qZ,dependencies:CZ,disConnect:HZ,disconnect:Mj,dispose:$Z,env:it,extendChartView:Cq,extendComponentModel:bq,extendComponentView:wq,extendSeriesModel:Tq,format:sq,getCoordinateSystemDimensions:YZ,getInstanceByDom:iC,getInstanceById:UZ,getMap:KZ,graphic:oq,helper:QK,init:GZ,innerDrawElementOnCanvas:tC,matrix:h$,number:aq,parseGeoJSON:Ob,parseGeoJson:Ob,registerAction:La,registerCoordinateSystem:Aj,registerCustomSeries:XZ,registerLayout:Ij,registerLoading:cC,registerLocale:PT,registerMap:Dj,registerPostInit:kj,registerPostUpdate:Lj,registerPreprocessor:sC,registerProcessor:lC,registerTheme:oC,registerTransform:Pj,registerUpdateLifecycle:Em,registerVisual:ss,setCanvasCreator:ZZ,setPlatformAPI:hN,throttle:Pm,time:iq,use:Ze,util:lq,vector:QH,version:TZ,zrUtil:$H,zrender:S7},Symbol.toStringTag,{value:"Module"}));var Mi={},ki={},y_={},DO;function Bde(){return DO||(DO=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1;r.default=function(){return"".concat(e++)}})(y_)),y_}var ud={},cd={},m_={},PO;function D6(){return PO||(PO=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var i=this,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];clearTimeout(a),a=setTimeout(function(){t.apply(i,s)},n)}}})(m_)),m_}var Li={},RO;function I2(){return RO||(RO=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.SizeSensorId=Li.SensorTabIndex=Li.SensorClassName=void 0,Li.SizeSensorId="size-sensor-id",Li.SensorClassName="size-sensor-object",Li.SensorTabIndex="-1"),Li}var EO;function jde(){if(EO)return cd;EO=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.createSensor=void 0;var r=t(D6()),e=I2();function t(n){return n&&n.__esModule?n:{default:n}}return cd.createSensor=function(a,i){var o=void 0,s=[],l=function(){getComputedStyle(a).position==="static"&&(a.style.position="relative");var v=document.createElement("object");return v.onload=function(){v.contentDocument.defaultView.addEventListener("resize",u),u()},v.style.display="block",v.style.position="absolute",v.style.top="0",v.style.left="0",v.style.height="100%",v.style.width="100%",v.style.overflow="hidden",v.style.pointerEvents="none",v.style.zIndex="-1",v.style.opacity="0",v.setAttribute("class",e.SensorClassName),v.setAttribute("tabindex",e.SensorTabIndex),v.type="text/html",a.appendChild(v),v.data="about:blank",v},u=(0,r.default)(function(){s.forEach(function(h){h(a)})}),c=function(v){o||(o=l()),s.indexOf(v)===-1&&s.push(v)},f=function(){o&&o.parentNode&&(o.contentDocument&&o.contentDocument.defaultView.removeEventListener("resize",u),o.parentNode.removeChild(o),a.removeAttribute(e.SizeSensorId),o=void 0,s=[],i&&i())},d=function(v){var y=s.indexOf(v);y!==-1&&s.splice(y,1),s.length===0&&o&&f()};return{element:a,bind:c,destroy:f,unbind:d}},cd}var fd={},zO;function Fde(){if(zO)return fd;zO=1,Object.defineProperty(fd,"__esModule",{value:!0}),fd.createSensor=void 0;var r=I2(),e=t(D6());function t(n){return n&&n.__esModule?n:{default:n}}return fd.createSensor=function(a,i){var o=void 0,s=[],l=(0,e.default)(function(){s.forEach(function(h){h(a)})}),u=function(){var v=new ResizeObserver(l);return v.observe(a),l(),v},c=function(v){o||(o=u()),s.indexOf(v)===-1&&s.push(v)},f=function(){o&&o.disconnect(),s=[],o=void 0,a.removeAttribute(r.SizeSensorId),i&&i()},d=function(v){var y=s.indexOf(v);y!==-1&&s.splice(y,1),s.length===0&&o&&f()};return{element:a,bind:c,destroy:f,unbind:d}},fd}var OO;function Vde(){if(OO)return ud;OO=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.createSensor=void 0;var r=jde(),e=Fde();return ud.createSensor=typeof ResizeObserver<"u"?e.createSensor:r.createSensor,ud}var NO;function Gde(){if(NO)return ki;NO=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.removeSensor=ki.getSensor=ki.Sensors=void 0;var r=n(Bde()),e=Vde(),t=I2();function n(o){return o&&o.__esModule?o:{default:o}}var a=ki.Sensors={};function i(o){o&&a[o]&&delete a[o]}return ki.getSensor=function(s){var l=s.getAttribute(t.SizeSensorId);if(l&&a[l])return a[l];var u=(0,r.default)();s.setAttribute(t.SizeSensorId,u);var c=(0,e.createSensor)(s,function(){return i(u)});return a[u]=c,c},ki.removeSensor=function(s){var l=s.element.getAttribute(t.SizeSensorId);s.destroy(),i(l)},ki}var BO;function Wde(){if(BO)return Mi;BO=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.ver=Mi.clear=Mi.bind=void 0;var r=Gde();return Mi.bind=function(t,n){var a=(0,r.getSensor)(t);return a.bind(n),function(){a.unbind(n)}},Mi.clear=function(t){var n=(0,r.getSensor)(t);(0,r.removeSensor)(n)},Mi.ver="1.0.3",Mi}var jO=Wde();function FO(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function x_(r){return typeof r=="function"}function Hde(r){return typeof r=="string"}var S_,VO;function $de(){return VO||(VO=1,S_=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}),S_}var Ude=$de();const Nu=Vw(Ude);var Yde=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(x_(n)&&!n(t,this.props))){if(!Nu(t.theme,this.props.theme)||!Nu(t.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var a=this.getEchartsInstance();Nu(t.onEvents,this.props.onEvents)||(this.unbindEvents(a),this.bindEvents(a,this.props.onEvents));var i=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];Nu(FO(this.props,i),FO(t,i))||this.updateEChartsOption(),(!Nu(t.style,this.props.style)||!Nu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.initEchartsInstance=function(){return eA(this,void 0,void 0,function(){var t=this;return tA(this,function(n){return[2,new Promise(function(a){t.echarts.init(t.ele,t.props.theme,t.props.opts);var i=t.getEchartsInstance();i.on("finished",function(){var o=t.ele.clientWidth,s=t.ele.clientHeight;t.echarts.dispose(t.ele);var l=kd({width:o,height:s},t.props.opts);a(t.echarts.init(t.ele,t.props.theme,l))})})]})})},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},e.prototype.dispose=function(){if(this.ele){try{jO.clear(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){return eA(this,void 0,void 0,function(){var t,n,a,i,o,s,l=this;return tA(this,function(u){switch(u.label){case 0:return t=this.props,n=t.onEvents,a=t.onChartReady,i=t.autoResize,o=i===void 0?!0:i,[4,this.initEchartsInstance()];case 1:return u.sent(),s=this.updateEChartsOption(),this.bindEvents(s,n||{}),x_(a)&&a(s),this.ele&&o&&jO.bind(this.ele,function(){l.resize()}),[2]}})})},e.prototype.bindEvents=function(t,n){var a=this,i=function(s,l){if(Hde(s)&&x_(l)){var u=function(c){l(c,t)};t.on(s,u),a.eventHandlerRefs[s]=u}};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&i(o,n[o])},e.prototype.unbindEvents=function(t){for(var n=0,a=Object.entries(this.eventHandlerRefs);n<a.length;n++){var i=a[n],o=i[0],s=i[1];t.off(o,s)}this.eventHandlerRefs={}},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.replaceMerge,s=o===void 0?null:o,l=t.lazyUpdate,u=l===void 0?!1:l,c=t.showLoading,f=t.loadingOption,d=f===void 0?null:f,h=this.getEchartsInstance();return h.setOption(n,{notMerge:i,replaceMerge:s,lazyUpdate:u}),c?h.showLoading(d):h.hideLoading(),h},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize({width:"auto",height:"auto"})}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i;n.echarts,n.option,n.theme,n.notMerge,n.replaceMerge,n.lazyUpdate,n.showLoading,n.loadingOption,n.opts,n.onChartReady,n.onEvents,n.shouldSetOption,n.autoResize;var s=kH(n,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),l=kd({height:300},a);return Cd.createElement("div",kd({ref:function(u){t.ele=u},style:l,className:"echarts-for-react ".concat(o)},s))},e})(Z.PureComponent),D2=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=Nde,n}return e})(Yde);function P2({title:r,children:e,height:t="180px"}){return w.jsxs("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,padding:"14px",boxShadow:`0 1px 3px ${_.shadowSm}`},children:[w.jsx("h4",{style:{fontSize:"10px",fontWeight:"600",color:_.textTertiary,fontFamily:F.body,margin:"0 0 10px 0",textTransform:"uppercase",letterSpacing:"0.05em"},children:r}),w.jsx("div",{style:{height:t},children:e})]})}const P6={critical:_.error,high:"#ea580c",medium:"#b45309",low:"#0d9488",info:_.textTertiary},Bw={"owasp-mcp":"#0d9488","agentic-security":"#374151",yara:"#57534e","general-security":_.accentGreen},GO={"owasp-mcp":"OWASP MCP","agentic-security":"Agentic","general-security":"General"},Jy={MCP01:"owasp-mcp",MCP02:"owasp-mcp",MCP03:"owasp-mcp",MCP04:"owasp-mcp",MCP05:"owasp-mcp",MCP06:"owasp-mcp",MCP07:"owasp-mcp",MCP08:"owasp-mcp",MCP09:"owasp-mcp",MCP10:"owasp-mcp",ASI01:"agentic-security",ASI02:"agentic-security",ASI03:"agentic-security",ASI04:"agentic-security",ASI05:"agentic-security",ASI06:"agentic-security",ASI07:"agentic-security",ASI08:"agentic-security",ASI09:"agentic-security",ASI10:"agentic-security"};function Xde(r){const e=r.owasp_id?.toUpperCase();return e&&Jy[e]?Jy[e]:"general-security"}function Zde({findings:r}){const e=[],t=[],n=new Set,a={},i={};for(const s of r){const l=Xde(s),u=s.owasp_id||"OTHER",c=s.severity||"info",f=`${l}|${u}`;a[f]=(a[f]||0)+1;const d=`${u}|${c}`;if(i[d]=(i[d]||0)+1,n.has(l)||(n.add(l),e.push({name:GO[l]||l,itemStyle:{color:Bw[l]}})),!n.has(u)){n.add(u);const h=Jy[u]||"general-security";e.push({name:u,itemStyle:{color:Bw[h]}})}n.has(c)||(n.add(c),e.push({name:c.charAt(0).toUpperCase()+c.slice(1),itemStyle:{color:P6[c]}}))}for(const[s,l]of Object.entries(a)){const[u,c]=s.split("|");t.push({source:GO[u]||u,target:c,value:l})}for(const[s,l]of Object.entries(i)){const[u,c]=s.split("|");t.push({source:u,target:c.charAt(0).toUpperCase()+c.slice(1),value:l})}const o={tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:_.bgCard,borderColor:_.borderLight,textStyle:{color:_.textPrimary,fontFamily:F.body,fontSize:11}},series:[{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},nodeAlign:"left",data:e,links:t,lineStyle:{color:"gradient",curveness:.5,opacity:.25},label:{color:_.textSecondary,fontFamily:F.body,fontSize:10},itemStyle:{borderWidth:0}}]};return w.jsx(P2,{title:"Findings Flow",height:"200px",children:w.jsx(D2,{option:o,style:{height:"100%"}})})}function Kde({findings:r}){const e=r.reduce((o,s)=>{const l=s.severity||"info";return o[l]=(o[l]||0)+1,o},{}),t=["critical","high","medium","low","info"],n=["Critical","High","Medium","Low","Info"],a=t.map(o=>e[o]||0),i={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:_.bgCard,borderColor:_.borderLight,textStyle:{color:_.textPrimary,fontFamily:F.body,fontSize:11}},grid:{left:"3%",right:"4%",bottom:"3%",top:"8%",containLabel:!0},xAxis:{type:"category",data:n,axisLabel:{color:_.textSecondary,fontFamily:F.body,fontSize:10},axisLine:{lineStyle:{color:_.borderLight}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:_.textTertiary,fontFamily:F.body,fontSize:10},axisLine:{show:!1},splitLine:{lineStyle:{color:_.borderLight,type:"dashed"}}},series:[{type:"bar",data:a.map((o,s)=>({value:o,itemStyle:{color:P6[t[s]]}})),barWidth:"50%",itemStyle:{borderRadius:[3,3,0,0]},label:{show:!0,position:"top",color:_.textTertiary,fontFamily:F.body,fontSize:10,formatter:o=>o.value>0?o.value:""}}]};return w.jsx(P2,{title:"Severity Distribution",children:w.jsx(D2,{option:i,style:{height:"100%"}})})}function qde({findings:r}){const e=r.reduce((l,u)=>{const c=u.owasp_id||"OTHER";return l[c]=(l[c]||0)+1,l},{}),t=Object.entries(e).sort((l,u)=>u[1]-l[1]).slice(0,8),n=t.map(([l])=>l).reverse(),a=t.map(([,l])=>l).reverse(),i=n.map(l=>{const u=Jy[l]||"general-security";return Bw[u]}),o={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:_.bgCard,borderColor:_.borderLight,textStyle:{color:_.textPrimary,fontFamily:F.body,fontSize:11}},grid:{left:"3%",right:"12%",bottom:"3%",top:"3%",containLabel:!0},xAxis:{type:"value",axisLabel:{color:_.textTertiary,fontFamily:F.body,fontSize:10},axisLine:{show:!1},splitLine:{lineStyle:{color:_.borderLight,type:"dashed"}}},yAxis:{type:"category",data:n,axisLabel:{color:_.textSecondary,fontFamily:F.mono,fontSize:10},axisLine:{lineStyle:{color:_.borderLight}},axisTick:{show:!1}},series:[{type:"bar",data:a.map((l,u)=>({value:l,itemStyle:{color:i[u]}})),barWidth:"60%",itemStyle:{borderRadius:[0,3,3,0]},label:{show:!0,position:"right",color:_.textTertiary,fontFamily:F.body,fontSize:10}}]},s=Math.max(160,t.length*22);return w.jsx(P2,{title:"Top Vulnerability Types",height:`${s}px`,children:w.jsx(D2,{option:o,style:{height:"100%"}})})}function Qde({findings:r}){return!r||r.length===0?null:w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px",marginBottom:"16px"},children:[w.jsx(Kde,{findings:r}),w.jsx(qde,{findings:r}),w.jsx("div",{style:{gridColumn:"span 2"},children:w.jsx(Zde,{findings:r})})]})}const Jde={critical:{color:_.error,label:"Critical"},high:{color:"#ea580c",label:"High"},medium:{color:"#b45309",label:"Medium"},low:{color:"#0d9488",label:"Low"}};function ehe({count:r,label:e,color:t}){const n=r>0;return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 10px",background:n?`${t}10`:_.bgTertiary,border:`1px solid ${n?`${t}30`:_.borderLight}`,borderRadius:"6px"},children:[w.jsx("span",{style:{fontSize:"14px",fontWeight:"600",color:n?t:_.textTertiary,fontFamily:F.body},children:r||0}),w.jsx("span",{style:{fontSize:"11px",color:n?t:_.textTertiary,fontFamily:F.body},children:e})]})}function the({summary:r}){if(!r)return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",background:_.bgTertiary,border:`1px solid ${_.borderLight}`,borderRadius:"6px"},children:[w.jsx(nm,{size:14,color:_.textTertiary,stroke:1.5}),w.jsx("span",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:"Run a scan to analyze MCP traffic"})]});const{total:e,bySeverity:t}=r;return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 12px",background:e>0?`${_.error}10`:`${_.accentGreen}10`,border:`1px solid ${e>0?`${_.error}30`:`${_.accentGreen}30`}`,borderRadius:"6px"},children:[w.jsx("span",{style:{fontSize:"16px",fontWeight:"700",color:e>0?_.error:_.accentGreen,fontFamily:F.body},children:e}),w.jsx("span",{style:{fontSize:"12px",color:e>0?_.error:_.accentGreen,fontFamily:F.body},children:e===1?"Finding":"Findings"})]}),Object.entries(Jde).map(([n,a])=>w.jsx(ehe,{count:t?.[n]||0,label:a.label,color:a.color},n))]})}const __={critical:_.error,high:"#ea580c",medium:"#b45309",low:"#0d9488",info:_.textTertiary},Th={tool:{icon:am,color:"#0d9488",label:"Tools"},prompt:{icon:rs,color:"#374151",label:"Prompts"},resource:{icon:Zu,color:_.accentGreen,label:"Resources"},server:{icon:Zu,color:"#57534e",label:"Servers"},packet:{icon:Zu,color:_.accentPink,label:"Network Traffic"}};function rhe({targetName:r,targetType:e,findings:t,selectedFinding:n,onSelectFinding:a}){const[i,o]=Z.useState(!0),s=Th[e]||Th.tool,l=s.icon,u=t.reduce((d,h)=>(d[h.severity||"info"]=(d[h.severity||"info"]||0)+1,d),{}),c=["critical","high","medium","low","info"],f=c.find(d=>u[d]>0)||"info";return w.jsxs("div",{style:{marginBottom:"6px",background:_.bgCard,borderRadius:"6px",border:`1px solid ${_.borderLight}`,overflow:"hidden"},children:[w.jsxs("button",{type:"button",onClick:()=>o(!i),"aria-expanded":i,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",width:"100%",background:"transparent",border:"none",borderLeft:`3px solid ${__[f]}`,cursor:"pointer",textAlign:"left",transition:"background 0.15s"},onMouseEnter:d=>{d.currentTarget.style.background=_.bgTertiary},onMouseLeave:d=>{d.currentTarget.style.background="transparent"},children:[i?w.jsx(ui,{size:12,color:_.textTertiary}):w.jsx(Dl,{size:12,color:_.textTertiary}),w.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",borderRadius:"4px",background:`${s.color}15`},children:w.jsx(l,{size:10,color:s.color,stroke:1.5})}),w.jsx("span",{style:{flex:1,fontSize:"12px",fontWeight:"500",color:_.textPrimary,fontFamily:F.mono},children:r}),w.jsx("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:c.map(d=>u[d]>0&&w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",fontSize:"10px",color:__[d],fontWeight:"500"},children:[w.jsx("span",{style:{width:"5px",height:"5px",borderRadius:"50%",background:__[d]}}),u[d]]},d))}),w.jsx("span",{style:{padding:"2px 6px",background:_.bgTertiary,borderRadius:"8px",fontSize:"10px",color:_.textSecondary,fontWeight:"500"},children:t.length})]}),i&&w.jsx("div",{style:{padding:"10px",paddingLeft:"36px",background:_.bgTertiary,borderTop:`1px solid ${_.borderLight}`},children:t.map(d=>w.jsx(Yw,{finding:d,isExpanded:n?.id===d.id,onToggle:()=>a(n?.id===d.id?null:d)},d.id))})]})}function nhe({targetType:r,targets:e,selectedFinding:t,onSelectFinding:n}){const[a,i]=Z.useState(!0),o=Th[r]||Th.tool,s=o.icon,l=Object.values(e).reduce((c,f)=>c+f.length,0),u=Object.keys(e).length;return w.jsxs("div",{style:{marginBottom:"16px"},children:[w.jsxs("button",{type:"button",onClick:()=>i(!a),"aria-expanded":a,style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px 14px",width:"100%",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",cursor:"pointer",textAlign:"left",marginBottom:a?"10px":0,transition:"background 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=_.bgTertiary},onMouseLeave:c=>{c.currentTarget.style.background=_.bgCard},children:[w.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"6px",background:`${o.color}15`,border:`1px solid ${o.color}30`},children:w.jsx(s,{size:16,color:o.color,stroke:1.5})}),w.jsxs("div",{style:{flex:1},children:[w.jsx("div",{style:{fontSize:"13px",fontWeight:"500",color:_.textPrimary,fontFamily:F.body},children:o.label}),w.jsxs("div",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body},children:[u," ",u===1?"target":"targets"," with issues"]})]}),w.jsxs("div",{style:{textAlign:"right",marginRight:"6px"},children:[w.jsx("div",{style:{fontSize:"16px",fontWeight:"600",color:o.color,lineHeight:1},children:l}),w.jsx("div",{style:{fontSize:"10px",color:_.textTertiary},children:l===1?"finding":"findings"})]}),a?w.jsx(ui,{size:16,color:_.textTertiary}):w.jsx(Dl,{size:16,color:_.textTertiary})]}),a&&w.jsx("div",{style:{marginLeft:"10px"},children:Object.entries(e).sort((c,f)=>f[1].length-c[1].length).map(([c,f])=>w.jsx(rhe,{targetName:c,targetType:r,findings:f,selectedFinding:t,onSelectFinding:n},c))})]})}function ahe({findings:r,selectedFinding:e,onSelectFinding:t}){const n={};for(const l of r){const u=l.target_type||"tool",c=l.target_name||"Unknown";n[u]||(n[u]={}),n[u][c]||(n[u][c]=[]),n[u][c].push(l)}const i=["tool","prompt","resource","server","packet"].filter(l=>n[l]&&Object.keys(n[l]).length>0),o=Z.useCallback(l=>{const u=document.getElementById(`target-type-${l}`);u&&u.scrollIntoView({behavior:"smooth",block:"start"})},[]),s=l=>n[l]?Object.values(n[l]).reduce((u,c)=>u+c.length,0):0;return i.length===0?w.jsx("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,padding:"40px",textAlign:"center"},children:w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body,margin:0},children:"No findings yet."})}):w.jsxs("div",{children:[w.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"16px",flexWrap:"wrap"},children:i.map(l=>{const u=Th[l],c=u.icon;return w.jsxs("button",{type:"button",onClick:()=>o(l),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:`${u.color}10`,border:`1px solid ${u.color}30`,borderRadius:"6px",cursor:"pointer",fontFamily:F.body,fontSize:"12px",color:u.color,fontWeight:500,transition:"all 0.15s"},onMouseEnter:f=>{f.currentTarget.style.background=`${u.color}20`,f.currentTarget.style.borderColor=`${u.color}50`},onMouseLeave:f=>{f.currentTarget.style.background=`${u.color}10`,f.currentTarget.style.borderColor=`${u.color}30`},children:[w.jsx(c,{size:14,stroke:1.5}),u.label,w.jsx("span",{style:{background:u.color,color:"#fff",borderRadius:"10px",padding:"1px 6px",fontSize:"10px",fontWeight:600},children:s(l)})]},l)})}),i.map(l=>w.jsx("div",{id:`target-type-${l}`,children:w.jsx(nhe,{targetType:l,targets:n[l],selectedFinding:e,onSelectFinding:t})},l))]})}const ihe=[{id:"dashboard",label:"Dashboard",icon:IG},{id:"severity",label:"By Severity",icon:sN},{id:"category",label:"By Category",icon:LG},{id:"target",label:"By Target",icon:am}];function ohe({onNavigateToSmartScan:r}){return w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"10px 16px",marginBottom:"16px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[w.jsx(rs,{size:16,stroke:1.5,style:{color:_.textMuted,flexShrink:0}}),w.jsxs("span",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:[w.jsx("strong",{style:{color:_.textPrimary},children:"Static Analysis"})," — Rule-based pattern matching on MCP configurations. For deeper semantic analysis, try AI-powered scanning."]})]}),w.jsxs("button",{type:"button",onClick:r,style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:_.accentGreen,color:"#fff",border:"none",borderRadius:"4px",fontSize:"11px",fontWeight:500,fontFamily:F.body,cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:[w.jsx(mW,{size:13,stroke:2}),"Try AI-Powered Smart Scan",w.jsx(Vg,{size:12,stroke:2})]})]})}function she({viewMode:r,onViewModeChange:e}){return w.jsx("div",{style:{display:"inline-flex",alignItems:"center",background:_.bgTertiary,borderRadius:"6px",border:`1px solid ${_.borderLight}`,padding:"2px"},children:ihe.map(t=>{const n=t.icon,a=r===t.id;return w.jsxs("button",{onClick:()=>e(t.id),type:"button",style:{display:"flex",alignItems:"center",gap:"5px",padding:"5px 10px",background:a?_.bgCard:"transparent",color:a?_.textPrimary:_.textSecondary,border:"none",borderRadius:"4px",fontSize:"11px",fontWeight:a?"500":"400",fontFamily:F.body,cursor:"pointer",transition:"all 0.15s",boxShadow:a?`0 1px 2px ${_.shadowSm}`:"none"},onMouseEnter:i=>{a||(i.currentTarget.style.color=_.textPrimary)},onMouseLeave:i=>{a||(i.currentTarget.style.color=_.textSecondary)},children:[w.jsx(n,{size:12,stroke:1.5}),t.label]},t.id)})})}function lhe({error:r,scanning:e,findings:t,summary:n,selectedFinding:a,onSelectFinding:i,loadSummary:o,onNavigateToSmartScan:s,onNavigateToSetup:l,scanHistory:u,selectedScanId:c,onSelectScan:f,showHistory:d,serversAvailable:h,scanComplete:v}){const[y,m]=Z.useState("dashboard"),x=t&&t.length>0,b=!r&&!e&&!x&&!d;return w.jsxs("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"20px",background:_.bgPrimary},children:[w.jsx(mH,{error:r,onNavigateToSetup:l}),w.jsx(MH,{scanning:e}),!r&&!e&&w.jsx(ohe,{onNavigateToSmartScan:s}),d&&!e&&w.jsx(bH,{history:u,onSelectScan:f,selectedScanId:c,expanded:!0}),b&&w.jsx(TH,{onNavigateToSetup:l,serversAvailable:h,scanComplete:v}),x&&!e&&!r&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px",marginBottom:"16px",flexWrap:"wrap"},children:[w.jsx(the,{summary:n,onRefresh:o}),w.jsx(she,{viewMode:y,onViewModeChange:m})]}),y==="dashboard"&&w.jsxs(w.Fragment,{children:[w.jsx(Qde,{findings:t}),w.jsx(QL,{findings:t,selectedFinding:a,onSelectFinding:i,showFilter:!1})]}),y==="severity"&&w.jsx(QL,{findings:t,selectedFinding:a,onSelectFinding:i}),y==="category"&&w.jsx(yH,{findings:t,selectedFinding:a,onSelectFinding:i}),y==="target"&&w.jsx(ahe,{findings:t,selectedFinding:a,onSelectFinding:i})]})]})}function uhe({onScan:r,scanning:e,onClear:t,clearing:n,onToggleHistory:a,showHistory:i,historyCount:o,serversAvailable:s}){const l=e||!s;return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsxs("button",{type:"button",onClick:r,disabled:l,title:s?"":"No MCP servers running. Go to Setup to start servers.",style:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",background:l?_.buttonSecondary:_.buttonPrimary,color:l?_.textTertiary:_.textInverse,border:"none",borderRadius:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:"600",cursor:l?"not-allowed":"pointer",opacity:!s&&!e?.6:1,transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:u=>{l||(u.currentTarget.style.background=_.buttonPrimaryHover,u.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:u=>{l||(u.currentTarget.style.background=_.buttonPrimary,u.currentTarget.style.transform="translateY(0)")},children:[e?w.jsx(C_,{size:12,className:"spin"}):w.jsx($w,{size:12}),e?"Analysing...":"Analyse"]}),w.jsxs("button",{type:"button",onClick:a,style:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",background:i?_.accentGreen:_.buttonSecondary,color:i?"#fff":_.textSecondary,border:`1px solid ${i?_.accentGreen:_.borderLight}`,borderRadius:"8px",fontSize:"12px",fontFamily:F.body,fontWeight:"500",cursor:"pointer",transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:u=>{i||(u.currentTarget.style.background=_.buttonSecondaryHover,u.currentTarget.style.color=_.textPrimary)},onMouseLeave:u=>{i||(u.currentTarget.style.background=_.buttonSecondary,u.currentTarget.style.color=_.textSecondary)},children:[w.jsx(UG,{size:14,stroke:1.5}),"History",o>0&&w.jsx("span",{style:{background:i?"rgba(255,255,255,0.2)":_.bgTertiary,color:i?"#fff":_.textMuted,padding:"1px 6px",borderRadius:"10px",fontSize:"10px",fontWeight:600,fontFamily:F.mono},children:o})]}),w.jsxs("button",{type:"button",onClick:t,disabled:n,style:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",background:_.buttonSecondary,color:n?_.textTertiary:_.textSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",fontSize:"12px",fontFamily:F.body,fontWeight:"500",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:u=>{n||(u.currentTarget.style.background=_.buttonSecondaryHover,u.currentTarget.style.color=_.textPrimary)},onMouseLeave:u=>{n||(u.currentTarget.style.background=_.buttonSecondary,u.currentTarget.style.color=_.textSecondary)},children:[n?w.jsx(C_,{size:14,className:"spin"}):w.jsx(wc,{size:14,stroke:1.5}),n?"Clearing...":"Clear"]})]})}function che(){return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginRight:"auto"},children:[w.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"10px",background:`${_.error}15`,border:`1px solid ${_.error}30`,flexShrink:0},children:w.jsx(nm,{size:20,color:_.error,stroke:1.5})}),w.jsxs("div",{children:[w.jsx("h1",{style:{fontSize:"18px",fontWeight:"700",color:_.textPrimary,fontFamily:F.body,margin:0,letterSpacing:"-0.2px"},children:"Local Static Analysis"}),w.jsx("p",{style:{fontSize:"11px",color:_.textSecondary,fontFamily:F.body,margin:0,lineHeight:"1.3"},children:"Offline YARA-based scanning of captured MCP traffic"})]})]})}function fhe({activeTab:r,setActiveTab:e}){return w.jsxs("div",{style:{display:"flex",gap:"8px",border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"4px",background:_.bgSecondary},children:[w.jsx("button",{type:"button",onClick:()=>e("scanner"),style:{padding:"6px 14px",background:r==="scanner"?_.bgCard:"transparent",border:"none",color:r==="scanner"?_.textPrimary:_.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:r==="scanner"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"OWASP Local Static Analysis"}),w.jsx("button",{type:"button",onClick:()=>e("rules"),style:{padding:"6px 14px",background:r==="rules"?_.bgCard:"transparent",border:"none",color:r==="rules"?_.textPrimary:_.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:r==="rules"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"YARA Detection"})]})}async function dhe(){return(await fetch("/api/security/rules")).json()}async function hhe(r){const e=new URLSearchParams;return r.severity&&e.append("severity",r.severity),r.owasp_id&&e.append("owasp_id",r.owasp_id),r.server_name&&e.append("server_name",r.server_name),r.finding_type&&e.append("finding_type",r.finding_type),e.append("limit","100"),(await fetch(`/api/security/findings?${e.toString()}`)).json()}async function phe(){return(await fetch("/api/security/summary")).json()}async function vhe(r=20){return(await fetch(`/api/security/history?limit=${r}`)).json()}async function ghe(){return(await fetch("/api/security/analyse",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async function yhe(){return(await fetch("/api/server/connected")).json()}async function mhe(){return(await fetch("/api/security/findings/clear",{method:"POST"})).json()}async function xhe(){return(await fetch("/api/security/community-rules")).json()}async function She(){return(await fetch("/api/security/sources")).json()}async function _he(){return(await fetch("/api/security/engine/status")).json()}async function bhe(){return(await fetch("/api/security/sources/initialize",{method:"POST"})).json()}async function whe(){return(await fetch("/api/security/sources/sync",{method:"POST"})).json()}async function The(r){return(await fetch(`/api/security/sources/${encodeURIComponent(r)}/sync`,{method:"POST"})).json()}async function Che(r,e){return(await fetch(`/api/security/community-rules/${encodeURIComponent(r)}/enabled`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})).json()}async function Mhe(r){return(await fetch("/api/security/community-rules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).json()}async function khe(r){return(await fetch(`/api/security/community-rules/${encodeURIComponent(r)}`,{method:"DELETE"})).json()}async function Lhe(){return(await fetch("/api/security/yara/reset-defaults",{method:"POST"})).json()}function Ahe(){const[r,e]=Z.useState([]),[t,n]=Z.useState([]),[a,i]=Z.useState(null),[o,s]=Z.useState(!1),[l,u]=Z.useState(null),c=Z.useCallback(async()=>{try{const C=await xhe();C.success&&(e(C.rules),i(C.summary))}catch(C){console.error("Failed to load community rules:",C)}},[]),f=Z.useCallback(async()=>{try{const C=await She();C.success&&n(C.sources)}catch(C){console.error("Failed to load rule sources:",C)}},[]),d=Z.useCallback(async()=>{try{const C=await _he();C.success&&u(C)}catch(C){console.error("Failed to load engine status:",C)}},[]),h=Z.useCallback(async()=>{try{const C=await bhe();return C.success&&await f(),C}catch(C){return console.error("Failed to initialize sources:",C),{success:!1,error:C.message}}},[f]),v=Z.useCallback(async()=>{s(!0);try{const C=await whe();return C.success&&(await c(),await f()),C}catch(C){return console.error("Failed to sync sources:",C),{success:!1,error:C.message}}finally{s(!1)}},[c,f]),y=Z.useCallback(async C=>{s(!0);try{const k=await The(C);return k.success&&(await c(),await f()),k}catch(k){return console.error("Failed to sync source:",k),{success:!1,error:k.message}}finally{s(!1)}},[c,f]),m=Z.useCallback(async(C,k)=>{try{const L=await Che(C,k);return L.success&&await c(),L}catch(L){return console.error("Failed to set rule enabled:",L),{success:!1,error:L.message}}},[c]),x=Z.useCallback(async C=>{try{const k=await Mhe(C);return k.success&&await c(),k}catch(k){return console.error("Failed to save custom rule:",k),{success:!1,error:k.message}}},[c]),b=Z.useCallback(async C=>{try{const k=await khe(C);return k.success&&await c(),k}catch(k){return console.error("Failed to delete custom rule:",k),{success:!1,error:k.message}}},[c]),T=Z.useCallback(async()=>{try{const C=await Lhe();return C.success&&await c(),C}catch(C){return console.error("Failed to reset defaults:",C),{success:!1,error:C.message}}},[c]);return Z.useEffect(()=>{f(),d(),c()},[f,d,c]),{communityRules:r,ruleSources:t,rulesSummary:a,syncing:o,engineStatus:l,loadCommunityRules:c,loadRuleSources:f,initializeSources:h,syncAllSources:v,syncSource:y,setRuleEnabled:m,saveCustomRule:x,deleteCustomRule:b,resetDefaults:T}}function Ihe(){const[r,e]=Z.useState([]),[t,n]=Z.useState([]),[a,i]=Z.useState(null),[o,s]=Z.useState(!1),[l,u]=Z.useState(!1),[c,f]=Z.useState(null),[d,h]=Z.useState({}),[v,y]=Z.useState(null),[m,x]=Z.useState([]),[b,T]=Z.useState(null),[C,k]=Z.useState(0),[L,A]=Z.useState(!1),D=Ahe(),P=Z.useCallback(async()=>{try{const U=await dhe();U.success&&e(U.rules)}catch(U){console.error("Failed to load rules:",U)}},[]),R=Z.useCallback(async()=>{try{const U=await hhe(d);U.success&&n(U.findings)}catch(U){console.error("Failed to load findings:",U)}},[d]),z=Z.useCallback(async()=>{try{const U=await phe();U.success&&i(U.summary)}catch(U){console.error("Failed to load summary:",U)}},[]),B=Z.useCallback(async()=>{try{const U=await vhe();U.success&&x(U.history)}catch(U){console.error("Failed to load scan history:",U)}},[]),N=Z.useCallback(async()=>{try{const U=await yhe();U.success&&k(U.count)}catch(U){console.error("Failed to check running servers:",U)}},[]),W=Z.useCallback(async()=>{s(!0),f(null),n([]),i(null),T(null),A(!1);try{const U=await ghe();if(U.success)await R(),await z(),await B(),A(!0);else{const G={message:U.error||"Analysis failed",requiresSetup:U.requiresSetup||!1};f(G)}}catch(U){console.error("Analysis error:",U),f({message:U.message,requiresSetup:!1})}finally{s(!1)}},[R,z,B]),$=Z.useCallback(async()=>{u(!0);try{(await mhe()).success&&(n([]),i(null),y(null),T(null),f(null),A(!1),await B())}catch(U){console.error("Failed to clear findings:",U)}finally{u(!1)}},[B]),H=Z.useCallback(async U=>{T(U),f(null);try{const G=new URLSearchParams;G.append("scan_id",U),G.append("limit","100");const K=await(await fetch(`/api/security/findings?${G.toString()}`)).json();K.success&&n(K.findings)}catch(G){console.error("Failed to load historical findings:",G)}},[]);return Z.useEffect(()=>{P(),B(),N()},[P,B,N]),{rules:r,findings:t,summary:a,scanning:o,clearing:l,error:c,discoverAndScan:W,clearFindings:$,loadFindings:R,loadSummary:z,filters:d,setFilters:h,selectedFinding:v,setSelectedFinding:y,scanHistory:m,selectedScanId:b,selectHistoricalScan:H,runningServersCount:C,checkRunningServers:N,scanComplete:L,...D}}function Dhe({onNavigateToSmartScan:r,onNavigateToSetup:e}){const[t,n]=Z.useState("scanner"),[a,i]=Z.useState(!1),{rules:o,findings:s,summary:l,scanning:u,clearing:c,error:f,discoverAndScan:d,clearFindings:h,loadSummary:v,selectedFinding:y,setSelectedFinding:m,scanHistory:x,selectedScanId:b,selectHistoricalScan:T,runningServersCount:C,scanComplete:k,communityRules:L,engineStatus:A,setRuleEnabled:D,saveCustomRule:P,deleteCustomRule:R,resetDefaults:z}=Ihe();return w.jsxs("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",background:_.bgPrimary},children:[w.jsx("div",{style:{background:_.bgCard,borderBottom:`1px solid ${_.borderLight}`,padding:"16px 24px",boxShadow:`0 2px 4px ${_.shadowSm}`},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px",flexWrap:"wrap"},children:[w.jsx(che,{}),w.jsx(fhe,{activeTab:t,setActiveTab:n}),t==="scanner"&&w.jsx(uhe,{onScan:d,scanning:u,onClear:h,clearing:c,onToggleHistory:()=>i(B=>!B),showHistory:a,historyCount:x.length,serversAvailable:C>0})]})}),t==="scanner"&&w.jsx(lhe,{error:f,scanning:u,findings:s,summary:l,selectedFinding:y,onSelectFinding:m,rules:o,loadSummary:v,onNavigateToSmartScan:r,onNavigateToSetup:e,scanHistory:x,selectedScanId:b,onSelectScan:T,showHistory:a,serversAvailable:C>0,scanComplete:k}),t==="rules"&&w.jsx(rH,{communityRules:L,engineStatus:A,onToggleRule:D,onSaveRule:P,onDeleteRule:R,onResetDefaults:z})]})}function Phe(){const[r,e]=Z.useState(3);return Z.useEffect(()=>{const t=setInterval(()=>{e(n=>n<=1?(clearInterval(t),window.location.href="/",0):n-1)},1e3);return()=>clearInterval(t)},[]),w.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",background:_.bgPrimary,fontFamily:F.body,padding:"20px",textAlign:"center"},children:w.jsxs("div",{style:{maxWidth:"500px",width:"100%"},children:[w.jsx("h1",{style:{fontSize:"32px",fontWeight:"600",color:_.textPrimary,margin:"0 0 16px 0"},children:"MCP Shark Shutdown"}),w.jsx("p",{style:{fontSize:"16px",color:_.textSecondary,margin:"0 0 32px 0",lineHeight:"1.6"},children:"MCP Shark has been shut down."}),w.jsx("div",{style:{padding:"24px",background:_.bgCard,borderRadius:"12px",border:`1px solid ${_.borderLight}`,boxShadow:`0 4px 12px ${_.shadowMd}`},children:w.jsxs("p",{style:{fontSize:"14px",color:_.textSecondary,margin:"0 0 16px 0",lineHeight:"1.6"},children:["The MCP Shark server has been stopped. Redirecting in ",r," second",r!==1?"s":"","..."]})})]})})}function rc({title:r,count:e,children:t,defaultExpanded:n=!1}){const[a,i]=Z.useState(n);return w.jsxs("div",{style:{background:_.bgTertiary,borderRadius:"8px",border:`1px solid ${_.borderLight}`,overflow:"hidden"},children:[w.jsxs("button",{type:"button",onClick:()=>i(!a),style:{width:"100%",padding:"8px 12px",display:"flex",alignItems:"center",justifyContent:"space-between",background:"transparent",border:"none",cursor:"pointer",fontFamily:F.body,transition:"background 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background=_.bgCard},onMouseLeave:o=>{o.currentTarget.style.background="transparent"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx("span",{style:{fontSize:"12px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body},children:r}),e!==void 0&&w.jsx("span",{style:{padding:"2px 6px",background:_.bgCard,borderRadius:"4px",fontSize:"10px",fontWeight:"500",color:_.textSecondary,border:`1px solid ${_.borderLight}`,fontFamily:F.body},children:e})]}),w.jsxs("svg",{style:{width:"14px",height:"14px",color:_.textSecondary,transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",role:"img","aria-label":"Chevron icon",children:[w.jsx("title",{children:"Chevron icon"}),w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})]})]}),a&&w.jsx("div",{style:{padding:"12px",borderTop:`1px solid ${_.borderLight}`,background:_.bgCard},children:t})]})}function Yh(r){if(!r)return _.textTertiary;switch(r.toLowerCase()){case"none":return _.accentGreen;case"low":return _.accentBlue;case"medium":return _.accentOrange;case"high":return _.error;case"critical":return _.error;default:return _.textTertiary}}function b_({findings:r,type:e}){return w.jsx("div",{style:{overflowX:"auto"},children:w.jsxs("table",{style:{width:"100%",fontSize:"12px",fontFamily:F.body},children:[w.jsx("thead",{children:w.jsxs("tr",{style:{borderBottom:`1px solid ${_.borderLight}`,background:_.bgTertiary},children:[w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Name"}),w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Risk Level"}),w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Risk Score"}),w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Tags"}),w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Reasons"}),w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Safe Use Notes"}),e==="tool"&&w.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:_.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Poisoned"})]})}),w.jsx("tbody",{children:r.map((t,n)=>w.jsxs("tr",{style:{borderBottom:`1px solid ${_.borderLight}`,transition:"background 0.15s"},onMouseEnter:a=>{a.currentTarget.style.background=_.bgTertiary},onMouseLeave:a=>{a.currentTarget.style.background="transparent"},children:[w.jsx("td",{style:{padding:"8px",fontSize:"12px",color:_.textPrimary,fontWeight:"500",fontFamily:F.body},children:t.name}),w.jsx("td",{style:{padding:"8px"},children:w.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",borderRadius:"4px",fontSize:"10px",fontWeight:"700",color:_.textInverse,background:Yh(t.risk_level),fontFamily:F.body},children:t.risk_level?.toUpperCase()})}),w.jsx("td",{style:{padding:"8px",fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:t.risk_score}),w.jsx("td",{style:{padding:"8px"},children:w.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"2px"},children:t.risk_tags?.map((a,i)=>w.jsx("span",{style:{padding:"2px 6px",background:_.bgCard,borderRadius:"4px",fontSize:"10px",color:_.textSecondary,border:`1px solid ${_.borderLight}`,fontFamily:F.body},children:a},`tag-${String(a)}-${i}`))})}),w.jsx("td",{style:{padding:"8px",fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:w.jsx("ul",{style:{listStyle:"disc",listStylePosition:"inside",margin:0,padding:0},children:t.reasons?.map((a,i)=>w.jsx("li",{style:{fontSize:"10px",marginBottom:"2px"},children:a},`reason-${i}-${a.substring(0,20)}`))})}),w.jsx("td",{style:{padding:"8px",fontSize:"10px",color:_.textSecondary,maxWidth:"200px",fontFamily:F.body},children:t.safe_use_notes}),e==="tool"&&Object.prototype.hasOwnProperty.call(t,"is_potentially_poisoned")&&w.jsx("td",{style:{padding:"8px"},children:t.is_potentially_poisoned?w.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",fontSize:"10px",fontWeight:"500",borderRadius:"4px",background:`${_.error}20`,color:_.error,border:`1px solid ${_.error}40`,fontFamily:F.body},children:"Yes"}):w.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",fontSize:"10px",fontWeight:"500",borderRadius:"4px",background:`${_.accentGreen}20`,color:_.accentGreen,border:`1px solid ${_.accentGreen}40`,fontFamily:F.body},children:"No"})})]},`finding-${t.id||t.name||n}-${n}`))})]})})}function Rhe({patterns:r}){return!r||r.length===0?null:w.jsx(rc,{title:"Notable Patterns",count:r.length,defaultExpanded:!1,children:w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((e,t)=>w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"8px",background:`${_.accentOrange}10`,borderRadius:"6px",border:`1px solid ${_.accentOrange}20`,transition:"all 0.15s"},onMouseEnter:n=>{n.currentTarget.style.background=`${_.accentOrange}15`,n.currentTarget.style.borderColor=`${_.accentOrange}40`},onMouseLeave:n=>{n.currentTarget.style.background=`${_.accentOrange}10`,n.currentTarget.style.borderColor=`${_.accentOrange}20`},children:[w.jsx("div",{style:{flexShrink:0,marginTop:"2px",width:"16px",height:"16px",borderRadius:"50%",background:`${_.accentOrange}30`,border:`1px solid ${_.accentOrange}60`,display:"flex",alignItems:"center",justifyContent:"center"},children:w.jsxs("svg",{style:{width:"10px",height:"10px",color:_.accentOrange},fill:"currentColor",viewBox:"0 0 20 20",role:"img","aria-label":"Pattern icon",children:[w.jsx("title",{children:"Pattern icon"}),w.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})}),w.jsx("p",{style:{fontSize:"12px",color:_.textPrimary,lineHeight:"1.5",flex:1,margin:0,fontFamily:F.body},children:e})]},`pattern-${e.type||t}-${t}`))})})}function Ehe(r){const e=r.includes(`
|
|
79
|
-
`)?`
|
|
80
|
-
`:r.includes(" | ")?" | ":null;return e?w.jsx("ul",{style:{listStyle:"disc",listStylePosition:"inside",margin:0,paddingLeft:"8px"},children:r.split(e).map((t,n)=>w.jsx("li",{style:{fontSize:"12px",marginBottom:"2px"},children:t.trim()},`reason-${n}-${t.trim().substring(0,20)}`))}):w.jsx("p",{style:{fontSize:"12px"},children:r})}function zhe({overallRiskLevel:r,overallReason:e}){return r?w.jsx(rc,{title:"Overall Summary",count:e?1:0,defaultExpanded:!0,children:w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx("span",{style:{fontSize:"12px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body},children:"Overall Risk Level:"}),w.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:"700",color:_.textInverse,background:Yh(r),fontFamily:F.body},children:r.toUpperCase()})]}),e&&w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:Ehe(e)})]})}):null}function Ohe({recommendations:r}){return!r||r.length===0?null:w.jsx(rc,{title:"Recommendations",count:r.length,defaultExpanded:!1,children:w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((e,t)=>w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"8px",background:`${_.accentBlue}10`,borderRadius:"6px",border:`1px solid ${_.accentBlue}20`,transition:"all 0.15s"},onMouseEnter:n=>{n.currentTarget.style.background=`${_.accentBlue}15`,n.currentTarget.style.borderColor=`${_.accentBlue}40`},onMouseLeave:n=>{n.currentTarget.style.background=`${_.accentBlue}10`,n.currentTarget.style.borderColor=`${_.accentBlue}20`},children:[w.jsx("div",{style:{flexShrink:0,marginTop:"2px",width:"16px",height:"16px",borderRadius:"50%",background:`${_.accentBlue}30`,border:`1px solid ${_.accentBlue}60`,display:"flex",alignItems:"center",justifyContent:"center"},children:w.jsx("span",{style:{fontSize:"10px",fontWeight:"600",color:_.accentBlue,fontFamily:F.body},children:t+1})}),w.jsx("p",{style:{fontSize:"12px",color:_.textPrimary,lineHeight:"1.5",flex:1,margin:0,fontFamily:F.body},children:e})]},`recommendation-${e.type||t}-${t}`))})})}function Nhe({analysis:r}){if(!r)return w.jsx("div",{style:{padding:"12px",background:`${_.bgTertiary}80`,borderRadius:"6px",border:`1px solid ${_.borderLight}`,fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:"No analysis data available."});const e=r.tool_findings||[],t=r.prompt_findings||[],n=r.resource_findings||[];return w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[w.jsx(zhe,{overallRiskLevel:r.overall_risk_level,overallReason:r.overall_reason}),e.length>0&&w.jsx(rc,{title:"Tool Findings",count:e.length,defaultExpanded:!0,children:w.jsx(b_,{findings:e,type:"tool"})}),t.length>0&&w.jsx(rc,{title:"Prompt Findings",count:t.length,defaultExpanded:!0,children:w.jsx(b_,{findings:t,type:"prompt"})}),n.length>0&&w.jsx(rc,{title:"Resource Findings",count:n.length,defaultExpanded:!0,children:w.jsx(b_,{findings:n,type:"resource"})}),w.jsx(Ohe,{recommendations:r.recommendations}),w.jsx(Rhe,{patterns:r.notable_patterns})]})}function Bhe({scan:r,scanId:e,serverName:t,analysisResult:n}){return w.jsxs("details",{style:{marginBottom:"16px"},children:[w.jsx("summary",{style:{cursor:"pointer",padding:"8px 12px",background:_.bgTertiary,borderRadius:"6px",fontSize:"11px",fontFamily:F.body,color:_.textSecondary,border:`1px solid ${_.borderLight}`,userSelect:"none"},onMouseEnter:a=>{a.currentTarget.style.background=_.bgSecondary,a.currentTarget.style.color=_.textPrimary},onMouseLeave:a=>{a.currentTarget.style.background=_.bgTertiary,a.currentTarget.style.color=_.textSecondary},children:"Debug Info (click to expand)"}),w.jsx("div",{style:{marginTop:"8px",padding:"12px",background:_.bgTertiary,borderRadius:"6px",fontSize:"11px",fontFamily:"monospace",border:`1px solid ${_.borderLight}`},children:w.jsxs("div",{style:{fontSize:"10px",color:_.textSecondary,lineHeight:"1.6"},children:[w.jsxs("div",{children:["scanId: ",e?`"${e}"`:"missing"]}),w.jsxs("div",{children:['serverName: "',t,'"']}),w.jsxs("div",{children:["analysisResult: ",n?"found":"missing"]}),w.jsxs("div",{children:["has scan.result: ",r.result?"yes":"no"]}),w.jsxs("div",{children:["has scan.data: ",r.data?"yes":"no"]}),w.jsxs("div",{children:["scan keys: ",Object.keys(r||{}).join(", ")]}),r.result&&w.jsxs("div",{children:["scan.result keys: ",Object.keys(r.result||{}).join(", ")]}),r.data&&w.jsxs("div",{children:["scan.data keys: ",Object.keys(r.data||{}).join(", ")]})]})})]})}function jhe({scan:r}){return w.jsxs("div",{style:{marginBottom:"24px"},children:[w.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${_.borderLight}`},children:"Raw Data"}),w.jsxs("details",{children:[w.jsx("summary",{style:{cursor:"pointer",padding:"8px",background:_.bgTertiary,borderRadius:"4px",fontSize:"11px",color:_.textSecondary,fontFamily:F.body,marginBottom:"8px"},children:"Click to view raw JSON data"}),w.jsx("pre",{style:{padding:"12px",background:_.bgTertiary,borderRadius:"6px",fontSize:"11px",fontFamily:"monospace",color:_.textPrimary,overflow:"auto",maxHeight:"400px",margin:0},children:JSON.stringify(r,null,2)})]})]})}function Fhe({scanId:r,serverName:e,onClose:t}){return w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[w.jsxs("div",{children:[w.jsx("h2",{style:{fontSize:"16px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,margin:0,marginBottom:"8px"},children:e}),r&&w.jsxs("div",{style:{fontSize:"12px",color:_.textTertiary,fontFamily:F.body},children:["ID: ",r]})]}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[r&&w.jsxs("a",{href:`https://smart.mcpshark.sh/scan-results?id=${r}`,target:"_blank",rel:"noopener noreferrer",style:{padding:"6px 12px",background:_.buttonPrimary,border:"none",color:_.textInverse,borderRadius:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:"500",textDecoration:"none",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px"},children:[w.jsx(oN,{size:14,stroke:1.5}),"View on Smart Scan"]}),w.jsx("button",{type:"button",onClick:t,style:{padding:"6px",background:"transparent",border:"none",color:_.textSecondary,cursor:"pointer",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:n=>{n.currentTarget.style.background=_.bgTertiary,n.currentTarget.style.color=_.textPrimary},onMouseLeave:n=>{n.currentTarget.style.background="transparent",n.currentTarget.style.color=_.textSecondary},children:w.jsx(im,{size:20,stroke:1.5})})]})]})}function Vhe({status:r,overallRiskLevel:e,createdAt:t,updatedAt:n}){const a=i=>i?new Date(i).toLocaleString():"N/A";return w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"16px",padding:"16px",background:_.bgTertiary,borderRadius:"8px"},children:[r&&w.jsxs("div",{children:[w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body,marginBottom:"4px"},children:"Status"}),w.jsx("div",{style:{fontSize:"13px",color:_.textPrimary,fontFamily:F.body,fontWeight:"500"},children:r})]}),e&&w.jsxs("div",{children:[w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body,marginBottom:"4px"},children:"Overall Risk Level"}),w.jsx("span",{style:{padding:"4px 10px",borderRadius:"6px",fontSize:"11px",fontWeight:"700",fontFamily:F.body,background:Yh(e),color:_.textInverse,display:"inline-block"},children:e.toLowerCase()})]}),t&&w.jsxs("div",{children:[w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body,marginBottom:"4px"},children:"Created At"}),w.jsx("div",{style:{fontSize:"13px",color:_.textPrimary,fontFamily:F.body,fontWeight:"500"},children:a(t)})]}),n&&w.jsxs("div",{children:[w.jsx("div",{style:{fontSize:"11px",color:_.textTertiary,fontFamily:F.body,marginBottom:"4px"},children:"Updated At"}),w.jsx("div",{style:{fontSize:"13px",color:_.textPrimary,fontFamily:F.body,fontWeight:"500"},children:a(n)})]})]})}function Ghe({serverData:r}){return r?w.jsxs("div",{style:{marginBottom:"24px"},children:[w.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${_.borderLight}`},children:"Server Information"}),w.jsxs("div",{style:{padding:"12px",background:_.bgTertiary,borderRadius:"6px",fontSize:"12px",fontFamily:F.body},children:[w.jsxs("div",{style:{marginBottom:"8px"},children:[w.jsx("strong",{style:{color:_.textTertiary},children:"Name: "}),w.jsx("span",{style:{color:_.textPrimary},children:r.name||"N/A"})]}),r.description&&w.jsxs("div",{children:[w.jsx("strong",{style:{color:_.textTertiary},children:"Description: "}),w.jsx("span",{style:{color:_.textPrimary},children:r.description})]})]})]}):null}function yt(r,e){return e.split(".").reduce((n,a)=>n&&typeof n=="object"&&a in n?n[a]:null,r)}function Whe(r){const e=r.result||r.data||r,t=yt(r,"result.id")||yt(r,"id")||yt(r,"scan_id")||yt(r,"data.id")||yt(r,"data.scan_id")||e?.id||e?.scan_id,n=r.serverName||r.server_name||yt(r,"result.mcp_server_data.server.name")||yt(r,"mcp_server_data.server.name")||yt(r,"server.name")||yt(r,"data.server.name")||yt(r,"data.data.server.name")||r.server?.name||"Unknown Server",a=yt(r,"result.status")||yt(r,"status")||yt(r,"data.status"),i=yt(r,"result.overall_risk_level")||yt(r,"overall_risk_level")||yt(r,"data.overall_risk_level")||yt(r,"data.data.overall_risk_level"),o=yt(r,"result.created_at")||yt(r,"created_at")||yt(r,"data.created_at")||yt(r,"data.data.created_at"),s=yt(r,"result.updated_at")||yt(r,"updated_at")||yt(r,"data.updated_at")||yt(r,"data.data.updated_at"),l=yt(r,"result.analysis_result")||yt(r,"analysis_result")||yt(r,"data.analysis_result")||yt(r,"data.data.analysis_result")||yt(r,"data.data.data.analysis_result"),c=((d,h)=>{if(d)return d;if(h&&typeof h=="object"){if(h.tool_findings||h.prompt_findings||h.resource_findings)return h;if(h.analysis_result)return h.analysis_result}return null})(l,e),f=yt(r,"result.mcp_server_data.server")||yt(r,"mcp_server_data.server")||yt(r,"server")||yt(r,"data.server")||yt(r,"data.data.server")||yt(r,"mcp_server_data");return{scanId:t,serverName:n,status:a,overallRiskLevel:i,createdAt:o,updatedAt:s,analysisResult:c,serverData:f}}function R6({scan:r,loading:e,onClose:t}){if(e)return w.jsx("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"24px",textAlign:"center"},children:w.jsx("p",{style:{color:_.textSecondary,fontFamily:F.body},children:"Loading scan details..."})});if(!r)return w.jsx("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"24px",textAlign:"center"},children:w.jsx("p",{style:{color:_.textSecondary,fontFamily:F.body},children:"No scan data available"})});const{scanId:n,serverName:a,status:i,overallRiskLevel:o,createdAt:s,updatedAt:l,analysisResult:u,serverData:c}=Whe(r);return w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"24px",boxShadow:`0 1px 3px ${_.shadowSm}`,position:"relative"},children:[w.jsx(Fhe,{scanId:n,serverName:a,onClose:t}),w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[w.jsx(Bhe,{scan:r,scanId:n,serverName:a,analysisResult:u}),w.jsx(Vhe,{status:i,overallRiskLevel:o,createdAt:s,updatedAt:l}),w.jsx(Ghe,{serverData:c}),u?w.jsxs("div",{style:{marginBottom:"24px"},children:[w.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${_.borderLight}`},children:"Analysis Result"}),w.jsx(Nhe,{analysis:u})]}):w.jsxs("div",{style:{marginBottom:"24px"},children:[w.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${_.borderLight}`},children:"Analysis Result"}),w.jsx("div",{style:{padding:"12px",background:`${_.bgTertiary}80`,borderRadius:"6px",border:`1px solid ${_.borderLight}`,fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:"No analysis result available for this scan. Check the Raw Data section below to see the scan structure."})]}),w.jsx(jhe,{scan:r})]})]})}function Hhe({result:r,onViewScan:e}){const t=r.serverName||r.server_name||r.server?.name||"Unknown Server";return console.log("[BatchResultItem] Rendering with result:",{serverName:r.serverName,extractedServerName:t,hasServerName:!!r.serverName,resultKeys:Object.keys(r)}),w.jsxs("div",{style:{background:_.bgTertiary,border:`1px solid ${r.success?_.borderLight:_.error}`,borderRadius:"8px",padding:"10px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1,minWidth:0},children:[w.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),r.success&&w.jsxs(w.Fragment,{children:[r.data?.data?.overall_risk_level&&w.jsxs("span",{style:{padding:"4px 10px",borderRadius:"6px",fontSize:"10px",fontWeight:"700",fontFamily:F.body,background:Yh(r.data.data.overall_risk_level),color:_.textInverse,whiteSpace:"nowrap"},children:[r.data.data.overall_risk_level.toLowerCase()," risk"]}),e&&r.data&&w.jsxs("button",{type:"button",onClick:()=>e(r.data),style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",borderRadius:"6px",background:_.buttonPrimary,border:"none",color:_.textInverse,cursor:"pointer",transition:"all 0.2s",fontSize:"11px",fontWeight:"500",fontFamily:F.body,whiteSpace:"nowrap"},onMouseEnter:n=>{n.currentTarget.style.background=_.buttonPrimaryHover},onMouseLeave:n=>{n.currentTarget.style.background=_.buttonPrimary},children:[w.jsx(Hw,{size:12,stroke:1.5}),w.jsx("span",{children:"View"})]}),r.data?.scan_id&&w.jsxs("a",{href:`https://smart.mcpshark.sh/scan-results?id=${r.data.scan_id}`,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",borderRadius:"6px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,color:_.accentBlue,textDecoration:"none",cursor:"pointer",transition:"all 0.2s",fontSize:"11px",fontWeight:"500",fontFamily:F.body,whiteSpace:"nowrap"},onMouseEnter:n=>{n.currentTarget.style.background=_.bgTertiary,n.currentTarget.style.borderColor=_.accentBlue},onMouseLeave:n=>{n.currentTarget.style.background=_.bgSecondary,n.currentTarget.style.borderColor=_.borderLight},children:[w.jsx("span",{children:"open"}),w.jsx(om,{size:12,color:_.accentBlue})]})]})]}),w.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:r.success?w.jsxs(w.Fragment,{children:[r.cached&&w.jsxs("span",{style:{padding:"4px 8px",borderRadius:"6px",fontSize:"10px",fontWeight:"600",fontFamily:F.body,background:_.bgSecondary,color:_.textSecondary,border:`1px solid ${_.borderLight}`,display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap"},title:"This result was retrieved from cache",children:[w.jsx(fN,{size:10,color:_.textSecondary}),w.jsx("span",{children:"Cached"})]}),w.jsxs("span",{style:{padding:"4px 8px",borderRadius:"6px",fontSize:"10px",fontWeight:"700",fontFamily:F.body,background:_.accentGreen,color:_.textInverse,display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap"},children:[w.jsx(Md,{size:10,color:_.textInverse}),w.jsx("span",{children:"Success"})]})]}):w.jsxs(w.Fragment,{children:[w.jsx("span",{style:{padding:"4px 8px",borderRadius:"6px",fontSize:"10px",fontWeight:"700",fontFamily:F.body,background:_.error,color:_.textInverse,whiteSpace:"nowrap"},children:"✗ Failed"}),r.error&&w.jsx("span",{style:{fontSize:"11px",color:_.error,fontFamily:F.body,whiteSpace:"nowrap",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis"},title:r.error,children:r.error})]})})]})}function $he({scanResults:r}){const e=r.filter(a=>a.cached).length,t=r.filter(a=>a.success&&!a.cached).length,n=r.every(a=>a.cached);return w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[w.jsxs("div",{children:[w.jsxs("h2",{style:{fontSize:"14px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,margin:0,marginBottom:"4px"},children:["Scan Results (",r.length," server",r.length!==1?"s":"",")"]}),n&&w.jsx("p",{style:{fontSize:"12px",color:_.textTertiary,fontFamily:F.body,margin:0},children:"Showing cached results. Run a new scan to get the latest analysis."})]}),r.length>0&&w.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center",fontSize:"13px",color:_.textSecondary,fontFamily:F.body},children:[e>0&&w.jsxs("span",{style:{padding:"6px 10px",background:_.bgTertiary,borderRadius:"6px",fontSize:"11px",fontWeight:"600",display:"inline-flex",alignItems:"center",gap:"4px",fontFamily:F.body},children:[w.jsx(fN,{size:12,color:_.textSecondary}),w.jsxs("span",{children:[e," cached"]})]}),t>0&&w.jsxs("span",{style:{padding:"6px 10px",background:_.bgTertiary,borderRadius:"6px",fontSize:"11px",fontWeight:"600",display:"inline-flex",alignItems:"center",gap:"4px"},children:[w.jsx(Md,{size:12,color:_.accentGreen}),w.jsxs("span",{children:[t," scanned"]})]})]})]})}function Uhe({scanResults:r,onViewScan:e}){return r.length===0?null:w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"20px",boxShadow:`0 1px 3px ${_.shadowSm}`},children:[w.jsx($he,{scanResults:r}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((t,n)=>w.jsx(Hhe,{result:t,onViewScan:e},t.scanId||`batch-result-${n}`))})]})}function Yhe(){return w.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",textAlign:"center",padding:"40px"},children:[w.jsx("div",{style:{marginBottom:"24px",opacity:.6},children:w.jsxs("svg",{width:64,height:64,viewBox:"0 0 24 24",fill:"none",stroke:_.textTertiary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},role:"img","aria-label":"Empty state icon",children:[w.jsx("title",{children:"Empty state icon"}),w.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),w.jsx("path",{d:"M9 12l2 2 4-4"})]})}),w.jsx("h3",{style:{fontSize:"20px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"8px"},children:"Ready to Scan"}),w.jsx("p",{style:{fontSize:"14px",color:_.textSecondary,fontFamily:F.body,maxWidth:"400px",lineHeight:"1.6"},children:"Configure your API token and discover MCP servers to start security scanning. Results will appear here."})]})}function Xhe({error:r}){return r?w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.error}`,borderRadius:"12px",padding:"16px 20px",marginBottom:"24px",display:"flex",gap:"12px",alignItems:"flex-start"},children:[w.jsx(CH,{size:20,color:_.error,style:{flexShrink:0,marginTop:"2px"}}),w.jsxs("div",{style:{flex:1},children:[w.jsx("p",{style:{fontSize:"14px",color:_.error,fontFamily:F.body,margin:0,fontWeight:"600",marginBottom:"4px"},children:"Error"}),w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body,margin:0,lineHeight:"1.5"},children:r})]})]}):null}function Zhe({scanning:r,selectedServers:e}){return r?w.jsx("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"24px",boxShadow:`0 2px 8px ${_.shadowSm}`},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[w.jsx($d,{size:20}),w.jsxs("div",{style:{flex:1},children:[w.jsxs("p",{style:{fontSize:"14px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,margin:0,marginBottom:"4px"},children:["Scanning ",e.size," server",e.size!==1?"s":"","..."]}),w.jsx("p",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body,margin:0},children:"Analyzing security vulnerabilities and risks"})]})]})}):null}function Khe({scanResult:r}){return r?w.jsxs("div",{style:{background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"20px",boxShadow:`0 1px 3px ${_.shadowSm}`},children:[w.jsx("h2",{style:{fontSize:"16px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"16px"},children:"Scan Results"}),r.data?.overall_risk_level&&w.jsxs("div",{style:{background:_.bgTertiary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"16px",marginBottom:"20px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"8px"},children:[w.jsx("span",{style:{padding:"4px 12px",borderRadius:"6px",fontSize:"12px",fontWeight:"700",fontFamily:F.body,background:Yh(r.data.overall_risk_level),color:_.textInverse},children:r.data.overall_risk_level.toUpperCase()}),w.jsx("span",{style:{fontSize:"14px",color:_.textSecondary,fontFamily:F.body},children:"Overall Risk Level"})]}),r.data.overall_reason&&w.jsx("p",{style:{fontSize:"13px",color:_.textSecondary,fontFamily:F.body,margin:0},children:r.data.overall_reason})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px",marginBottom:"20px"},children:[r.data?.tool_findings?.length>0&&w.jsxs("div",{style:{background:_.bgTertiary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"12px"},children:[w.jsx("div",{style:{fontSize:"24px",fontWeight:"700",color:_.textPrimary,fontFamily:F.body},children:r.data.tool_findings.length}),w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:"Tool Findings"})]}),r.data?.resource_findings?.length>0&&w.jsxs("div",{style:{background:_.bgTertiary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"12px"},children:[w.jsx("div",{style:{fontSize:"24px",fontWeight:"700",color:_.textPrimary,fontFamily:F.body},children:r.data.resource_findings.length}),w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:"Resource Findings"})]}),r.data?.prompt_findings?.length>0&&w.jsxs("div",{style:{background:_.bgTertiary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"12px"},children:[w.jsx("div",{style:{fontSize:"24px",fontWeight:"700",color:_.textPrimary,fontFamily:F.body},children:r.data.prompt_findings.length}),w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,fontFamily:F.body},children:"Prompt Findings"})]})]}),r.data?.recommendations?.length>0&&w.jsxs("div",{style:{background:_.bgTertiary,border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"16px",marginBottom:"20px"},children:[w.jsx("h3",{style:{fontSize:"14px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"12px"},children:"Recommendations"}),w.jsx("ul",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",color:_.textSecondary,fontFamily:F.body,lineHeight:"1.8"},children:r.data.recommendations.map((e,t)=>w.jsx("li",{children:e},`recommendation-${t}-${e.substring(0,30)}`))})]}),r.scan_id&&w.jsx("div",{style:{marginTop:"20px",paddingTop:"20px",borderTop:`1px solid ${_.borderLight}`},children:w.jsxs("a",{href:`https://smart.mcpshark.sh/scan-results?id=${r.scan_id}`,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 20px",background:_.buttonSecondary,color:_.textPrimary,border:`1px solid ${_.borderMedium}`,borderRadius:"8px",textDecoration:"none",fontSize:"13px",fontWeight:"600",fontFamily:F.body,transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background=_.buttonSecondaryHover},onMouseLeave:e=>{e.currentTarget.style.background=_.buttonSecondary},children:[w.jsx("span",{children:"View Full Results"}),w.jsx(om,{size:14,color:_.textPrimary})]})})]}):null}function E6({error:r,scanning:e,selectedServers:t,scanResults:n,scanResult:a,onViewScan:i}){return w.jsxs("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px",background:_.bgPrimary},children:[!r&&n.length===0&&!a&&!e&&w.jsx(Yhe,{}),w.jsx(Xhe,{error:r}),w.jsx(Zhe,{scanning:e,selectedServers:t}),n.length>0&&w.jsx(Uhe,{scanResults:n,onViewScan:i}),a&&n.length===0&&w.jsx(Khe,{scanResult:a})]})}function qhe({error:r,loadingScans:e,selectedScan:t,loadingScanDetail:n,allScans:a,setSelectedScan:i,loadScanDetail:o,onViewScan:s}){return e?w.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"24px",background:_.bgPrimary},children:w.jsx("p",{style:{color:_.textSecondary,fontFamily:F.body},children:"Loading cached scans..."})}):t?w.jsx(R6,{scan:t,loading:n,onClose:()=>{i(null),o(null)}}):w.jsxs(w.Fragment,{children:[r&&w.jsx("div",{style:{padding:"12px 16px",background:`${_.error}20`,border:`1px solid ${_.error}`,borderRadius:"8px",marginBottom:"16px",color:_.error,fontSize:"13px",fontFamily:F.body},children:r}),w.jsx(E6,{error:r,scanning:!1,selectedServers:[],scanResults:a,scanResult:null,onViewScan:s})]})}function Qhe({discoveredServers:r,selectedServers:e,setSelectedServers:t,runScan:n,scanning:a,apiToken:i}){const o=()=>{e.size===r.length?t(new Set):t(new Set(r.map(s=>s.name)))};return w.jsx("div",{style:{background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,padding:"12px 24px"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"16px",flexWrap:"wrap"},children:[w.jsx("div",{style:{fontSize:"12px",fontWeight:"600",color:_.textSecondary,fontFamily:F.body,whiteSpace:"nowrap"},children:"Select servers to scan:"}),w.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap",flex:1},children:r.map((s,l)=>{const u=e.has(s.name);return w.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",background:u?_.bgCard:_.bgTertiary,border:`1px solid ${u?_.accentBlue:_.borderLight}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",fontSize:"12px",fontFamily:F.body,fontWeight:u?"600":"500",color:u?_.textPrimary:_.textSecondary},onMouseEnter:c=>{c.currentTarget.style.borderColor=_.accentBlue,c.currentTarget.style.boxShadow=`0 2px 4px ${_.shadowSm}`},onMouseLeave:c=>{u||(c.currentTarget.style.borderColor=_.borderLight,c.currentTarget.style.boxShadow="none")},children:[w.jsx("input",{type:"checkbox",checked:u,onChange:c=>{const f=new Set(e);c.target.checked?f.add(s.name):f.delete(s.name),t(f)},style:{width:"16px",height:"16px",cursor:"pointer",accentColor:_.accentBlue}}),w.jsx("span",{children:s.name}),w.jsxs("span",{style:{fontSize:"10px",color:_.textTertiary,fontWeight:"400"},children:["(",s.tools?.length||0," tools, ",s.resources?.length||0," resources,"," ",s.prompts?.length||0," prompts)"]})]},s.name||`server-${l}`)})}),w.jsx("button",{type:"button",onClick:o,style:{padding:"6px 12px",background:_.buttonSecondary,color:_.textPrimary,border:`1px solid ${_.borderMedium}`,borderRadius:"6px",fontSize:"11px",fontWeight:"600",fontFamily:F.body,cursor:"pointer",transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:s=>{s.currentTarget.style.background=_.buttonSecondaryHover},onMouseLeave:s=>{s.currentTarget.style.background=_.buttonSecondary},children:e.size===r.length?"Deselect All":"Select All"}),w.jsx("button",{type:"button",onClick:n,disabled:!i||e.size===0||a,style:{padding:"8px 16px",background:i&&e.size>0&&!a?_.buttonPrimary:_.buttonSecondary,color:i&&e.size>0&&!a?_.textInverse:_.textTertiary,border:"none",borderRadius:"6px",fontSize:"13px",fontWeight:"600",fontFamily:F.body,cursor:i&&e.size>0&&!a?"pointer":"not-allowed",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"8px",whiteSpace:"nowrap"},onMouseEnter:s=>{i&&e.size>0&&!a&&(s.currentTarget.style.background=_.buttonPrimaryHover,s.currentTarget.style.transform="translateY(-1px)",s.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`)},onMouseLeave:s=>{i&&e.size>0&&!a&&(s.currentTarget.style.background=_.buttonPrimary,s.currentTarget.style.transform="translateY(0)",s.currentTarget.style.boxShadow="none")},children:a?w.jsxs(w.Fragment,{children:[w.jsx($d,{size:14,color:_.textInverse}),w.jsxs("span",{children:["Scanning ",e.size," server",e.size!==1?"s":"","..."]})]}):w.jsxs(w.Fragment,{children:[w.jsx(cN,{size:14,color:i&&e.size>0?_.textInverse:_.textTertiary}),w.jsxs("span",{children:["Run Scan (",e.size,")"]})]})})]})})}function Jhe({discoveredServers:r,selectedServers:e,setSelectedServers:t,runScan:n,scanning:a,apiToken:i,error:o,scanResults:s,scanResult:l,selectedScan:u,loadingScanDetail:c,setSelectedScan:f,loadScanDetail:d,onViewScan:h}){return u?w.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px",background:_.bgPrimary},children:w.jsx(R6,{scan:u,loading:c,onClose:()=>{f(null),d(null)}})}):w.jsxs(w.Fragment,{children:[r.length>0&&w.jsx(Qhe,{discoveredServers:r,selectedServers:e,setSelectedServers:t,runScan:n,scanning:a,apiToken:i}),w.jsx(E6,{error:o,scanning:a,selectedServers:e,scanResults:s,scanResult:l,onViewScan:h})]})}function epe({apiToken:r,setApiToken:e,saveToken:t,loadingData:n,discoverMcpData:a,discoveredServers:i,_selectedServers:o,_setSelectedServers:s,scanning:l,clearCache:u,clearingCache:c,...f}){const{runScan:d}=f,h=Z.useRef(null),[v,y]=Z.useState(!1),m=x=>{e(x),h.current&&clearTimeout(h.current),x?h.current=setTimeout(()=>{t(x)},1e3):t("")};return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px",flexWrap:"wrap",flex:1,justifyContent:"flex-end"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx("label",{htmlFor:"api-token-input",style:{fontSize:"12px",fontWeight:"600",color:_.textSecondary,fontFamily:F.body,whiteSpace:"nowrap"},children:"API Token:"}),w.jsxs("div",{style:{position:"relative",width:"200px"},children:[w.jsx("input",{id:"api-token-input",type:"password",value:r,onChange:x=>m(x.target.value),placeholder:"sk_...",style:{width:"100%",padding:"8px 10px",paddingRight:r?"28px":"10px",border:`1px solid ${r?_.accentGreen:_.borderMedium}`,borderRadius:"8px",fontSize:"12px",fontFamily:F.body,background:_.bgCard,color:_.textPrimary,boxSizing:"border-box",transition:"all 0.2s ease"},onFocus:x=>{x.currentTarget.style.borderColor=_.accentBlue,x.currentTarget.style.boxShadow=`0 0 0 2px ${_.accentBlue}20`},onBlur:x=>{x.currentTarget.style.borderColor=r?_.accentGreen:_.borderMedium,x.currentTarget.style.boxShadow="none"}}),r&&w.jsx("div",{style:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"},children:w.jsx(Md,{size:12,color:_.accentGreen})})]}),w.jsxs("a",{href:"https://smart.mcpshark.sh/tokens",target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",color:_.accentBlue,textDecoration:"none",fontFamily:F.body,fontWeight:"500",whiteSpace:"nowrap"},onMouseEnter:x=>{x.currentTarget.style.textDecoration="underline"},onMouseLeave:x=>{x.currentTarget.style.textDecoration="none"},children:[w.jsx("span",{children:"Get token"}),w.jsx(om,{size:10,color:_.accentBlue})]})]}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx("label",{htmlFor:"servers-label",style:{fontSize:"12px",fontWeight:"600",color:_.textSecondary,fontFamily:F.body,whiteSpace:"nowrap"},children:"Servers:"}),w.jsx("button",{type:"button",onClick:a,disabled:n,style:{padding:"8px 14px",background:n?_.buttonSecondary:_.buttonPrimary,color:n?_.textTertiary:_.textInverse,border:"none",borderRadius:"6px",fontSize:"12px",fontWeight:"600",fontFamily:F.body,cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",whiteSpace:"nowrap"},onMouseEnter:x=>{n||(x.currentTarget.style.background=_.buttonPrimaryHover,x.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:x=>{n||(x.currentTarget.style.background=_.buttonPrimary,x.currentTarget.style.transform="translateY(0)")},children:n?w.jsxs(w.Fragment,{children:[w.jsx($d,{size:12}),w.jsx("span",{children:"Discovering..."})]}):w.jsxs(w.Fragment,{children:[w.jsx(Md,{size:12,color:_.textInverse}),w.jsx("span",{children:"Discover"})]})}),i.length>0&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 10px",background:_.bgTertiary,borderRadius:"8px",fontSize:"11px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body},children:[w.jsx(Md,{size:12,color:_.accentGreen}),w.jsxs("span",{children:[i.length," server",i.length!==1?"s":""]})]})]}),w.jsx("button",{type:"button",onClick:()=>y(!0),disabled:c,style:{padding:"8px 14px",background:_.buttonSecondary,border:`1px solid ${_.borderLight}`,color:_.textSecondary,cursor:c?"not-allowed":"pointer",fontSize:"12px",fontWeight:"500",fontFamily:F.body,borderRadius:"8px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",whiteSpace:"nowrap",opacity:c?.5:1},onMouseEnter:x=>{c||(x.currentTarget.style.background=_.buttonSecondaryHover,x.currentTarget.style.color=_.textPrimary)},onMouseLeave:x=>{c||(x.currentTarget.style.background=_.buttonSecondary,x.currentTarget.style.color=_.textSecondary)},title:"Clear cached scan results",children:c?w.jsxs(w.Fragment,{children:[w.jsx($d,{size:12}),w.jsx("span",{children:"Clearing..."})]}):w.jsxs(w.Fragment,{children:[w.jsx(wc,{size:14,stroke:1.5}),w.jsx("span",{children:"Clear Cache"})]})}),w.jsx(Ch,{isOpen:v,onClose:()=>y(!1),onConfirm:async()=>{(await u()).success&&y(!1)},title:"Clear Scan Cache?",message:"Are you sure you want to clear all cached scan results? This will force fresh scans for all servers on the next scan.",confirmText:"Clear Cache",cancelText:"Cancel",danger:!1})]})}function tpe(){return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginRight:"auto"},children:[w.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"10px",background:`linear-gradient(135deg, ${_.accentBlue}20, ${_.accentGreen}20)`,border:`2px solid ${_.accentBlue}40`,flexShrink:0},children:w.jsx(cN,{size:20,color:_.accentBlue})}),w.jsxs("div",{children:[w.jsx("h1",{style:{fontSize:"18px",fontWeight:"700",color:_.textPrimary,fontFamily:F.body,margin:0,letterSpacing:"-0.2px"},children:w.jsxs("a",{href:"https://smart.mcpshark.sh/#get-started",target:"_blank",rel:"noopener noreferrer",style:{color:_.textPrimary,textDecoration:"none",display:"inline-flex",alignItems:"center",gap:"6px",transition:"color 0.2s ease"},onMouseEnter:r=>{r.currentTarget.style.color=_.accentBlue},onMouseLeave:r=>{r.currentTarget.style.color=_.textPrimary},children:["Smart Scan",w.jsx(om,{size:12,color:"currentColor"})]})}),w.jsx("p",{style:{fontSize:"11px",color:_.textSecondary,fontFamily:F.body,margin:0,lineHeight:"1.3"},children:"AI-powered security analysis for Model Context Protocol (MCP) servers"})]})]})}function rpe({viewMode:r,setViewMode:e,onSwitchToScan:t,onSwitchToList:n}){return w.jsxs("div",{style:{display:"flex",gap:"8px",border:`1px solid ${_.borderLight}`,borderRadius:"8px",padding:"4px",background:_.bgSecondary},children:[w.jsx("button",{type:"button",onClick:()=>{e("scan"),t?.()},style:{padding:"6px 14px",background:r==="scan"?_.bgCard:"transparent",border:"none",color:r==="scan"?_.textPrimary:_.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:r==="scan"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"Scan Servers"}),w.jsx("button",{type:"button",onClick:()=>{e("list"),n?.()},style:{padding:"6px 14px",background:r==="list"?_.bgCard:"transparent",border:"none",color:r==="list"?_.textPrimary:_.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:F.body,fontWeight:r==="list"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"View All Scans"})]})}function npe(r,e,t){const[n,a]=Z.useState(!1);return{clearingCache:n,clearCache:async()=>{a(!0),t(null);try{const o=await fetch("/api/smartscan/cache/clear",{method:"POST"}),s=await o.json();if(o.ok)return r.length>0&&await e(),{success:!0,message:s.message};throw new Error(s.error||"Failed to clear cache")}catch(o){return t(o.message||"Failed to clear cache"),{success:!1,error:o.message}}finally{a(!1)}}}}function ape(r){const[e,t]=Z.useState(null),[n,a]=Z.useState([]),[i,o]=Z.useState(new Set),[s,l]=Z.useState(!1),[u,c]=Z.useState(null);return{mcpData:e,discoveredServers:n,selectedServers:i,setSelectedServers:o,loadingData:s,discoverMcpData:async()=>{l(!0),r(null),t(null),a([]);try{const h=await fetch("/api/smartscan/discover");if(!h.ok){const y=await h.json();throw new Error(y.message||"Failed to discover servers")}const v=await h.json();if(!v.success||!v.servers||v.servers.length===0)throw new Error("No MCP servers found in config. Please configure servers in the Setup tab.");if(a(v.servers),v.servers.length>0){o(new Set(v.servers.map(y=>y.name)));try{const y=await fetch("/api/smartscan/cached-results",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({servers:v.servers})});if(y.ok){const m=await y.json();m.success&&m.results&&m.results.filter(b=>b.success&&b.cached).length>0}}catch(y){console.debug("Could not load cached results:",y)}}if(v.servers.length>0){const y=v.servers[0];t({server:{name:y.name,description:"Discovered from MCP config"},tools:y.tools||[],resources:y.resources||[],prompts:y.prompts||[]})}}catch(h){r(h.message||"Failed to discover MCP server data")}finally{l(!1)}},makeMcpRequest:async(h,v={})=>{const y={"Content-Type":"application/json"};u&&(y["Mcp-Session-Id"]=u);const m=await fetch("/api/playground/proxy",{method:"POST",headers:y,body:JSON.stringify({method:h,params:v})}),x=await m.json(),b=m.headers.get("Mcp-Session-Id")||m.headers.get("mcp-session-id")||x._sessionId;if(b&&b!==u&&c(b),!m.ok)throw new Error(x.error?.message||x.message||"Request failed");return x.result||x}}}function ipe(r,e){const[t,n]=Z.useState([]),[a,i]=Z.useState(!1),[o,s]=Z.useState(null),[l,u]=Z.useState(!1);return{allScans:t,loadingScans:a,loadAllScans:async()=>{i(!0),e(null);try{console.log("Loading cached scans from local storage...");const d=await fetch("/api/smartscan/scans?cache=true"),h=await d.json();if(console.log("Cache response:",{status:d.status,ok:d.ok,cacheData:h}),d.ok){const v=h.scans||[];console.log(`[useScanList] Loaded ${v.length} cached scans from API`),console.log("[useScanList] Full cacheData:",h),v.length>0&&console.log("[useScanList] First scan structure:",{keys:Object.keys(v[0]),serverName:v[0].serverName,server_name:v[0].server_name,server:v[0].server,fullScan:v[0]});const y=v.map((m,x)=>{console.log(`[useScanList] Transforming scan ${x}:`,{scanId:m.id||m.scan_id,serverName:m.serverName,server_name:m.server_name,server:m.server,hasServerName:!!m.serverName,hasServerNameAlt:!!m.server_name,hasServer:!!m.server});const b=m.serverName?.trim()||m.server_name?.trim()||m.server?.name?.trim()||"Unknown Server";console.log(`[useScanList] Extracted serverName for scan ${x}: "${b}"`),b==="Unknown Server"&&console.error("[useScanList] Could not find server name in scan:",{scanId:m.id||m.scan_id,hasServerName:!!m.serverName,hasServerNameAlt:!!m.server_name,hasServer:!!m.server,serverNameValue:m.serverName,serverNameAltValue:m.server_name,serverNameFromServer:m.server?.name,scanKeys:Object.keys(m),fullScanObject:m});const T=m.data||m.result||m,C=T?.data&&typeof T.data=="object"?T.data:T,k={serverName:b,success:!0,cached:!0,data:{scan_id:m.scan_id||m.id,data:C}};return console.log(`[useScanList] Transformed result ${x}:`,{serverName:k.serverName,scan_id:k.data.scan_id}),k});console.log("[useScanList] Final transformed scanResults:",y.map(m=>({serverName:m.serverName,scan_id:m.data.scan_id}))),console.log("[useScanList] Setting allScans state with:",y.length,"items"),console.log("[useScanList] First item serverName:",y[0]?.serverName),console.log("[useScanList] Second item serverName:",y[1]?.serverName),n(y),y.length===0&&e("No cached scans found. Please run a scan first to see results here.")}else e(h.error||h.message||"Failed to load cached scans")}catch(d){e(d.message||"Failed to load cached scans")}finally{i(!1)}},selectedScan:o,setSelectedScan:s,loadingScanDetail:l,loadScanDetail:async d=>{if(!d){s(null);return}const h=t.find(v=>v.data?.scan_id===d||v.data?.data?.id===d||v.data?.data?.scan_id===d);if(h?.cached&&h.data?.data){const v=h.data.data;s({...v,scan_id:h.data.scan_id||v.id||v.scan_id});return}if(!r){e("Please enter your API token to view scan details");return}u(!0),e(null);try{const v=await fetch(`/api/smartscan/scans/${d}`,{headers:{Authorization:`Bearer ${r}`}}),y=await v.json();v.ok?s(y.result||y):e(y.error||y.message||"Failed to load scan details")}catch(v){e(v.message||"Failed to load scan details")}finally{u(!1)}}}}function ope(r,e,t,n){const[a,i]=Z.useState(!1),[o,s]=Z.useState(null),[l,u]=Z.useState([]);return{scanning:a,scanResult:o,scanResults:l,runScan:async()=>{if(!r){n("Please enter your API token");return}if(!e||e.length===0){n("Please discover MCP servers first");return}if(t.size===0){n("Please select at least one server to scan");return}i(!0),n(null),s(null),u([]);const f=e.filter(d=>t.has(d.name));try{const d=await fetch("/api/smartscan/scans/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiToken:r,servers:f})}),h=await d.json();if(!d.ok){const v=m=>Array.isArray(m)?`Validation failed: ${m.map(x=>typeof x=="string"?x:x.field&&x.message?`${x.field}: ${x.message}`:JSON.stringify(x)).join("; ")}`:null,y=d.status===400&&h.details?v(h.details)||h.error||h.message||`API error: ${d.status}`:h.error||h.message||`API error: ${d.status}`;n(y);return}if(h.results&&Array.isArray(h.results)){u(h.results);const v=h.results.find(y=>y.success);v&&s(v.data)}}catch(d){n(d.message||"Failed to run scan")}finally{i(!1)}}}}function spe(){const[r,e]=Z.useState(null);Z.useEffect(()=>{t();const n=setInterval(t,2e3);return()=>clearInterval(n)},[]);const t=async()=>{try{const n=await fetch("/api/composite/status");if(!n.ok)throw new Error("Server not available");const a=await n.json();e(a)}catch{e({running:!1})}};return{serverStatus:r}}function lpe(){const[r,e]=Z.useState(""),t=Z.useRef(null);Z.useEffect(()=>(n(),()=>{t.current&&clearTimeout(t.current)}),[]);const n=async()=>{try{const i=await fetch("/api/smartscan/token");if(i.ok){const o=await i.json();o.token&&e(o.token)}}catch{console.debug("No stored token found")}};return{apiToken:r,setApiToken:e,saveToken:async i=>{try{(await fetch("/api/smartscan/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok||console.error("Failed to save token")}catch(o){console.error("Error saving token:",o)}},saveTokenTimeoutRef:t}}function upe(){const[r,e]=Z.useState(null),{apiToken:t,setApiToken:n,saveToken:a,saveTokenTimeoutRef:i}=lpe(),{serverStatus:o}=spe(),{mcpData:s,discoveredServers:l,selectedServers:u,setSelectedServers:c,loadingData:f,discoverMcpData:d,makeMcpRequest:h}=ape(e),{scanning:v,scanResult:y,scanResults:m,runScan:x}=ope(t,l,u,e),{allScans:b,loadingScans:T,loadAllScans:C,selectedScan:k,setSelectedScan:L,loadingScanDetail:A,loadScanDetail:D}=ipe(t,e),{clearingCache:P,clearCache:R}=npe(l,d,e);return{apiToken:t,setApiToken:n,serverStatus:o,mcpData:s,discoveredServers:l,selectedServers:u,setSelectedServers:c,loadingData:f,scanning:v,scanResult:y,scanResults:m,error:r,saveToken:a,discoverMcpData:d,runScan:x,clearCache:R,clearingCache:P,saveTokenTimeoutRef:i,allScans:b,loadingScans:T,loadAllScans:C,selectedScan:k,setSelectedScan:L,loadingScanDetail:A,loadScanDetail:D,makeMcpRequest:h}}function cpe(){const[r,e]=Z.useState("scan"),{apiToken:t,setApiToken:n,discoveredServers:a,selectedServers:i,setSelectedServers:o,loadingData:s,scanning:l,scanResult:u,scanResults:c,error:f,saveToken:d,discoverMcpData:h,runScan:v,clearCache:y,clearingCache:m,allScans:x,loadingScans:b,loadAllScans:T,selectedScan:C,setSelectedScan:k,loadingScanDetail:L,loadScanDetail:A}=upe();return w.jsxs("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",background:_.bgPrimary},children:[w.jsx("div",{style:{background:_.bgCard,borderBottom:`1px solid ${_.borderLight}`,padding:"16px 24px",boxShadow:`0 2px 4px ${_.shadowSm}`},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px",flexWrap:"wrap"},children:[w.jsx(tpe,{}),w.jsx(rpe,{viewMode:r,setViewMode:e,onSwitchToScan:()=>k(null),onSwitchToList:()=>{k(null),x.length===0&&T()}}),r==="scan"&&w.jsx(epe,{apiToken:t,setApiToken:n,saveToken:d,loadingData:s,discoverMcpData:h,discoveredServers:a,selectedServers:i,setSelectedServers:o,runScan:v,scanning:l,clearCache:y,clearingCache:m})]})}),r==="scan"?w.jsx(Jhe,{discoveredServers:a,selectedServers:i,setSelectedServers:o,runScan:v,scanning:l,apiToken:t,error:f,scanResults:c,scanResult:u,selectedScan:C,loadingScanDetail:L,setSelectedScan:k,loadScanDetail:A,onViewScan:D=>{if(console.log("onViewScan - scanData:",D),D.scan_id&&t)A(D.scan_id);else if(D.data&&typeof D.data=="object"){const P=D.data;k({...P,scan_id:D.scan_id||P.id||P.scan_id})}else k(D)}}):w.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px",background:_.bgPrimary},children:w.jsx(qhe,{error:f,loadingScans:b,selectedScan:C,loadingScanDetail:L,allScans:x,setSelectedScan:k,loadScanDetail:A,onViewScan:D=>{console.log("onViewScan - scanData:",D);const P=D.scan_id||D.id||D.hash,z=x.find(B=>B.data?.scan_id===P||B.data?.data?.scan_id===P)?.serverName||D.serverName||"Unknown Server";if(D?.data&&typeof D.data=="object"){const B=D.data;k({...B,scan_id:P||B.id||B.scan_id||B.hash,serverName:z})}else D&&typeof D=="object"?k({...D,scan_id:P||D.id||D.hash,serverName:z}):console.warn("Invalid scanData structure:",D)}})})]})}const fpe=({size:r=32,className:e="",style:t={}})=>w.jsx("img",{src:"/og-image.png",alt:"MCP Shark Logo",width:r,height:r,className:e,style:{width:`${r}px`,height:`${r}px`,objectFit:"contain",...t},"aria-label":"MCP Shark Logo"});var z6={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},R2={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},dpe=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],em={CSS:{},springs:{}};function Qa(r,e,t){return Math.min(Math.max(r,e),t)}function Wd(r,e){return r.indexOf(e)>-1}function w_(r,e){return r.apply(null,e)}var Xe={arr:function(r){return Array.isArray(r)},obj:function(r){return Wd(Object.prototype.toString.call(r),"Object")},pth:function(r){return Xe.obj(r)&&r.hasOwnProperty("totalLength")},svg:function(r){return r instanceof SVGElement},inp:function(r){return r instanceof HTMLInputElement},dom:function(r){return r.nodeType||Xe.svg(r)},str:function(r){return typeof r=="string"},fnc:function(r){return typeof r=="function"},und:function(r){return typeof r>"u"},nil:function(r){return Xe.und(r)||r===null},hex:function(r){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)},rgb:function(r){return/^rgb/.test(r)},hsl:function(r){return/^hsl/.test(r)},col:function(r){return Xe.hex(r)||Xe.rgb(r)||Xe.hsl(r)},key:function(r){return!z6.hasOwnProperty(r)&&!R2.hasOwnProperty(r)&&r!=="targets"&&r!=="keyframes"}};function O6(r){var e=/\(([^)]+)\)/.exec(r);return e?e[1].split(",").map(function(t){return parseFloat(t)}):[]}function N6(r,e){var t=O6(r),n=Qa(Xe.und(t[0])?1:t[0],.1,100),a=Qa(Xe.und(t[1])?100:t[1],.1,100),i=Qa(Xe.und(t[2])?10:t[2],.1,100),o=Qa(Xe.und(t[3])?0:t[3],.1,100),s=Math.sqrt(a/n),l=i/(2*Math.sqrt(a*n)),u=l<1?s*Math.sqrt(1-l*l):0,c=1,f=l<1?(l*s+-o)/u:-o+s;function d(v){var y=e?e*v/1e3:v;return l<1?y=Math.exp(-y*l*s)*(c*Math.cos(u*y)+f*Math.sin(u*y)):y=(c+f*y)*Math.exp(-y*s),v===0||v===1?v:1-y}function h(){var v=em.springs[r];if(v)return v;for(var y=1/6,m=0,x=0;;)if(m+=y,d(m)===1){if(x++,x>=16)break}else x=0;var b=m*y*1e3;return em.springs[r]=b,b}return e?d:h}function hpe(r){return r===void 0&&(r=10),function(e){return Math.ceil(Qa(e,1e-6,1)*r)*(1/r)}}var ppe=(function(){var r=11,e=1/(r-1);function t(c,f){return 1-3*f+3*c}function n(c,f){return 3*f-6*c}function a(c){return 3*c}function i(c,f,d){return((t(f,d)*c+n(f,d))*c+a(f))*c}function o(c,f,d){return 3*t(f,d)*c*c+2*n(f,d)*c+a(f)}function s(c,f,d,h,v){var y,m,x=0;do m=f+(d-f)/2,y=i(m,h,v)-c,y>0?d=m:f=m;while(Math.abs(y)>1e-7&&++x<10);return m}function l(c,f,d,h){for(var v=0;v<4;++v){var y=o(f,d,h);if(y===0)return f;var m=i(f,d,h)-c;f-=m/y}return f}function u(c,f,d,h){if(!(0<=c&&c<=1&&0<=d&&d<=1))return;var v=new Float32Array(r);if(c!==f||d!==h)for(var y=0;y<r;++y)v[y]=i(y*e,c,d);function m(x){for(var b=0,T=1,C=r-1;T!==C&&v[T]<=x;++T)b+=e;--T;var k=(x-v[T])/(v[T+1]-v[T]),L=b+k*e,A=o(L,c,d);return A>=.001?l(x,L,c,d):A===0?L:s(x,b,b+e,c,d)}return function(x){return c===f&&d===h||x===0||x===1?x:i(m(x),f,h)}}return u})(),B6=(function(){var r={linear:function(){return function(n){return n}}},e={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Expo:function(){return function(n){return n?Math.pow(2,10*n-10):0}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var a,i=4;n<((a=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((a*3-2)/22-n,2)}},Elastic:function(n,a){n===void 0&&(n=1),a===void 0&&(a=.5);var i=Qa(n,1,10),o=Qa(a,.1,2);return function(s){return s===0||s===1?s:-i*Math.pow(2,10*(s-1))*Math.sin((s-1-o/(Math.PI*2)*Math.asin(1/i))*(Math.PI*2)/o)}}},t=["Quad","Cubic","Quart","Quint"];return t.forEach(function(n,a){e[n]=function(){return function(i){return Math.pow(i,a+2)}}}),Object.keys(e).forEach(function(n){var a=e[n];r["easeIn"+n]=a,r["easeOut"+n]=function(i,o){return function(s){return 1-a(i,o)(1-s)}},r["easeInOut"+n]=function(i,o){return function(s){return s<.5?a(i,o)(s*2)/2:1-a(i,o)(s*-2+2)/2}},r["easeOutIn"+n]=function(i,o){return function(s){return s<.5?(1-a(i,o)(1-s*2))/2:(a(i,o)(s*2-1)+1)/2}}}),r})();function E2(r,e){if(Xe.fnc(r))return r;var t=r.split("(")[0],n=B6[t],a=O6(r);switch(t){case"spring":return N6(r,e);case"cubicBezier":return w_(ppe,a);case"steps":return w_(hpe,a);default:return w_(n,a)}}function j6(r){try{var e=document.querySelectorAll(r);return e}catch{return}}function Um(r,e){for(var t=r.length,n=arguments.length>=2?arguments[1]:void 0,a=[],i=0;i<t;i++)if(i in r){var o=r[i];e.call(n,o,i,r)&&a.push(o)}return a}function Ym(r){return r.reduce(function(e,t){return e.concat(Xe.arr(t)?Ym(t):t)},[])}function WO(r){return Xe.arr(r)?r:(Xe.str(r)&&(r=j6(r)||r),r instanceof NodeList||r instanceof HTMLCollection?[].slice.call(r):[r])}function z2(r,e){return r.some(function(t){return t===e})}function O2(r){var e={};for(var t in r)e[t]=r[t];return e}function jw(r,e){var t=O2(r);for(var n in r)t[n]=e.hasOwnProperty(n)?e[n]:r[n];return t}function Xm(r,e){var t=O2(r);for(var n in e)t[n]=Xe.und(r[n])?e[n]:r[n];return t}function vpe(r){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(r);return e?"rgba("+e[1]+",1)":r}function gpe(r){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,t=r.replace(e,function(s,l,u,c){return l+l+u+u+c+c}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),a=parseInt(n[1],16),i=parseInt(n[2],16),o=parseInt(n[3],16);return"rgba("+a+","+i+","+o+",1)"}function ype(r){var e=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(r)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(r),t=parseInt(e[1],10)/360,n=parseInt(e[2],10)/100,a=parseInt(e[3],10)/100,i=e[4]||1;function o(d,h,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?d+(h-d)*6*v:v<1/2?h:v<2/3?d+(h-d)*(2/3-v)*6:d}var s,l,u;if(n==0)s=l=u=a;else{var c=a<.5?a*(1+n):a+n-a*n,f=2*a-c;s=o(f,c,t+1/3),l=o(f,c,t),u=o(f,c,t-1/3)}return"rgba("+s*255+","+l*255+","+u*255+","+i+")"}function mpe(r){if(Xe.rgb(r))return vpe(r);if(Xe.hex(r))return gpe(r);if(Xe.hsl(r))return ype(r)}function Wi(r){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(r);if(e)return e[1]}function xpe(r){if(Wd(r,"translate")||r==="perspective")return"px";if(Wd(r,"rotate")||Wd(r,"skew"))return"deg"}function Fw(r,e){return Xe.fnc(r)?r(e.target,e.id,e.total):r}function Ja(r,e){return r.getAttribute(e)}function N2(r,e,t){var n=Wi(e);if(z2([t,"deg","rad","turn"],n))return e;var a=em.CSS[e+t];if(!Xe.und(a))return a;var i=100,o=document.createElement(r.tagName),s=r.parentNode&&r.parentNode!==document?r.parentNode:document.body;s.appendChild(o),o.style.position="absolute",o.style.width=i+t;var l=i/o.offsetWidth;s.removeChild(o);var u=l*parseFloat(e);return em.CSS[e+t]=u,u}function F6(r,e,t){if(e in r.style){var n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=r.style[e]||getComputedStyle(r).getPropertyValue(n)||"0";return t?N2(r,a,t):a}}function B2(r,e){if(Xe.dom(r)&&!Xe.inp(r)&&(!Xe.nil(Ja(r,e))||Xe.svg(r)&&r[e]))return"attribute";if(Xe.dom(r)&&z2(dpe,e))return"transform";if(Xe.dom(r)&&e!=="transform"&&F6(r,e))return"css";if(r[e]!=null)return"object"}function V6(r){if(Xe.dom(r)){for(var e=r.style.transform||"",t=/(\w+)\(([^)]*)\)/g,n=new Map,a;a=t.exec(e);)n.set(a[1],a[2]);return n}}function Spe(r,e,t,n){var a=Wd(e,"scale")?1:0+xpe(e),i=V6(r).get(e)||a;return t&&(t.transforms.list.set(e,i),t.transforms.last=e),n?N2(r,i,n):i}function j2(r,e,t,n){switch(B2(r,e)){case"transform":return Spe(r,e,n,t);case"css":return F6(r,e,t);case"attribute":return Ja(r,e);default:return r[e]||0}}function F2(r,e){var t=/^(\*=|\+=|-=)/.exec(r);if(!t)return r;var n=Wi(r)||0,a=parseFloat(e),i=parseFloat(r.replace(t[0],""));switch(t[0][0]){case"+":return a+i+n;case"-":return a-i+n;case"*":return a*i+n}}function G6(r,e){if(Xe.col(r))return mpe(r);if(/\s/g.test(r))return r;var t=Wi(r),n=t?r.substr(0,r.length-t.length):r;return e?n+e:n}function V2(r,e){return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}function _pe(r){return Math.PI*2*Ja(r,"r")}function bpe(r){return Ja(r,"width")*2+Ja(r,"height")*2}function wpe(r){return V2({x:Ja(r,"x1"),y:Ja(r,"y1")},{x:Ja(r,"x2"),y:Ja(r,"y2")})}function W6(r){for(var e=r.points,t=0,n,a=0;a<e.numberOfItems;a++){var i=e.getItem(a);a>0&&(t+=V2(n,i)),n=i}return t}function Tpe(r){var e=r.points;return W6(r)+V2(e.getItem(e.numberOfItems-1),e.getItem(0))}function H6(r){if(r.getTotalLength)return r.getTotalLength();switch(r.tagName.toLowerCase()){case"circle":return _pe(r);case"rect":return bpe(r);case"line":return wpe(r);case"polyline":return W6(r);case"polygon":return Tpe(r)}}function Cpe(r){var e=H6(r);return r.setAttribute("stroke-dasharray",e),e}function Mpe(r){for(var e=r.parentNode;Xe.svg(e)&&Xe.svg(e.parentNode);)e=e.parentNode;return e}function $6(r,e){var t=e||{},n=t.el||Mpe(r),a=n.getBoundingClientRect(),i=Ja(n,"viewBox"),o=a.width,s=a.height,l=t.viewBox||(i?i.split(" "):[0,0,o,s]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:o,h:s,vW:l[2],vH:l[3]}}function kpe(r,e){var t=Xe.str(r)?j6(r)[0]:r,n=e||100;return function(a){return{property:a,el:t,svg:$6(t),totalLength:H6(t)*(n/100)}}}function Lpe(r,e,t){function n(c){c===void 0&&(c=0);var f=e+c>=1?e+c:0;return r.el.getPointAtLength(f)}var a=$6(r.el,r.svg),i=n(),o=n(-1),s=n(1),l=t?1:a.w/a.vW,u=t?1:a.h/a.vH;switch(r.property){case"x":return(i.x-a.x)*l;case"y":return(i.y-a.y)*u;case"angle":return Math.atan2(s.y-o.y,s.x-o.x)*180/Math.PI}}function HO(r,e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=G6(Xe.pth(r)?r.totalLength:r,e)+"";return{original:n,numbers:n.match(t)?n.match(t).map(Number):[0],strings:Xe.str(r)||e?n.split(t):[]}}function G2(r){var e=r?Ym(Xe.arr(r)?r.map(WO):WO(r)):[];return Um(e,function(t,n,a){return a.indexOf(t)===n})}function U6(r){var e=G2(r);return e.map(function(t,n){return{target:t,id:n,total:e.length,transforms:{list:V6(t)}}})}function Ape(r,e){var t=O2(e);if(/^spring/.test(t.easing)&&(t.duration=N6(t.easing)),Xe.arr(r)){var n=r.length,a=n===2&&!Xe.obj(r[0]);a?r={value:r}:Xe.fnc(e.duration)||(t.duration=e.duration/n)}var i=Xe.arr(r)?r:[r];return i.map(function(o,s){var l=Xe.obj(o)&&!Xe.pth(o)?o:{value:o};return Xe.und(l.delay)&&(l.delay=s?0:e.delay),Xe.und(l.endDelay)&&(l.endDelay=s===i.length-1?e.endDelay:0),l}).map(function(o){return Xm(o,t)})}function Ipe(r){for(var e=Um(Ym(r.map(function(i){return Object.keys(i)})),function(i){return Xe.key(i)}).reduce(function(i,o){return i.indexOf(o)<0&&i.push(o),i},[]),t={},n=function(i){var o=e[i];t[o]=r.map(function(s){var l={};for(var u in s)Xe.key(u)?u==o&&(l.value=s[u]):l[u]=s[u];return l})},a=0;a<e.length;a++)n(a);return t}function Dpe(r,e){var t=[],n=e.keyframes;n&&(e=Xm(Ipe(n),e));for(var a in e)Xe.key(a)&&t.push({name:a,tweens:Ape(e[a],r)});return t}function Ppe(r,e){var t={};for(var n in r){var a=Fw(r[n],e);Xe.arr(a)&&(a=a.map(function(i){return Fw(i,e)}),a.length===1&&(a=a[0])),t[n]=a}return t.duration=parseFloat(t.duration),t.delay=parseFloat(t.delay),t}function Rpe(r,e){var t;return r.tweens.map(function(n){var a=Ppe(n,e),i=a.value,o=Xe.arr(i)?i[1]:i,s=Wi(o),l=j2(e.target,r.name,s,e),u=t?t.to.original:l,c=Xe.arr(i)?i[0]:u,f=Wi(c)||Wi(l),d=s||f;return Xe.und(o)&&(o=u),a.from=HO(c,d),a.to=HO(F2(o,c),d),a.start=t?t.end:0,a.end=a.start+a.delay+a.duration+a.endDelay,a.easing=E2(a.easing,a.duration),a.isPath=Xe.pth(i),a.isPathTargetInsideSVG=a.isPath&&Xe.svg(e.target),a.isColor=Xe.col(a.from.original),a.isColor&&(a.round=1),t=a,a})}var Y6={css:function(r,e,t){return r.style[e]=t},attribute:function(r,e,t){return r.setAttribute(e,t)},object:function(r,e,t){return r[e]=t},transform:function(r,e,t,n,a){if(n.list.set(e,t),e===n.last||a){var i="";n.list.forEach(function(o,s){i+=s+"("+o+") "}),r.style.transform=i}}};function X6(r,e){var t=U6(r);t.forEach(function(n){for(var a in e){var i=Fw(e[a],n),o=n.target,s=Wi(i),l=j2(o,a,s,n),u=s||Wi(l),c=F2(G6(i,u),l),f=B2(o,a);Y6[f](o,a,c,n.transforms,!0)}})}function Epe(r,e){var t=B2(r.target,e.name);if(t){var n=Rpe(e,r),a=n[n.length-1];return{type:t,property:e.name,animatable:r,tweens:n,duration:a.end,delay:n[0].delay,endDelay:a.endDelay}}}function zpe(r,e){return Um(Ym(r.map(function(t){return e.map(function(n){return Epe(t,n)})})),function(t){return!Xe.und(t)})}function Z6(r,e){var t=r.length,n=function(i){return i.timelineOffset?i.timelineOffset:0},a={};return a.duration=t?Math.max.apply(Math,r.map(function(i){return n(i)+i.duration})):e.duration,a.delay=t?Math.min.apply(Math,r.map(function(i){return n(i)+i.delay})):e.delay,a.endDelay=t?a.duration-Math.max.apply(Math,r.map(function(i){return n(i)+i.duration-i.endDelay})):e.endDelay,a}var $O=0;function Ope(r){var e=jw(z6,r),t=jw(R2,r),n=Dpe(t,r),a=U6(r.targets),i=zpe(a,n),o=Z6(i,t),s=$O;return $O++,Xm(e,{id:s,children:[],animatables:a,animations:i,duration:o.duration,delay:o.delay,endDelay:o.endDelay})}var ya=[],K6=(function(){var r;function e(){!r&&(!UO()||!ft.suspendWhenDocumentHidden)&&ya.length>0&&(r=requestAnimationFrame(t))}function t(a){for(var i=ya.length,o=0;o<i;){var s=ya[o];s.paused?(ya.splice(o,1),i--):(s.tick(a),o++)}r=o>0?requestAnimationFrame(t):void 0}function n(){ft.suspendWhenDocumentHidden&&(UO()?r=cancelAnimationFrame(r):(ya.forEach(function(a){return a._onDocumentVisibility()}),K6()))}return typeof document<"u"&&document.addEventListener("visibilitychange",n),e})();function UO(){return!!document&&document.hidden}function ft(r){r===void 0&&(r={});var e=0,t=0,n=0,a,i=0,o=null;function s(b){var T=window.Promise&&new Promise(function(C){return o=C});return b.finished=T,T}var l=Ope(r);s(l);function u(){var b=l.direction;b!=="alternate"&&(l.direction=b!=="normal"?"normal":"reverse"),l.reversed=!l.reversed,a.forEach(function(T){return T.reversed=l.reversed})}function c(b){return l.reversed?l.duration-b:b}function f(){e=0,t=c(l.currentTime)*(1/ft.speed)}function d(b,T){T&&T.seek(b-T.timelineOffset)}function h(b){if(l.reversePlayback)for(var C=i;C--;)d(b,a[C]);else for(var T=0;T<i;T++)d(b,a[T])}function v(b){for(var T=0,C=l.animations,k=C.length;T<k;){var L=C[T],A=L.animatable,D=L.tweens,P=D.length-1,R=D[P];P&&(R=Um(D,function(Ce){return b<Ce.end})[0]||R);for(var z=Qa(b-R.start-R.delay,0,R.duration)/R.duration,B=isNaN(z)?1:R.easing(z),N=R.to.strings,W=R.round,$=[],H=R.to.numbers.length,U=void 0,G=0;G<H;G++){var X=void 0,K=R.to.numbers[G],V=R.from.numbers[G]||0;R.isPath?X=Lpe(R.value,B*K,R.isPathTargetInsideSVG):X=V+B*(K-V),W&&(R.isColor&&G>2||(X=Math.round(X*W)/W)),$.push(X)}var Y=N.length;if(!Y)U=$[0];else{U=N[0];for(var ne=0;ne<Y;ne++){N[ne];var ue=N[ne+1],fe=$[ne];isNaN(fe)||(ue?U+=fe+ue:U+=fe+" ")}}Y6[L.type](A.target,L.property,U,A.transforms),L.currentValue=U,T++}}function y(b){l[b]&&!l.passThrough&&l[b](l)}function m(){l.remaining&&l.remaining!==!0&&l.remaining--}function x(b){var T=l.duration,C=l.delay,k=T-l.endDelay,L=c(b);l.progress=Qa(L/T*100,0,100),l.reversePlayback=L<l.currentTime,a&&h(L),!l.began&&l.currentTime>0&&(l.began=!0,y("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,y("loopBegin")),L<=C&&l.currentTime!==0&&v(0),(L>=k&&l.currentTime!==T||!T)&&v(T),L>C&&L<k?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,y("changeBegin")),y("change"),v(L)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,y("changeComplete")),l.currentTime=Qa(L,0,T),l.began&&y("update"),b>=T&&(t=0,m(),l.remaining?(e=n,y("loopComplete"),l.loopBegan=!1,l.direction==="alternate"&&u()):(l.paused=!0,l.completed||(l.completed=!0,y("loopComplete"),y("complete"),!l.passThrough&&"Promise"in window&&(o(),s(l)))))}return l.reset=function(){var b=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed=b==="reverse",l.remaining=l.loop,a=l.children,i=a.length;for(var T=i;T--;)l.children[T].reset();(l.reversed&&l.loop!==!0||b==="alternate"&&l.loop===1)&&l.remaining++,v(l.reversed?l.duration:0)},l._onDocumentVisibility=f,l.set=function(b,T){return X6(b,T),l},l.tick=function(b){n=b,e||(e=n),x((n+(t-e))*ft.speed)},l.seek=function(b){x(c(b))},l.pause=function(){l.paused=!0,f()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,ya.push(l),f(),K6())},l.reverse=function(){u(),l.completed=!l.reversed,f()},l.restart=function(){l.reset(),l.play()},l.remove=function(b){var T=G2(b);q6(T,l)},l.reset(),l.autoplay&&l.play(),l}function YO(r,e){for(var t=e.length;t--;)z2(r,e[t].animatable.target)&&e.splice(t,1)}function q6(r,e){var t=e.animations,n=e.children;YO(r,t);for(var a=n.length;a--;){var i=n[a],o=i.animations;YO(r,o),!o.length&&!i.children.length&&n.splice(a,1)}!t.length&&!n.length&&e.pause()}function Npe(r){for(var e=G2(r),t=ya.length;t--;){var n=ya[t];q6(e,n)}}function Bpe(r,e){e===void 0&&(e={});var t=e.direction||"normal",n=e.easing?E2(e.easing):null,a=e.grid,i=e.axis,o=e.from||0,s=o==="first",l=o==="center",u=o==="last",c=Xe.arr(r),f=parseFloat(c?r[0]:r),d=c?parseFloat(r[1]):0,h=Wi(c?r[1]:r)||0,v=e.start||0+(c?f:0),y=[],m=0;return function(x,b,T){if(s&&(o=0),l&&(o=(T-1)/2),u&&(o=T-1),!y.length){for(var C=0;C<T;C++){if(!a)y.push(Math.abs(o-C));else{var k=l?(a[0]-1)/2:o%a[0],L=l?(a[1]-1)/2:Math.floor(o/a[0]),A=C%a[0],D=Math.floor(C/a[0]),P=k-A,R=L-D,z=Math.sqrt(P*P+R*R);i==="x"&&(z=-P),i==="y"&&(z=-R),y.push(z)}m=Math.max.apply(Math,y)}n&&(y=y.map(function(N){return n(N/m)*m})),t==="reverse"&&(y=y.map(function(N){return i?N<0?N*-1:-N:Math.abs(m-N)}))}var B=c?(d-f)/m:f;return v+B*(Math.round(y[b]*100)/100)+h}}function jpe(r){r===void 0&&(r={});var e=ft(r);return e.duration=0,e.add=function(t,n){var a=ya.indexOf(e),i=e.children;a>-1&&ya.splice(a,1);function o(d){d.passThrough=!0}for(var s=0;s<i.length;s++)o(i[s]);var l=Xm(t,jw(R2,r));l.targets=l.targets||r.targets;var u=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=Xe.und(n)?u:F2(n,u),o(e),e.seek(l.timelineOffset);var c=ft(l);o(c),i.push(c);var f=Z6(i,r);return e.delay=f.delay,e.endDelay=f.endDelay,e.duration=f.duration,e.seek(0),e.reset(),e.autoplay&&e.play(),e},e}ft.version="3.2.1";ft.speed=1;ft.suspendWhenDocumentHidden=!0;ft.running=ya;ft.remove=Npe;ft.get=j2;ft.set=X6;ft.convertPx=N2;ft.path=kpe;ft.setDashoffset=Cpe;ft.stagger=Bpe;ft.timeline=jpe;ft.easing=E2;ft.penner=B6;ft.random=function(r,e){return Math.floor(Math.random()*(e-r+1))+r};function Fpe({tabs:r,activeTab:e,onTabChange:t,tabRefs:n,indicatorRef:a}){return Z.useEffect(()=>{const i=n.current[e];if(i&&a.current){const{offsetLeft:o,offsetWidth:s}=i;ft({targets:a.current,left:o,width:s,duration:400,easing:"easeOutExpo"})}},[e,n,a]),w.jsxs("div",{style:{position:"relative",display:"flex",flex:1},children:[r.map(i=>w.jsxs("button",{type:"button",ref:o=>{o&&(n.current[i.id]=o)},"data-tour":i.id==="traffic"?"traffic-tab":i.id==="logs"?"logs-tab":i.id==="setup"?"setup-tab":i.id==="playground"?"playground-tab":"smart-scan-tab",onClick:()=>t(i.id),style:{padding:"14px 24px",background:e===i.id?_.bgSecondary:"transparent",border:"none",borderBottom:"3px solid transparent",color:e===i.id?_.textPrimary:_.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:F.body,fontWeight:e===i.id?"600":"400",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",position:"relative",borderRadius:"8px 8px 0 0",zIndex:1},onMouseEnter:o=>{e!==i.id&&ft({targets:o.currentTarget,background:_.bgHover,color:_.textPrimary,duration:200,easing:"easeOutQuad"})},onMouseLeave:o=>{e!==i.id&&ft({targets:o.currentTarget,background:"transparent",color:_.textSecondary,duration:200,easing:"easeOutQuad"})},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx("div",{style:{display:"flex",alignItems:"center",color:"currentColor"},children:w.jsx(i.icon,{size:16})}),w.jsx("span",{children:i.label})]}),w.jsx("div",{style:{fontSize:"11px",color:e===i.id?_.textSecondary:_.textTertiary,fontWeight:"400",fontFamily:F.body},children:i.description})]},i.id)),w.jsx("div",{ref:a,style:{position:"absolute",bottom:0,height:"3px",background:_.accentBlue,borderRadius:"3px 3px 0 0",zIndex:2,pointerEvents:"none"}})]})}const Vpe=({size:r=16,color:e="currentColor"})=>w.jsx(rm,{size:r,stroke:1.5,color:e}),Gpe=({size:r=16,color:e="currentColor"})=>w.jsx(GG,{size:r,stroke:1.5,color:e}),Wpe=({size:r=16,color:e="currentColor"})=>w.jsx(M_,{size:r,stroke:1.5,color:e}),Hpe=({size:r=16,color:e="currentColor"})=>w.jsx(TG,{size:r,stroke:1.5,color:e}),$pe=({size:r=16,color:e="currentColor"})=>w.jsx(Uw,{size:r,stroke:1.5,color:e}),Upe=({size:r=16,color:e="currentColor"})=>w.jsx(lN,{size:r,stroke:1.5,color:e}),Ype=({size:r=16,color:e="currentColor"})=>w.jsx(ui,{size:r,stroke:1.5,color:e}),Xpe=({size:r=16,color:e="currentColor"})=>w.jsx(nm,{size:r,stroke:1.5,color:e});function Zpe({tabs:r,activeTab:e,onTabChange:t,isDropdownOpen:n,setIsDropdownOpen:a,dropdownRef:i}){return w.jsxs("div",{style:{position:"relative",flex:1,display:"flex",justifyContent:"flex-end"},ref:i,children:[w.jsxs("button",{type:"button",onClick:()=>a(!n),style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px 16px",background:n?_.bgSecondary:"transparent",border:"none",borderRadius:"8px",color:_.textPrimary,cursor:"pointer",fontSize:"14px",fontFamily:F.body,fontWeight:"500"},onMouseEnter:o=>{n||(o.currentTarget.style.background=_.bgHover)},onMouseLeave:o=>{n||(o.currentTarget.style.background="transparent")},children:[w.jsx(Upe,{size:18,color:_.textPrimary}),w.jsx("span",{children:r.find(o=>o.id===e)?.label||"Menu"}),w.jsx("div",{style:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",display:"flex",alignItems:"center"},children:w.jsx(Ype,{size:14,color:_.textPrimary})})]}),n&&w.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:"8px",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"8px",boxShadow:`0 4px 12px ${_.shadowSm}`,minWidth:"280px",zIndex:1e3,overflow:"hidden"},children:r.map(o=>{const s=o.icon;return w.jsxs("button",{type:"button",onClick:()=>{t(o.id),a(!1)},style:{width:"100%",padding:"14px 16px",background:e===o.id?_.bgSecondary:"transparent",border:"none",borderLeft:e===o.id?`3px solid ${_.accentBlue}`:"3px solid transparent",color:e===o.id?_.textPrimary:_.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:F.body,fontWeight:e===o.id?"600":"400",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",textAlign:"left",transition:"all 0.2s"},onMouseEnter:l=>{e!==o.id&&(l.currentTarget.style.background=_.bgHover,l.currentTarget.style.color=_.textPrimary)},onMouseLeave:l=>{e!==o.id&&(l.currentTarget.style.background="transparent",l.currentTarget.style.color=_.textSecondary)},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",width:"100%"},children:[w.jsx("div",{style:{display:"flex",alignItems:"center",color:"currentColor"},children:w.jsx(s,{size:16})}),w.jsx("span",{style:{flex:1},children:o.label})]}),w.jsx("div",{style:{fontSize:"11px",color:e===o.id?_.textSecondary:_.textTertiary,fontWeight:"400",fontFamily:F.body,marginLeft:"26px"},children:o.description})]},o.id)})})]})}function Kpe({activeTab:r,onTabChange:e}){const t=[{id:"traffic",label:"Traffic Capture",icon:Vpe,description:"Wireshark-like HTTP request/response analysis for forensic investigation"},{id:"logs",label:"MCP Shark Logs",icon:Gpe,description:"View MCP Shark server console output and debug logs"},{id:"setup",label:"MCP Server Setup",icon:Wpe,description:"Configure and manage MCP Shark server"},{id:"playground",label:"MCP Playground",icon:Hpe,description:"Test and interact with MCP tools, prompts, and resources"},{id:"security",label:"Local Analysis",icon:Xpe,description:"Local static analysis of captured MCP traffic"},{id:"smart-scan",label:"Smart Scan",icon:$pe,description:"AI-powered security analysis via remote API"}],n=Z.useRef({}),a=Z.useRef(null),[i,o]=Z.useState(!1),[s,l]=Z.useState(!1),u=Z.useRef(null);return Z.useEffect(()=>{const c=()=>{o(window.innerWidth<1200)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),Z.useEffect(()=>{const c=f=>{u.current&&!u.current.contains(f.target)&&l(!1)};return s&&document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[s]),w.jsx("div",{style:{borderBottom:`1px solid ${_.borderLight}`,background:_.bgCard,boxShadow:`0 1px 3px ${_.shadowSm}`},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"0 16px",gap:"12px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",paddingRight:"12px",borderRight:`1px solid ${_.borderLight}`},children:[w.jsx(fpe,{size:24}),w.jsx("span",{style:{fontSize:"16px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body},children:"MCP Shark"})]}),i?w.jsx(Zpe,{tabs:t,activeTab:r,onTabChange:e,isDropdownOpen:s,setIsDropdownOpen:l,dropdownRef:u}):w.jsx(Fpe,{tabs:t,activeTab:r,onTabChange:e,tabRefs:n,indicatorRef:a})]})})}function qpe({style:r,onClick:e,onMouseEnter:t,onMouseLeave:n}){const a=()=>{window.open("/api-docs","_blank"),e&&e()},i={position:"fixed",bottom:"20px",right:"80px",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:_.textSecondary,cursor:"pointer",fontFamily:F.body,boxShadow:`0 4px 12px ${_.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease",...r},o=l=>{l.currentTarget.style.background=_.bgHover,l.currentTarget.style.color=_.textPrimary,l.currentTarget.style.borderColor=_.borderMedium,l.currentTarget.style.transform="scale(1.1)",l.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`,t&&t(l)},s=l=>{l.currentTarget.style.background=_.bgCard,l.currentTarget.style.color=_.textSecondary,l.currentTarget.style.borderColor=_.borderLight,l.currentTarget.style.transform="scale(1)",l.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`,n&&n(l)};return w.jsx("button",{type:"button",onClick:a,"data-tour":"api-docs-button",style:i,onMouseEnter:o,onMouseLeave:s,title:"View API Documentation",children:w.jsx(xG,{size:20,stroke:1.5})})}const Qpe=({size:r=16,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Tour icon",children:[w.jsx("title",{children:"Tour icon"}),w.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),w.jsx("path",{d:"M2 17l10 5 10-5"}),w.jsx("path",{d:"M2 12l10 5 10-5"})]});function Jpe({onClick:r,style:e,onMouseEnter:t,onMouseLeave:n}){const a={position:"fixed",bottom:"20px",right:"20px",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:_.textSecondary,cursor:"pointer",fontFamily:F.body,boxShadow:`0 4px 12px ${_.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease",...e},i=s=>{s.currentTarget.style.background=_.bgHover,s.currentTarget.style.color=_.textPrimary,s.currentTarget.style.borderColor=_.borderMedium,s.currentTarget.style.transform="scale(1.1)",s.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`,t&&t(s)},o=s=>{s.currentTarget.style.background=_.bgCard,s.currentTarget.style.color=_.textSecondary,s.currentTarget.style.borderColor=_.borderLight,s.currentTarget.style.transform="scale(1)",s.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`,n&&n(s)};return w.jsx("button",{type:"button",onClick:r,"data-tour":"help-button",style:a,onMouseEnter:i,onMouseLeave:o,title:"Start tour",children:w.jsx(Qpe,{size:20})})}function Q6({isOpen:r,onClose:e,title:t,message:n,type:a="error"}){if(!r)return null;const i=a==="error";return w.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,border:"none",margin:0,width:"100%",height:"100%"},onClick:e,onKeyDown:o=>{(o.key==="Escape"||o.key==="Enter")&&e()},children:w.jsxs("div",{role:"document",style:{background:_.bgCard,borderRadius:"12px",padding:"24px",maxWidth:"500px",width:"90%",boxShadow:`0 4px 20px ${_.shadowLg}`,fontFamily:F.body},onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),children:[w.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:"18px",fontWeight:"600",color:i?_.error:_.textPrimary},children:t||(i?"Error":"Information")}),w.jsx("p",{style:{margin:"0 0 24px 0",fontSize:"14px",color:_.textSecondary,lineHeight:"1.5"},children:n}),w.jsx("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:w.jsx("button",{type:"button",onClick:e,style:{padding:"10px 20px",background:i?_.buttonDanger:_.buttonPrimary,border:"none",borderRadius:"8px",color:_.textInverse,fontSize:"14px",fontWeight:"500",fontFamily:F.body,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:o=>{o.currentTarget.style.background=i?_.buttonDangerHover:_.buttonPrimaryHover},onMouseLeave:o=>{o.currentTarget.style.background=i?_.buttonDanger:_.buttonPrimary},children:"OK"})})]})})}function eve({isOpen:r}){return r?w.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4,border:"none",margin:0,width:"100%",height:"100%"},children:w.jsxs("div",{role:"document",style:{background:_.bgCard,borderRadius:"12px",padding:"32px",maxWidth:"400px",width:"90%",boxShadow:`0 4px 20px ${_.shadowLg}`,fontFamily:F.body,textAlign:"center"},children:[w.jsx("h3",{style:{margin:"0 0 16px 0",fontSize:"20px",fontWeight:"600",color:_.textPrimary},children:"Shutting Down..."}),w.jsx("p",{style:{margin:"0 0 24px 0",fontSize:"14px",color:_.textSecondary,lineHeight:"1.5"},children:"MCP Shark is shutting down. The server will stop in a moment."}),w.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"16px"},children:w.jsx(C_,{size:48,stroke:2,color:_.error,style:{animation:"shutdown-spin 1s linear infinite"}})}),w.jsx("style",{children:`
|
|
81
|
-
@keyframes shutdown-spin {
|
|
82
|
-
from {
|
|
83
|
-
transform: rotate(0deg);
|
|
84
|
-
}
|
|
85
|
-
to {
|
|
86
|
-
transform: rotate(360deg);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`})]})}):null}function tve({style:r,onClick:e,onMouseEnter:t,onMouseLeave:n}){const[a,i]=Z.useState(!1),[o,s]=Z.useState(!1),[l,u]=Z.useState(!1),[c,f]=Z.useState(""),d=async()=>{u(!0);const{success:x,message:b}=await rve();x?(console.log("Shutdown successful"),window.location.reload()):(u(!1),f(b),s(!0))},h=()=>{i(!0),e&&e()},v={position:"fixed",bottom:"20px",left:"20px",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:_.textSecondary,cursor:"pointer",fontFamily:F.body,boxShadow:`0 4px 12px ${_.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease",...r},y=x=>{x.currentTarget.style.background=_.bgHover,x.currentTarget.style.color=_.error,x.currentTarget.style.borderColor=_.borderMedium,x.currentTarget.style.transform="scale(1.1)",x.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`,t&&t(x)},m=x=>{x.currentTarget.style.background=_.bgCard,x.currentTarget.style.color=_.textSecondary,x.currentTarget.style.borderColor=_.borderLight,x.currentTarget.style.transform="scale(1)",x.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`,n&&n(x)};return w.jsxs(w.Fragment,{children:[w.jsx("button",{type:"button",onClick:h,"data-tour":"shutdown-button",style:v,onMouseEnter:y,onMouseLeave:m,title:"Shutdown MCP Shark",children:w.jsx(aW,{size:20,stroke:1.5})}),w.jsx(Ch,{isOpen:a,onClose:()=>i(!1),onConfirm:d,title:"Shutdown MCP Shark",message:"Are you sure you want to shutdown MCP Shark? This will stop the server and all services.",confirmText:"Shutdown",cancelText:"Cancel",danger:!0}),w.jsx(Q6,{isOpen:o,onClose:()=>s(!1),title:"Shutdown Failed",message:c,type:"error"}),w.jsx(eve,{isOpen:l})]})}async function rve(){return Promise.race([ave(),nve(3e3)])}async function nve(r){return new Promise(e=>setTimeout(()=>e({success:!0,message:"Shutdown timed out"}),r))}async function ave(){try{const r=await fetch("/api/composite/shutdown",{method:"POST"});return{success:r.ok,message:r.message}}catch(r){return console.error("Shutdown error:",r),{success:!1,message:r.message||"Failed to shutdown server"}}}function ive({onHelpClick:r}){const[e,t]=Z.useState(!1),n=Z.useRef(null);Z.useEffect(()=>{const o=s=>{n.current&&!n.current.contains(s.target)&&t(!1)};if(e)return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[e]);const a={position:"fixed",bottom:"20px",right:"20px",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:_.textSecondary,cursor:"pointer",fontFamily:F.body,boxShadow:`0 4px 12px ${_.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease"},i={position:"absolute",right:"0",background:_.bgCard,border:`1px solid ${_.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:_.textSecondary,cursor:"pointer",fontFamily:F.body,boxShadow:`0 4px 12px ${_.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",opacity:e?1:0,pointerEvents:e?"auto":"none",transform:e?"scale(1) translateY(0)":"scale(0.8) translateY(10px)"};return w.jsxs("div",{ref:n,style:{position:"fixed",bottom:"20px",right:"20px",zIndex:9999},children:[w.jsx(qpe,{style:{...i,bottom:e?"180px":"0",position:"absolute",left:"auto"},onClick:()=>t(!1),onMouseEnter:o=>{e&&(o.currentTarget.style.transform="scale(1.1) translateY(0)",o.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`)},onMouseLeave:o=>{e&&(o.currentTarget.style.transform="scale(1) translateY(0)",o.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`)}}),w.jsx(Jpe,{onClick:()=>{r(),t(!1)},style:{...i,bottom:e?"120px":"0",position:"absolute",left:"auto"},onMouseEnter:o=>{e&&(o.currentTarget.style.transform="scale(1.1) translateY(0)",o.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`)},onMouseLeave:o=>{e&&(o.currentTarget.style.transform="scale(1) translateY(0)",o.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`)}}),w.jsx(tve,{style:{...i,bottom:e?"60px":"0",position:"absolute",left:"auto"},onClick:()=>t(!1),onMouseEnter:o=>{e&&(o.currentTarget.style.transform="scale(1.1) translateY(0)",o.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`)},onMouseLeave:o=>{e&&(o.currentTarget.style.transform="scale(1) translateY(0)",o.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`)}}),w.jsx("button",{type:"button",onClick:()=>t(!e),style:{...a,background:e?_.accentBlue:_.bgCard,color:e?_.textInverse:_.textSecondary},onMouseEnter:o=>{e||(o.currentTarget.style.background=_.bgHover,o.currentTarget.style.color=_.textPrimary,o.currentTarget.style.borderColor=_.borderMedium,o.currentTarget.style.transform="scale(1.1)",o.currentTarget.style.boxShadow=`0 6px 16px ${_.shadowLg}`)},onMouseLeave:o=>{e||(o.currentTarget.style.background=_.bgCard,o.currentTarget.style.color=_.textSecondary,o.currentTarget.style.borderColor=_.borderLight,o.currentTarget.style.transform="scale(1)",o.currentTarget.style.boxShadow=`0 4px 12px ${_.shadowMd}`)},title:e?"Close menu":"Open menu",children:e?w.jsx(im,{size:20,stroke:1.5}):w.jsx(lN,{size:20,stroke:1.5})})]})}const ove=({size:r=12,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle",marginRight:"4px"},role:"img","aria-label":"Chevron icon",children:[w.jsx("title",{children:"Chevron icon"}),w.jsx("polyline",{points:"6 9 12 15 18 9"})]});function ts({title:r,children:e,titleColor:t=_.accentBlue,defaultExpanded:n=!0}){const[a,i]=Z.useState(n);return w.jsxs("div",{style:{marginBottom:"16px"},children:[w.jsxs("button",{type:"button",style:{color:t,fontWeight:"600",fontFamily:F.body,fontSize:"12px",marginBottom:"8px",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",gap:"6px",padding:"4px 0",transition:"color 0.15s ease",background:"transparent",border:"none",textAlign:"left",width:"100%"},onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},onMouseEnter:o=>{o.currentTarget.style.color=t===_.accentBlue?_.accentBlueHover:t},onMouseLeave:o=>{o.currentTarget.style.color=t},children:[w.jsx("span",{style:{transform:a?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease",display:"inline-block"},children:w.jsx(ove,{size:12,color:t})}),r]}),a&&w.jsx("div",{style:{paddingLeft:"20px",color:_.textPrimary,fontFamily:F.body,fontSize:"12px",lineHeight:"1.6"},children:e})]})}function J6({body:r,title:e,titleColor:t}){return r?w.jsx(ts,{title:e||"Body",titleColor:t,children:w.jsx("pre",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:F.mono,maxHeight:"400px",border:`1px solid ${_.borderLight}`,color:_.textPrimary,lineHeight:"1.5"},children:typeof r=="object"?JSON.stringify(r,null,2):r})}):null}function eV({title:r,titleColor:e,children:t,defaultExpanded:n=!0}){const[a,i]=Z.useState(n);return w.jsxs("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,overflow:"hidden",marginBottom:"20px"},children:[w.jsx("button",{type:"button",onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},"aria-label":`Toggle ${r} section`,style:{padding:"16px 20px",background:a?_.bgCard:_.bgSecondary,borderBottom:a?`1px solid ${_.borderLight}`:"none",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.15s ease",width:"100%",border:"none",textAlign:"left"},onMouseEnter:o=>{o.currentTarget.style.background=_.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=a?_.bgCard:_.bgSecondary},children:w.jsxs("div",{style:{fontSize:"13px",fontWeight:"600",color:e,textTransform:"uppercase",letterSpacing:"0.05em",fontFamily:F.body,display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx(ui,{size:14,stroke:1.5,style:{transform:a?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease"}}),r]})}),a&&w.jsx("div",{style:{padding:"20px"},children:t})]})}function tV({headers:r,titleColor:e}){return!r||Object.keys(r).length===0?null:w.jsx(ts,{title:"Headers",children:Object.entries(r).map(([t,n])=>w.jsxs("div",{style:{marginBottom:"6px",fontSize:"12px",fontFamily:F.body},children:[w.jsxs("span",{style:{color:e,fontWeight:"500",fontFamily:F.mono},children:[t,":"]})," ",w.jsx("span",{style:{color:_.textPrimary},children:String(n)})]},t))})}function XO(r,e){if(!(r.session_id===e.session_id))return!1;const n=tm(r),a=tm(e);return!n||!a?r.jsonrpc_id&&e.jsonrpc_id?r.jsonrpc_id===e.jsonrpc_id:!1:n===a?r.jsonrpc_id&&e.jsonrpc_id?r.jsonrpc_id===e.jsonrpc_id:!0:!1}function rV(r){const e=[],t=new Set;return r.forEach(n=>{if(!t.has(n.frame_number))if(n.direction==="request"){const a=r.find(i=>i.direction==="response"&&!t.has(i.frame_number)&&XO(n,i)&&i.frame_number>n.frame_number);a?(e.push({request:n,response:a,frame_number:n.frame_number}),t.add(n.frame_number),t.add(a.frame_number)):(e.push({request:n,response:null,frame_number:n.frame_number}),t.add(n.frame_number))}else n.direction==="response"&&(r.find(i=>i.direction==="request"&&!t.has(i.frame_number)&&XO(i,n)&&i.frame_number<n.frame_number)||(e.push({request:null,response:n,frame_number:n.frame_number}),t.add(n.frame_number)))}),e.sort((n,a)=>a.frame_number-n.frame_number)}const ZO="LLM Server";function W2(r,e){return e?((new Date(r)-new Date(e))/1e3).toFixed(6):"0.000000"}function H2(r){if(!r)return"-";try{return new Date(r).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return r}}function $2(r){return r.direction==="request"?{source:ZO,dest:r.remote_address||"Unknown MCP Client"}:{source:r.remote_address||"Unknown MCP Server",dest:ZO}}function Zm(r){if(r.direction==="request"){if(r.body_json)try{const e=typeof r.body_json=="string"?JSON.parse(r.body_json):r.body_json;if(e&&typeof e=="object"&&e.method)return e.method}catch{}if(r.body_raw)try{const e=typeof r.body_raw=="string"?JSON.parse(r.body_raw):r.body_raw;if(e&&typeof e=="object"&&e.method)return e.method}catch{}if(r.jsonrpc_method)return r.jsonrpc_method;if(r.url)try{const e=new URL(r.url);return e.pathname+(e.search||"")}catch{const t=r.url,n=t.match(/^https?:\/\/[^\/]+(\/.*)$/);return n?n[1]:t}}return"-"}function sve(r){if(r.direction==="request"){const n=Zm(r),a=r.method||"",i=r.url||"";return n&&n!=="-"?a&&i?`${a} ${n}`:a?`${a} ${n}`:n:a&&i?`${a} ${i}`:a||i||"Request"}const e=r.status_code||"",t=r.jsonrpc_method||tm(r);return e&&t?`${e} ${t}`:e?`Status: ${e}`:t||"Response"}function tm(r){if(r.jsonrpc_method)return r.jsonrpc_method;if(r.direction==="request"){if(r.body_json)try{const e=typeof r.body_json=="string"?JSON.parse(r.body_json):r.body_json;if(e&&typeof e=="object"&&e.method)return e.method}catch{}if(r.body_raw)try{const e=typeof r.body_raw=="string"?JSON.parse(r.body_raw):r.body_raw;if(e&&typeof e=="object"&&e.method)return e.method}catch{}}if(r.direction==="response"&&r.body_json)try{const e=typeof r.body_json=="string"?JSON.parse(r.body_json):r.body_json}catch{}return null}function nV({data:r,titleColor:e}){if(!r)return null;const t=sve(r);return w.jsx(ts,{title:"Info",titleColor:e,defaultExpanded:!1,children:w.jsx("div",{style:{background:_.bgSecondary,padding:"12px 16px",borderRadius:"6px",border:`1px solid ${_.borderLight}`,fontFamily:F.mono,fontSize:"12px",color:e,wordBreak:"break-word"},children:t})})}function aV({data:r,showUserAgent:e=!1}){return w.jsxs(ts,{title:"Network Information",children:[w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["Remote Address:"," ",w.jsx("span",{style:{color:_.textSecondary,fontFamily:F.mono},children:r.remote_address||"N/A"})]}),w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["Host:"," ",w.jsx("span",{style:{color:_.textSecondary,fontFamily:F.mono},children:r.host||"N/A"})]}),e&&r.user_agent&&w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["User Agent:"," ",w.jsx("span",{style:{color:_.textSecondary,fontSize:"11px"},children:r.user_agent})]}),r.session_id&&w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["Session ID:"," ",w.jsx("span",{style:{color:_.textSecondary,fontFamily:F.mono},children:r.session_id})]})]})}function iV({data:r,titleColor:e}){return w.jsxs(ts,{title:`${r.protocol||"HTTP"} Protocol`,children:[w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["Direction: ",w.jsx("span",{style:{color:e,fontWeight:"500"},children:r.direction})]}),r.status_code&&w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["Status Code:"," ",w.jsx("span",{style:{color:r.status_code>=400?_.error:r.status_code>=300?_.warning:_.success,fontFamily:F.mono,fontWeight:"600"},children:r.status_code})]}),r.jsonrpc_method&&w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["JSON-RPC Method:"," ",w.jsx("span",{style:{color:_.textSecondary,fontFamily:F.mono},children:r.jsonrpc_method})]}),r.jsonrpc_id&&w.jsxs("div",{style:{fontSize:"12px",color:_.textPrimary,fontFamily:F.body,marginBottom:"4px"},children:["JSON-RPC ID:"," ",w.jsx("span",{style:{color:_.textSecondary,fontFamily:F.mono},children:r.jsonrpc_id})]})]})}function lve({request:r,requestHeaders:e,requestBody:t}){return r?w.jsxs(eV,{title:"Request",titleColor:_.accentBlue,defaultExpanded:!0,children:[w.jsx(nV,{data:r,titleColor:_.accentBlue}),w.jsx(aV,{data:r,showUserAgent:!0}),w.jsx(iV,{data:r,titleColor:_.accentBlue}),w.jsx(tV,{headers:e,titleColor:_.accentBlue}),w.jsx(J6,{body:t,titleColor:_.accentBlue}),r.jsonrpc_params&&w.jsx(ts,{title:"JSON-RPC Params",titleColor:_.accentBlue,children:w.jsx("pre",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:"monospace",maxHeight:"400px",border:`1px solid ${_.borderLight}`,color:_.textPrimary,lineHeight:"1.5"},children:JSON.stringify(JSON.parse(r.jsonrpc_params),null,2)})})]}):null}function uve({response:r,responseHeaders:e,responseBody:t}){return r?w.jsxs(eV,{title:"Response",titleColor:_.accentGreen,defaultExpanded:!0,children:[w.jsx(nV,{data:r,titleColor:_.accentGreen}),w.jsx(aV,{data:r}),w.jsx(iV,{data:r,titleColor:_.accentGreen}),w.jsx(tV,{headers:e,titleColor:_.accentGreen}),w.jsx(J6,{body:t,titleColor:_.accentGreen}),r.jsonrpc_result&&w.jsx(ts,{title:"JSON-RPC Result",titleColor:_.accentGreen,children:w.jsx("pre",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:F.mono,maxHeight:"400px",border:`1px solid ${_.borderLight}`,color:_.textPrimary,lineHeight:"1.5"},children:JSON.stringify(JSON.parse(r.jsonrpc_result),null,2)})}),r.jsonrpc_error&&w.jsx(ts,{title:"JSON-RPC Error",titleColor:_.error,children:w.jsx("pre",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:F.mono,maxHeight:"400px",border:`1px solid ${_.borderLight}`,color:_.error,lineHeight:"1.5"},children:JSON.stringify(JSON.parse(r.jsonrpc_error),null,2)})})]}):null}function cve({request:r,response:e,requestHeaders:t,requestBody:n,responseHeaders:a,responseBody:i}){return w.jsx("div",{style:{padding:"20px",overflow:"auto",flex:1,background:_.bgPrimary},children:w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:[w.jsx(lve,{request:r,requestHeaders:t,requestBody:n}),w.jsx(uve,{response:e,responseHeaders:a,responseBody:i})]})})}const fve=({size:r=14,color:e="currentColor",rotated:t=!1})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle",transform:t?"rotate(-90deg)":"rotate(0deg)",transition:"transform 0.2s ease"},role:"img","aria-label":"Chevron down icon",children:[w.jsx("title",{children:"Chevron down icon"}),w.jsx("polyline",{points:"6 9 12 15 18 9"})]});function KO({title:r,titleColor:e,children:t,defaultExpanded:n=!0}){const[a,i]=Z.useState(n);return w.jsxs("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,overflow:"hidden",marginBottom:"20px"},children:[w.jsx("button",{type:"button",onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},style:{padding:"16px 20px",background:a?_.bgCard:_.bgSecondary,borderBottom:a?`1px solid ${_.borderLight}`:"none",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.15s ease",width:"100%",border:"none",textAlign:"left"},onMouseEnter:o=>{o.currentTarget.style.background=_.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=a?_.bgCard:_.bgSecondary},children:w.jsxs("div",{style:{fontSize:"13px",fontWeight:"600",color:e,textTransform:"uppercase",letterSpacing:"0.05em",fontFamily:F.body,display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx(fve,{size:14,color:e,rotated:!a}),r]})}),a&&w.jsx("div",{style:{padding:"20px"},children:t})]})}function dve({requestHexLines:r,responseHexLines:e,hasRequest:t,hasResponse:n}){return w.jsx("div",{style:{padding:"20px",overflow:"auto",flex:1,background:_.bgPrimary},children:w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:[t&&w.jsx(KO,{title:"Request Hex Dump",titleColor:_.accentBlue,defaultExpanded:!0,children:w.jsx("div",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",border:`1px solid ${_.borderLight}`,maxHeight:"calc(100vh - 300px)",overflow:"auto"},children:r.length>0?r.map((a,i)=>w.jsxs("div",{style:{display:"flex",gap:"16px",padding:"4px 0",color:_.textPrimary,fontFamily:F.mono,fontSize:"12px",lineHeight:"1.5"},children:[w.jsx("span",{style:{color:_.textTertiary,minWidth:"80px"},children:a.offset}),w.jsx("span",{style:{minWidth:"400px",color:_.textPrimary},children:a.hex.padEnd(48)}),w.jsx("span",{style:{color:_.textSecondary},children:a.ascii})]},`request-${a.offset}-${i}`)):w.jsx("div",{style:{color:_.textTertiary,fontFamily:F.body,fontSize:"12px"},children:"(empty)"})})}),n&&w.jsx(KO,{title:"Response Hex Dump",titleColor:_.accentGreen,defaultExpanded:!0,children:w.jsx("div",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",border:`1px solid ${_.borderLight}`,maxHeight:"calc(100vh - 300px)",overflow:"auto"},children:e.length>0?e.map((a,i)=>w.jsxs("div",{style:{display:"flex",gap:"16px",padding:"4px 0",color:_.textPrimary,fontFamily:F.mono,fontSize:"12px",lineHeight:"1.5"},children:[w.jsx("span",{style:{color:_.textTertiary,minWidth:"80px"},children:a.offset}),w.jsx("span",{style:{minWidth:"400px",color:_.textPrimary},children:a.hex.padEnd(48)}),w.jsx("span",{style:{color:_.textSecondary},children:a.ascii})]},`response-${a.offset}-${i}`)):w.jsx("div",{style:{color:_.textTertiary,fontFamily:F.body,fontSize:"12px"},children:"(empty)"})})})]})})}function hve({request:r,onClose:e,matchingPair:t}){const n=a=>a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(2)} KB`:`${(a/1048576).toFixed(2)} MB`;return w.jsxs("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${_.borderLight}`,display:"flex",justifyContent:"space-between",alignItems:"center",background:_.bgCard,boxShadow:`0 1px 3px ${_.shadowSm}`},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[w.jsxs("h3",{style:{fontSize:"14px",fontWeight:"600",color:_.textPrimary,margin:0,fontFamily:F.body},children:["#",r.frame_number,":"," ",r.direction==="request"?"HTTP Request":"HTTP Response",t&&w.jsxs("span",{style:{fontSize:"11px",color:_.textTertiary,fontWeight:"400",marginLeft:"8px"},children:["(with #",t.frame_number,")"]})]}),w.jsxs("span",{style:{fontSize:"11px",color:_.textSecondary,padding:"4px 8px",background:_.bgSecondary,borderRadius:"8px",fontFamily:F.mono},children:[n(r.length)," bytes"]})]}),w.jsx("button",{type:"button",onClick:e,style:{background:"none",border:"none",color:_.textSecondary,cursor:"pointer",fontSize:"20px",padding:"4px 8px",borderRadius:"8px",transition:"all 0.2s"},onMouseEnter:a=>{a.currentTarget.style.background=_.bgHover,a.currentTarget.style.color=_.textPrimary},onMouseLeave:a=>{a.currentTarget.style.background="none",a.currentTarget.style.color=_.textSecondary},children:w.jsx(im,{size:20,stroke:1.5})})]})}const pve=({size:r=14,color:e="currentColor",rotated:t=!1})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle",transform:t?"rotate(-90deg)":"rotate(0deg)",transition:"transform 0.2s ease"},role:"img","aria-label":"Chevron down icon",children:[w.jsx("title",{children:"Chevron down icon"}),w.jsx("polyline",{points:"6 9 12 15 18 9"})]});function qO({title:r,titleColor:e,children:t,defaultExpanded:n=!0}){const[a,i]=Z.useState(n);return w.jsxs("div",{style:{background:_.bgCard,borderRadius:"8px",border:`1px solid ${_.borderLight}`,overflow:"hidden",marginBottom:"20px"},children:[w.jsx("button",{type:"button",onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},style:{padding:"16px 20px",background:a?_.bgCard:_.bgSecondary,borderBottom:a?`1px solid ${_.borderLight}`:"none",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.15s ease",width:"100%",border:"none",textAlign:"left"},onMouseEnter:o=>{o.currentTarget.style.background=_.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=a?_.bgCard:_.bgSecondary},children:w.jsxs("div",{style:{fontSize:"13px",fontWeight:"600",color:e,textTransform:"uppercase",letterSpacing:"0.05em",fontFamily:F.body,display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx(pve,{size:14,color:e,rotated:!a}),r]})}),a&&w.jsx("div",{style:{padding:"20px"},children:t})]})}function vve({requestFullText:r,responseFullText:e,hasRequest:t,hasResponse:n}){return w.jsx("div",{style:{padding:"20px",overflow:"auto",flex:1,background:_.bgPrimary},children:w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:[t&&w.jsx(qO,{title:"Raw Request Data",titleColor:_.accentBlue,defaultExpanded:!0,children:w.jsx("pre",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:F.mono,color:_.textPrimary,border:`1px solid ${_.borderLight}`,whiteSpace:"pre-wrap",wordBreak:"break-all",lineHeight:"1.5",maxHeight:"calc(100vh - 300px)"},children:r||"(empty)"})}),n&&w.jsx(qO,{title:"Raw Response Data",titleColor:_.accentGreen,defaultExpanded:!0,children:w.jsx("pre",{style:{background:_.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:F.mono,color:_.textPrimary,border:`1px solid ${_.borderLight}`,whiteSpace:"pre-wrap",wordBreak:"break-all",lineHeight:"1.5",maxHeight:"calc(100vh - 300px)"},children:e||"(empty)"})})]})})}function gve({tabs:r,activeTab:e,onTabChange:t}){const n=Z.useRef({}),a=Z.useRef(null);return Z.useEffect(()=>{const i=n.current[e];if(i&&a.current){const{offsetLeft:o,offsetWidth:s}=i;ft({targets:a.current,left:o,width:s,duration:300,easing:"easeOutExpo"})}},[e]),w.jsxs("div",{style:{display:"flex",borderBottom:`1px solid ${_.borderLight}`,background:`${_.bgCard}CC`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",position:"relative",boxShadow:`0 1px 3px ${_.shadowSm}`},children:[r.map(i=>w.jsx("button",{type:"button",ref:o=>{o&&(n.current[i]=o)},onClick:()=>t(i),style:{padding:"10px 18px",background:e===i?_.bgSecondary:"transparent",border:"none",borderBottom:"2px solid transparent",color:e===i?_.textPrimary:_.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:F.body,fontWeight:e===i?"500":"400",textTransform:"capitalize",borderRadius:"8px 8px 0 0",transition:"all 0.2s",position:"relative",zIndex:1},onMouseEnter:o=>{e!==i&&ft({targets:o.currentTarget,background:_.bgHover,color:_.textPrimary,duration:200,easing:"easeOutQuad"})},onMouseLeave:o=>{e!==i&&ft({targets:o.currentTarget,background:"transparent",color:_.textSecondary,duration:200,easing:"easeOutQuad"})},children:i},i)),w.jsx("div",{ref:a,style:{position:"absolute",bottom:0,height:"2px",background:_.accentBlue,borderRadius:"2px 2px 0 0",zIndex:2}})]})}const QO=(r,e={})=>ft({targets:r,opacity:[0,1],translateY:[20,0],duration:e.duration||400,delay:ft.stagger(e.delay||50),easing:e.easing||"easeOutExpo",...e}),U2=(r,e={})=>ft({targets:r,opacity:[0,1],duration:e.duration||300,easing:e.easing||"easeOutQuad",...e}),yve=(r,e={})=>ft({targets:r,translateX:[e.width||600,0],opacity:[0,1],duration:e.duration||400,easing:e.easing||"easeOutExpo",...e});function JO(r){if(!r)return[];const e=new TextEncoder().encode(r),t=[],n=16,a=Math.ceil(e.length/n);for(const i of Array.from({length:a},(o,s)=>s)){const o=i*n,s=e.slice(o,o+n),l=Array.from(s).map(f=>f.toString(16).padStart(2,"0")).join(" "),u=Array.from(s).map(f=>f>=32&&f<127?String.fromCharCode(f):".").join(""),c=o.toString(16).padStart(8,"0");t.push({offset:c,hex:l,ascii:u})}return t}function eN(r,e){return Object.entries(r).map(([n,a])=>`${n}: ${a}`).join(`\r
|
|
90
|
-
`)+(e?`\r
|
|
91
|
-
\r
|
|
92
|
-
${e}`:"")}function mve({request:r,onClose:e,requests:t=[]}){const[n,a]=Z.useState("details"),i=Z.useRef(null),o=Z.useRef(n);if(Z.useEffect(()=>{o.current!==n&&i.current&&(U2(i.current,{duration:300}),o.current=n)},[n]),!r)return null;const s=C=>{if(C.jsonrpc_method)return C.jsonrpc_method;if(C.direction==="request"){if(C.body_json)try{const k=typeof C.body_json=="string"?JSON.parse(C.body_json):C.body_json;if(k&&typeof k=="object"&&k.method)return k.method}catch{}if(C.body_raw)try{const k=typeof C.body_raw=="string"?JSON.parse(C.body_raw):C.body_raw;if(k&&typeof k=="object"&&k.method)return k.method}catch{}}return null},u=(()=>{const C=(k,L)=>{if(k.session_id!==L.session_id)return!1;const A=s(k),D=s(L);return!A||!D?k.jsonrpc_id&&L.jsonrpc_id?k.jsonrpc_id===L.jsonrpc_id:!1:A!==D?!1:k.jsonrpc_id&&L.jsonrpc_id?k.jsonrpc_id===L.jsonrpc_id:!0};return r.direction==="request"?t.find(k=>k.direction==="response"&&C(r,k)&&k.frame_number>r.frame_number):t.find(k=>k.direction==="request"&&C(k,r)&&k.frame_number<r.frame_number)})(),c=r.direction==="request"?r:u||r,f=r.direction==="response"?r:u,d=c?.headers_json?JSON.parse(c.headers_json):{},h=c?.body_json?JSON.parse(c.body_json):c?.body_raw,v=c?eN(d,c.body_raw):"",y=c?JO(v):[],m=f?.headers_json?JSON.parse(f.headers_json):{},x=f?.body_json?JSON.parse(f.body_json):f?.body_raw,b=f?eN(m,f.body_raw):"",T=f?JO(b):[];return w.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:_.bgPrimary},children:[w.jsx(hve,{request:r,onClose:e,matchingPair:u}),w.jsx(gve,{tabs:["details","hex","raw"],activeTab:n,onTabChange:a}),w.jsxs("div",{ref:i,style:{flex:1,overflow:"auto",background:_.bgPrimary},children:[n==="details"&&w.jsx(cve,{request:c,response:f,requestHeaders:d,requestBody:h,responseHeaders:m,responseBody:x}),n==="hex"&&w.jsx(dve,{requestHexLines:y,responseHexLines:T,hasRequest:!!c,hasResponse:!!f}),n==="raw"&&w.jsx(vve,{requestFullText:v,responseFullText:b,hasRequest:!!c,hasResponse:!!f})]})]})}function xve({stats:r,onExport:e}){return w.jsxs("div",{style:{display:"flex",gap:"16px",alignItems:"center",marginLeft:"auto"},children:[r&&w.jsxs(w.Fragment,{children:[w.jsxs("span",{style:{color:_.textSecondary,fontSize:"12px",fontFamily:F.body},children:["Total:"," ",w.jsx("span",{style:{color:_.textPrimary,fontWeight:"500"},children:r.total_packets||0})]}),w.jsxs("span",{style:{color:_.textSecondary,fontSize:"12px",fontFamily:F.body},children:["Requests:"," ",w.jsx("span",{style:{color:_.accentBlue,fontWeight:"500"},children:r.total_requests||0})]}),w.jsxs("span",{style:{color:_.textSecondary,fontSize:"12px",fontFamily:F.body},children:["Responses:"," ",w.jsx("span",{style:{color:_.accentGreen,fontWeight:"500"},children:r.total_responses||0})]}),w.jsxs("span",{style:{color:_.textSecondary,fontSize:"12px",fontFamily:F.body},children:["Errors:"," ",w.jsx("span",{style:{color:_.error,fontWeight:"500"},children:r.total_errors||0})]}),w.jsxs("span",{style:{color:_.textSecondary,fontSize:"12px",fontFamily:F.body},children:["Sessions:"," ",w.jsx("span",{style:{color:_.textPrimary,fontWeight:"500"},children:r.unique_sessions||0})]})]}),w.jsxs("div",{style:{display:"flex",gap:"6px",alignItems:"center",marginLeft:"12px",paddingLeft:"12px",borderLeft:`1px solid ${_.borderLight}`},children:[w.jsxs("button",{type:"button",onClick:()=>e("json"),style:{padding:"8px 14px",background:_.buttonPrimary,border:"none",color:_.textInverse,fontSize:"12px",fontFamily:F.body,fontWeight:"500",borderRadius:"8px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"all 0.2s",boxShadow:`0 2px 4px ${_.shadowSm}`},onMouseEnter:t=>{ft({targets:t.currentTarget,background:_.buttonPrimaryHover,translateY:-1,boxShadow:[`0 2px 4px ${_.shadowSm}`,`0 4px 8px ${_.shadowMd}`],duration:200,easing:"easeOutQuad"})},onMouseLeave:t=>{ft({targets:t.currentTarget,background:_.buttonPrimary,translateY:0,boxShadow:[`0 4px 8px ${_.shadowMd}`,`0 2px 4px ${_.shadowSm}`],duration:200,easing:"easeOutQuad"})},title:"Export as JSON",children:[w.jsx(iN,{size:14,stroke:1.5}),"Export"]}),w.jsxs("select",{onChange:t=>e(t.target.value),value:"",style:{padding:"8px 10px",background:_.bgCard,border:`1px solid ${_.borderLight}`,color:_.textPrimary,fontSize:"11px",fontFamily:F.body,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s"},onFocus:t=>{t.currentTarget.style.borderColor=_.accentBlue},onBlur:t=>{t.currentTarget.style.borderColor=_.borderLight},children:[w.jsx("option",{value:"",disabled:!0,children:"Format"}),w.jsx("option",{value:"json",children:"JSON"}),w.jsx("option",{value:"csv",children:"CSV"}),w.jsx("option",{value:"txt",children:"TXT"})]})]})]})}function Zs({type:r="text",placeholder:e,value:t,onChange:n,style:a={},...i}){const o={padding:"8px 12px",background:_.bgCard,border:`1px solid ${_.borderLight}`,color:_.textPrimary,fontSize:"13px",fontFamily:r==="number"||e?.includes("JSON-RPC")||e?.includes("HTTP")?F.mono:F.body,borderRadius:"8px",transition:"all 0.2s",...a},s=u=>{ft({targets:u.currentTarget,borderColor:_.accentBlue,boxShadow:[`0 0 0 0px ${_.accentBlue}20`,`0 0 0 3px ${_.accentBlue}20`],duration:200,easing:"easeOutQuad"})},l=u=>{ft({targets:u.currentTarget,borderColor:_.borderLight,boxShadow:"none",duration:200,easing:"easeOutQuad"})};return w.jsx("input",{type:r,placeholder:e,value:t||"",onChange:n,style:o,onFocus:s,onBlur:l,...i})}function Sve({filters:r,onFilterChange:e,stats:t,onClear:n}){const a=Z.useRef(null),[i,o]=Z.useState(!1),[s,l]=Z.useState(!1),[u,c]=Z.useState("");Z.useEffect(()=>{a.current&&U2(a.current,{duration:400})},[]);const f=async(d="json")=>{try{const h=new URLSearchParams;r.search&&h.append("search",r.search),r.serverName&&h.append("serverName",r.serverName),r.sessionId&&h.append("sessionId",r.sessionId),r.method&&h.append("method",r.method),r.jsonrpcMethod&&h.append("jsonrpcMethod",r.jsonrpcMethod),r.statusCode&&h.append("statusCode",r.statusCode),r.jsonrpcId&&h.append("jsonrpcId",r.jsonrpcId),h.append("format",d);const y=await(await fetch(`/api/requests/export?${h}`)).blob(),m=window.URL.createObjectURL(y),x=document.createElement("a");x.href=m;const b=d==="csv"?"csv":d==="txt"?"txt":"json";x.download=`mcp-shark-traffic-${new Date().toISOString().replace(/[:.]/g,"-")}.${b}`,document.body.appendChild(x),x.click(),window.URL.revokeObjectURL(m),document.body.removeChild(x)}catch(h){console.error("Failed to export traffic:",h),c("Failed to export traffic. Please try again."),l(!0)}};return w.jsxs("div",{ref:a,"data-tour":"filters",style:{padding:"12px 16px",borderBottom:`1px solid ${_.borderLight}`,background:_.bgSecondary,display:"flex",gap:"10px",alignItems:"center",flexWrap:"wrap",boxShadow:`0 1px 3px ${_.shadowSm}`},children:[w.jsxs("div",{style:{position:"relative",width:"300px"},children:[w.jsx($w,{size:16,stroke:1.5,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:_.textTertiary,pointerEvents:"none",zIndex:1}}),w.jsx(Zs,{type:"text",placeholder:"Search everything (partial match)...",value:r.search||"",onChange:d=>e({...r,search:d.target.value||null}),style:{width:"100%",fontWeight:r.search?"500":"400",paddingLeft:"36px"}})]}),w.jsx(Zs,{type:"text",placeholder:"MCP Server Name...",value:r.serverName||"",onChange:d=>e({...r,serverName:d.target.value||null}),style:{width:"200px"}}),w.jsx(Zs,{type:"text",placeholder:"Session ID...",value:r.sessionId||"",onChange:d=>e({...r,sessionId:d.target.value||null}),style:{width:"200px"}}),w.jsx(Zs,{type:"text",placeholder:"HTTP Method...",value:r.method||"",onChange:d=>e({...r,method:d.target.value||null}),style:{width:"150px"}}),w.jsx(Zs,{type:"text",placeholder:"JSON-RPC Method...",value:r.jsonrpcMethod||"",onChange:d=>e({...r,jsonrpcMethod:d.target.value||null}),style:{width:"200px"}}),w.jsx(Zs,{type:"number",placeholder:"Status Code...",value:r.statusCode||"",onChange:d=>e({...r,statusCode:d.target.value?Number.parseInt(d.target.value):null}),style:{width:"120px"}}),w.jsx(Zs,{type:"text",placeholder:"JSON-RPC ID...",value:r.jsonrpcId||"",onChange:d=>e({...r,jsonrpcId:d.target.value||null}),style:{width:"150px"}}),w.jsx(xve,{stats:t,onExport:f}),w.jsxs("button",{type:"button",onClick:()=>o(!0),style:{padding:"8px 14px",background:_.buttonDanger,border:"none",color:_.textInverse,fontSize:"12px",fontFamily:F.body,fontWeight:"500",borderRadius:"8px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"all 0.2s",boxShadow:`0 2px 4px ${_.shadowSm}`,marginLeft:"12px"},onMouseEnter:d=>{ft({targets:d.currentTarget,background:_.buttonDangerHover,translateY:-1,boxShadow:[`0 2px 4px ${_.shadowSm}`,`0 4px 8px ${_.shadowMd}`],duration:200,easing:"easeOutQuad"})},onMouseLeave:d=>{ft({targets:d.currentTarget,background:_.buttonDanger,translateY:0,boxShadow:[`0 4px 8px ${_.shadowMd}`,`0 2px 4px ${_.shadowSm}`],duration:200,easing:"easeOutQuad"})},title:"Clear all captured traffic",children:[w.jsx(wc,{size:14,stroke:1.5}),"Clear"]}),w.jsx(Ch,{isOpen:i,onClose:()=>o(!1),onConfirm:async()=>{try{const d=await fetch("/api/requests/clear",{method:"POST"});if(d.ok)n&&n();else{const h=await d.json();c(`Failed to clear traffic: ${h.error||"Unknown error"}`),l(!0)}}catch(d){console.error("Failed to clear traffic:",d),c("Failed to clear traffic. Please try again."),l(!0)}},title:"Clear All Captured Traffic",message:"Are you sure you want to delete all captured traffic? This action cannot be undone and will permanently remove all requests and responses from the database.",confirmText:"Clear All",cancelText:"Cancel",danger:!0}),w.jsx(Q6,{isOpen:s,onClose:()=>l(!1),title:"Error",message:u,type:"error"})]})}const At={LIFECYCLE:"lifecycle",TOOLS:"tools",RESOURCES:"resources",PROMPTS:"prompts",NOTIFICATIONS:"notifications",CLIENT_FEATURES:"client-features",OTHER:"other"};function _ve(r){return r?r==="initialize"||r==="notifications/initialized"?At.LIFECYCLE:r.startsWith("tools/")?At.TOOLS:r.startsWith("resources/")?At.RESOURCES:r.startsWith("prompts/")?At.PROMPTS:r.startsWith("notifications/")?At.NOTIFICATIONS:r.startsWith("elicitation/")||r.startsWith("sampling/")||r.startsWith("logging/")?At.CLIENT_FEATURES:At.OTHER:At.OTHER}function bve(r){return{[At.LIFECYCLE]:"Lifecycle",[At.TOOLS]:"Tools",[At.RESOURCES]:"Resources",[At.PROMPTS]:"Prompts",[At.NOTIFICATIONS]:"Notifications",[At.CLIENT_FEATURES]:"Client Features",[At.OTHER]:"Other"}[r]||"Unknown"}function wve(r){return{[At.LIFECYCLE]:Hd,[At.TOOLS]:am,[At.RESOURCES]:NG,[At.PROMPTS]:QG,[At.NOTIFICATIONS]:bG,[At.CLIENT_FEATURES]:bW,[At.OTHER]:ZL}[r]||ZL}function Tve(r){const e=rV(r),t=new Map;return e.forEach(n=>{const a=n.request||n.response;if(!a)return;const i=a.session_id||"__NO_SESSION__",o=tm(a),s=_ve(o||"");t.has(i)||t.set(i,{sessionId:i==="__NO_SESSION__"?null:i,categories:new Map,firstTimestamp:a.timestamp_iso});const l=t.get(i);l.categories.has(s)||l.categories.set(s,[]),l.categories.get(s).push(n),new Date(a.timestamp_iso)<new Date(l.firstTimestamp)&&(l.firstTimestamp=a.timestamp_iso)}),Array.from(t.entries()).map(([n,a])=>({sessionId:a.sessionId,firstTimestamp:a.firstTimestamp,categories:Array.from(a.categories.entries()).map(([i,o])=>({category:i,label:bve(i),pairs:o.sort((s,l)=>{const u=(s.request||s.response)?.timestamp_iso||"",c=(l.request||l.response)?.timestamp_iso||"";return new Date(u)-new Date(c)})})).sort((i,o)=>{const s=[At.LIFECYCLE,At.TOOLS,At.RESOURCES,At.PROMPTS,At.NOTIFICATIONS,At.CLIENT_FEATURES,At.OTHER],l=s.indexOf(i.category),u=s.indexOf(o.category);return l-u})})).sort((n,a)=>new Date(a.firstTimestamp)-new Date(n.firstTimestamp))}const Cve=({size:r=12,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle"},role:"img","aria-label":"Chevron down icon",children:[w.jsx("title",{children:"Chevron down icon"}),w.jsx("polyline",{points:"6 9 12 15 18 9"})]}),Mve=({size:r=12,color:e="currentColor"})=>w.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle"},role:"img","aria-label":"Chevron right icon",children:[w.jsx("title",{children:"Chevron right icon"}),w.jsx("polyline",{points:"9 18 15 12 9 6"})]});function tN({children:r,onClick:e,isExpanded:t,indent:n=0}){return w.jsx("tr",{onClick:e,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e())},tabIndex:0,"aria-label":`Toggle group ${r}`,style:{cursor:"pointer",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,borderTop:`1px solid ${_.borderLight}`},onMouseEnter:a=>{a.currentTarget.style.background=_.bgCard},onMouseLeave:a=>{a.currentTarget.style.background=_.bgSecondary},children:w.jsxs("td",{colSpan:11,style:{padding:n>0?"12px 16px 12px 40px":"12px 16px",color:_.textPrimary,fontFamily:F.body,fontWeight:"600",fontSize:n>0?"11px":"12px"},children:[w.jsx("span",{style:{marginRight:"8px",userSelect:"none",display:"inline-flex",alignItems:"center"},children:t?w.jsx(Cve,{size:12}):w.jsx(Mve,{size:12})}),r]})})}function kve({response:r,selected:e,firstRequestTime:t,onSelect:n}){const a=e?.frame_number===r.frame_number,{source:i,dest:o}=$2(r),s=W2(r.timestamp_iso,t);return w.jsxs("tr",{onClick:()=>n(r),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(r))},tabIndex:0,"aria-label":`Select orphaned response ${r.frame_number}`,style:{cursor:"pointer",background:a?_.bgSelected:_.bgUnpaired,borderBottom:`1px solid ${_.borderLight}`,fontFamily:F.body,transition:"background-color 0.15s ease",opacity:.85},onMouseEnter:l=>{a||(l.currentTarget.style.background=nc(_.accentOrange,.1))},onMouseLeave:l=>{a||(l.currentTarget.style.background=_.bgUnpaired)},children:[w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,textAlign:"right",fontFamily:F.mono,fontSize:"12px"},children:w.jsxs("span",{style:{color:_.accentOrange,fontWeight:"500"},children:["#",r.frame_number," (orphaned)"]})}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px"},children:s}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.body,fontSize:"12px"},children:H2(r.timestamp_iso)}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.accentOrange,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:i}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.accentOrange,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:o}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:r.protocol||"HTTP"}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textSecondary,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:"-"}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:w.jsx("div",{style:{color:r.status_code>=400?_.error:r.status_code>=300?_.warning:_.success,fontWeight:"600"},children:r.status_code||"-"})}),w.jsx("td",{style:{padding:"16px",color:_.textPrimary,fontFamily:F.mono,fontSize:"12px"},children:Zm(r)})]})}const Lve=({size:r=12,rotated:e=!1})=>w.jsx(ui,{size:r,stroke:1.5,style:{display:"inline-block",verticalAlign:"middle",transform:e?"rotate(-90deg)":"rotate(0deg)",transition:"transform 0.2s ease"}});function Ave({request:r,response:e,selected:t,firstRequestTime:n,onSelect:a,isExpanded:i,onToggleExpand:o,isUnpaired:s}){const l=t?.frame_number===r.frame_number,{source:u,dest:c}=$2(r),f=W2(r.timestamp_iso,n),d=!!e;return w.jsx(w.Fragment,{children:w.jsxs("tr",{onClick:()=>a(r),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),a(r))},tabIndex:0,"aria-label":`Select request ${r.frame_number}`,style:{cursor:"pointer",background:l?_.bgSelected:s?_.bgUnpaired:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontFamily:F.body,transition:"background-color 0.15s ease",opacity:s?.85:1},onMouseEnter:h=>{l||(h.currentTarget.style.background=s?nc(_.accentOrange,.1):_.bgCard)},onMouseLeave:h=>{l||(h.currentTarget.style.background=s?_.bgUnpaired:_.bgSecondary)},children:[w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,textAlign:"right",fontFamily:F.mono,fontSize:"12px"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"flex-end"},children:[d&&w.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),o()},style:{background:"none",border:"none",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",color:_.textSecondary},onMouseEnter:h=>{h.currentTarget.style.color=_.textPrimary},onMouseLeave:h=>{h.currentTarget.style.color=_.textSecondary},children:w.jsx(Lve,{size:14,rotated:!i})}),w.jsxs("span",{style:{color:s?_.accentOrange:_.accentBlue,fontWeight:"500"},children:["#",r.frame_number,s&&w.jsx("span",{style:{fontSize:"10px",color:_.textSecondary,marginLeft:"4px",fontStyle:"italic"},children:"(no response)"})]})]})}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px"},children:f}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.body,fontSize:"12px"},children:H2(r.timestamp_iso)}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.accentBlue,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:u}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.accentBlue,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:c}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:r.protocol||"HTTP"}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:w.jsx("div",{style:{color:_.accentBlue},children:r.method||"REQ"})}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:d&&w.jsx("div",{style:{color:e.status_code>=400?_.error:e.status_code>=300?_.warning:_.success,fontWeight:"600"},children:e.status_code||"-"})}),w.jsx("td",{style:{padding:"16px",color:_.textPrimary,fontFamily:F.mono,fontSize:"12px"},children:Zm(r)})]})})}function Ive({response:r,selected:e,firstRequestTime:t,onSelect:n}){const a=e?.frame_number===r.frame_number,{source:i,dest:o}=$2(r),s=W2(r.timestamp_iso,t);return w.jsxs("tr",{onClick:()=>n(r),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(r))},tabIndex:0,"aria-label":`Select response ${r.frame_number}`,style:{cursor:"pointer",background:a&&e?.frame_number===r.frame_number?_.bgSelected:_.bgTertiary,borderBottom:`1px solid ${_.borderLight}`,fontFamily:F.body,transition:"background-color 0.15s ease"},onMouseEnter:l=>{a&&e?.frame_number===r.frame_number||(l.currentTarget.style.background=_.bgSecondary)},onMouseLeave:l=>{a&&e?.frame_number===r.frame_number||(l.currentTarget.style.background=_.bgTertiary)},children:[w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,textAlign:"right",fontFamily:F.mono,fontSize:"12px",paddingLeft:"40px"},children:w.jsxs("span",{style:{color:_.accentGreen,fontWeight:"500"},children:["#",r.frame_number]})}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px"},children:s}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.body,fontSize:"12px"},children:H2(r.timestamp_iso)}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.accentGreen,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:i}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.accentGreen,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:o}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textPrimary,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:r.protocol||"HTTP"}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,color:_.textSecondary,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:"-"}),w.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${_.borderLight}`,fontFamily:F.mono,fontSize:"12px",fontWeight:"500"},children:w.jsx("div",{style:{color:r.status_code>=400?_.error:r.status_code>=300?_.warning:_.success,fontWeight:"600"},children:r.status_code||"-"})}),w.jsx("td",{style:{padding:"16px",color:_.textPrimary,fontFamily:F.mono,fontSize:"12px"},children:Zm(r)})]})}function oV({pair:r,request:e,selected:t,firstRequestTime:n,onSelect:a,isExpanded:i=!1,onToggleExpand:o=()=>{}}){const l=((h,v)=>h?{request:h.request,response:h.response}:v?{request:v,response:null}:null)(r,e);if(!l)return null;const{request:u,response:c}=l,f=!u||!c;if(!u&&c)return w.jsx(kve,{response:c,selected:t,firstRequestTime:n,onSelect:a});if(!u)return null;const d=!!c;return w.jsxs(w.Fragment,{children:[w.jsx(Ave,{request:u,response:c,selected:t,firstRequestTime:n,onSelect:a,isExpanded:i,onToggleExpand:o,isUnpaired:f}),d&&i&&w.jsx(Ive,{response:c,selected:t,firstRequestTime:n,onSelect:a,request:u})]})}function Dve({groupedData:r,selected:e,firstRequestTime:t,onSelect:n,expandedSessions:a,expandedCategories:i,onToggleSession:o,onToggleCategory:s}){return w.jsx("tbody",{children:r.map(l=>{const u=l.sessionId||"__NO_SESSION__",c=a.has(u);return w.jsxs(Cd.Fragment,{children:[w.jsxs(tN,{onClick:()=>o(u),isExpanded:c,indent:0,children:[w.jsxs("span",{style:{color:_.accentBlue,marginRight:"8px"},children:["Session: ",l.sessionId||"No Session"]}),w.jsxs("span",{style:{color:_.textTertiary,fontSize:"11px",fontWeight:"400"},children:["(",l.categories.reduce((f,d)=>f+d.pairs.length,0)," ","operations)"]})]}),c&&l.categories.map(f=>{const d=`${u}::${f.category}`,h=i.has(d);return w.jsxs(Cd.Fragment,{children:[w.jsxs(tN,{onClick:()=>s(d),isExpanded:h,indent:1,children:[w.jsx("span",{style:{marginRight:"8px",display:"inline-flex",alignItems:"center"},children:Cd.createElement(wve(f.category),{size:16,stroke:1.5,color:_.accentBlue})}),w.jsx("span",{style:{color:_.textPrimary},children:f.label}),w.jsxs("span",{style:{color:_.textTertiary,fontSize:"11px",fontWeight:"400",marginLeft:"8px"},children:["(",f.pairs.length," ",f.pairs.length===1?"operation":"operations",")"]})]}),h&&f.pairs.map(v=>w.jsx(oV,{pair:v,selected:e,firstRequestTime:t,onSelect:n,isExpanded:!1,onToggleExpand:()=>{}},v.frame_number))]},d)})]},u)})})}function Pve({columnWidths:r}){return w.jsx("thead",{style:{position:"sticky",top:0,background:_.bgSecondary,zIndex:10,boxShadow:`0 2px 4px ${_.shadowSm}`},children:w.jsxs("tr",{children:[w.jsx("th",{style:{padding:"12px 16px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.frame}px`,minWidth:`${r.frame}px`,color:_.textSecondary,fontWeight:"600",fontFamily:F.body,fontSize:"11px",textTransform:"uppercase",letterSpacing:"0.05em",background:_.bgSecondary},children:"No."}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.time}px`,minWidth:`${r.time}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Time"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.datetime}px`,minWidth:`${r.datetime}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Date/Time"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.source}px`,minWidth:`${r.source}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Source"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.destination}px`,minWidth:`${r.destination}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Destination"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.protocol}px`,minWidth:`${r.protocol}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Protocol"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.method}px`,minWidth:`${r.method}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Method"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,borderRight:`1px solid ${_.borderLight}`,width:`${r.status}px`,minWidth:`${r.status}px`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Status"}),w.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${_.borderLight}`,color:_.textPrimary,fontWeight:"600",fontFamily:F.body,fontSize:"11px"},children:"Endpoint"})]})})}function Rve({viewMode:r,onViewModeChange:e}){return w.jsxs("div",{"data-tour":"view-modes",style:{display:"flex",borderBottom:`1px solid ${_.borderLight}`,background:_.bgSecondary,padding:"0 12px",boxShadow:`0 1px 3px ${_.shadowSm}`,flexShrink:0},children:[w.jsxs("button",{type:"button",onClick:()=>e("general"),style:{padding:"10px 18px",background:r==="general"?_.bgCard:"transparent",fontFamily:F.body,border:"none",borderBottom:r==="general"?`2px solid ${_.accentBlue}`:"2px solid transparent",color:r==="general"?_.textPrimary:_.textSecondary,borderRadius:"8px 8px 0 0",cursor:"pointer",fontSize:"12px",fontWeight:r==="general"?"500":"normal",display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:t=>{r!=="general"&&(t.currentTarget.style.background=_.bgHover,t.currentTarget.style.color=_.textPrimary)},onMouseLeave:t=>{r!=="general"&&(t.currentTarget.style.background="transparent",t.currentTarget.style.color=_.textSecondary)},children:[w.jsx(sN,{size:16,stroke:1.5}),"General List"]}),w.jsxs("button",{type:"button",onClick:()=>e("groupedByMcp"),style:{padding:"10px 18px",background:r==="groupedByMcp"?_.bgCard:"transparent",fontFamily:F.body,border:"none",borderBottom:r==="groupedByMcp"?`2px solid ${_.accentBlue}`:"2px solid transparent",color:r==="groupedByMcp"?_.textPrimary:_.textSecondary,cursor:"pointer",fontSize:"12px",fontWeight:r==="groupedByMcp"?"500":"normal",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:t=>{r!=="groupedByMcp"&&(t.currentTarget.style.background=_.bgHover,t.currentTarget.style.color=_.textPrimary)},onMouseLeave:t=>{r!=="groupedByMcp"&&(t.currentTarget.style.background="transparent",t.currentTarget.style.color=_.textSecondary)},children:[w.jsx(rm,{size:16,stroke:1.5}),"MCP Protocol View"]})]})}function Eve({requests:r,selected:e,onSelect:t,firstRequestTime:n}){const[a,i]=Z.useState("general"),[o]=Z.useState({frame:90,time:120,datetime:180,source:200,destination:200,protocol:90,method:90,status:80,endpoint:500}),[s,l]=Z.useState(new Set),[u,c]=Z.useState(new Set),[f,d]=Z.useState(new Set),h=Z.useRef(null),v=Z.useRef(0),y=Z.useMemo(()=>Tve(r),[r]);Z.useEffect(()=>{if(h.current&&r.length>0){const k=h.current.querySelectorAll("tr");if(k.length>0){if(r.length>v.current){const L=Array.from(k).slice(v.current);L.length>0&&QO(L,{delay:30,duration:300})}else QO(k,{delay:20,duration:300});v.current=r.length}}},[r]),Z.useEffect(()=>{if(a==="groupedByMcp"){const k=new Set(y.map(L=>L.sessionId||"__NO_SESSION__"));c(L=>{const A=new Set(L);return k.forEach(D=>A.add(D)),A}),d(L=>{const A=new Set(L);return y.forEach(D=>{const P=D.sessionId||"__NO_SESSION__";D.categories.forEach(R=>{A.add(`${P}::${R.category}`)})}),A})}},[y,a]);const m=k=>{c(L=>{const A=new Set(L);return A.has(k)?A.delete(k):A.add(k),A})},x=k=>{d(L=>{const A=new Set(L);return A.has(k)?A.delete(k):A.add(k),A})},b=Z.useMemo(()=>rV(r),[r]),T=k=>{l(L=>{const A=new Set(L);return A.has(k)?A.delete(k):A.add(k),A})},C=()=>w.jsx("tbody",{ref:h,children:b.map(k=>w.jsx(oV,{pair:k,selected:e,firstRequestTime:n,onSelect:t,isExpanded:s.has(k.frame_number),onToggleExpand:()=>T(k.frame_number)},k.frame_number))});return w.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",background:_.bgPrimary,minHeight:0,overflow:"hidden"},children:[w.jsx(Rve,{viewMode:a,onViewModeChange:i}),w.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"auto",minHeight:0,WebkitOverflowScrolling:"touch"},children:w.jsxs("table",{style:{width:"100%",borderCollapse:"separate",borderSpacing:0,fontSize:"12px",fontFamily:F.body,background:_.bgPrimary},children:[w.jsx(Pve,{columnWidths:o}),a==="general"?C():w.jsx(Dve,{groupedData:y,expandedSessions:u,expandedCategories:f,onToggleSession:m,onToggleCategory:x,selected:e,firstRequestTime:n,onSelect:t})]})})]})}function zve({requests:r,selected:e,onSelect:t,filters:n,onFilterChange:a,stats:i,firstRequestTime:o,onClear:s}){const l=Z.useRef(null);return Z.useEffect(()=>{e&&l.current&&setTimeout(()=>{l.current&&(l.current.style.opacity="0",l.current.style.transform="translateX(600px)",yve(l.current,{width:600}))},10)},[e]),w.jsxs("div",{"data-tab-content":!0,style:{display:"flex",flex:1,overflow:"hidden",minHeight:0},children:[w.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minWidth:0,minHeight:0},children:[w.jsx(Sve,{filters:n,onFilterChange:a,stats:i,onExport:()=>{},onClear:s}),w.jsx(Eve,{requests:r,selected:e,onSelect:t,firstRequestTime:o})]}),e&&w.jsx("div",{ref:l,style:{width:"40%",minWidth:"500px",maxWidth:"700px",borderLeft:`1px solid ${_.borderLight}`,overflow:"hidden",display:"flex",flexDirection:"column",background:_.bgCard,flexShrink:0},children:w.jsx(mve,{request:e,onClose:()=>t(null),requests:r})})]})}function Ao(r,e){e.search&&r.append("search",e.search),e.serverName&&r.append("serverName",e.serverName),e.sessionId&&r.append("sessionId",e.sessionId),e.method&&r.append("method",e.method),e.jsonrpcMethod&&r.append("jsonrpcMethod",e.jsonrpcMethod),e.statusCode&&r.append("statusCode",e.statusCode),e.jsonrpcId&&r.append("jsonrpcId",e.jsonrpcId)}const Ove=["traffic","logs","setup","playground","smart-scan"],Nve="traffic";function T_(){const r=window.location.hash.slice(1),e=r.startsWith("/")?r.slice(1):r;return Ove.includes(e)?e:Nve}function rN(r){const e=`#/${r}`;window.location.hash!==e&&window.history.replaceState(null,"",e)}function Bve(){const[r,e]=Z.useState(()=>T_()),[t,n]=Z.useState([]),[a,i]=Z.useState(null),[o,s]=Z.useState({}),[l,u]=Z.useState(null),[c,f]=Z.useState(null),[d,h]=Z.useState(!1),[v,y]=Z.useState(!0),m=Z.useRef(null),x=Z.useRef(r),b=Z.useRef(o);Z.useEffect(()=>{if(!window.location.hash||window.location.hash==="#"){const k=T_();rN(k)}},[]),Z.useEffect(()=>{rN(r)},[r]),Z.useEffect(()=>{const k=()=>{const L=T_();L!==r&&e(L)};return window.addEventListener("hashchange",k),()=>window.removeEventListener("hashchange",k)},[r]);const T=async()=>{try{const k=new URLSearchParams;Ao(k,o);const A=await(await fetch(`/api/statistics?${k}`)).json();u(A)}catch(k){console.error("Failed to load statistics:",k)}},C=async()=>{try{const k=new URLSearchParams;Ao(k,o),k.append("limit","5000");const A=await(await fetch(`/api/requests?${k}`)).json();if(n(A),A.length>0){const D=A[A.length-1]?.timestamp_iso;D&&f(D)}await T()}catch(k){console.error("Failed to load requests:",k)}};return Z.useEffect(()=>{const k=async()=>{try{const P=await(await fetch("/api/help/state")).json();y(P.dismissed||P.tourCompleted),!P.dismissed&&!P.tourCompleted&&setTimeout(()=>{h(!0)},500)}catch(D){console.error("Failed to load tour state:",D),setTimeout(()=>{h(!0)},500),y(!1)}},L=async()=>{try{const D=new URLSearchParams;Ao(D,o),D.append("limit","5000");const R=await(await fetch(`/api/requests?${D}`)).json();if(n(R),R.length>0){const W=R[R.length-1]?.timestamp_iso;W&&f(W)}const z=new URLSearchParams;Ao(z,o);const N=await(await fetch(`/api/statistics?${z}`)).json();u(N)}catch(D){console.error("Failed to load requests:",D)}};k(),L();const A=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;try{const D=new WebSocket(A);m.current=D,D.onmessage=async P=>{const R=JSON.parse(P.data);if(R.type==="update"){if(n(R.data),R.data.length>0){const z=R.data[R.data.length-1]?.timestamp_iso;z&&f(z)}try{const z=new URLSearchParams;Ao(z,o);const N=await(await fetch(`/api/statistics?${z}`)).json();u(N)}catch(z){console.error("Failed to load statistics:",z)}}},D.onerror=()=>{},D.onclose=()=>{}}catch{}return()=>{m.current&&m.current.readyState===WebSocket.OPEN&&m.current.close()}},[o]),Z.useEffect(()=>{(async()=>{try{const L=new URLSearchParams;Ao(L,o),L.append("limit","5000");const D=await(await fetch(`/api/requests?${L}`)).json();if(n(D),D.length>0){const B=D[D.length-1]?.timestamp_iso;B&&f(B)}const P=new URLSearchParams;Ao(P,o);const z=await(await fetch(`/api/statistics?${P}`)).json();u(z)}catch(L){console.error("Failed to load requests:",L)}})()},[o]),Z.useEffect(()=>{b.current=o},[o]),Z.useEffect(()=>{if(r!=="traffic")return;const k=setInterval(async()=>{try{const L=new URLSearchParams;Ao(L,b.current);const D=await(await fetch(`/api/statistics?${L}`)).json();u(D)}catch(L){console.error("Failed to load statistics:",L)}},2e3);return()=>clearInterval(k)},[r]),{activeTab:r,setActiveTab:e,requests:t,selected:a,setSelected:i,filters:o,setFilters:s,stats:l,firstRequestTime:c,showTour:d,setShowTour:h,tourDismissed:v,prevTabRef:x,wsRef:m,loadRequests:C}}function jve({show:r}){const e=Z.useRef(null),t=Z.useRef([]);return Z.useEffect(()=>{r&&e.current?(ft({targets:e.current,opacity:[0,1],scale:[.9,1],duration:400,easing:"easeOutExpo"}),t.current.length>0&&ft({targets:t.current,translateY:[0,-10,0],duration:1200,delay:ft.stagger(200),loop:!0,easing:"easeInOutQuad"})):!r&&e.current&&ft({targets:e.current,opacity:[1,0],scale:[1,.9],duration:300,easing:"easeInExpo",complete:()=>{e.current&&(e.current.style.display="none")}})},[r]),r?w.jsx("div",{ref:e,style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(245, 243, 240, 0.9)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,borderRadius:"8px",backdropFilter:"blur(2px)"},children:w.jsxs("div",{style:{background:_.bgCard,borderRadius:"16px",padding:"32px",boxShadow:`0 8px 32px ${_.shadowMd}`,maxWidth:"320px",width:"90%",textAlign:"center"},children:[w.jsx("h3",{style:{fontSize:"16px",fontWeight:"600",color:_.textPrimary,fontFamily:F.body,marginBottom:"20px"},children:"Waiting for MCP server to start"}),w.jsx("div",{style:{display:"flex",justifyContent:"center",gap:"8px"},children:[0,1,2].map(n=>w.jsx("div",{ref:a=>{a&&(t.current[n]=a)},style:{width:"12px",height:"12px",borderRadius:"50%",background:_.accentBlue}},n))})]})}):null}function Fve({prompt:r,promptArgs:e,onPromptArgsChange:t,promptResult:n,onGetPrompt:a,loading:i}){return w.jsxs("div",{style:{flex:1,border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[w.jsxs("div",{style:{padding:"12px",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontWeight:"500",fontSize:"14px",color:_.textPrimary},children:["Get Prompt: ",r.name]}),w.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"},children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"prompt-args-textarea",style:{display:"block",fontSize:"12px",fontWeight:"500",color:_.textSecondary,marginBottom:"6px"},children:"Arguments (JSON)"}),w.jsx("textarea",{id:"prompt-args-textarea",value:e,onChange:o=>t(o.target.value),style:{width:"100%",minHeight:"150px",padding:"10px",border:`1px solid ${_.borderLight}`,borderRadius:"6px",fontFamily:F.mono,fontSize:"12px",background:_.bgCard,color:_.textPrimary,resize:"vertical"}})]}),w.jsx("button",{type:"button",onClick:a,disabled:i,style:{padding:"10px 20px",background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",cursor:i?"not-allowed":"pointer",fontFamily:F.body,fontSize:"13px",fontWeight:"500",opacity:i?.6:1},children:i?"Getting...":"Get Prompt"}),n&&w.jsxs("div",{children:[w.jsx("label",{htmlFor:"prompt-result-pre",style:{display:"block",fontSize:"12px",fontWeight:"500",color:_.textSecondary,marginBottom:"6px"},children:"Result"}),w.jsx("pre",{id:"prompt-result-pre",style:{padding:"12px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:F.mono,color:n.error?_.error:_.textPrimary,overflow:"auto",maxHeight:"300px",margin:0},children:JSON.stringify(n,null,2)})]})]})]})}function Y2({message:r}){return w.jsx("div",{style:{padding:"40px",textAlign:"center",color:_.textSecondary,fontFamily:F.body,fontSize:"13px"},children:r})}function X2({message:r}){return w.jsx("div",{style:{padding:"40px",textAlign:"center",color:_.error,fontFamily:F.body,fontSize:"13px"},children:r})}function bc({message:r}){return w.jsx("div",{style:{padding:"40px",textAlign:"center",color:_.textSecondary,fontFamily:F.body,fontSize:"13px"},children:r})}function Vve({prompt:r,isSelected:e,onClick:t}){return w.jsx("button",{type:"button",onClick:t,"aria-label":`Select prompt ${r.name}`,style:{padding:"16px 20px",margin:"4px 8px",borderRadius:"8px",cursor:"pointer",background:e?_.bgSelected:_.bgCard,border:e?`2px solid ${_.accentBlue}`:`1px solid ${_.borderLight}`,boxShadow:e?`0 2px 4px ${_.shadowSm}`:"none",transition:"all 0.2s ease",position:"relative",width:"100%",textAlign:"left"},onMouseEnter:n=>{e||(n.currentTarget.style.background=_.bgHover,n.currentTarget.style.borderColor=_.borderMedium,n.currentTarget.style.boxShadow=`0 2px 4px ${_.shadowSm}`)},onMouseLeave:n=>{e||(n.currentTarget.style.background=_.bgCard,n.currentTarget.style.borderColor=_.borderLight,n.currentTarget.style.boxShadow="none")},children:w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px"},children:[w.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:e?_.accentBlue:_.textTertiary,marginTop:"6px",flexShrink:0,transition:"background 0.2s"}}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsx("div",{style:{fontWeight:e?"600":"500",fontSize:"14px",color:_.textPrimary,marginBottom:r.description?"6px":"0",lineHeight:"1.4"},children:r.name}),r.description&&w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,lineHeight:"1.5",marginTop:"4px"},children:r.description})]})]})})}function Gve({serverStatus:r,promptsLoading:e,promptsLoaded:t,error:n,prompts:a,selectedPrompt:i,onSelectPrompt:o}){return w.jsx("div",{style:{flex:1,overflow:"auto",background:_.bgCard,position:"relative"},children:r?.running?e||!t?w.jsx(bc,{message:"Loading prompts..."}):n?.includes("prompts:")?w.jsx(X2,{message:`Error loading prompts: ${n.replace("prompts: ","")}`}):a.length===0?w.jsx(Y2,{message:"No prompts available."}):w.jsx("div",{style:{padding:"8px 0"},children:a.map((s,l)=>w.jsx(Vve,{prompt:s,isSelected:i?.name===s.name,onClick:()=>o(s)},s.name||`prompt-${l}`))}):w.jsx(bc,{message:"Waiting for MCP server to start..."})})}function Wve({prompts:r,selectedPrompt:e,onSelectPrompt:t,promptArgs:n,onPromptArgsChange:a,promptResult:i,onGetPrompt:o,loading:s,promptsLoading:l,promptsLoaded:u,serverStatus:c,error:f,onRefresh:d}){const h=v=>{t(v);const y=v.arguments?v.arguments.reduce((m,x)=>(m[x.name]=x.default!==void 0?x.default:"",m),{}):{};a(JSON.stringify(y,null,2))};return w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[w.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[w.jsx("button",{type:"button",onClick:d,disabled:s||l,style:{padding:"8px 16px",background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",cursor:s||l?"not-allowed":"pointer",fontFamily:F.body,fontSize:"13px",fontWeight:"500",opacity:s||l?.6:1},children:l?"Loading...":"Refresh Prompts"}),w.jsx("span",{style:{color:_.textSecondary,fontSize:"13px"},children:l?"Loading prompts...":`${r.length} prompt${r.length!==1?"s":""} available`})]}),w.jsxs("div",{style:{display:"flex",gap:"16px",flex:1,minHeight:0},children:[w.jsxs("div",{style:{flex:1,border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[w.jsx("div",{style:{padding:"12px",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontWeight:"500",fontSize:"14px",color:_.textPrimary},children:"Available Prompts"}),w.jsx(Gve,{serverStatus:c,promptsLoading:l,promptsLoaded:u,error:f,prompts:r,selectedPrompt:e,onSelectPrompt:h})]}),e&&w.jsx(Fve,{prompt:e,promptArgs:n,onPromptArgsChange:a,promptResult:i,onGetPrompt:o,loading:s})]})]})}function Hve({resource:r,resourceResult:e,onReadResource:t,loading:n}){return w.jsxs("div",{style:{flex:1,border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[w.jsxs("div",{style:{padding:"12px",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontWeight:"500",fontSize:"14px",color:_.textPrimary},children:["Read Resource: ",r.uri]}),w.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"},children:[w.jsx("button",{type:"button",onClick:t,disabled:n,style:{padding:"10px 20px",background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",cursor:n?"not-allowed":"pointer",fontFamily:F.body,fontSize:"13px",fontWeight:"500",opacity:n?.6:1},children:n?"Reading...":"Read Resource"}),e&&w.jsxs("div",{children:[w.jsx("label",{htmlFor:"resource-result-pre",style:{display:"block",fontSize:"12px",fontWeight:"500",color:_.textSecondary,marginBottom:"6px"},children:"Result"}),w.jsx("pre",{id:"resource-result-pre",style:{padding:"12px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:F.mono,color:e.error?_.error:_.textPrimary,overflow:"auto",maxHeight:"400px",margin:0},children:JSON.stringify(e,null,2)})]})]})]})}function $ve({resource:r,isSelected:e,onClick:t}){return w.jsx("button",{type:"button",onClick:t,"aria-label":`Select resource ${r.uri}`,style:{padding:"16px 20px",margin:"4px 8px",borderRadius:"8px",cursor:"pointer",background:e?_.bgSelected:_.bgCard,border:e?`2px solid ${_.accentBlue}`:`1px solid ${_.borderLight}`,boxShadow:e?`0 2px 4px ${_.shadowSm}`:"none",transition:"all 0.2s ease",position:"relative",width:"100%",textAlign:"left"},onMouseEnter:n=>{e||(n.currentTarget.style.background=_.bgHover,n.currentTarget.style.borderColor=_.borderMedium,n.currentTarget.style.boxShadow=`0 2px 4px ${_.shadowSm}`)},onMouseLeave:n=>{e||(n.currentTarget.style.background=_.bgCard,n.currentTarget.style.borderColor=_.borderLight,n.currentTarget.style.boxShadow="none")},children:w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px"},children:[w.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:e?_.accentBlue:_.textTertiary,marginTop:"6px",flexShrink:0,transition:"background 0.2s"}}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsx("div",{style:{fontWeight:e?"600":"500",fontSize:"14px",color:_.textPrimary,marginBottom:r.name||r.description?"6px":"0",lineHeight:"1.4",wordBreak:"break-word"},children:r.uri}),r.name&&w.jsx("div",{style:{fontSize:"13px",color:_.textPrimary,fontWeight:"500",lineHeight:"1.5",marginTop:"4px"},children:r.name}),r.description&&w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,lineHeight:"1.5",marginTop:r.name?"2px":"4px"},children:r.description})]})]})})}function Uve({serverStatus:r,resourcesLoading:e,resourcesLoaded:t,error:n,resources:a,selectedResource:i,onSelectResource:o}){return w.jsx("div",{style:{flex:1,overflow:"auto",background:_.bgCard,position:"relative"},children:r?.running?e||!t?w.jsx(bc,{message:"Loading resources..."}):n?.includes("resources:")?w.jsx(X2,{message:`Error loading resources: ${n.replace("resources: ","")}`}):a.length===0?w.jsx(Y2,{message:"No resources available."}):w.jsx("div",{style:{padding:"8px 0"},children:a.map((s,l)=>w.jsx($ve,{resource:s,isSelected:i?.uri===s.uri,onClick:()=>o(s)},s.uri||`resource-${l}`))}):w.jsx(bc,{message:"Waiting for MCP server to start..."})})}function Yve({resources:r,selectedResource:e,onSelectResource:t,resourceResult:n,onReadResource:a,loading:i,resourcesLoading:o,resourcesLoaded:s,serverStatus:l,error:u,onRefresh:c}){return w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[w.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[w.jsx("button",{type:"button",onClick:c,disabled:i||o,style:{padding:"8px 16px",background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",cursor:i||o?"not-allowed":"pointer",fontFamily:F.body,fontSize:"13px",fontWeight:"500",opacity:i||o?.6:1},children:o?"Loading...":"Refresh Resources"}),w.jsx("span",{style:{color:_.textSecondary,fontSize:"13px"},children:o?"Loading resources...":`${r.length} resource${r.length!==1?"s":""} available`})]}),w.jsxs("div",{style:{display:"flex",gap:"16px",flex:1,minHeight:0},children:[w.jsxs("div",{style:{flex:1,border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[w.jsx("div",{style:{padding:"12px",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontWeight:"500",fontSize:"14px",color:_.textPrimary},children:"Available Resources"}),w.jsx(Uve,{serverStatus:l,resourcesLoading:o,resourcesLoaded:s,error:u,resources:r,selectedResource:e,onSelectResource:t})]}),e&&w.jsx(Hve,{resource:e,resourceResult:n,onReadResource:a,loading:i})]})]})}function Xve({tool:r,toolArgs:e,onToolArgsChange:t,toolResult:n,onCallTool:a,loading:i}){return w.jsxs("div",{style:{flex:1,border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[w.jsxs("div",{style:{padding:"12px",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontWeight:"500",fontSize:"14px",color:_.textPrimary},children:["Call Tool: ",r.name]}),w.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"},children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"tool-args-textarea",style:{display:"block",fontSize:"12px",fontWeight:"500",color:_.textSecondary,marginBottom:"6px"},children:"Arguments (JSON)"}),w.jsx("textarea",{id:"tool-args-textarea",value:e,onChange:o=>t(o.target.value),style:{width:"100%",minHeight:"150px",padding:"10px",border:`1px solid ${_.borderLight}`,borderRadius:"6px",fontFamily:F.mono,fontSize:"12px",background:_.bgCard,color:_.textPrimary,resize:"vertical"}})]}),w.jsx("button",{type:"button",onClick:a,disabled:i,style:{padding:"10px 20px",background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",cursor:i?"not-allowed":"pointer",fontFamily:F.body,fontSize:"13px",fontWeight:"500",opacity:i?.6:1},children:i?"Calling...":"Call Tool"}),n&&w.jsxs("div",{children:[w.jsx("label",{htmlFor:"tool-result-pre",style:{display:"block",fontSize:"12px",fontWeight:"500",color:_.textSecondary,marginBottom:"6px"},children:"Result"}),w.jsx("pre",{id:"tool-result-pre",style:{padding:"12px",background:_.bgSecondary,border:`1px solid ${_.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:F.mono,color:n.error?_.error:_.textPrimary,overflow:"auto",maxHeight:"300px",margin:0},children:JSON.stringify(n,null,2)})]})]})]})}function Zve({tool:r,isSelected:e,onClick:t}){return w.jsx("button",{type:"button",onClick:t,"aria-label":`Select tool ${r.name}`,style:{padding:"16px 20px",margin:"4px 8px",borderRadius:"8px",cursor:"pointer",background:e?_.bgSelected:_.bgCard,border:e?`2px solid ${_.accentBlue}`:`1px solid ${_.borderLight}`,boxShadow:e?`0 2px 4px ${_.shadowSm}`:"none",transition:"all 0.2s ease",position:"relative",width:"100%",textAlign:"left"},onMouseEnter:n=>{e||(n.currentTarget.style.background=_.bgHover,n.currentTarget.style.borderColor=_.borderMedium,n.currentTarget.style.boxShadow=`0 2px 4px ${_.shadowSm}`)},onMouseLeave:n=>{e||(n.currentTarget.style.background=_.bgCard,n.currentTarget.style.borderColor=_.borderLight,n.currentTarget.style.boxShadow="none")},children:w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px"},children:[w.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:e?_.accentBlue:_.textTertiary,marginTop:"6px",flexShrink:0,transition:"background 0.2s"}}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsx("div",{style:{fontWeight:e?"600":"500",fontSize:"14px",color:_.textPrimary,marginBottom:r.description?"6px":"0",lineHeight:"1.4"},children:r.name}),r.description&&w.jsx("div",{style:{fontSize:"12px",color:_.textSecondary,lineHeight:"1.5",marginTop:"4px"},children:r.description})]})]})})}function Kve({serverStatus:r,toolsLoading:e,toolsLoaded:t,error:n,tools:a,selectedTool:i,onSelectTool:o}){return w.jsx("div",{style:{flex:1,overflow:"auto",background:_.bgCard,position:"relative"},children:r?.running?e||!t?w.jsx(bc,{message:"Loading tools..."}):n?.includes("tools:")?w.jsx(X2,{message:`Error loading tools: ${n.replace("tools: ","")}`}):a.length===0?w.jsx(Y2,{message:"No tools available."}):w.jsx("div",{style:{padding:"8px 0"},children:a.map((s,l)=>w.jsx(Zve,{tool:s,isSelected:i?.name===s.name,onClick:()=>o(s)},s.name||`tool-${l}`))}):w.jsx(bc,{message:"Waiting for MCP server to start..."})})}function qve({tools:r,selectedTool:e,onSelectTool:t,toolArgs:n,onToolArgsChange:a,toolResult:i,onCallTool:o,loading:s,toolsLoading:l,toolsLoaded:u,serverStatus:c,error:f,onRefresh:d}){const h=v=>{t(v);const y=v.inputSchema?.properties?Object.keys(v.inputSchema.properties).reduce((m,x)=>{const b=v.inputSchema.properties[x];return m[x]=b.default!==void 0?b.default:"",m},{}):{};a(JSON.stringify(y,null,2))};return w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[w.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[w.jsx("button",{type:"button",onClick:d,disabled:s||l,style:{padding:"8px 16px",background:_.buttonPrimary,color:_.textInverse,border:"none",borderRadius:"6px",cursor:s||l?"not-allowed":"pointer",fontFamily:F.body,fontSize:"13px",fontWeight:"500",opacity:s||l?.6:1},children:l?"Loading...":"Refresh Tools"}),w.jsx("span",{style:{color:_.textSecondary,fontSize:"13px"},children:l?"Loading tools...":`${r.length} tool${r.length!==1?"s":""} available`})]}),w.jsxs("div",{style:{display:"flex",gap:"16px",flex:1,minHeight:0},children:[w.jsxs("div",{style:{flex:1,border:`1px solid ${_.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[w.jsx("div",{style:{padding:"12px",background:_.bgSecondary,borderBottom:`1px solid ${_.borderLight}`,fontWeight:"500",fontSize:"14px",color:_.textPrimary},children:"Available Tools"}),w.jsx(Kve,{serverStatus:c,toolsLoading:l,toolsLoaded:u,error:f,tools:r,selectedTool:e,onSelectTool:h})]}),e&&w.jsx(Xve,{tool:e,toolArgs:n,onToolArgsChange:a,toolResult:i,onCallTool:o,loading:s})]})]})}function Qve(r,e,t){const[n,a]=Z.useState([]),[i,o]=Z.useState([]),[s,l]=Z.useState([]),[u,c]=Z.useState(!1),[f,d]=Z.useState(!1),[h,v]=Z.useState(!1),[y,m]=Z.useState(!1),[x,b]=Z.useState(!1),[T,C]=Z.useState(!1),k=Z.useCallback(async()=>{if(!e){t("tools: No server selected"),m(!0);return}c(!0),t(null);try{const P=await r("tools/list");a(P?.tools||[]),m(!0)}catch(P){const R=P.message||"Failed to load tools";t(`tools: ${R}`),m(!0),console.error("Failed to load tools:",P)}finally{c(!1)}},[e,r,t]),L=Z.useCallback(async()=>{if(!e){t("prompts: No server selected"),b(!0);return}d(!0),t(null);try{const P=await r("prompts/list");o(P?.prompts||[]),b(!0)}catch(P){const R=P.message||"Failed to load prompts";t(`prompts: ${R}`),b(!0),console.error("Failed to load prompts:",P)}finally{d(!1)}},[e,r,t]),A=Z.useCallback(async()=>{if(!e){t("resources: No server selected"),C(!0);return}v(!0),t(null);try{const P=await r("resources/list");l(P?.resources||[]),C(!0)}catch(P){const R=P.message||"Failed to load resources";t(`resources: ${R}`),C(!0),console.error("Failed to load resources:",P)}finally{v(!1)}},[e,r,t]),D=Z.useCallback(()=>{m(!1),b(!1),C(!1),a([]),o([]),l([])},[]);return{tools:n,prompts:i,resources:s,toolsLoading:u,promptsLoading:f,resourcesLoading:h,toolsLoaded:y,promptsLoaded:x,resourcesLoaded:T,loadTools:k,loadPrompts:L,loadResources:A,resetData:D}}function Jve(r){const[e,t]=Z.useState(!1),[n,a]=Z.useState(null),[i,o]=Z.useState(null),s=Z.useRef(i);s.current=i;const l=Z.useCallback(async(c,f={})=>{if(!r)throw new Error("No server selected");a(null),t(!0);try{const d={"Content-Type":"application/json"},h=s.current;h&&(d["Mcp-Session-Id"]=h);const v=await fetch("/api/playground/proxy",{method:"POST",headers:d,body:JSON.stringify({method:c,params:f,serverName:r})}),y=await v.json(),m=v.headers.get("Mcp-Session-Id")||v.headers.get("mcp-session-id")||y._sessionId;if(m&&m!==h&&o(m),!v.ok)throw new Error(y.error?.message||y.message||"Request failed");return y.result||y}catch(d){throw a(d.message),d}finally{t(!1)}},[r]),u=Z.useCallback(()=>{o(null)},[]);return{makeMcpRequest:l,loading:e,error:n,setError:a,resetSession:u}}function ege(){const[r,e]=Z.useState(null),[t,n]=Z.useState(!1),[a,i]=Z.useState([]),[o,s]=Z.useState(null),l=Z.useCallback(async()=>{try{const c=await fetch("/api/composite/status");if(!c.ok)throw new Error("Server not available");const f=await c.json();e(d=>{const h=d?.running;return f.running?n(v=>v&&!1):n(v=>!v||h?!0:v),f})}catch{e({running:!1}),n(f=>f||!0)}},[]),u=Z.useCallback(async()=>{try{const c=await fetch("/api/composite/servers");if(c.ok){const f=await c.json();i(f.servers||[]),s(d=>!d&&f.servers&&f.servers.length>0?f.servers[0]:d)}}catch(c){console.error("Failed to load servers:",c)}},[]);return Z.useEffect(()=>{u()},[u]),Z.useEffect(()=>{l();const c=setInterval(l,2e3);return()=>clearInterval(c)},[l]),Z.useEffect(()=>{a.length>0&&!o&&s(a[0])},[a,o]),{serverStatus:r,showLoadingModal:t,availableServers:a,selectedServer:o,setSelectedServer:s,checkServerStatus:l}}function tge(){const[r,e]=Z.useState("tools"),[t,n]=Z.useState(null),[a,i]=Z.useState("{}"),[o,s]=Z.useState(null),[l,u]=Z.useState(null),[c,f]=Z.useState("{}"),[d,h]=Z.useState(null),[v,y]=Z.useState(null),[m,x]=Z.useState(null),{serverStatus:b,showLoadingModal:T,availableServers:C,selectedServer:k,setSelectedServer:L}=ege(),{makeMcpRequest:A,loading:D,error:P,setError:R,resetSession:z}=Jve(k),{tools:B,prompts:N,resources:W,toolsLoading:$,promptsLoading:H,resourcesLoading:U,toolsLoaded:G,promptsLoaded:X,resourcesLoaded:K,loadTools:V,loadPrompts:Y,loadResources:ne,resetData:ue}=Qve(A,k,R),fe=Z.useRef(r);return fe.current=r,Z.useEffect(()=>{if(!k||!b?.running)return;ue(),n(null),u(null),y(null),s(null),h(null),x(null),i("{}"),f("{}"),z(),R(null);const ce=setTimeout(()=>{const we=fe.current;we==="tools"?V():we==="prompts"?Y():we==="resources"&&ne()},100);return()=>clearTimeout(ce)},[k,b?.running,ue,V,Y,ne,z,R]),Z.useEffect(()=>{if(!(!b?.running||!k)){if(r==="tools"&&!G&&!$){const ce=setTimeout(()=>{V()},100);return()=>clearTimeout(ce)}if(r==="prompts"&&!X&&!H){const ce=setTimeout(()=>{Y()},100);return()=>clearTimeout(ce)}if(r==="resources"&&!K&&!U){const ce=setTimeout(()=>{ne()},100);return()=>clearTimeout(ce)}}},[r,b?.running,k,G,$,X,H,K,U,V,Y,ne]),{activeSection:r,setActiveSection:e,tools:B,prompts:N,resources:W,loading:D,error:P,selectedTool:t,setSelectedTool:n,toolArgs:a,setToolArgs:i,toolResult:o,selectedPrompt:l,setSelectedPrompt:u,promptArgs:c,setPromptArgs:f,promptResult:d,selectedResource:v,setSelectedResource:y,resourceResult:m,serverStatus:b,showLoadingModal:T,toolsLoading:$,promptsLoading:H,resourcesLoading:U,toolsLoaded:G,promptsLoaded:X,resourcesLoaded:K,loadTools:V,loadPrompts:Y,loadResources:ne,handleCallTool:async()=>{if(t)try{const we=(Ie=>{try{return JSON.parse(Ie)}catch{return null}})(a);if(we===null){R("Invalid JSON in arguments");return}const xe=await A("tools/call",{name:t.name,arguments:we});s(xe)}catch(ce){s({error:ce.message})}},handleGetPrompt:async()=>{if(l)try{const we=(Ie=>{try{return JSON.parse(Ie)}catch{return null}})(c);if(we===null){R("Invalid JSON in arguments");return}const xe=await A("prompts/get",{name:l.name,arguments:we});h(xe)}catch(ce){h({error:ce.message})}},handleReadResource:async()=>{if(v)try{const ce=await A("resources/read",{uri:v.uri});x(ce)}catch(ce){x({error:ce.message})}},availableServers:C,selectedServer:k,setSelectedServer:L}}function rge(){const{activeSection:r,setActiveSection:e,tools:t,prompts:n,resources:a,loading:i,error:o,selectedTool:s,setSelectedTool:l,toolArgs:u,setToolArgs:c,toolResult:f,selectedPrompt:d,setSelectedPrompt:h,promptArgs:v,setPromptArgs:y,promptResult:m,selectedResource:x,setSelectedResource:b,resourceResult:T,serverStatus:C,showLoadingModal:k,toolsLoading:L,promptsLoading:A,resourcesLoading:D,toolsLoaded:P,promptsLoaded:R,resourcesLoaded:z,loadTools:B,loadPrompts:N,loadResources:W,handleCallTool:$,handleGetPrompt:H,handleReadResource:U,availableServers:G,selectedServer:X,setSelectedServer:K}=tge();return w.jsxs(w.Fragment,{children:[w.jsx("style",{children:`
|
|
93
|
-
@keyframes spin {
|
|
94
|
-
from { transform: rotate(0deg); }
|
|
95
|
-
to { transform: rotate(360deg); }
|
|
96
|
-
}
|
|
97
|
-
`}),w.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:_.bgPrimary,padding:"20px",gap:"16px",position:"relative"},children:[w.jsx(jve,{show:k}),o&&!o.includes(":")&&w.jsxs("div",{style:{padding:"12px 16px",background:_.error,color:_.textInverse,borderRadius:"6px",fontSize:"13px",fontFamily:F.body},children:["Error: ",o]}),w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[G.length>0&&w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[w.jsx("label",{htmlFor:"mcp-server-select",style:{fontSize:"13px",fontFamily:F.body,color:_.textSecondary,fontWeight:"500"},children:"Server:"}),w.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:G.map(V=>w.jsx("button",{type:"button",onClick:()=>K(V),style:{padding:"10px 18px",background:X===V?_.accentBlue:_.bgSecondary,border:X===V?`2px solid ${_.accentBlue}`:`1px solid ${_.borderLight}`,borderRadius:"8px",color:X===V?_.textInverse:_.textPrimary,fontSize:"13px",fontFamily:F.body,fontWeight:X===V?"600":"500",cursor:"pointer",transition:"all 0.2s ease",boxShadow:X===V?`0 2px 4px ${_.shadowSm}`:"none"},onMouseEnter:Y=>{X!==V&&(Y.currentTarget.style.background=_.bgHover,Y.currentTarget.style.borderColor=_.borderMedium,Y.currentTarget.style.boxShadow=`0 2px 4px ${_.shadowSm}`)},onMouseLeave:Y=>{X!==V&&(Y.currentTarget.style.background=_.bgSecondary,Y.currentTarget.style.borderColor=_.borderLight,Y.currentTarget.style.boxShadow="none")},children:V},V))})]}),w.jsx("div",{style:{display:"flex",gap:"8px",borderBottom:`1px solid ${_.borderLight}`},children:["tools","prompts","resources"].map(V=>w.jsx("button",{type:"button",onClick:()=>e(V),style:{padding:"10px 18px",background:r===V?_.bgSecondary:"transparent",border:"none",borderBottom:`2px solid ${r===V?_.accentBlue:"transparent"}`,color:r===V?_.textPrimary:_.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:F.body,fontWeight:r===V?"500":"400",textTransform:"capitalize",borderRadius:"6px 6px 0 0",transition:"all 0.2s"},children:V},V))})]}),w.jsxs("div",{style:{flex:1,overflow:"hidden",minHeight:0},children:[r==="tools"&&w.jsx(qve,{tools:t,selectedTool:s,onSelectTool:l,toolArgs:u,onToolArgsChange:c,toolResult:f,onCallTool:$,loading:i,toolsLoading:L,toolsLoaded:P,serverStatus:C,error:o,onRefresh:B}),r==="prompts"&&w.jsx(Wve,{prompts:n,selectedPrompt:d,onSelectPrompt:h,promptArgs:v,onPromptArgsChange:y,promptResult:m,onGetPrompt:H,loading:i,promptsLoading:A,promptsLoaded:R,serverStatus:C,error:o,onRefresh:N}),r==="resources"&&w.jsx(Yve,{resources:a,selectedResource:x,onSelectResource:b,resourceResult:T,onReadResource:U,loading:i,resourcesLoading:D,resourcesLoaded:z,serverStatus:C,error:o,onRefresh:W})]})]})]})}const nN=[{target:'[data-tour="tabs"]',title:"Welcome to MCP Shark!",content:w.jsxs("div",{children:[w.jsx("p",{style:{margin:"0 0 12px 0"},children:"MCP Shark is a powerful tool for monitoring and analyzing Model Context Protocol (MCP) communications. Let's get you started!"}),w.jsxs("p",{style:{margin:0},children:["First, you'll need to set up the MCP Shark server. Click on the"," ",w.jsx("strong",{children:"MCP Server Setup"})," tab to begin."]})]}),position:"bottom"},{target:'[data-tour="setup-tab"]',title:"Step 1: Open MCP Server Setup",content:w.jsxs("div",{children:[w.jsxs("p",{style:{margin:"0 0 8px 0"},children:["Click on the ",w.jsx("strong",{children:"MCP Server Setup"})," tab to configure and start the MCP Shark server."]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"This is where you'll configure your MCP servers and start monitoring."})]}),position:"bottom"},{target:'[data-tour="detected-editors"]',title:"Step 2: Select Your Configuration",content:w.jsxs("div",{children:[w.jsx("p",{style:{margin:"0 0 8px 0"},children:"MCP Shark automatically detects your IDE's MCP configuration files. You have two options:"}),w.jsxs("ul",{style:{margin:"0 0 8px 0",paddingLeft:"20px",fontSize:"13px"},children:[w.jsxs("li",{children:["Click on any ",w.jsx("strong",{children:"detected editor"})," (like Cursor or Windsurf) to use its config"]}),w.jsxs("li",{children:["Or click ",w.jsx("strong",{children:'"Select File"'})," to upload your own config file"]})]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"When you click a detected editor, the file path will automatically populate in the text box."})]}),position:"bottom"},{target:'[data-tour="select-file"]',title:"Alternative: Upload Your Config",content:w.jsxs("div",{children:[w.jsxs("p",{style:{margin:"0 0 8px 0"},children:["If you prefer, you can click ",w.jsx("strong",{children:'"Select File"'})," to upload your MCP configuration file directly."]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"Or manually enter the file path in the text box next to it."})]}),position:"bottom"},{target:'[data-tour="start-button"]',title:"Step 3: Start MCP Shark",content:w.jsxs("div",{children:[w.jsxs("p",{style:{margin:"0 0 8px 0"},children:["Once you've selected a configuration file (either from detected editors or uploaded), click ",w.jsx("strong",{children:'"Start MCP Shark"'})," to begin monitoring."]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"The server will start and begin capturing all MCP traffic between your IDE and servers."})]}),position:"top"},{target:'[data-tour="traffic-tab"]',title:"View Your Traffic",content:w.jsxs("div",{children:[w.jsxs("p",{style:{margin:"0 0 8px 0"},children:["After starting the server, switch to the ",w.jsx("strong",{children:"Traffic Capture"})," tab to see all HTTP requests and responses in real-time."]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"You can view traffic as a flat list, grouped by session, or grouped by server."})]}),position:"bottom"},{target:'[data-tour="smart-scan-tab"]',title:"Smart Scan - AI Security Analysis",content:w.jsxs("div",{children:[w.jsxs("p",{style:{margin:"0 0 8px 0"},children:[w.jsx("strong",{children:"Smart Scan"})," uses AI-powered analysis via remote API to detect security vulnerabilities in your MCP servers. For offline scanning, use the"," ",w.jsx("strong",{children:"Local Analysis"})," tab."]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"Scan results are cached automatically, so you won't waste API calls on unchanged servers."})]}),position:"bottom"},{target:'[data-tour="help-button"]',title:"Need Help?",content:w.jsxs("div",{children:[w.jsxs("p",{style:{margin:"0 0 8px 0"},children:["Click the ",w.jsx("strong",{children:"Start Tour"})," button anytime to restart this guide or get help."]}),w.jsx("p",{style:{margin:0,fontSize:"12px",color:"#858585"},children:"You're all set! Start by configuring your MCP server, then watch the traffic flow."})]}),position:"left"}];function nge(){const{activeTab:r,setActiveTab:e,requests:t,selected:n,setSelected:a,filters:i,setFilters:o,stats:s,firstRequestTime:l,showTour:u,setShowTour:c,prevTabRef:f,loadRequests:d}=Bve(),[h,v]=Z.useState(0);return Z.useEffect(()=>{if(f.current!==r){const y=document.querySelector("[data-tab-content]");y&&U2(y,{duration:300}),f.current=r}},[r,f]),w.jsxs("div",{style:{display:"flex",height:"100vh",flexDirection:"column",background:_.bgPrimary},children:[u&&w.jsx(YW,{steps:nN,onComplete:()=>c(!1),onSkip:()=>c(!1),onStepChange:y=>{const m=nN[y];m&&(m.target==='[data-tour="setup-tab"]'||m.target==='[data-tour="detected-editors"]'||m.target==='[data-tour="select-file"]'||m.target==='[data-tour="start-button"]'?r!=="setup"&&e("setup"):m.target==='[data-tour="traffic-tab"]'?r!=="traffic"&&e("traffic"):m.target==='[data-tour="smart-scan-tab"]'&&r!=="smart-scan"&&e("smart-scan"))}},h),w.jsx("div",{style:{position:"relative"},"data-tour":"tabs",children:w.jsx(Kpe,{activeTab:r,onTabChange:e})}),w.jsx(ive,{onHelpClick:()=>{u?(c(!1),v(y=>y+1),setTimeout(()=>{c(!0)},100)):(v(y=>y+1),c(!0))}}),r==="traffic"&&w.jsx(zve,{requests:t,selected:n,onSelect:a,filters:i,onFilterChange:o,stats:s,firstRequestTime:l,onClear:()=>{a(null),d()}}),r==="logs"&&w.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:w.jsx(CW,{})}),r==="setup"&&w.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:w.jsx(BW,{})}),r==="playground"&&w.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:w.jsx(rge,{})}),r==="smart-scan"&&w.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"auto",width:"100%",height:"100%"},children:w.jsx(cpe,{})}),r==="shutdown"&&w.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:w.jsx(Phe,{})}),r==="security"&&w.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"auto",width:"100%",height:"100%"},children:w.jsx(Dhe,{onNavigateToSmartScan:()=>e("smart-scan"),onNavigateToSetup:()=>e("setup")})})]})}dG.createRoot(document.getElementById("root")).render(w.jsx(Cd.StrictMode,{children:w.jsx(nge,{})}));
|