@8btc/wujie-ppt 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wujie-ppt.es.js +9012 -9641
- package/dist/wujie-ppt.umd.js +19 -48
- package/package.json +1 -1
package/dist/wujie-ppt.umd.js
CHANGED
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
(function(Xt,Ns){typeof exports=="object"&&typeof module<"u"?Ns(exports,require("@icon-park/react/styles/index.css"),require("prosemirror-view/style/prosemirror.css"),require("animate.css"),require("react"),require("lodash"),require("nanoid"),require("zustand"),require("prosemirror-commands"),require("clipboard"),require("crypto-js"),require("tinycolor2"),require("clsx"),require("@icon-park/react"),require("react-dom"),require("prosemirror-state"),require("prosemirror-view"),require("prosemirror-model"),require("prosemirror-keymap"),require("prosemirror-history"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-schema-list"),require("prosemirror-inputrules"),require("prosemirror-schema-basic"),require("mitt"),require("svg-pathdata"),require("svg-arc-to-cubic-bezier")):typeof define=="function"&&define.amd?define(["exports","@icon-park/react/styles/index.css","prosemirror-view/style/prosemirror.css","animate.css","react","lodash","nanoid","zustand","prosemirror-commands","clipboard","crypto-js","tinycolor2","clsx","@icon-park/react","react-dom","prosemirror-state","prosemirror-view","prosemirror-model","prosemirror-keymap","prosemirror-history","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-schema-list","prosemirror-inputrules","prosemirror-schema-basic","mitt","svg-pathdata","svg-arc-to-cubic-bezier"],Ns):(Xt=typeof globalThis<"u"?globalThis:Xt||self,Ns(Xt.WujiePPT={},null,null,null,Xt.React,Xt._,Xt.nanoid$1,Xt.zustand,Xt.prosemirrorCommands,Xt.Clipboard,Xt.CryptoJS,Xt.tinycolor,Xt.clsx,Xt.react,Xt.ReactDOM,Xt.prosemirrorState,Xt.prosemirrorView,Xt.prosemirrorModel,Xt.prosemirrorKeymap,Xt.prosemirrorHistory,Xt.prosemirrorDropcursor,Xt.prosemirrorGapcursor,Xt.prosemirrorSchemaList,Xt.prosemirrorInputrules,Xt.prosemirrorSchemaBasic,Xt.mitt,Xt.svgPathdata))})(this,function(Xt,Ns,SD,wD,N,Ar,jt,Os,ee,t_,cc,Is,kt,Ie,e_,fc,r_,Bd,Vd,hc,n_,i_,oi,jr,zd,a_,o_){"use strict";var dc={exports:{}},qa={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Fd;function s_(){if(Fd)return qa;Fd=1;var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={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)&&!a.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:i.current}}return qa.Fragment=r,qa.jsx=o,qa.jsxs=o,qa}var to={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Hd;function l_(){return Hd||(Hd=1,process.env.NODE_ENV!=="production"&&function(){var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,p="@@iterator";function g(V){if(V===null||typeof V!="object")return null;var rt=v&&V[v]||V[p];return typeof rt=="function"?rt:null}var m=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(V){{for(var rt=arguments.length,pt=new Array(rt>1?rt-1:0),At=1;At<rt;At++)pt[At-1]=arguments[At];_("error",V,pt)}}function _(V,rt,pt){{var At=m.ReactDebugCurrentFrame,Jt=At.getStackAddendum();Jt!==""&&(rt+="%s",pt=pt.concat([Jt]));var ae=pt.map(function(Gt){return String(Gt)});ae.unshift("Warning: "+rt),Function.prototype.apply.call(console[V],console,ae)}}var x=!1,S=!1,b=!1,w=!1,T=!1,L;L=Symbol.for("react.module.reference");function C(V){return!!(typeof V=="string"||typeof V=="function"||V===n||V===a||T||V===i||V===u||V===c||w||V===h||x||S||b||typeof V=="object"&&V!==null&&(V.$$typeof===d||V.$$typeof===f||V.$$typeof===o||V.$$typeof===s||V.$$typeof===l||V.$$typeof===L||V.getModuleId!==void 0))}function M(V,rt,pt){var At=V.displayName;if(At)return At;var Jt=rt.displayName||rt.name||"";return Jt!==""?pt+"("+Jt+")":pt}function A(V){return V.displayName||"Context"}function E(V){if(V==null)return null;if(typeof V.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof V=="function")return V.displayName||V.name||null;if(typeof V=="string")return V;switch(V){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof V=="object")switch(V.$$typeof){case s:var rt=V;return A(rt)+".Consumer";case o:var pt=V;return A(pt._context)+".Provider";case l:return M(V,V.render,"ForwardRef");case f:var At=V.displayName||null;return At!==null?At:E(V.type)||"Memo";case d:{var Jt=V,ae=Jt._payload,Gt=Jt._init;try{return E(Gt(ae))}catch{return null}}}return null}var P=Object.assign,I=0,k,R,H,B,F,O,G;function j(){}j.__reactDisabledLog=!0;function Y(){{if(I===0){k=console.log,R=console.info,H=console.warn,B=console.error,F=console.group,O=console.groupCollapsed,G=console.groupEnd;var V={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:V,log:V,warn:V,error:V,group:V,groupCollapsed:V,groupEnd:V})}I++}}function et(){{if(I--,I===0){var V={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},V,{value:k}),info:P({},V,{value:R}),warn:P({},V,{value:H}),error:P({},V,{value:B}),group:P({},V,{value:F}),groupCollapsed:P({},V,{value:O}),groupEnd:P({},V,{value:G})})}I<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ft=m.ReactCurrentDispatcher,gt;function $(V,rt,pt){{if(gt===void 0)try{throw Error()}catch(Jt){var At=Jt.stack.trim().match(/\n( *(at )?)/);gt=At&&At[1]||""}return`
|
|
18
|
-
`+gt+V}}var U=!1,q;{var tt=typeof WeakMap=="function"?WeakMap:Map;q=new tt}function nt(V,rt){if(!V||U)return"";{var pt=q.get(V);if(pt!==void 0)return pt}var At;U=!0;var Jt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ae;ae=ft.current,ft.current=null,Y();try{if(rt){var Gt=function(){throw Error()};if(Object.defineProperty(Gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Gt,[])}catch(ar){At=ar}Reflect.construct(V,[],Gt)}else{try{Gt.call()}catch(ar){At=ar}V.call(Gt.prototype)}}else{try{throw Error()}catch(ar){At=ar}V()}}catch(ar){if(ar&&At&&typeof ar.stack=="string"){for(var Vt=ar.stack.split(`
|
|
19
|
-
`),Ke=At.stack.split(`
|
|
20
|
-
`),ge=Vt.length-1,be=Ke.length-1;ge>=1&&be>=0&&Vt[ge]!==Ke[be];)be--;for(;ge>=1&&be>=0;ge--,be--)if(Vt[ge]!==Ke[be]){if(ge!==1||be!==1)do if(ge--,be--,be<0||Vt[ge]!==Ke[be]){var Dr=`
|
|
21
|
-
`+Vt[ge].replace(" at new "," at ");return V.displayName&&Dr.includes("<anonymous>")&&(Dr=Dr.replace("<anonymous>",V.displayName)),typeof V=="function"&&q.set(V,Dr),Dr}while(ge>=1&&be>=0);break}}}finally{U=!1,ft.current=ae,et(),Error.prepareStackTrace=Jt}var Ja=V?V.displayName||V.name:"",Ki=Ja?$(Ja):"";return typeof V=="function"&&q.set(V,Ki),Ki}function at(V,rt,pt){return nt(V,!1)}function st(V){var rt=V.prototype;return!!(rt&&rt.isReactComponent)}function Et(V,rt,pt){if(V==null)return"";if(typeof V=="function")return nt(V,st(V));if(typeof V=="string")return $(V);switch(V){case u:return $("Suspense");case c:return $("SuspenseList")}if(typeof V=="object")switch(V.$$typeof){case l:return at(V.render);case f:return Et(V.type,rt,pt);case d:{var At=V,Jt=At._payload,ae=At._init;try{return Et(ae(Jt),rt,pt)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,J={},_t=m.ReactDebugCurrentFrame;function mt(V){if(V){var rt=V._owner,pt=Et(V.type,V._source,rt?rt.type:null);_t.setExtraStackFrame(pt)}else _t.setExtraStackFrame(null)}function xt(V,rt,pt,At,Jt){{var ae=Function.call.bind(K);for(var Gt in V)if(ae(V,Gt)){var Vt=void 0;try{if(typeof V[Gt]!="function"){var Ke=Error((At||"React class")+": "+pt+" type `"+Gt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof V[Gt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}Vt=V[Gt](rt,Gt,At,pt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ge){Vt=ge}Vt&&!(Vt instanceof Error)&&(mt(Jt),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",At||"React class",pt,Gt,typeof Vt),mt(null)),Vt instanceof Error&&!(Vt.message in J)&&(J[Vt.message]=!0,mt(Jt),y("Failed %s type: %s",pt,Vt.message),mt(null))}}}var X=Array.isArray;function W(V){return X(V)}function Q(V){{var rt=typeof Symbol=="function"&&Symbol.toStringTag,pt=rt&&V[Symbol.toStringTag]||V.constructor.name||"Object";return pt}}function Z(V){try{return ut(V),!1}catch{return!0}}function ut(V){return""+V}function dt(V){if(Z(V))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Q(V)),ut(V)}var ct=m.ReactCurrentOwner,Ut={key:!0,ref:!0,__self:!0,__source:!0},Qt,Wt,pe;pe={};function Ae(V){if(K.call(V,"ref")){var rt=Object.getOwnPropertyDescriptor(V,"ref").get;if(rt&&rt.isReactWarning)return!1}return V.ref!==void 0}function lt(V){if(K.call(V,"key")){var rt=Object.getOwnPropertyDescriptor(V,"key").get;if(rt&&rt.isReactWarning)return!1}return V.key!==void 0}function Ze(V,rt){if(typeof V.ref=="string"&&ct.current&&rt&&ct.current.stateNode!==rt){var pt=E(ct.current.type);pe[pt]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E(ct.current.type),V.ref),pe[pt]=!0)}}function Me(V,rt){{var pt=function(){Qt||(Qt=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",rt))};pt.isReactWarning=!0,Object.defineProperty(V,"key",{get:pt,configurable:!0})}}function Gr(V,rt){{var pt=function(){Wt||(Wt=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",rt))};pt.isReactWarning=!0,Object.defineProperty(V,"ref",{get:pt,configurable:!0})}}var uc=function(V,rt,pt,At,Jt,ae,Gt){var Vt={$$typeof:e,type:V,key:rt,ref:pt,props:Gt,_owner:ae};return Vt._store={},Object.defineProperty(Vt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Vt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:At}),Object.defineProperty(Vt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Jt}),Object.freeze&&(Object.freeze(Vt.props),Object.freeze(Vt)),Vt};function ks(V,rt,pt,At,Jt){{var ae,Gt={},Vt=null,Ke=null;pt!==void 0&&(dt(pt),Vt=""+pt),lt(rt)&&(dt(rt.key),Vt=""+rt.key),Ae(rt)&&(Ke=rt.ref,Ze(rt,Jt));for(ae in rt)K.call(rt,ae)&&!Ut.hasOwnProperty(ae)&&(Gt[ae]=rt[ae]);if(V&&V.defaultProps){var ge=V.defaultProps;for(ae in ge)Gt[ae]===void 0&&(Gt[ae]=ge[ae])}if(Vt||Ke){var be=typeof V=="function"?V.displayName||V.name||"Unknown":V;Vt&&Me(Gt,be),Ke&&Gr(Gt,be)}return uc(V,Vt,Ke,Jt,At,ct.current,Gt)}}var kd=m.ReactCurrentOwner,U4=m.ReactDebugCurrentFrame;function Qa(V){if(V){var rt=V._owner,pt=Et(V.type,V._source,rt?rt.type:null);U4.setExtraStackFrame(pt)}else U4.setExtraStackFrame(null)}var Nd;Nd=!1;function Od(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function $4(){{if(kd.current){var V=E(kd.current.type);if(V)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+V+"`."}return""}}function hD(V){return""}var Z4={};function dD(V){{var rt=$4();if(!rt){var pt=typeof V=="string"?V:V.displayName||V.name;pt&&(rt=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+pt+">.")}return rt}}function K4(V,rt){{if(!V._store||V._store.validated||V.key!=null)return;V._store.validated=!0;var pt=dD(rt);if(Z4[pt])return;Z4[pt]=!0;var At="";V&&V._owner&&V._owner!==kd.current&&(At=" It was passed a child from "+E(V._owner.type)+"."),Qa(V),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',pt,At),Qa(null)}}function Q4(V,rt){{if(typeof V!="object")return;if(W(V))for(var pt=0;pt<V.length;pt++){var At=V[pt];Od(At)&&K4(At,rt)}else if(Od(V))V._store&&(V._store.validated=!0);else if(V){var Jt=g(V);if(typeof Jt=="function"&&Jt!==V.entries)for(var ae=Jt.call(V),Gt;!(Gt=ae.next()).done;)Od(Gt.value)&&K4(Gt.value,rt)}}}function vD(V){{var rt=V.type;if(rt==null||typeof rt=="string")return;var pt;if(typeof rt=="function")pt=rt.propTypes;else if(typeof rt=="object"&&(rt.$$typeof===l||rt.$$typeof===f))pt=rt.propTypes;else return;if(pt){var At=E(rt);xt(pt,V.props,"prop",At,V)}else if(rt.PropTypes!==void 0&&!Nd){Nd=!0;var Jt=E(rt);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Jt||"Unknown")}typeof rt.getDefaultProps=="function"&&!rt.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pD(V){{for(var rt=Object.keys(V.props),pt=0;pt<rt.length;pt++){var At=rt[pt];if(At!=="children"&&At!=="key"){Qa(V),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",At),Qa(null);break}}V.ref!==null&&(Qa(V),y("Invalid attribute `ref` supplied to `React.Fragment`."),Qa(null))}}var J4={};function q4(V,rt,pt,At,Jt,ae){{var Gt=C(V);if(!Gt){var Vt="";(V===void 0||typeof V=="object"&&V!==null&&Object.keys(V).length===0)&&(Vt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ke=hD();Ke?Vt+=Ke:Vt+=$4();var ge;V===null?ge="null":W(V)?ge="array":V!==void 0&&V.$$typeof===e?(ge="<"+(E(V.type)||"Unknown")+" />",Vt=" Did you accidentally export a JSX literal instead of a component?"):ge=typeof V,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ge,Vt)}var be=ks(V,rt,pt,Jt,ae);if(be==null)return be;if(Gt){var Dr=rt.children;if(Dr!==void 0)if(At)if(W(Dr)){for(var Ja=0;Ja<Dr.length;Ja++)Q4(Dr[Ja],V);Object.freeze&&Object.freeze(Dr)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Q4(Dr,V)}if(K.call(rt,"key")){var Ki=E(V),ar=Object.keys(rt).filter(function(bD){return bD!=="key"}),Id=ar.length>0?"{key: someKey, "+ar.join(": ..., ")+": ...}":"{key: someKey}";if(!J4[Ki+Id]){var xD=ar.length>0?"{"+ar.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Id,Ki,xD,Ki),J4[Ki+Id]=!0}}return V===n?pD(be):vD(be),be}}function gD(V,rt,pt){return q4(V,rt,pt,!0)}function mD(V,rt,pt){return q4(V,rt,pt,!1)}var yD=mD,_D=gD;to.Fragment=n,to.jsx=yD,to.jsxs=_D}()),to}process.env.NODE_ENV==="production"?dc.exports=s_():dc.exports=l_();var D=dc.exports;const Bs=(t,e)=>t.type===e.nodes.bullet_list||t.type===e.nodes.ordered_list,vr=t=>{const{empty:e}=t.state.selection;e&&ee.selectAll(t.state,t.dispatch)},Tn=(t,e,r)=>{if(r)t.dispatch(t.state.tr.addMark(r.from,r.to,e));else{const{$from:n,$to:i}=t.state.selection;t.dispatch(t.state.tr.addMark(n.pos,i.pos,e))}},u_=(t,e,r,n)=>{let i=e;const a=d=>d.type===n;let o=null,s=null,l=null;for(;i<=r;){const d=t.nodeAt(i);if(!d||!d.marks)return null;const h=d.marks.find(a);if(!h||o&&h!==o)return null;s=s||d,o=o||h,l=d,i++}let u=e,c=r,f=0;for(i=e-1;i>f;){const d=t.nodeAt(i),h=d&&d.marks.find(a);if(!h||h!==o)break;u=i,s=d,i--}for(i=r+1,f=t.nodeSize-2;i<f;){const d=t.nodeAt(i),h=d&&d.marks.find(a);if(!h||h!==o)break;c=i,l=d,i++}return{mark:o,from:{node:s,pos:u},to:{node:l,pos:c}}},c_=(t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t,f_=(t,e)=>{for(let r=t.depth;r>0;r--){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}},Wd=t=>e=>f_(e.$from,t),h_=t=>e=>Wd(r=>c_(t,r))(e),Vs=(t,e)=>{const r=e.schema.nodes[t];return!!h_(r)(e.selection)},Gd=t=>t?t.type.name==="text"?t:t.lastChild?Gd(t.lastChild):null:null,jd=t=>{const{selection:e,doc:r}=t.state,{from:n}=e;let i=r.nodeAt(n)||r.nodeAt(n-1);return i=Gd(i),(i==null?void 0:i.marks)||[]},Qi=(t,e,r)=>{for(const n of t)if(n.type.name===e&&n.attrs[r])return n.attrs[r];return null},si=(t,e)=>{for(const r of t)if(r.type.name===e)return!0;return!1},d_=(t,e)=>{const{from:r,$from:n,to:i,empty:a}=t.selection;return a?e.isInSet(t.storedMarks||n.marks()):t.doc.rangeHasMark(r,i,e)},v_=(t,e)=>{const{selection:r,doc:n}=t.state,{from:i,to:a}=r;let o=!0,s="";return n.nodesBetween(i,a,l=>(o&&l.attrs[e]&&(o=!1,s=l.attrs[e]),o)),s},Xd={color:"#000000",backcolor:"",fontsize:"16px",fontname:"",align:"left"},p_=(t,e={})=>{const r={...Xd,...e},n=jd(t),i=si(n,"strong"),a=si(n,"em"),o=si(n,"underline"),s=si(n,"strikethrough"),l=si(n,"superscript"),u=si(n,"subscript"),c=si(n,"code"),f=Qi(n,"forecolor","color")||r.color,d=Qi(n,"backcolor","backcolor")||r.backcolor,h=Qi(n,"fontsize","fontsize")||r.fontsize,v=Qi(n,"fontname","fontname")||r.fontname,p=Qi(n,"link","href")||"",g=v_(t,"align")||r.align,m=Vs("bullet_list",t.state),y=Vs("ordered_list",t.state),_=Vs("blockquote",t.state);return{bold:i,em:a,underline:o,strikethrough:s,superscript:l,subscript:u,code:c,color:f,backcolor:d,fontsize:h,fontname:v,link:p,align:g,bulletList:m,orderedList:y,blockquote:_}},Yd=t=>{const e=jd(t),r=Qi(e,"fontsize","fontsize")||Xd.fontsize;return parseInt(r)},g_={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000000",backcolor:"",fontsize:"16px",fontname:"",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},Pr=t=>{const e=t.slides||[],r=t.slideIndex!==void 0?t.slideIndex:0,n=e[r]||null,i=[],a=[];if(n&&n.animations){const s=n.elements.map(u=>u.id),l=n.animations.filter(u=>s.includes(u.elId));i.push(...l);for(const u of l)if(u.trigger==="click"||!a.length)a.push({animations:[u],autoNext:!1});else if(u.trigger==="meantime"){const c=a[a.length-1];c.animations=c.animations.filter(f=>f.elId!==u.elId),c.animations.push(u),a[a.length-1]=c}else if(u.trigger==="auto"){const c=a[a.length-1];c.autoNext=!0,a[a.length-1]=c,a.push({animations:[u],autoNext:!1})}}return{currentSlide:n,currentSlideAnimations:i,formatedAnimations:a}},Bt=Os.create((t,e)=>({title:"未命名演示文稿",theme:{themeColors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"],fontColor:"#333",fontName:"",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},slides:[],slideIndex:0,viewportSize:1e3,viewportRatio:.5625,templates:[{name:"山河映红",id:"template_1",cover:"./imgs/template_1.webp",origin:"官方制作"},{name:"都市蓝调",id:"template_2",cover:"./imgs/template_2.webp",origin:"官方制作"},{name:"智感几何",id:"template_3",cover:"./imgs/template_3.webp",origin:"官方制作"},{name:"柔光莫兰迪",id:"template_4",cover:"./imgs/template_4.webp",origin:"官方制作"},{name:"简约绿意",id:"template_5",cover:"./imgs/template_5.webp",origin:"社区贡献+官方深度完善优化"},{name:"暖色复古",id:"template_6",cover:"./imgs/template_6.webp",origin:"社区贡献+官方深度完善优化"},{name:"深邃沉稳",id:"template_7",cover:"./imgs/template_7.webp",origin:"社区贡献+官方深度完善优化"},{name:"浅蓝小清新",id:"template_8",cover:"./imgs/template_8.webp",origin:"社区贡献+官方深度完善优化"}],currentSlide:null,currentSlideAnimations:[],formatedAnimations:[],setTitle:r=>t({title:r||"未命名演示文稿"}),setTheme:r=>t(n=>({theme:{...n.theme,...r}})),setViewportSize:r=>t({viewportSize:r}),setViewportRatio:r=>t({viewportRatio:r}),setSlides:r=>t(n=>{const i={...n,slides:r};return{...i,...Pr(i)}}),setTemplates:r=>t({templates:r}),addSlide:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=[...n.slides],o=i.map(u=>{const c={...u};return c.sectionTag&&delete c.sectionTag,c}),s=n.slideIndex+1;a.splice(s,0,...o);const l={...n,slides:a,slideIndex:s};return{...l,...Pr(l)}}),updateSlide:(r,n)=>t(i=>{const a=n?i.slides.findIndex(l=>l.id===n):i.slideIndex;if(a===-1)return{};const o=[...i.slides];o[a]={...o[a],...r};const s={...i,slides:o};return{...s,...Pr(s)}}),removeSlideProps:r=>t(n=>{const{id:i,propName:a}=r,o=n.slides.map(l=>l.id===i?Ar.omit(l,a):l),s={...n,slides:o};return{...s,...Pr(s)}}),deleteSlide:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=JSON.parse(JSON.stringify(n.slides)),o=[];for(const c of i){const f=a.findIndex(h=>h.id===c);if(f===-1)continue;o.push(f);const d=a[f].sectionTag;if(d){const h=a[f+1];h&&!h.sectionTag&&(delete a[f].sectionTag,a[f+1].sectionTag=d)}a.splice(f,1)}if(a.length===0){const c={...n,slides:[],slideIndex:0};return{...c,...Pr(c)}}let s=Math.min(...o);const l=a.length-1;s>l&&(s=l);const u={...n,slides:a,slideIndex:s};return{...u,...Pr(u)}}),updateSlideIndex:r=>t(n=>{const i={...n,slideIndex:r};return{...i,...Pr(i)}}),addElement:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=n.slides[n.slideIndex];if(!a)return{};const o=[...n.slides],s=[...a.elements,...i];o[n.slideIndex]={...a,elements:s};const l={...n,slides:o};return{...l,...Pr(l)}}),deleteElement:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=n.slides[n.slideIndex];if(!a)return{};const o=[...n.slides],s=a.elements.filter(u=>!i.includes(u.id));o[n.slideIndex]={...a,elements:s};const l={...n,slides:o};return{...l,...Pr(l)}}),updateElement:r=>t(n=>{const{id:i,props:a,slideId:o}=r,s=typeof i=="string"?[i]:i,l=o?n.slides.findIndex(h=>h.id===o):n.slideIndex;if(l===-1)return{};const u=n.slides[l],c=u.elements.map(h=>s.includes(h.id)?{...h,...a}:h),f=[...n.slides];f[l]={...u,elements:c};const d={...n,slides:f};return{...d,...Pr(d)}}),removeElementProps:r=>t(n=>{const{id:i,propName:a}=r,o=typeof a=="string"?[a]:a,s=n.slideIndex,l=n.slides[s],u=l.elements.map(d=>d.id===i?Ar.omit(d,o):d),c=[...n.slides];c[s]={...l,elements:u};const f={...n,slides:c};return{...f,...Pr(f)}})})),m_=jt.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")(10),Tt=Os.create(t=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,gridLinesState:!1,showRuler:!1,creatingElement:null,creatingCustomShape:!1,clipingImageElementId:"",richTextAttrs:g_,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],databaseId:m_,textFormatPainter:null,shapeFormatPainter:null,setActiveElementIdList:e=>t(()=>{const r=e.length===1?e[0]:"";return{activeElementIdList:e,handleElementId:r}}),setHandleElementId:e=>t({handleElementId:e}),setActiveGroupElementId:e=>t({activeGroupElementId:e}),setHiddenElementIdList:e=>t({hiddenElementIdList:e}),setCanvasPercentage:e=>t({canvasPercentage:e}),setCanvasScale:e=>t({canvasScale:e}),setCanvasDragged:e=>t({canvasDragged:e}),setThumbnailsFocus:e=>t({thumbnailsFocus:e}),setEditorareaFocus:e=>t({editorAreaFocus:e}),setDisableHotkeysState:e=>t({disableHotkeys:e}),setGridLineSize:e=>t({gridLineSize:e}),setGridLinesState:e=>t({gridLinesState:e}),setRulerState:e=>t({showRuler:e}),setCreatingElement:e=>t({creatingElement:e}),setCreatingCustomShapeState:e=>t({creatingCustomShape:e}),setClipingImageElementId:e=>t({clipingImageElementId:e}),setRichtextAttrs:e=>t({richTextAttrs:e}),setSelectedTableCells:e=>t({selectedTableCells:e}),setScalingState:e=>t({isScaling:e}),updateSelectedSlidesIndex:e=>t({selectedSlidesIndex:e}),setTextFormatPainter:e=>t({textFormatPainter:e}),setShapeFormatPainter:e=>t({shapeFormatPainter:e})})),y_=Os.create((t,e)=>({snapshotCursor:-1,snapshotLength:0,snapshots:[],setSnapshotCursor:r=>t({snapshotCursor:r}),setSnapshotLength:r=>t({snapshotLength:r}),addSnapshot:()=>{const{slides:r,slideIndex:n}=Bt.getState(),{snapshotCursor:i,snapshots:a}=e();let o=[...a];i>=0&&i<a.length-1&&(o=o.slice(0,i+1));const s={index:n,slides:JSON.parse(JSON.stringify(r))};if(o.length>=1){const f=o.length-1;o[f]={...o[f],index:n}}o.push(s),o.length>20&&o.shift();const u=o.length,c=u-1;t({snapshots:o,snapshotCursor:c,snapshotLength:u})},unDo:()=>{const{snapshotCursor:r,snapshots:n}=e();if(r<=0)return;const i=r-1,a=n[i],{index:o,slides:s}=a,{setSlides:l,updateSlideIndex:u}=Bt.getState(),{setActiveElementIdList:c}=Tt.getState(),f=o>s.length-1?s.length-1:o;l(s),u(f),t({snapshotCursor:i}),c([])},reDo:()=>{const{snapshotCursor:r,snapshotLength:n,snapshots:i}=e();if(r>=n-1)return;const a=r+1,o=i[a],{index:s,slides:l}=o,{setSlides:u,updateSlideIndex:c}=Bt.getState(),{setActiveElementIdList:f}=Tt.getState(),d=s>l.length-1?l.length-1:s;u(l),c(d),t({snapshotCursor:a}),f([])}})),pr=Os.create(t=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1,ctrlOrShiftKeyActive:!1,setCtrlKeyState:e=>t(r=>({ctrlKeyState:e,ctrlOrShiftKeyActive:e||r.shiftKeyState})),setShiftKeyState:e=>t(r=>({shiftKeyState:e,ctrlOrShiftKeyActive:r.ctrlKeyState||e})),setSpaceKeyState:e=>t({spaceKeyState:e})}));var me=(t=>(t.C="C",t.X="X",t.Z="Z",t.Y="Y",t.A="A",t.G="G",t.L="L",t.F="F",t.D="D",t.B="B",t.P="P",t.O="O",t.R="R",t.T="T",t.MINUS="-",t.EQUAL="=",t.DIGIT_0="0",t.DELETE="DELETE",t.UP="ARROWUP",t.DOWN="ARROWDOWN",t.LEFT="ARROWLEFT",t.RIGHT="ARROWRIGHT",t.ENTER="ENTER",t.SPACE=" ",t.TAB="TAB",t.BACKSPACE="BACKSPACE",t.ESC="ESCAPE",t.PAGEUP="PAGEUP",t.PAGEDOWN="PAGEDOWN",t.F5="F5",t))(me||{});const __=t=>new Promise(e=>{const r=document.createElement("img");r.src=t,r.style.opacity="0",document.body.appendChild(r),r.onload=()=>{const n=r.clientWidth,i=r.clientHeight;r.onload=null,r.onerror=null,document.body.removeChild(r),e({width:n,height:i})},r.onerror=()=>{r.onload=null,r.onerror=null}}),Ud=t=>new Promise(e=>{const r=new FileReader;r.addEventListener("load",()=>{e(r.result)}),r.readAsDataURL(t)}),x_=t=>{if(!/<svg[\s\S]*?>[\s\S]*?<\/svg>/i.test(t))return!1;try{return new DOMParser().parseFromString(t,"image/svg+xml").documentElement.nodeName==="svg"}catch{return!1}},b_=t=>{const e=new Blob([t],{type:"image/svg+xml"});return new File([e],`${Date.now()}.svg`,{type:"image/svg+xml"})};var Nt=(t=>(t.ROUND_RECT="roundRect",t.ROUND_RECT_DIAGONAL="roundRectDiagonal",t.ROUND_RECT_SINGLE="roundRectSingle",t.ROUND_RECT_SAMESIDE="roundRectSameSide",t.CUT_RECT_DIAGONAL="cutRectDiagonal",t.CUT_RECT_SINGLE="cutRectSingle",t.CUT_RECT_SAMESIDE="cutRectSameSide",t.CUT_ROUND_RECT="cutRoundRect",t.MESSAGE="message",t.ROUND_MESSAGE="roundMessage",t.L="L",t.RING_RECT="ringRect",t.PLUS="plus",t.TRIANGLE="triangle",t.PARALLELOGRAM_LEFT="parallelogramLeft",t.PARALLELOGRAM_RIGHT="parallelogramRight",t.TRAPEZOID="trapezoid",t.BULLET="bullet",t.INDICATOR="indicator",t))(Nt||{}),$t=(t=>(t.TEXT="text",t.IMAGE="image",t.SHAPE="shape",t.LINE="line",t.CHART="chart",t.TABLE="table",t.LATEX="latex",t.VIDEO="video",t.AUDIO="audio",t))($t||{});const eo={[Nt.ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${n} 0 L ${t-n} 0 Q ${t} 0 ${t} ${n} L ${t} ${e-n} Q ${t} ${e} ${t-n} ${e} L ${n} ${e} Q 0 ${e} 0 ${e-n} L 0 ${n} Q 0 0 ${n} 0 Z`}},[Nt.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${e-n} L 0 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} L ${n} ${e} Z`}},[Nt.CUT_RECT_SINGLE]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${e} L 0 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} Z`}},[Nt.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:[.2],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${n} L ${n} 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} L 0 ${e} Z`}},[Nt.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${n} 0 L ${t} 0 L ${t} ${e-n} Q ${t} ${e} ${t-n} ${e} L 0 ${e} L 0 ${n} Q 0 0 ${n} 0 Z`}},[Nt.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["right"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 0 L ${t-n} 0 Q ${t} 0 ${t} ${n} L ${t} ${e} L 0 ${e} L 0 0 Z`}},[Nt.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${n} Q 0 0 ${n} 0 L ${t-n} 0 Q ${t} 0 ${t} ${n} L ${t} ${e} L 0 ${e} Z`}},[Nt.CUT_ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${n} 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} L 0 ${e} L 0 ${n} Q 0 0 ${n} 0 Z`}},[Nt.MESSAGE]:{editable:!0,range:[[0,.8],[.1,.3]],defaultValue:[.3,.2],relative:["left_bottom","bottom"],getBaseSize:[t=>t,(t,e)=>e],formula:(t,e,r)=>{const n=t*r[0],i=t*.2,a=e*r[1];return`M 0 0 L ${t} 0 L ${t} ${e-a} L ${n+i} ${e-a} L ${n} ${e} L ${n} ${e-a} L 0 ${e-a} Z`}},[Nt.ROUND_MESSAGE]:{formula:(t,e)=>{const r=Math.min(t,e)*.125,n=Math.min(t,e)*.2,i=Math.min(t,e)*.2;return`M 0 ${r} Q 0 0 ${r} 0 L ${t-r} 0 Q ${t} 0 ${t} ${r} L ${t} ${e-r-i} Q ${t} ${e-i} ${t-r} ${e-i} L ${t/2} ${e-i} L ${t/2-n} ${e} L ${t/2-n} ${e-i} L ${r} ${e-i} Q 0 ${e-i} 0 ${e-r-i} L 0 ${r} Z`}},[Nt.L]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 0 L 0 ${e} L ${t} ${e} L ${t} ${e-n} L ${n} ${e-n} L ${n} 0 Z`}},[Nt.RING_RECT]:{editable:!0,defaultValue:[.25],range:[[.1,.45]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 0 ${t} 0 ${t} ${e} L 0 ${e} L 0 0 Z M ${n} ${n} L ${n} ${e-n} L ${t-n} ${e-n} L ${t-n} ${n} Z`}},[Nt.PLUS]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["center"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${t/2-n/2} 0 L ${t/2-n/2} ${e/2-n/2} L 0 ${e/2-n/2} L 0 ${e/2+n/2} L ${t/2-n/2} ${e/2+n/2} L ${t/2-n/2} ${e} L ${t/2+n/2} ${e} L ${t/2+n/2} ${e/2+n/2} L ${t} ${e/2+n/2} L ${t} ${e/2-n/2} L ${t/2+n/2} ${e/2-n/2} L ${t/2+n/2} 0 Z`}},[Nt.TRIANGLE]:{editable:!0,defaultValue:[.5],range:[[0,1]],relative:["left"],getBaseSize:[t=>t],formula:(t,e,r)=>`M ${t*r[0]} 0 L 0 ${e} L ${t} ${e} Z`},[Nt.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["left"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M ${n} 0 L ${t} 0 L ${t-n} ${e} L 0 ${e} Z`}},[Nt.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["right"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M 0 0 L ${t-n} 0 L ${t} ${e} L ${n} ${e} Z`}},[Nt.TRAPEZOID]:{editable:!0,defaultValue:[.25],range:[[0,.5]],relative:["left"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M ${n} 0 L ${t-n} 0 L ${t} ${e} L 0 ${e} Z`}},[Nt.BULLET]:{editable:!0,defaultValue:[.2],range:[[0,1]],relative:["top"],getBaseSize:[(t,e)=>e],formula:(t,e,r)=>{const n=e*r[0];return`M ${t/2} 0 L 0 ${n} L 0 ${e} L ${t} ${e} L ${t} ${n} Z`}},[Nt.INDICATOR]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M ${t} ${e/2} L ${t-n} 0 L 0 0 L ${n} ${e/2} L 0 ${e} L ${t-n} ${e} Z`}}},S_=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:Nt.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:Nt.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:Nt.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:Nt.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:Nt.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:Nt.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:Nt.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:Nt.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:Nt.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:Nt.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:Nt.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:Nt.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:Nt.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:Nt.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M100,0 L200,76.6 L161.8,200 L38.2,200 L0,76.6 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M100,0 L170.71,29.29 L200,100 L170.71,170.71 L100,200 L29.29,170.71 L0,100 L29.29,29.29 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z",pptxShapeType:"dodecagon"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z",pptxShapeType:"flowChartManualInput"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 150 C 110 140 110 240 0 180 Z",pptxShapeType:"flowChartDocument"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z",pptxShapeType:"diagStripe"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:Nt.L,pptxShapeType:"corner"},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:Nt.RING_RECT,pptxShapeType:"frame"},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z",pptxShapeType:"donut"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:Nt.PLUS,pptxShapeType:"mathPlus"},{viewBox:[200,200],path:"M 0 70 L 200 70 L 200 130 L 0 130 Z",pptxShapeType:"mathMinus"},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z",pptxShapeType:"mathMultiply"},{viewBox:[200,200],path:"M 0 80 L 200 80 L 200 120 L 0 120 Z M 100 0 A 25 25 0 1 1 100 50 A 25 25 0 1 1 100 0 M 100 200 A 25 25 0 1 1 100 150 A 25 25 0 1 1 100 200",pptxShapeType:"mathDivide"},{viewBox:[200,200],path:"M 0 30 L 200 30 L 200 80 L 0 80 Z M 0 120 L 200 120 L 200 170 L 0 170 Z",pptxShapeType:"mathEqual"},{viewBox:[200,200],path:"M 120 0 L 170 0 L 150 40 L 200 40 L 200 80 L 130 80 L 110 120 L 200 120 L 200 160 L 90 160 L 70 200 L 20 200 L 40 160 L 0 160 L 0 120 L 60 120 L 80 80 L 0 80 L 0 40 L 100 40 Z",pptxShapeType:"mathNotEqual"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:Nt.MESSAGE,pptxShapeType:"wedgeRectCallout"},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:Nt.ROUND_MESSAGE,pptxShapeType:"wedgeRoundRectCallout"},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z",pptxShapeType:"flowChartMagneticTape"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z",pptxShapeType:"flowChartCollate"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z",pptxShapeType:"wave"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",pptxShapeType:"doubleWave"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 130 30 L 170 30 L 170 70 L 200 100 L 170 130 L 170 170 L 130 170 L 100 200 L 70 170 L 30 170 L 30 130 L 0 100 L 30 70 L 30 30 L 70 30 L 100 0",pptxShapeType:"star8"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 0 200 120 A 100 100 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 120 0 L 100 80 L 200 80 L 80 200 L 100 120 L 0 120 L 120 0 Z"},{viewBox:[200,200],path:"M 30 50 Q 40 -20 120 10 Q 180 -10 180 40 Q 210 70 190 100 C 210 140 180 170 160 170 Q 140 210 100 180 C 70 210 20 190 30 150 C -10 140 -10 80 30 50",pptxShapeType:"cloud"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z M 200 100 L 0 100",withborder:!0,pptxShapeType:"flowChartSort"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 30 30 L 170 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170 M 30 30 L 170 170",withborder:!0,pptxShapeType:"flowChartSummingJunction"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 200 100 L 0 100 M 100 0 L 100 200",withborder:!0,pptxShapeType:"flowChartOr"},{viewBox:[200,200],path:"M 160 0 A 40 100 0 1 1 160 200 L 40 200 A 40 100 0 1 1 40 0 L 160 0 Z M 160 200 A 40 100 0 1 1 160 0",withborder:!0,pptxShapeType:"flowChartMagneticDrum"},{viewBox:[200,200],path:"M 0 40 A 50 20 0 1 1 200 40 L 200 160 A 50 20 0 1 1 0 160 L 0 40 Z M 200 40 A 50 20 0 1 1 0 40",withborder:!0,pptxShapeType:"can"},{viewBox:[200,200],path:"M 200 0 L 50 0 L 0 50 L 0 200 L 150 200 L 200 150 L 200 0 Z M 200 0 L 150 50 M 150 50 L 0 50 M 150 50 L 150 200",withborder:!0,pptxShapeType:"cube"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z",pptxShapeType:"quadArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z",pptxShapeType:"leftArrowCallout"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z",pptxShapeType:"rightArrowCallout"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z",pptxShapeType:"bentUpArrow"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z",pptxShapeType:"leftUpArrow"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],w_={bar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},ring:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},area:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:["坐标1","坐标2","坐标3","坐标4","坐标5"],legends:["X","Y"],series:[[12,19,5,2,18],[7,11,13,21,9]]}},Be=()=>{const{addSnapshot:t,reDo:e,unDo:r}=y_(),n=N.useMemo(()=>Ar.debounce(t,300,{trailing:!0}),[t]),i=N.useMemo(()=>Ar.throttle(e,100,{leading:!0,trailing:!1}),[e]),a=N.useMemo(()=>Ar.throttle(r,100,{leading:!0,trailing:!1}),[r]);return{addHistorySnapshot:n,redo:i,undo:a}},ro=()=>{const{creatingElement:t,setCreatingElement:e,setActiveElementIdList:r,setEditorareaFocus:n}=Tt(),{theme:i,viewportRatio:a,viewportSize:o,addElement:s}=Bt(),{addHistorySnapshot:l}=Be(),u=(x,S)=>{s(x),r([x.id]),t&&e(null),setTimeout(()=>{n(!0)},0),S&&S(),l()};return{createElement:u,createImageElement:x=>{__(x).then(({width:S,height:b})=>{const w=b/S;w<a&&S>o?(S=o,b=S*w):b>o*a&&(b=o*a,S=b/w),u({type:"image",id:jt.nanoid(10),src:x,width:S,height:b,left:(o-S)/2,top:(o*a-b)/2,fixedRatio:!0,rotate:0})})},createChartElement:x=>{u({type:"chart",id:jt.nanoid(10),chartType:x,left:300,top:81.25,width:400,height:400,rotate:0,themeColors:i.themeColors,textColor:i.fontColor,data:w_[x]})},createTableElement:(x,S)=>{const b={fontname:i.fontName,color:i.fontColor},w=[];for(let E=0;E<x;E++){const P=[];for(let I=0;I<S;I++)P.push({id:jt.nanoid(10),colspan:1,rowspan:1,text:"",style:b});w.push(P)}const T=100,L=36,C=new Array(S).fill(1/S),M=S*T,A=x*L;u({type:"table",id:jt.nanoid(10),width:M,height:A,colWidths:C,rotate:0,data:w,left:(o-M)/2,top:(o*a-A)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:i.themeColors[0],rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},createTextElement:(x,S)=>{const{left:b,top:w,width:T,height:L}=x,C=(S==null?void 0:S.content)||"",M=(S==null?void 0:S.vertical)||!1,A=jt.nanoid(10);u({type:"text",id:A,left:b,top:w,width:T,height:L,content:C,rotate:0,defaultFontName:i.fontName,defaultColor:i.fontColor,vertical:M},()=>{setTimeout(()=>{const E=document.querySelector(`#editable-element-${A} .ProseMirror`);E&&E.focus()},0)})},createShapeElement:(x,S,b={})=>{const{left:w,top:T,width:L,height:C}=x,M={type:"shape",id:jt.nanoid(10),left:w,top:T,width:L,height:C,viewBox:S.viewBox,path:S.path,fill:i.themeColors[0],fixedRatio:!1,rotate:0,...b};if(S.withborder&&(M.outline=i.outline),S.special&&(M.special=!0),S.pathFormula){M.pathFormula=S.pathFormula,M.viewBox=[L,C];const A=eo[S.pathFormula];"editable"in A&&A.editable?(M.path=A.formula(L,C,A.defaultValue),M.keypoints=A.defaultValue):M.path=A.formula(L,C)}u(M)},createCustomShapeElement:x=>{const{start:S,viewBox:b,path:w,fill:T,outline:L}=x;u({type:"shape",id:jt.nanoid(10),left:S[0],top:S[1],width:b[0],height:b[1],viewBox:b,path:w,fill:T||i.themeColors[0],rotate:0,outline:L,fixedRatio:!1})},createLineElement:(x,S)=>{const{left:b,top:w,start:T,end:L}=x,C={type:"line",id:jt.nanoid(10),left:b,top:w,start:T,end:L,points:S.points,color:i.themeColors[0],style:S.style,width:2};S.isBroken&&(C.broken=[(T[0]+L[0])/2,(T[1]+L[1])/2]),S.isBroken2&&(C.broken2=[(T[0]+L[0])/2,(T[1]+L[1])/2]),S.isCurve&&(C.curve=[(T[0]+L[0])/2,(T[1]+L[1])/2]),S.isCubic&&(C.cubic=[[(T[0]+L[0])/2,(T[1]+L[1])/2],[(T[0]+L[0])/2,(T[1]+L[1])/2]]),u(C)},createLatexElement:x=>{u({type:"latex",id:jt.nanoid(10),width:x.w,height:x.h,rotate:0,left:(o-x.w)/2,top:(o*a-x.h)/2,path:x.path,latex:x.latex,color:i.fontColor,strokeWidth:2,viewBox:[x.w,x.h],fixedRatio:!0})},createVideoElement:(x,S)=>{const b={type:"video",id:jt.nanoid(10),width:500,height:300,rotate:0,left:(o-500)/2,top:(o*a-300)/2,src:x,autoplay:!1};S&&(b.ext=S),u(b)},createAudioElement:(x,S)=>{const b={type:"audio",id:jt.nanoid(10),width:50,height:50,rotate:0,left:(o-50)/2,top:(o*a-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:i.themeColors[0],src:x};S&&(b.ext=S),u(b)}}},$d="pptist",Zd=t=>cc.AES.encrypt(t,$d).toString(),T_=t=>cc.AES.decrypt(t,$d).toString(cc.enc.Utf8),Kd=t=>new Promise((e,r)=>{const n=document.createElement("button"),i=new t_(n,{text:()=>t,action:()=>"copy",container:document.body});i.on("success",a=>{i.destroy(),e(a)}),i.on("error",a=>{i.destroy(),r(a)}),document.body.appendChild(n),n.click(),document.body.removeChild(n)}),Qd=()=>new Promise((t,e)=>{var r;(r=navigator.clipboard)!=null&&r.readText?navigator.clipboard.readText().then(n=>(n||e("剪贴板为空或者不包含文本"),t(n))):e("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),Jd=t=>{let e;try{e=JSON.parse(T_(t))}catch{e=t}return e},L_=t=>{const e=t.split(`\r
|
|
31
|
-
`);e[e.length-1]===""&&e.pop();let r=-1;const n=[];for(const i in e){if(n[i]=e[i].split(" "),n[i].length===1)return null;if(r===-1)r=n[i].length;else if(r!==n[i].length)return null}return n},M_=t=>{const n=new DOMParser().parseFromString(t,"text/html").querySelector("table"),i=[];if(!n)return i;const a=n.querySelectorAll("tr");for(const o of a){const s=[],l=o.querySelectorAll("td, th");for(const u of l){const c=u.textContent?u.textContent.trim():"",f=parseInt(u.getAttribute("colspan")||"1",10);for(let d=0;d<f;d++)s.push(c)}i.push(s)}return i},zs=t=>{const{left:e,top:r,width:n,height:i,rotate:a=0}=t,o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2,s=Math.atan(i/n)*180/Math.PI,l=(180-a-s)*Math.PI/180,u=(s-a)*Math.PI/180,c=e+n/2,f=r+i/2,d=[c+o*Math.cos(l),c+o*Math.cos(u),c-o*Math.cos(l),c-o*Math.cos(u)],h=[f-o*Math.sin(l),f-o*Math.sin(u),f+o*Math.sin(l),f+o*Math.sin(u)];return{xRange:[Math.min(...d),Math.max(...d)],yRange:[Math.min(...h),Math.max(...h)]}},no=t=>{let e,r,n,i;if(t.type==="line")e=t.left,r=t.left+Math.max(t.start[0],t.end[0]),n=t.top,i=t.top+Math.max(t.start[1],t.end[1]);else if("rotate"in t&&t.rotate){const{left:a,top:o,width:s,height:l,rotate:u}=t,{xRange:c,yRange:f}=zs({left:a,top:o,width:s,height:l,rotate:u});e=c[0],r=c[1],n=f[0],i=f[1]}else e=t.left,r=t.left+t.width,n=t.top,i=t.top+t.height;return{minX:e,maxX:r,minY:n,maxY:i}},qd=t=>{const e=[],r=[],n=[],i=[];t.forEach(u=>{const{minX:c,maxX:f,minY:d,maxY:h}=no(u);e.push(c),r.push(d),n.push(f),i.push(h)});const a=Math.min(...e),o=Math.max(...n),s=Math.min(...r),l=Math.max(...i);return{minX:a,maxX:o,minY:s,maxY:l}},Fs=t=>{const e=[];return t.forEach(r=>{const n=e.findIndex(i=>i.value===r.value);if(n===-1)e.push(r);else{const i=e[n],a=Math.min(i.range[0],r.range[0]),o=Math.max(i.range[1],r.range[1]),s=[a,o],l={value:r.value,range:s};e[n]=l}}),e},C_=t=>{const e={};for(const r of t)e[r.id]=jt.nanoid(10);return e},vc=t=>{const e={},r={};for(const n of t){const i=n.groupId;i&&!e[i]&&(e[i]=jt.nanoid(10)),r[n.id]=jt.nanoid(10)}return{groupIdMap:e,elIdMap:r}},E_=t=>{const e=Is(t);return[e.setAlpha(.3).toRgbString(),e.setAlpha(.1).toRgbString()]},tv=t=>{const e=t.start.join(","),r=t.end.join(",");if(t.broken){const n=t.broken.join(",");return`M${e} L${n} L${r}`}else if(t.broken2){const{minX:n,maxX:i,minY:a,maxY:o}=no(t);return i-n>=o-a?`M${e} L${t.broken2[0]},${t.start[1]} L${t.broken2[0]},${t.end[1]} ${r}`:`M${e} L${t.start[0]},${t.broken2[1]} L${t.end[0]},${t.broken2[1]} ${r}`}else if(t.curve){const n=t.curve.join(",");return`M${e} Q${n} ${r}`}else if(t.cubic){const[n,i]=t.cubic,a=n.join(","),o=i.join(",");return`M${e} C${a} ${o} ${r}`}return`M${e} L${r}`},pc=t=>{const r=t.replace(/[\n\r]+/g,"<br>").split("<br>");let n="";for(const i of r)i&&(n+=`<div>${i}</div>`);return n},D_=t=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(t),ev=()=>{const{setActiveElementIdList:t}=Tt(),{currentSlide:e,addElement:r,addSlide:n}=Bt(),{addHistorySnapshot:i}=Be();return{addElementsFromData:s=>{if(!e)return;const{groupIdMap:l,elIdMap:u}=vc(s),c=s[0];let f=0,d;do d=e.elements.find(h=>{if(h.type!==c.type)return!1;const{minX:v,maxX:p,minY:g,maxY:m}=no(h),{minX:y,maxX:_,minY:x,maxY:S}=no({...c,left:c.left+f,top:c.top+f});return v===y&&p===_&&g===x&&m===S}),d&&(f+=10);while(d);for(const h of s)h.id=u[h.id],h.left=h.left+f,h.top=h.top+f,h.groupId&&(h.groupId=l[h.groupId]);r(s),t(Object.values(u)),i()},addSlidesFromData:s=>{const l=C_(s),u=s.map(c=>{const{groupIdMap:f,elIdMap:d}=vc(c.elements);for(const h of c.elements)h.id=d[h.id],h.groupId&&(h.groupId=f[h.groupId]),h.link&&h.link.type==="slide"&&(l[h.link.target]?h.link.target=l[h.link.target]:delete h.link);if(c.animations)for(const h of c.animations)h.id=jt.nanoid(10),h.elId=d[h.elId];return{...c,id:l[c.id]}});n(u),i()}}},A_=t=>{const e=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pexels\.com\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(t),r=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pptist\.cn\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(t);return e||r},rv=()=>{const{shiftKeyState:t}=pr(),{createTextElement:e,createImageElement:r}=ro(),{addElementsFromData:n,addSlidesFromData:i}=ev(),a=s=>{e({left:0,top:0,width:600,height:50},{content:s})};return{pasteTextClipboardData:(s,l)=>{const u=(l==null?void 0:l.onlySlide)||!1,c=(l==null?void 0:l.onlyElements)||!1,f=Jd(s);if(typeof f=="object"){const{type:d,data:h}=f;d==="elements"&&!u?n(h):d==="slides"&&!c&&i(h)}else if(!c&&!u)if(t){const d=pc(f);a(d)}else if(A_(f))r(f);else if(D_(f))a(`<a href="${f}" title="${f}" target="_blank">${f}</a>`);else if(x_(f)){const d=b_(f);Ud(d).then(h=>r(h))}else{const d=pc(f);a(d)}}}},P_=()=>{const{selectedSlidesIndex:t,activeElementIdList:e,setActiveElementIdList:r,setThumbnailsFocus:n,updateSelectedSlidesIndex:i}=Tt(),{currentSlide:a,slides:o,theme:s,slideIndex:l,updateSlideIndex:u,addSlide:c,deleteSlide:f,updateSlide:d,setSlides:h}=Bt(),v=N.useMemo(()=>[...t,l],[t,l]),p=N.useMemo(()=>o.filter((k,R)=>v.includes(R)),[o,v]),g=N.useMemo(()=>p.map(k=>k.id),[p]),{pasteTextClipboardData:m}=rv(),{addSlidesFromData:y}=ev(),{addHistorySnapshot:_}=Be(),x=()=>{const k={id:jt.nanoid(10),elements:[],background:{type:"solid",color:s.backgroundColor}};u(0),r([]),h([k])},S=k=>{k===me.UP&&l>0?(e.length&&r([]),u(l-1)):k===me.DOWN&&l<o.length-1&&(e.length&&r([]),u(l+1))},b=()=>{const k=Zd(JSON.stringify({type:"slides",data:p}));Kd(k).then(()=>{n(!0)})},w=()=>{Qd().then(k=>{m(k,{onlySlide:!0})}).catch(k=>console.warn(k))},T=()=>{const k={id:jt.nanoid(10),elements:[],background:{type:"solid",color:s.backgroundColor}};r([]),c(k),_()},L=k=>{const{groupIdMap:R,elIdMap:H}=vc(k.elements);for(const F of k.elements)F.id=H[F.id],F.groupId&&(F.groupId=R[F.groupId]);const B={...k,id:jt.nanoid(10)};r([]),c(B),_()},C=()=>{const k=JSON.parse(JSON.stringify(a));y([k])},M=(k=g)=>{o.length===k.length?x():f(k),i([]),_()},A=()=>{const k=[...g];b(),M(k)},E=()=>{const k=Array.from(Array(o.length),(R,H)=>H);r([]),i(k)},P=(k,R)=>{if(R===k)return;const H=JSON.parse(JSON.stringify(o)),B=H[R],F=B.sectionTag;if(F){const G=H[R+1];delete B.sectionTag,G&&!G.sectionTag&&(G.sectionTag=F)}if(k===0){const G=H[0].sectionTag;G&&(delete H[0].sectionTag,B.sectionTag=G)}const O=H[R];H.splice(R,1),H.splice(k,0,O),h(H),u(k)},I=N.useMemo(()=>o.length===0?!0:!(o.length>1||o[0].elements.length>0),[o]);return{resetSlides:x,updateSlideIndex:S,copySlide:b,pasteSlide:w,createSlide:T,createSlideByTemplate:L,copyAndPasteSlide:C,deleteSlide:M,cutSlide:A,selectAllSlide:E,sortSlides:P,isEmptySlide:I}};function R_(t,e){N.useEffect(()=>{const r=n=>{var s;const i=t.current;if(!i)return;const a=(s=n.composedPath)==null?void 0:s.call(n);(a?!a.includes(i):!i.contains(n.target))&&e(n)};return document.addEventListener("click",r),()=>{document.removeEventListener("click",r)}},[t,e])}const k_=()=>{const t=window.getSelection();t&&t.removeAllRanges()},N_=t=>{const[e,r]=N.useState(0),[n,i]=N.useState(0),a=Tt(p=>p.canvasPercentage),o=Tt(p=>p.canvasDragged),s=Tt(p=>p.setCanvasScale),l=Tt(p=>p.setCanvasDragged),u=Bt(p=>p.viewportRatio),c=Bt(p=>p.viewportSize),f=N.useRef(a),d=N.useCallback(()=>{if(!t.current)return;const p=t.current.clientWidth,g=t.current.clientHeight;if(!(p===0||g===0))if(g/p>u){const m=p*(a/100);s(m/c),r((p-m)/2),i((g-m*u)/2)}else{const m=g*(a/100);s(m/(c*u)),r((p-m/u)/2),i((g-m)/2)}},[t,u,c,a,s]);return N.useEffect(()=>{const p=f.current,g=a;if(p===g||(f.current=g,!t.current))return;const m=t.current.clientWidth,y=t.current.clientHeight;if(y/m>u){const _=m*(g/100),x=m*(p/100),S=_*u,b=x*u;s(_/c),r(w=>w-(_-x)/2),i(w=>w-(S-b)/2)}else{const _=y*(g/100),x=y*(p/100),S=_/u,b=x/u;s(_/(c*u)),r(w=>w-(S-b)/2),i(w=>w-(_-x)/2)}},[a,u,c,s,t]),N.useEffect(()=>{d()},[d]),N.useEffect(()=>{o||d()},[o,d]),N.useEffect(()=>{const p=t.current;if(!p)return;d();const g=new ResizeObserver(()=>{d()});return g.observe(p),()=>{g.disconnect()}},[t,d]),{viewportStyles:N.useMemo(()=>({width:c,height:c*u,left:e,top:n}),[c,u,e,n]),dragViewport:p=>{let g=!0;const m=p.pageX,y=p.pageY,_=e,x=n,S=w=>{if(!g)return;const T=w.pageX,L=w.pageY;r(_+(T-m)),i(x+(L-y))},b=()=>{g=!1,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",b),l(!0)};document.addEventListener("mousemove",S),document.addEventListener("mouseup",b)}}},O_=(t,e)=>{const[r,n]=N.useState(!1),[i,a]=N.useState({top:0,left:0,width:0,height:0,quadrant:1}),o=N.useRef({top:0,left:0,width:0,height:0,quadrant:1});return{selectionState:i,mouseSelectionVisible:r,updateMouseSelection:l=>{if(!e.current)return;l.stopPropagation();let u=!0;const c=e.current.getBoundingClientRect(),{canvasScale:f,hiddenElementIdList:d,setActiveElementIdList:h}=Tt.getState(),v=5,p=l.pageX,g=l.pageY,m=(p-c.x)/f,y=(g-c.y)/f;o.current={top:y,left:m,width:0,height:0,quadrant:4},a({...o.current}),n(!1);const _=S=>{if(!u)return;const b=S.pageX,w=S.pageY,T=(b-p)/f,L=(w-g)/f,C=Math.abs(T),M=Math.abs(L);if(C<v||M<v)return;let A=0;T>0&&L>0?A=4:T<0&&L<0?A=2:T>0&&L<0?A=1:T<0&&L>0&&(A=3),o.current={...o.current,width:C,height:M,quadrant:A},a({...o.current}),n(!0)},x=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",x),u=!1;const{ctrlOrShiftKeyActive:S}=pr.getState(),b=o.current,w=b.left,T=b.top,L=b.width,C=b.height,M=b.quadrant;let A=[];for(let P=0;P<t.length;P++){const I=t[P],{minX:k,maxX:R,minY:H,maxY:B}=no(I);let F=!1;S?M===4?F=R>w&&k<w+L&&B>T&&H<T+C:M===2?F=R>w-L&&k<w-L+L&&B>T-C&&H<T-C+C:M===1?F=R>w&&k<w+L&&B>T-C&&H<T-C+C:M===3&&(F=R>w-L&&k<w-L+L&&B>T&&H<T+C):M===4?F=k>w&&R<w+L&&H>T&&B<T+C:M===2?F=k>w-L&&R<w-L+L&&H>T-C&&B<T-C+C:M===1?F=k>w&&R<w+L&&H>T-C&&B<T-C+C:M===3&&(F=k>w-L&&R<w-L+L&&H>T&&B<T+C),F&&!d.includes(I.id)&&A.push(I)}A=A.filter(P=>{if(P.groupId){const I=A.map(R=>R.id);return t.filter(R=>R.groupId===P.groupId).every(R=>I.includes(R.id))}return!0});const E=A.map(P=>P.id);h(E),n(!1)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",x)}}},nv={"audio/aac":"aac","audio/mpeg":"mp3","audio/ogg":"oga","audio/wav":"wav","audio/webm":"weba","audio/flac":"flac","audio/mp4":"m4a","audio/x-aiff":"aif","audio/x-ms-wma":"wma","audio/midi":"mid","video/mp4":"mp4","video/mpeg":"mpeg","video/ogg":"ogv","video/webm":"webm","video/x-msvideo":"avi","video/quicktime":"mov","video/x-ms-wmv":"wmv","video/x-flv":"flv","video/3gpp":"3gp","video/3gpp2":"3g2"},I_=()=>{const{createImageElement:t,createVideoElement:e,createAudioElement:r}=ro();return{pasteDataTransfer:i=>{const a=i.items,o=a[0];let s=!1;for(const l of a)if(l.kind==="file"){if(l.type.indexOf("image")!==-1){const u=l.getAsFile();u&&(Ud(u).then(c=>t(c)),s=!0)}else if(l.type.indexOf("video")!==-1){const u=l.getAsFile();if(u){const c=URL.createObjectURL(u),f=nv[u.type]||"";e(c,f),s=!0}}else if(l.type.indexOf("audio")!==-1){const u=l.getAsFile();if(u){const c=URL.createObjectURL(u),f=nv[u.type]||"";r(c,f),s=!0}}}return{isFile:s,dataTransferFirstItem:o}}}},B_=t=>{const{createTextElement:e}=ro(),{pasteDataTransfer:r}=I_();N.useEffect(()=>{const n=o=>{if(!o.dataTransfer||o.dataTransfer.items.length===0)return;const{isFile:s,dataTransferFirstItem:l}=r(o.dataTransfer);s||l&&l.kind==="string"&&l.type==="text/plain"&&l.getAsString(u=>{if(Tt.getState().disableHotkeys)return;const c=pc(u);e({left:0,top:0,width:600,height:50},{content:c})})},i=o=>o.preventDefault(),a=t.current;return a&&a.addEventListener("drop",n),document.addEventListener("dragleave",i),document.addEventListener("drop",i),document.addEventListener("dragenter",i),document.addEventListener("dragover",i),()=>{a&&a.removeEventListener("drop",n),document.removeEventListener("dragleave",i),document.removeEventListener("drop",i),document.removeEventListener("dragenter",i),document.removeEventListener("dragover",i)}},[t.current])},V_=t=>{const{canvasScale:e,creatingElement:r,setCreatingElement:n}=Tt(),{createTextElement:i,createShapeElement:a,createLineElement:o}=ro(),s=c=>{const{start:f,end:d}=c;if(!t.current)return;const h=t.current.getBoundingClientRect(),[v,p]=f,[g,m]=d,y=Math.min(v,g),_=Math.max(v,g),x=Math.min(p,m),S=Math.max(p,m),b=(y-h.x)/e,w=(x-h.y)/e,T=(_-y)/e,L=(S-x)/e;return{left:b,top:w,width:T,height:L}},l=c=>{const{start:f,end:d}=c;if(!t.current)return;const h=t.current.getBoundingClientRect(),[v,p]=f,[g,m]=d,y=Math.min(v,g),_=Math.max(v,g),x=Math.min(p,m),S=Math.max(p,m),b=(y-h.x)/e,w=(x-h.y)/e,T=(_-y)/e,L=(S-x)/e;return{left:b,top:w,start:[v===y?0:T,p===x?0:L],end:[g===y?0:T,m===x?0:L]}};return{formatCreateSelection:s,insertElementFromCreateSelection:c=>{if(!r)return;const f=r.type;if(f==="text"){const d=s(c);d&&i(d,{vertical:r.vertical})}else if(f==="shape"){const d=s(c);d&&a(d,r.data)}else if(f==="line"){const d=l(c);d&&o(d,r.data)}n(null)}}},z_=(t,e,r)=>{Bt();const{addHistorySnapshot:n}=Be();return{dragElement:(a,o)=>{const s=!(a instanceof MouseEvent);if(s&&(!a.changedTouches||!a.changedTouches[0]))return;const{activeElementIdList:l,activeGroupElementId:u}=Tt.getState();if(!l.includes(o.id))return;let c=!0;const{viewportRatio:f,viewportSize:d}=Bt.getState(),h=d,v=d*f,p=5,m=JSON.parse(JSON.stringify(t)).filter(j=>l.includes(j.id)),y=o.left,_=o.top,x=o.width,S="height"in o&&o.height?o.height:0,b="rotate"in o&&o.rotate?o.rotate:0,w=s?a.changedTouches[0].pageX:a.pageX,T=s?a.changedTouches[0].pageY:a.pageY,L=Tt.getState().canvasScale,C=pr.getState().shiftKeyState;let M=null;const A=o.id===u;let E=[],P=[];for(const j of t){if(j.type==="line"||A&&j.id===o.id||!A&&l.includes(j.id))continue;let Y,et,ft,gt;if("rotate"in j&&j.rotate){const{xRange:_t,yRange:mt}=zs({left:j.left,top:j.top,width:j.width,height:j.height,rotate:j.rotate});Y=_t[0],et=mt[0],ft=_t[1]-_t[0],gt=mt[1]-mt[0]}else Y=j.left,et=j.top,ft=j.width,gt=j.height;const $=Y+ft,U=et+gt,q=et+gt/2,tt=Y+ft/2,nt={value:et,range:[Y,$]},at={value:U,range:[Y,$]},st={value:q,range:[Y,$]},Et={value:Y,range:[et,U]},K={value:$,range:[et,U]},J={value:tt,range:[et,U]};E.push(nt,at,st),P.push(Et,K,J)}const I={value:0,range:[0,h]},k={value:v,range:[0,h]},R={value:v/2,range:[0,h]},H={value:0,range:[0,v]},B={value:h,range:[0,v]},F={value:h/2,range:[0,v]};E.push(I,k,R),P.push(H,B,F),E=Fs(E),P=Fs(P);const O=j=>{const Y=j instanceof MouseEvent?j.pageX:j.changedTouches[0].pageX,et=j instanceof MouseEvent?j.pageY:j.changedTouches[0].pageY;if(M!==!1&&(M=Math.abs(w-Y)<p&&Math.abs(T-et)<p),!c||M)return;let ft=(Y-w)/L,gt=(et-T)/L;C&&(Math.abs(ft)>Math.abs(gt)&&(gt=0),Math.abs(ft)<Math.abs(gt)&&(ft=0));let $=y+ft,U=_+gt,q,tt,nt,at;if(l.length===1||A)if(b){const{xRange:mt,yRange:xt}=zs({left:$,top:U,width:x,height:S,rotate:b});q=mt[0],tt=mt[1],nt=xt[0],at=xt[1]}else o.type==="line"?(q=$,tt=$+Math.max(o.start[0],o.end[0]),nt=U,at=U+Math.max(o.start[1],o.end[1])):(q=$,tt=$+x,nt=U,at=U+S);else{const mt=[],xt=[],X=[],W=[];for(let Q=0;Q<m.length;Q++){const Z=m[Q],ut=Z.left+ft,dt=Z.top+gt,ct=Z.width,Ut="height"in Z&&Z.height?Z.height:0,Qt="rotate"in Z&&Z.rotate?Z.rotate:0;if("rotate"in Z&&Z.rotate){const{xRange:Wt,yRange:pe}=zs({left:ut,top:dt,width:ct,height:Ut,rotate:Qt});mt.push(Wt[0]),xt.push(pe[0]),X.push(Wt[1]),W.push(pe[1])}else Z.type==="line"?(mt.push(ut),xt.push(dt),X.push(ut+Math.max(Z.start[0],Z.end[0])),W.push(dt+Math.max(Z.start[1],Z.end[1]))):(mt.push(ut),xt.push(dt),X.push(ut+ct),W.push(dt+Ut))}q=Math.min(...mt),tt=Math.max(...X),nt=Math.min(...xt),at=Math.max(...W)}const st=q+(tt-q)/2,Et=nt+(at-nt)/2,K=[];let J=!1,_t=!1;for(let mt=0;mt<E.length;mt++){const{value:xt,range:X}=E[mt],W=Math.min(...X,q,tt),Q=Math.max(...X,q,tt);Math.abs(nt-xt)<p&&!_t&&(U=U-(nt-xt),_t=!0,K.push({type:"horizontal",axis:{x:W-50,y:xt},length:Q-W+100})),Math.abs(at-xt)<p&&!_t&&(U=U-(at-xt),_t=!0,K.push({type:"horizontal",axis:{x:W-50,y:xt},length:Q-W+100})),Math.abs(Et-xt)<p&&!_t&&(U=U-(Et-xt),_t=!0,K.push({type:"horizontal",axis:{x:W-50,y:xt},length:Q-W+100}))}for(let mt=0;mt<P.length;mt++){const{value:xt,range:X}=P[mt],W=Math.min(...X,nt,at),Q=Math.max(...X,nt,at);Math.abs(q-xt)<p&&!J&&($=$-(q-xt),J=!0,K.push({type:"vertical",axis:{x:xt,y:W-50},length:Q-W+100})),Math.abs(tt-xt)<p&&!J&&($=$-(tt-xt),J=!0,K.push({type:"vertical",axis:{x:xt,y:W-50},length:Q-W+100})),Math.abs(st-xt)<p&&!J&&($=$-(st-xt),J=!0,K.push({type:"vertical",axis:{x:xt,y:W-50},length:Q-W+100}))}if(r(K),l.length===1||A)e(mt=>mt.map(xt=>xt.id===o.id?{...xt,left:$,top:U}:xt));else{const mt=t.find(xt=>xt.id===o.id);if(!mt)return;e(xt=>xt.map(X=>l.includes(X.id)?X.id===o.id?{...X,left:$,top:U}:{...X,left:X.left+($-mt.left),top:X.top+(U-mt.top)}:X))}},G=j=>{c=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,r([]);const Y=j instanceof MouseEvent?j.pageX:j.changedTouches[0].pageX,et=j instanceof MouseEvent?j.pageY:j.changedTouches[0].pageY;w===Y&&T===et||n()};s?(document.ontouchmove=O,document.ontouchend=G):(document.onmousemove=O,document.onmouseup=G)}}},F_=(t,e)=>{const r=Tt();return{selectElement:(i,a,o=!0)=>{if(!i)return;const{activeElementIdList:s,activeGroupElementId:l,handleElementId:u,editorAreaFocus:c}=Tt.getState(),{ctrlOrShiftKeyActive:f}=pr.getState();if(c||r.setEditorareaFocus(!0),s.includes(a.id)){if(f){let d=[];if(a.groupId){const h=[];t.forEach(v=>{v.groupId===a.groupId&&h.push(v.id)}),d=s.filter(v=>!h.includes(v))}else d=s.filter(h=>h!==a.id);d.length>0&&r.setActiveElementIdList(d)}else if(u!==a.id)r.setHandleElementId(a.id);else if(l!==a.id){let d=0,h=0;if(i instanceof MouseEvent?(d=i.pageX,h=i.pageY):"changedTouches"in i&&i.changedTouches&&i.changedTouches.length>0&&(d=i.changedTouches[0].pageX,h=i.changedTouches[0].pageY),d||h){const v=i.target;v.onmouseup=p=>{const g=p.pageX,m=p.pageY;d===g&&h===m&&(r.setActiveGroupElementId(a.id),v.onmouseup=null)}}}}else{let d=[];if(f?d=[...s,a.id]:d=[a.id],a.groupId){const h=[];t.forEach(v=>{v.groupId===a.groupId&&h.push(v.id)}),d=[...d,...h]}r.setActiveElementIdList(Ar.uniq(d)),r.setHandleElementId(a.id)}o&&e(i,a)}}},H_=(t,e)=>{const r=Math.atan2(t,e);return 180/Math.PI*r},W_=(t,e,r)=>{Bt();const{addHistorySnapshot:n}=Be();return{rotateElement:(a,o)=>{const s=!(a instanceof MouseEvent);if(s&&(!a.changedTouches||!a.changedTouches[0]))return;let l=!0,u=0;const c=o.rotate||0,f=o.left,d=o.top,h=o.width,v=o.height,p=Tt.getState().canvasScale,g=f+h/2,m=d+v/2;if(!r.current)return;const y=r.current.getBoundingClientRect(),_=S=>{if(!l)return;const b=S instanceof MouseEvent?S.pageX:S.changedTouches[0].pageX,w=S instanceof MouseEvent?S.pageY:S.changedTouches[0].pageY,T=(b-y.left)/p,L=(w-y.top)/p,C=T-g,M=m-L;u=H_(C,M);const A=5;Math.abs(u)<=A?u=0:u>0&&Math.abs(u-45)<=A?u-=u-45:u<0&&Math.abs(u+45)<=A?u-=u+45:u>0&&Math.abs(u-90)<=A?u-=u-90:u<0&&Math.abs(u+90)<=A?u-=u+90:u>0&&Math.abs(u-135)<=A?u-=u-135:u<0&&Math.abs(u+135)<=A?u-=u+135:u>0&&Math.abs(u-180)<=A?u-=u-180:u<0&&Math.abs(u+180)<=A&&(u-=u+180),e(E=>E.map(P=>o.id===P.id?{...P,rotate:u}:P))},x=()=>{l=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&n()};s?(document.ontouchmove=_,document.ontouchend=x):(document.onmousemove=_,document.onmouseup=x)}}};var Rr=(t=>(t.UP="up",t.DOWN="down",t.TOP="top",t.BOTTOM="bottom",t))(Rr||{}),Ce=(t=>(t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.CENTER="center",t))(Ce||{}),io=(t=>(t.T="top",t.B="bottom",t.L="left",t.R="right",t))(io||{}),it=(t=>(t.LEFT_TOP="left-top",t.TOP="top",t.RIGHT_TOP="right-top",t.LEFT="left",t.RIGHT="right",t.LEFT_BOTTOM="left-bottom",t.BOTTOM="bottom",t.RIGHT_BOTTOM="right-bottom",t))(it||{}),Qe=(t=>(t.START="start",t.END="end",t.C="ctrl",t.C1="ctrl1",t.C2="ctrl2",t))(Qe||{});const G_={text:40,image:20,shape:20,chart:200,table:30,video:250,audio:20,latex:20},iv=(t,e)=>{const{left:r,top:n,width:i,height:a}=t,o=Math.sqrt(Math.pow(i,2)+Math.pow(a,2))/2,s=Math.atan(a/i)*180/Math.PI,l=(180-e-s)*Math.PI/180,u=(s-e)*Math.PI/180,c=(90-e)*Math.PI/180,f=e*Math.PI/180,d=i/2,h=a/2,v=r+d,p=n+h,g={left:v+o*Math.cos(l),top:p-o*Math.sin(l)},m={left:v+h*Math.cos(c),top:p-h*Math.sin(c)},y={left:v+o*Math.cos(u),top:p-o*Math.sin(u)},_={left:v+d*Math.cos(f),top:p+d*Math.sin(f)},x={left:v-o*Math.cos(l),top:p+o*Math.sin(l)},S={left:v-h*Math.sin(f),top:p+h*Math.cos(f)},b={left:v-o*Math.cos(u),top:p+o*Math.sin(u)},w={left:v-d*Math.cos(f),top:p-d*Math.sin(f)};return{leftTopPoint:g,topPoint:m,rightTopPoint:y,rightPoint:_,rightBottomPoint:x,bottomPoint:S,leftBottomPoint:b,leftPoint:w}},av=(t,e)=>({[it.RIGHT_BOTTOM]:e.leftTopPoint,[it.LEFT_BOTTOM]:e.rightTopPoint,[it.LEFT_TOP]:e.rightBottomPoint,[it.RIGHT_TOP]:e.leftBottomPoint,[it.TOP]:e.bottomPoint,[it.BOTTOM]:e.topPoint,[it.LEFT]:e.rightPoint,[it.RIGHT]:e.leftPoint})[t],j_=(t,e,r)=>{const n=Tt();Bt();const{addHistorySnapshot:i}=Be();return{scaleElement:(s,l,u)=>{const c=!(s instanceof MouseEvent);if(c&&(!s.changedTouches||!s.changedTouches[0]))return;let f=!0;n.setScalingState(!0);const d=l.left,h=l.top,v=l.width,p=l.height,g=l.type==="table"?l.cellMinHeight:0,m="rotate"in l&&l.rotate?l.rotate:0,y=Math.PI*m/180,x=pr.getState().ctrlOrShiftKeyActive||"fixedRatio"in l&&l.fixedRatio,S=v/p,b=c?s.changedTouches[0].pageX:s.pageX,w=c?s.changedTouches[0].pageY:s.pageY,T=Tt.getState().canvasScale,L=G_[l.type]||20,C=(B,F)=>{if(!x)return B<L?L:B;let O=L,G=L;const j=l.width/l.height;return j<1&&(G=L/j),j>1&&(O=L*j),F==="width"?B<O?O:B:B<G?G:B};let M,A=0,E=0,P=[],I=[];if("rotate"in l&&l.rotate){const{left:B,top:F,width:O,height:G}=l;M=iv({left:B,top:F,width:O,height:G},m);const j=av(u,M);A=j.left,E=j.top}else{const{viewportRatio:B,viewportSize:F}=Bt.getState(),{activeElementIdList:O,activeGroupElementId:G}=Tt.getState(),j=F,Y=F*B,et=l.id===G;for(const nt of t){if("rotate"in nt&&nt.rotate||nt.type==="line"||et&&nt.id===l.id||!et&&O.includes(nt.id))continue;const at=nt.left,st=nt.top,Et=nt.width,K=nt.height,J=at+Et,_t=st+K,mt={value:st,range:[at,J]},xt={value:_t,range:[at,J]},X={value:at,range:[st,_t]},W={value:J,range:[st,_t]};P.push(mt,xt),I.push(X,W)}const ft={value:0,range:[0,j]},gt={value:Y,range:[0,j]},$={value:Y/2,range:[0,j]},U={value:0,range:[0,Y]},q={value:j,range:[0,Y]},tt={value:j/2,range:[0,Y]};P.push(ft,gt,$),I.push(U,q,tt),P=Fs(P),I=Fs(I)}const k=(B,F)=>{const G=[];let j=!1,Y=!1;const et={offsetX:0,offsetY:0};if(F||F===0)for(let ft=0;ft<P.length;ft++){const{value:gt,range:$}=P[ft],U=Math.min(...$,B||0),q=Math.max(...$,B||0);Math.abs(F-gt)<5&&!Y&&(et.offsetY=F-gt,Y=!0,G.push({type:"horizontal",axis:{x:U-50,y:gt},length:q-U+100}))}if(B||B===0)for(let ft=0;ft<I.length;ft++){const{value:gt,range:$}=I[ft],U=Math.min(...$,F||0),q=Math.max(...$,F||0);Math.abs(B-gt)<5&&!j&&(et.offsetX=B-gt,j=!0,G.push({type:"vertical",axis:{x:gt,y:U-50},length:q-U+100}))}return r(G),et},R=B=>{if(!f)return;const F=B instanceof MouseEvent?B.pageX:B.changedTouches[0].pageX,O=B instanceof MouseEvent?B.pageY:B.changedTouches[0].pageY,G=F-b,j=O-w;let Y=v,et=p,ft=d,gt=h;if(m){const $=(Math.cos(y)*G+Math.sin(y)*j)/T;let U=(Math.cos(y)*j-Math.sin(y)*G)/T;x&&((u===it.RIGHT_BOTTOM||u===it.LEFT_TOP)&&(U=$/S),(u===it.LEFT_BOTTOM||u===it.RIGHT_TOP)&&(U=-$/S)),u===it.RIGHT_BOTTOM?(Y=C(v+$,"width"),et=C(p+U,"height")):u===it.LEFT_BOTTOM?(Y=C(v-$,"width"),et=C(p+U,"height"),ft=d-(Y-v)):u===it.LEFT_TOP?(Y=C(v-$,"width"),et=C(p-U,"height"),ft=d-(Y-v),gt=h-(et-p)):u===it.RIGHT_TOP?(Y=C(v+$,"width"),et=C(p-U,"height"),gt=h-(et-p)):u===it.TOP?(et=C(p-U,"height"),gt=h-(et-p)):u===it.BOTTOM?et=C(p+U,"height"):u===it.LEFT?(Y=C(v-$,"width"),ft=d-(Y-v)):u===it.RIGHT&&(Y=C(v+$,"width"));const q=iv({width:Y,height:et,left:ft,top:gt},m),tt=av(u,q),nt=tt.left,at=tt.top,st=nt-A,Et=at-E;ft=ft-st,gt=gt-Et}else{let $=G/T,U=j/T;if(x&&((u===it.RIGHT_BOTTOM||u===it.LEFT_TOP)&&(U=$/S),(u===it.LEFT_BOTTOM||u===it.RIGHT_TOP)&&(U=-$/S)),u===it.RIGHT_BOTTOM){const{offsetX:q,offsetY:tt}=k(d+v+$,h+p+U);$=$-q,U=U-tt,x&&(tt?$=U*S:U=$/S),Y=C(v+$,"width"),et=C(p+U,"height")}else if(u===it.LEFT_BOTTOM){const{offsetX:q,offsetY:tt}=k(d+$,h+p+U);$=$-q,U=U-tt,x&&(tt?$=-U*S:U=-$/S),Y=C(v-$,"width"),et=C(p+U,"height"),ft=d-(Y-v)}else if(u===it.LEFT_TOP){const{offsetX:q,offsetY:tt}=k(d+$,h+U);$=$-q,U=U-tt,x&&(tt?$=U*S:U=$/S),Y=C(v-$,"width"),et=C(p-U,"height"),ft=d-(Y-v),gt=h-(et-p)}else if(u===it.RIGHT_TOP){const{offsetX:q,offsetY:tt}=k(d+v+$,h+U);$=$-q,U=U-tt,x&&(tt?$=-U*S:U=-$/S),Y=C(v+$,"width"),et=C(p-U,"height"),gt=h-(et-p)}else if(u===it.LEFT){const{offsetX:q}=k(d+$,null);$=$-q,Y=C(v-$,"width"),ft=d-(Y-v)}else if(u===it.RIGHT){const{offsetX:q}=k(d+v+$,null);$=$-q,Y=C(v+$,"width")}else if(u===it.TOP){const{offsetY:q}=k(null,h+U);U=U-q,et=C(p-U,"height"),gt=h-(et-p)}else if(u===it.BOTTOM){const{offsetY:q}=k(null,h+p+U);U=U-q,et=C(p+U,"height")}}e($=>$.map(U=>{if(l.id!==U.id)return U;if(U.type==="shape"&&"pathFormula"in U&&U.pathFormula){const q=eo[U.pathFormula];let tt="";return"editable"in q?tt=q.formula(Y,et,U.keypoints):tt=q.formula(Y,et),{...U,left:ft,top:gt,width:Y,height:et,viewBox:[Y,et],path:tt}}if(U.type==="table"){let q=g+(et-p)/U.data.length;return q=q<36?36:q,q===g?{...U,left:ft,width:Y}:{...U,left:ft,top:gt,width:Y,height:et,cellMinHeight:q<36?36:q}}return{...U,left:ft,top:gt,width:Y,height:et}}))},H=B=>{f=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,r([]);const F=B instanceof MouseEvent?B.pageX:B.changedTouches[0].pageX,O=B instanceof MouseEvent?B.pageY:B.changedTouches[0].pageY;b===F&&w===O||(i(),n.setScalingState(!1))};c?(document.ontouchmove=R,document.ontouchend=H):(document.onmousemove=R,document.onmouseup=H)},scaleMultiElement:(s,l,u)=>{let c=!0;const{minX:f,maxX:d,minY:h,maxY:v}=l,p=d-f,g=v-h,m=p/g,y=s.pageX,_=s.pageY,x=Tt.getState().canvasScale,{activeElementIdList:S}=Tt.getState(),{ctrlOrShiftKeyActive:b}=pr.getState(),w=JSON.parse(JSON.stringify(t));document.onmousemove=T=>{if(!c)return;const L=T.pageX,C=T.pageY,M=(L-y)/x;let A=(C-_)/x;b&&((u===it.RIGHT_BOTTOM||u===it.LEFT_TOP)&&(A=M/m),(u===it.LEFT_BOTTOM||u===it.RIGHT_TOP)&&(A=-M/m));let E=f,P=d,I=h,k=v;u===it.RIGHT_BOTTOM?(P=d+M,k=v+A):u===it.LEFT_BOTTOM?(E=f+M,k=v+A):u===it.LEFT_TOP?(E=f+M,I=h+A):u===it.RIGHT_TOP?(P=d+M,I=h+A):u===it.TOP?I=h+A:u===it.BOTTOM?k=v+A:u===it.LEFT?E=f+M:u===it.RIGHT&&(P=d+M);const R=P-E,H=k-I;let B=R/p,F=H/g;B<=0&&(B=0),F<=0&&(F=0),e(O=>O.map(G=>{if((G.type==="image"||G.type==="shape")&&S.includes(G.id)){const j=w.find(Y=>Y.id===G.id);return j?{...G,width:j.width*B,height:j.height*F,left:E+(j.left-f)*B,top:I+(j.top-h)*F}:G}return G}))},document.onmouseup=T=>{c=!1,document.onmousemove=null,document.onmouseup=null,!(y===T.pageX&&_===T.pageY)&&i()}}}},X_=(t,e)=>{Bt();const{addHistorySnapshot:r}=Be();return{dragLineElement:(i,a,o)=>{let s=!0;const l=8,u=i.pageX,c=i.pageY,f=Tt.getState().canvasScale,d=pr.getState().ctrlOrShiftKeyActive,h=[];for(let v=0;v<t.length;v++){const p=t[v];if(p.type==="line"||p.rotate)continue;const g=p.left,m=p.top,y=p.width,_=p.height,x=g+y,S=m+_,b=m+_/2,w=g+y/2,T={x:w,y:m},L={x:w,y:S},C={x:g,y:b},M={x,y:b},A={x:g,y:m},E={x,y:m},P={x:g,y:S},I={x,y:S};h.push(T,L,C,M,A,E,P,I)}document.onmousemove=v=>{if(!s)return;const p=v.pageX,g=v.pageY,m=(p-u)/f,y=(g-c)/f;let _=a.left+a.start[0],x=a.top+a.start[1],S=a.left+a.end[0],b=a.top+a.end[1];const w=a.broken||a.broken2||a.curve||[0,0];let T=a.left+w[0],L=a.top+w[1];const[C,M]=a.cubic||[[0,0],[0,0]];let A=a.left+C[0],E=a.top+C[1],P=a.left+M[0],I=a.top+M[1];if(o===Qe.START){_=_+m,x=x+y,Math.abs(_-S)<l&&(_=S),Math.abs(x-b)<l&&(x=b);for(const G of h){const{x:j,y:Y}=G;if(Math.abs(j-_)<l&&Math.abs(Y-x)<l){_=j,x=Y;break}}}else if(o===Qe.END){S=S+m,b=b+y,Math.abs(_-S)<l&&(S=_),Math.abs(x-b)<l&&(b=x);for(const G of h){const{x:j,y:Y}=G;if(Math.abs(j-S)<l&&Math.abs(Y-b)<l){S=j,b=Y;break}}}else o===Qe.C?(T=T+m,L=L+y,Math.abs(T-_)<l&&(T=_),Math.abs(L-x)<l&&(L=x),Math.abs(T-S)<l&&(T=S),Math.abs(L-b)<l&&(L=b),Math.abs(T-(_+S)/2)<l&&Math.abs(L-(x+b)/2)<l&&(T=(_+S)/2,L=(x+b)/2)):o===Qe.C1?(A=A+m,E=E+y,Math.abs(A-_)<l&&(A=_),Math.abs(E-x)<l&&(E=x),Math.abs(A-S)<l&&(A=S),Math.abs(E-b)<l&&(E=b)):o===Qe.C2&&(P=P+m,I=I+y,Math.abs(P-_)<l&&(P=_),Math.abs(I-x)<l&&(I=x),Math.abs(P-S)<l&&(P=S),Math.abs(I-b)<l&&(I=b));const k=Math.min(_,S),R=Math.min(x,b),H=Math.max(_,S),B=Math.max(x,b),F=[0,0],O=[H-k,B-R];_>S&&(F[0]=H-k,O[0]=0),x>b&&(F[1]=B-R,O[1]=0),e(G=>G.map(j=>{if(j.id===a.id){const Y={...j,left:k,top:R,start:F,end:O};return o===Qe.START||o===Qe.END?(d?(a.broken&&(Y.broken=[T-k,L-R]),a.curve&&(Y.curve=[T-k,L-R]),a.cubic&&(Y.cubic=[[A-k,E-R],[P-k,I-R]])):(a.broken&&(Y.broken=[(F[0]+O[0])/2,(F[1]+O[1])/2]),a.curve&&(Y.curve=[(F[0]+O[0])/2,(F[1]+O[1])/2]),a.cubic&&(Y.cubic=[[(F[0]+O[0])/2,(F[1]+O[1])/2],[(F[0]+O[0])/2,(F[1]+O[1])/2]])),a.broken2&&(Y.broken2=[(F[0]+O[0])/2,(F[1]+O[1])/2])):o===Qe.C?(a.broken&&(Y.broken=[T-k,L-R]),a.curve&&(Y.curve=[T-k,L-R]),a.broken2&&(H-k>=B-R?Y.broken2=[T-k,Y.broken2[1]]:Y.broken2=[Y.broken2[0],L-R])):a.cubic&&(Y.cubic=[[A-k,E-R],[P-k,I-R]]),Y}return j}))},document.onmouseup=v=>{s=!1,document.onmousemove=null,document.onmouseup=null;const p=v.pageX,g=v.pageY;u===p&&c===g||r()}}}},Y_=(t,e)=>{Bt();const{addHistorySnapshot:r}=Be();return{moveShapeKeypoint:(i,a,o=0)=>{const s=!(i instanceof MouseEvent);if(s&&(!i.changedTouches||!i.changedTouches[0]))return;let l=!0;const u=Tt.getState().canvasScale,c=s?i.changedTouches[0].pageX:i.pageX,f=s?i.changedTouches[0].pageY:i.pageY,d=a.keypoints,h=eo[a.pathFormula];let v=null;if("editable"in h&&h.editable){const m=h.getBaseSize[o],y=h.range[o],_=h.relative[o],x=d[o],S=m(a.width,a.height),b=S*x,[w,T]=y;v={baseSize:S,originPos:b,min:w,max:T,relative:_}}const p=m=>{if(!l)return;const y=m instanceof MouseEvent?m.pageX:m.changedTouches[0].pageX,_=m instanceof MouseEvent?m.pageY:m.changedTouches[0].pageY,x=(y-c)/u,S=(_-f)/u;e(b=>b.map(w=>{if(w.id===a.id&&v){const{baseSize:T,originPos:L,min:C,max:M,relative:A}=v,E=w;let P=0;A==="center"?P=(L-x*2)/T:A==="left"?P=(L+x)/T:A==="right"?P=(L-x)/T:A==="top"?P=(L+S)/T:A==="bottom"?P=(L-S)/T:A==="left_bottom"?P=(L+x)/T:A==="right_bottom"?P=(L-x)/T:A==="top_right"?P=(L+S)/T:A==="bottom_right"&&(P=(L-S)/T),P<C&&(P=C),P>M&&(P=M);let I=[];return Array.isArray(d)?(I=[...d],I[o]=P):I=[P],{...w,keypoints:I,path:h.formula(E.width,E.height,I)}}return w}))},g=m=>{l=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const y=m instanceof MouseEvent?m.pageX:m.changedTouches[0].pageX,_=m instanceof MouseEvent?m.pageY:m.changedTouches[0].pageY;c===y&&f===_||r()};s?(document.ontouchmove=p,document.ontouchend=g):(document.onmousemove=p,document.onmouseup=g)}}},U_={gridLines:"_gridLines_fow0c_1"},$_=()=>{const{canvasScale:t,gridLineSize:e}=Tt(),{currentSlide:r,viewportRatio:n,viewportSize:i}=Bt(),a=r==null?void 0:r.background,o=N.useMemo(()=>{const l=(a==null?void 0:a.color)||"#fff",u=["#000","#fff"];return Is.mostReadable(l,u,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()},[a]),s=N.useMemo(()=>{if(!e)return"";const l=i,u=i*n;let c="";for(let f=0;f<=Math.floor(u/e);f++)c+=`M0 ${f*e} L${l} ${f*e} `;for(let f=0;f<=Math.floor(l/e);f++)c+=`M${f*e} 0 L${f*e} ${u} `;return c},[i,n,e]);return D.jsx("svg",{className:U_.gridLines,children:D.jsx("path",{style:{transform:`scale(${t})`},d:s,fill:"none",stroke:o,strokeWidth:"0.3",strokeDasharray:"5"})})},ov=t=>({backgroundStyle:N.useMemo(()=>{if(!t)return{backgroundColor:"#fff"};const{type:r,color:n,image:i,gradient:a}=t;if(r==="solid")return{backgroundColor:n};if(r==="image")return i?i.size==="repeat"?{backgroundImage:`url("${i.src}")`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url("${i.src}")`,backgroundRepeat:"no-repeat",backgroundSize:i.size||"cover"}:{backgroundColor:"#fff"};if(r==="gradient"){const o=(a==null?void 0:a.rotate)||0,s=(a==null?void 0:a.colors[0].color)||"#fff",l=(a==null?void 0:a.colors[1].color)||"#fff";return(a==null?void 0:a.type)==="radial"?{backgroundImage:`radial-gradient(${s}, ${l})`}:{backgroundImage:`linear-gradient(${o}deg, ${s}, ${l})`}}return{backgroundColor:"#fff"}},[t])}),Z_={viewportBackground:"_viewportBackground_19tuy_1"},K_=()=>{const{gridLineSize:t}=Tt(),{currentSlide:e}=Bt(),r=e==null?void 0:e.background,{backgroundStyle:n}=ov(r);return D.jsx("div",{className:Z_.viewportBackground,style:n,children:t>0&&D.jsx($_,{})})},Ji=(t,e)=>{const r=N.useMemo(()=>[{direction:it.LEFT_TOP,style:{}},{direction:it.TOP,style:{left:t/2+"px"}},{direction:it.RIGHT_TOP,style:{left:t+"px"}},{direction:it.LEFT,style:{top:e/2+"px"}},{direction:it.RIGHT,style:{left:t+"px",top:e/2+"px"}},{direction:it.LEFT_BOTTOM,style:{top:e+"px"}},{direction:it.BOTTOM,style:{left:t/2+"px",top:e+"px"}},{direction:it.RIGHT_BOTTOM,style:{left:t+"px",top:e+"px"}}],[t,e]),n=N.useMemo(()=>[{direction:it.LEFT,style:{top:e/2+"px"}},{direction:it.RIGHT,style:{left:t+"px",top:e/2+"px"}}],[t,e]),i=N.useMemo(()=>[{direction:it.TOP,style:{left:t/2+"px"}},{direction:it.BOTTOM,style:{left:t/2+"px",top:e+"px"}}],[t,e]),a=N.useMemo(()=>[{type:io.T,style:{width:t+"px"}},{type:io.B,style:{top:e+"px",width:t+"px"}},{type:io.L,style:{height:e+"px"}},{type:io.R,style:{left:t+"px",height:e+"px"}}],[t,e]);return{resizeHandlers:r,textElementResizeHandlers:n,verticalTextElementResizeHandlers:i,borderLines:a}},Q_={rotateHandler:"_rotateHandler_1pyuz_1"},ao=({style:t,onMouseDown:e})=>D.jsx("div",{className:Q_.rotateHandler,style:t,onMouseDown:e}),gc={resizeHandler:"_resizeHandler_vk7ul_1","left-top":"_left-top_vk7ul_14","rotate-0":"_rotate-0_vk7ul_14","right-bottom":"_right-bottom_vk7ul_14",left:"_left_vk7ul_14","rotate-45":"_rotate-45_vk7ul_14",right:"_right_vk7ul_14","left-bottom":"_left-bottom_vk7ul_14","rotate-90":"_rotate-90_vk7ul_14","right-top":"_right-top_vk7ul_14",top:"_top_vk7ul_14","rotate-135":"_rotate-135_vk7ul_14",bottom:"_bottom_vk7ul_14"},li=({type:t,rotate:e=0,style:r,onMouseDown:n})=>{const i=N.useMemo(()=>{const a="rotate-",o=e;return o>-22.5&&o<=22.5?a+0:o>22.5&&o<=67.5?a+45:o>67.5&&o<=112.5?a+90:o>112.5&&o<=157.5?a+135:o>157.5||o<=-157.5?a+0:o>-157.5&&o<=-112.5?a+45:o>-112.5&&o<=-67.5?a+90:o>-67.5&&o<=-22.5?a+135:a+0},[e]);return D.jsx("div",{className:kt(gc.resizeHandler,gc[i],gc[t]),style:r,onMouseDown:n})},mc={borderLine:"_borderLine_u4hgj_1",top:"_top_u4hgj_9",bottom:"_bottom_u4hgj_12",left:"_left_u4hgj_15",right:"_right_u4hgj_18",wide:"_wide_u4hgj_21"},qi=({type:t,isWide:e=!1,style:r})=>D.jsx("div",{className:kt(mc.borderLine,mc[t],{[mc.wide]:e}),style:r}),Hs=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i}=Tt(),a=t.width*i,o=t.height*i,{resizeHandlers:s,borderLines:l}=Ji(a,o),u=N.useMemo(()=>["chart","video","audio"].includes(t.type),[t.type]);return D.jsxs("div",{className:"common-element-operate",children:[l.map(c=>D.jsx(qi,{type:c.type,style:c.style},c.type)),e&&D.jsxs(D.Fragment,{children:[s.map(c=>D.jsx(li,{type:c.direction,rotate:t.rotate,style:c.style,onMouseDown:f=>{f.stopPropagation(),n(f,t,c.direction)}},c.direction)),!u&&D.jsx(ao,{style:{left:a/2+"px"},onMouseDown:c=>{c.stopPropagation(),r(c,t)}})]})]})},sv={imageElementOperate:"_imageElementOperate_170vc_1",cliping:"_cliping_170vc_1"},J_=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i,clipingImageElementId:a}=Tt(),o=a===t.id,s=t.width*i,l=t.height*i,{resizeHandlers:u,borderLines:c}=Ji(s,l);return D.jsxs("div",{className:kt(sv.imageElementOperate,{[sv.cliping]:o}),children:[c.map(f=>D.jsx(qi,{type:f.type,style:f.style},f.type)),e&&D.jsxs(D.Fragment,{children:[u.map(f=>D.jsx(li,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:d=>{d.stopPropagation(),n(d,t,f.direction)}},f.direction)),D.jsx(ao,{style:{left:s/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}})]})]})},q_=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i}=Tt(),a=t.width*i,o=t.height*i,{textElementResizeHandlers:s,verticalTextElementResizeHandlers:l,borderLines:u}=Ji(a,o),c=N.useMemo(()=>t.vertical?l:s,[t.vertical,l,s]);return D.jsxs("div",{className:"text-element-operate",children:[u.map(f=>D.jsx(qi,{type:f.type,style:f.style},f.type)),e&&D.jsxs(D.Fragment,{children:[c.map(f=>D.jsx(li,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:d=>{d.stopPropagation(),n(d,t,f.direction)}},f.direction)),D.jsx(ao,{style:{left:a/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}})]})]})},lv={operateKeypointHandler:"_operateKeypointHandler_6ci2w_1"},t3=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n,moveShapeKeypoint:i})=>{const{canvasScale:a}=Tt(),o=t.width*a,s=t.height*a,{resizeHandlers:l,borderLines:u}=Ji(o,s),c=N.useMemo(()=>{if(!t.pathFormula||t.keypoints===void 0)return[];const f=eo[t.pathFormula];return f?t.keypoints.map((d,h)=>{const v=f.getBaseSize[h],p=f.relative[h],g=v(t.width,t.height)*d;let m={};return p==="left"?m={left:g*a+"px"}:p==="right"?m={left:(t.width-g)*a+"px"}:p==="center"?m={left:(t.width-g)/2*a+"px"}:p==="top"?m={top:g*a+"px"}:p==="bottom"?m={top:(t.height-g)*a+"px"}:p==="left_bottom"?m={left:g*a+"px",top:t.height*a+"px"}:p==="right_bottom"?m={left:(t.width-g)*a+"px",top:t.height*a+"px"}:p==="top_right"?m={left:t.width*a+"px",top:g*a+"px"}:p==="bottom_right"&&(m={left:t.width*a+"px",top:(t.height-g)*a+"px"}),{keypoint:d,styles:m}}):[]},[t,a]);return D.jsxs("div",{className:lv.shapeElementOperate,children:[u.map(f=>D.jsx(qi,{type:f.type,style:f.style},f.type)),e&&D.jsxs(D.Fragment,{children:[l.map(f=>D.jsx(li,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:d=>{d.stopPropagation(),n(d,t,f.direction)}},f.direction)),D.jsx(ao,{style:{left:o/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}}),c.map((f,d)=>D.jsx("div",{className:lv.operateKeypointHandler,style:f.styles,onMouseDown:h=>{h.stopPropagation(),i==null||i(h,t,d)}},d))]})]})},oo={lineElementOperate:"_lineElementOperate_1300m_1",anchorLine:"_anchorLine_1300m_8"},e3=({elementInfo:t,handlerVisible:e,dragLineElement:r})=>{const{canvasScale:n}=Tt(),i=Math.max(t.start[0],t.end[0]),a=Math.max(t.start[1],t.end[1]),o=N.useMemo(()=>{const s=[{handler:Qe.START,style:{left:t.start[0]*n+"px",top:t.start[1]*n+"px"}},{handler:Qe.END,style:{left:t.end[0]*n+"px",top:t.end[1]*n+"px"}}];if(t.curve||t.broken||t.broken2){const l=t.curve||t.broken||t.broken2;s.push({handler:Qe.C,style:{left:l[0]*n+"px",top:l[1]*n+"px"}})}else if(t.cubic){const[l,u]=t.cubic;s.push({handler:Qe.C1,style:{left:l[0]*n+"px",top:l[1]*n+"px"}}),s.push({handler:Qe.C2,style:{left:u[0]*n+"px",top:u[1]*n+"px"}})}return s},[t,n]);return D.jsx("div",{className:oo.lineElementOperate,children:e&&D.jsxs(D.Fragment,{children:[o.map(s=>D.jsx(li,{type:s.handler,style:s.style,onMouseDown:l=>{l.stopPropagation(),r==null||r(l,t,s.handler)}},s.handler)),D.jsxs("svg",{width:i||1,height:a||1,stroke:t.color,overflow:"visible",style:{transform:`scale(${n})`},children:[t.curve&&D.jsxs("g",{children:[D.jsx("line",{className:oo.anchorLine,x1:t.start[0],y1:t.start[1],x2:t.curve[0],y2:t.curve[1]}),D.jsx("line",{className:oo.anchorLine,x1:t.end[0],y1:t.end[1],x2:t.curve[0],y2:t.curve[1]})]}),t.cubic&&t.cubic.map((s,l)=>D.jsxs("g",{children:[l===0&&D.jsx("line",{className:oo.anchorLine,x1:t.start[0],y1:t.start[1],x2:s[0],y2:s[1]}),l===1&&D.jsx("line",{className:oo.anchorLine,x1:t.end[0],y1:t.end[1],x2:s[0],y2:s[1]})]},l))]})]})})},r3=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i}=Tt(),a=t.outline.width||1,o=(t.width+a)*i,s=t.height*i,{resizeHandlers:l,borderLines:u}=Ji(o,s);return D.jsxs("div",{className:"table-element-operate",children:[u.map(c=>D.jsx(qi,{type:c.type,style:c.style},c.type)),e&&D.jsxs(D.Fragment,{children:[l.map(c=>D.jsx(li,{type:c.direction,rotate:t.rotate,style:c.style,onMouseDown:f=>{f.stopPropagation(),n(f,t,c.direction)}},c.direction)),D.jsx(ao,{style:{left:o/2+"px"},onMouseDown:c=>{c.stopPropagation(),r(c,t)}})]})]})},n3={linkHandler:"_linkHandler_1yjax_1",link:"_link_1yjax_1",btns:"_btns_1yjax_25",btn:"_btn_1yjax_25"},i3=({elementInfo:t,openLinkDialog:e})=>D.jsx("div",{className:n3.linkHandler,style:{left:t.width/2+"px"},onClick:e,children:D.jsx(Ie.LinkOne,{size:14,fill:"#666"})}),uv={operate:"_operate_5txtx_1",multiSelect:"_multiSelect_5txtx_7",animationIndex:"_animationIndex_5txtx_11",indexItem:"_indexItem_5txtx_17"},a3=({elementInfo:t,isSelected:e,isActive:r,isActiveGroupElement:n,isMultiSelect:i,rotateElement:a=()=>{},scaleElement:o=()=>{},dragLineElement:s=()=>{},moveShapeKeypoint:l=()=>{},openLinkDialog:u=()=>{}})=>{const{canvasScale:c}=Tt(),f="rotate"in t&&t.rotate||0,{formatedAnimations:d}=Bt();N.useMemo(()=>{const m=[];for(let y=0;y<d.length;y++)d[y].animations.map(x=>x.elId).includes(t.id)&&m.push(y+1);return m},[d,t.id]);const h="height"in t&&t.height||0,v=N.useMemo(()=>({[$t.IMAGE]:J_,[$t.TEXT]:q_,[$t.SHAPE]:t3,[$t.LINE]:e3,[$t.TABLE]:r3,[$t.CHART]:Hs,[$t.LATEX]:Hs,[$t.VIDEO]:Hs,[$t.AUDIO]:Hs})[t.type]||null,[t.type]);if(!v)return null;const p=h===0&&t.type===$t.TEXT?20:h,g=v;return D.jsxs("div",{className:kt(uv.operate,{[uv.multiSelect]:i&&!r}),style:{top:t.top*c+"px",left:t.left*c+"px",transform:`rotate(${f}deg)`,transformOrigin:`${t.width*c/2}px ${p*c/2}px`},children:[e&&D.jsx(g,{elementInfo:{...t,height:p},handlerVisible:n||!i,rotateElement:a,scaleElement:o,dragLineElement:s,moveShapeKeypoint:l}),r&&t.link&&D.jsx(i3,{elementInfo:t,link:t.link,openLinkDialog:u})]})},o3=({type:t,axis:e,length:r,canvasScale:n})=>{const i={position:"absolute",zIndex:100,backgroundColor:"#d14424"};return t==="vertical"?(i.left=e.x*n,i.top=e.y*n,i.width=1,i.height=r*n):(i.left=e.x*n,i.top=e.y*n,i.width=r*n,i.height=1),D.jsx("div",{className:"alignment-line",style:i})},yc={elementCreateSelection:"_elementCreateSelection_dvlwf_1",selection:"_selection_dvlwf_14",line:"_line_dvlwf_18"},s3=({onCreated:t})=>{const{creatingElement:e,setCreatingElement:r}=Tt(),{ctrlOrShiftKeyActive:n}=pr(),[i,a]=N.useState(null),[o,s]=N.useState(null),l=N.useRef(null),u=N.useRef({x:0,y:0});N.useEffect(()=>{if(!l.current)return;const{x:h,y:v}=l.current.getBoundingClientRect();u.current={x:h,y:v}},[]);const c=N.useMemo(()=>{if(!i||!o||!e||e.type!=="line")return null;const[h,v]=i,[p,g]=o,m=Math.min(h,p),y=Math.max(h,p),_=Math.min(v,g),x=Math.max(v,g),S=y-m>=24?y-m:24,b=x-_>=24?x-_:24,w=h===m?0:y-m,T=v===_?0:x-_,L=p===m?0:y-m,C=g===_?0:x-_,M=`M${w}, ${T} L${L}, ${C}`;return{svgWidth:S,svgHeight:b,path:M}},[i,o,e]),f=N.useMemo(()=>{if(!i||!o)return{};const[h,v]=i,[p,g]=o,m=Math.min(h,p),y=Math.max(h,p),_=Math.min(v,g),x=Math.max(v,g),S=y-m,b=x-_;return{left:m-u.current.x+"px",top:_-u.current.y+"px",width:S+"px",height:b+"px"}},[i,o]),d=h=>{h.stopPropagation();let v=!0;const p=h.pageX,g=h.pageY;a([p,g]);const m=_=>{if(!e||!v)return;let x=_.pageX,S=_.pageY;if(n){const b=x-p,w=S-g,T=Math.abs(b),L=Math.abs(w);if(e.type==="shape"){const C=w>0&&b<0||w<0&&b>0;T>L?S=C?g-b:g+b:x=C?p-w:p+w}else e.type==="line"&&(T>L?S=g:x=p)}s([x,S])},y=_=>{if(document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),_.button===2){setTimeout(()=>r(null),0);return}v=!1;const x=_.pageX,S=_.pageY,b=30;let w=x,T=S;if(n&&e){const L=x-p,C=S-g,M=Math.abs(L),A=Math.abs(C);if(e.type==="shape"){const E=C>0&&L<0||C<0&&L>0;M>A?T=E?g-L:g+L:w=E?p-C:p+C}else e.type==="line"&&(M>A?T=g:w=p)}if((e==null?void 0:e.type)==="line"&&(Math.abs(w-p)>=b||Math.abs(T-g)>=b))t({start:[p,g],end:[w,T]});else if((e==null?void 0:e.type)!=="line"&&Math.abs(w-p)>=b&&Math.abs(T-g)>=b)t({start:[p,g],end:[w,T]});else{const C=Math.min(w,p),M=Math.min(T,g),A=Math.max(w,p),E=Math.max(T,g),P=A-C>=b?A-C:200,I=E-M>=b?E-M:200;t({start:[C,M],end:[C+P,M+I]})}};document.addEventListener("mousemove",m),document.addEventListener("mouseup",y)};return D.jsx("div",{className:yc.elementCreateSelection,ref:l,onMouseDown:d,onContextMenu:h=>{h.stopPropagation(),h.preventDefault()},children:i&&o&&D.jsx("div",{className:kt(yc.selection,{[yc.line]:(e==null?void 0:e.type)==="line"}),style:f,children:(e==null?void 0:e.type)==="line"&&c&&D.jsx("svg",{overflow:"visible",width:c.svgWidth,height:c.svgHeight,children:D.jsx("path",{d:c.path,stroke:"#d14424",fill:"none",strokeWidth:"2"})})})})},l3={shapeCreateCanvas:"_shapeCreateCanvas_112bd_1"},u3=({onCreated:t,onClose:e})=>{const{ctrlOrShiftKeyActive:r}=pr(),{theme:n}=Bt(),i=N.useRef(null),a=N.useRef(!1),o=N.useRef({x:0,y:0}),[s,l]=N.useState(null),[u,c]=N.useState([]),[f,d]=N.useState(!1);N.useEffect(()=>{if(!i.current)return;const{x,y:S}=i.current.getBoundingClientRect();o.current={x,y:S}},[]);const h=(x,S=!1)=>{let b=x.pageX-o.current.x,w=x.pageY-o.current.y;if(S)return{pageX:b,pageY:w};if(r&&u.length){const[T,L]=u[u.length-1];Math.abs(T-b)-Math.abs(L-w)>0?w=L:b=T}return{pageX:b,pageY:w}},v=x=>{if(a.current){const{pageX:w,pageY:T}=h(x,!0);c(L=>[...L,[w,T]]),l(null);return}const{pageX:S,pageY:b}=h(x);if(l([S,b]),u.length>=2){const[w,T]=u[0];Math.abs(w-S)<5&&Math.abs(T-b)<5?d(!0):d(!1)}else d(!1)},p=N.useMemo(()=>{let x="";for(let S=0;S<u.length;S++){const b=u[S];S===0?x+=`M ${b[0]} ${b[1]} `:x+=`L ${b[0]} ${b[1]} `}return u.length&&s&&(x+=`L ${s[0]} ${s[1]}`),x},[u,s]),g=(x=!0)=>{const S=u.map(k=>k[0]),b=u.map(k=>k[1]),w=Math.min(...S),T=Math.min(...b),L=Math.max(...S),C=Math.max(...b),M=u.map(k=>[k[0]-w,k[1]-T]);let A="";for(let k=0;k<M.length;k++){const R=M[k];k===0?A+=`M ${R[0]} ${R[1]} `:A+=`L ${R[0]} ${R[1]} `}x&&(A+="Z");const E=[w+o.current.x,T+o.current.y],P=[L+o.current.x,C+o.current.y],I=[L-w,C-T];return{start:E,end:P,path:A,viewBox:I}},m=x=>{const{pageX:S,pageY:b}=h(x);a.current=!0,f?t(g()):c(T=>[...T,[S,b]]);const w=()=>{a.current=!1,document.removeEventListener("mouseup",w)};document.addEventListener("mouseup",w)},y=()=>{e()},_=N.useCallback(()=>{t({...g(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:n.themeColors[0],style:"solid"}}),y()},[t,n,u]);return N.useEffect(()=>{const x=S=>{const b=S.key.toUpperCase();b===me.ESC&&y(),b===me.ENTER&&_()};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[_]),D.jsx("div",{className:l3.shapeCreateCanvas,ref:i,onMouseDown:x=>{x.stopPropagation(),m(x)},onMouseMove:x=>v(x),onContextMenu:x=>{x.stopPropagation(),x.preventDefault(),y()},children:D.jsx("svg",{overflow:"visible",children:D.jsx("path",{d:p,stroke:"#d14424",fill:f?"rgba(226, 83, 77, 0.15)":"none",strokeWidth:"2"})})})},cv={mouseSelection:"_mouseSelection_13fbu_1",quadrant1:"_quadrant1_13fbu_8",quadrant2:"_quadrant2_13fbu_13",quadrant3:"_quadrant3_13fbu_18",quadrant4:"_quadrant4_13fbu_23"},c3=({top:t,left:e,width:r,height:n,quadrant:i})=>D.jsx("div",{className:kt(cv.mouseSelection,cv[`quadrant${i}`]),style:{top:t+"px",left:e+"px",width:r+"px",height:n+"px"}}),f3={multiSelectOperate:"_multiSelectOperate_17xs4_1",borderLine:"_borderLine_17xs4_5",top:"_top_17xs4_13",bottom:"_bottom_17xs4_16",left:"_left_17xs4_19",right:"_right_17xs4_22"},h3=({elementList:t,scaleMultiElement:e})=>{const{activeElementIdList:r,canvasScale:n}=Tt(),i=N.useMemo(()=>t.filter(f=>r.includes(f.id)),[t,r]),a=N.useMemo(()=>{const{minX:f,maxX:d,minY:h,maxY:v}=qd(i);return{minX:f,maxX:d,minY:h,maxY:v}},[i]),o=(a.maxX-a.minX)*n,s=(a.maxY-a.minY)*n,{resizeHandlers:l,borderLines:u}=Ji(o,s),c=N.useMemo(()=>i.some(f=>!((f.type==="image"||f.type==="shape")&&!f.rotate)),[i]);return D.jsxs("div",{className:f3.multiSelectOperate,style:{left:a.minX*n+"px",top:a.minY*n+"px"},children:[u.map(f=>D.jsx(qi,{type:f.type,style:f.style},f.type)),!c&&l.map(f=>D.jsx(li,{type:f.direction,style:f.style,onMouseDown:d=>{d.stopPropagation(),e==null||e(d,a,f.direction)}},f.direction))]})},fv=()=>{const{activeElementIdList:t,activeGroupElementId:e,setActiveElementIdList:r}=Tt(),{currentSlide:n,updateSlide:i}=Bt(),{addHistorySnapshot:a}=Be();return{deleteElement:()=>{if(!t.length||!n)return;let l=[];e?l=n.elements.filter(u=>u.id!==e):l=n.elements.filter(u=>!t.includes(u.id)),r([]),i({elements:l}),a()},deleteAllElements:()=>{!n||!n.elements.length||(r([]),i({elements:[]}),a())}}},d3=()=>{const{currentSlide:t,updateSlide:e}=Bt(),{addHistorySnapshot:r}=Be(),n=(u,c)=>({minLevel:u.findIndex(f=>f.id===c[0].id),maxLevel:u.findIndex(f=>f.id===c[c.length-1].id)}),i=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(m=>m.groupId===c.groupId),{minLevel:h,maxLevel:v}=n(u,d);if(v===u.length-1)return;const p=f[v+1],g=f.splice(h,d.length);if(p.groupId){const m=f.filter(y=>y.groupId===p.groupId);f.splice(h+m.length,0,...g)}else f.splice(h+1,0,...g)}else{const d=u.findIndex(p=>p.id===c.id);if(d===u.length-1)return;const h=f[d+1],v=f.splice(d,1)[0];if(h.groupId){const p=f.filter(g=>g.groupId===h.groupId);f.splice(d+p.length,0,v)}else f.splice(d+1,0,v)}return f},a=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(g=>g.groupId===c.groupId),{minLevel:h}=n(u,d);if(h===0)return;const v=f[h-1],p=f.splice(h,d.length);if(v.groupId){const g=f.filter(m=>m.groupId===v.groupId);f.splice(h-g.length,0,...p)}else f.splice(h-1,0,...p)}else{const d=u.findIndex(p=>p.id===c.id);if(d===0)return;const h=f[d-1],v=f.splice(d,1)[0];if(h.groupId){const p=f.filter(g=>g.groupId===h.groupId);f.splice(d-p.length,0,v)}else f.splice(d-1,0,v)}return f},o=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(g=>g.groupId===c.groupId),{minLevel:h,maxLevel:v}=n(u,d);if(v===u.length-1)return null;const p=f.splice(h,d.length);f.push(...p)}else{const d=u.findIndex(h=>h.id===c.id);if(d===u.length-1)return null;f.splice(d,1),f.push(c)}return f},s=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(p=>p.groupId===c.groupId),{minLevel:h}=n(u,d);if(h===0)return;const v=f.splice(h,d.length);f.unshift(...v)}else{const d=u.findIndex(h=>h.id===c.id);if(d===0)return;f.splice(d,1),f.unshift(c)}return f};return{orderElement:(u,c)=>{if(!t)return;let f;c===Rr.UP?f=i(t.elements,u):c===Rr.DOWN?f=a(t.elements,u):c===Rr.TOP?f=o(t.elements,u):c===Rr.BOTTOM&&(f=s(t.elements,u)),f&&(e({elements:f}),r())}}},v3=()=>{const{activeElementIdList:t}=Tt(),{currentSlide:e,viewportRatio:r,viewportSize:n,updateSlide:i}=Bt(),a=N.useMemo(()=>!e||!e.elements?[]:e.elements.filter(l=>t.includes(l.id)),[e,t]),{addHistorySnapshot:o}=Be();return{alignElementToCanvas:l=>{if(!e)return;const u=n,c=n*r,{minX:f,maxX:d,minY:h,maxY:v}=qd(a),p=JSON.parse(JSON.stringify(e.elements));for(const g of p)if(t.includes(g.id)){if(l===Ce.CENTER){const m=h+(v-h)/2-c/2,y=f+(d-f)/2-u/2;g.top=g.top-m,g.left=g.left-y}if(l===Ce.TOP){const m=h-0;g.top=g.top-m}else if(l===Ce.VERTICAL){const m=h+(v-h)/2-c/2;g.top=g.top-m}else if(l===Ce.BOTTOM){const m=v-c;g.top=g.top-m}else if(l===Ce.LEFT){const m=f-0;g.left=g.left-m}else if(l===Ce.HORIZONTAL){const m=f+(d-f)/2-u/2;g.left=g.left-m}else if(l===Ce.RIGHT){const m=d-u;g.left=g.left-m}}i({elements:p}),o()}}},p3=()=>{const{activeElementIdList:t,setEditorareaFocus:e}=Tt(),{currentSlide:r}=Bt(),n=N.useMemo(()=>!r||!r.elements?[]:r.elements.filter(c=>t.includes(c.id)),[r,t]),{pasteTextClipboardData:i}=rv(),{deleteElement:a}=fv(),o=()=>{if(!t.length)return;const c=Zd(JSON.stringify({type:"elements",data:n}));Kd(c).then(()=>{e(!0)})},s=()=>{o(),a()},l=()=>{Qd().then(c=>{i(c)}).catch(c=>console.warn(c))};return{copyElement:o,cutElement:s,pasteElement:l,quickCopyElement:()=>{o(),l()}}};var Ws,Gs=e_;if(process.env.NODE_ENV==="production")Ws=Gs.createRoot,Gs.hydrateRoot;else{var hv=Gs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ws=function(t,e){hv.usingClientEntryPoint=!0;try{return Gs.createRoot(t,e)}finally{hv.usingClientEntryPoint=!1}}}const dv=({menus:t,handleClickMenuItem:e})=>D.jsx("ul",{className:"menu-content",children:t.map((r,n)=>r.hide?null:D.jsx("li",{className:kt("menu-item",{divider:r.divider,disable:r.disable}),onClick:i=>{i.stopPropagation(),e(r)},children:!r.divider&&D.jsxs("div",{className:kt("menu-item-content",{"has-children":r.children&&r.children.length>0,"has-handler":!!r.handler}),children:[D.jsx("span",{className:"text",children:r.text}),r.subText&&(!r.children||r.children.length===0)&&D.jsx("span",{className:"sub-text",children:r.subText}),r.children&&r.children.length>0&&D.jsx("div",{className:"sub-menu",children:D.jsx(dv,{menus:r.children,handleClickMenuItem:e})})]})},r.text||n))}),vv=({axis:t,el:e,menus:r,removeContextmenu:n})=>{const i=N.useMemo(()=>{const{x:c,y:f}=t,d=r.filter(y=>!(y.divider||y.hide)).length,h=r.filter(y=>y.divider).length,v=180,p=d*30+h*11+5*2,g=document.body.clientWidth,m=document.body.clientHeight;return{left:g<=c+v?c-v:c,top:m<=f+p?f-p:f}},[t,r]),a=o=>{o.disable||o.children&&!o.handler||(o.handler&&o.handler(e),n())};return D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"contextmenu-mask",onContextMenu:o=>{o.preventDefault(),n()},onMouseDown:o=>{o.button===0&&n()}}),D.jsx("div",{className:"contextmenu",style:{left:i.left,top:i.top},onContextMenu:o=>o.preventDefault(),children:D.jsx(dv,{menus:r,handleClickMenuItem:a})})]})};function Xr(t,e,r=!0){N.useEffect(()=>{if(!r)return;const n=t.current;if(!n)return;const i=a=>{const o=a;o.preventDefault(),o.stopPropagation();const s=typeof e=="function"?e(n):e;if(!s||s.length===0)return;const l=document.getElementById("global-contextmenu-container");l&&document.body.removeChild(l);const u=document.createElement("div");u.id="global-contextmenu-container",document.body.appendChild(u);const c=Ws(u),f=()=>{setTimeout(()=>{c.unmount(),document.body.contains(u)&&document.body.removeChild(u),n.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",f),window.removeEventListener("resize",f)},0)};c.render(D.jsx(vv,{axis:{x:o.clientX,y:o.clientY},el:n,menus:s,removeContextmenu:f})),n.classList.add("contextmenu-active"),document.body.addEventListener("scroll",f),window.addEventListener("resize",f)};return n.addEventListener("contextmenu",i),()=>{n.removeEventListener("contextmenu",i)}},[t,e,r])}const Ln=t=>({shadowStyle:N.useMemo(()=>{if(t){const{h:r,v:n,blur:i,color:a}=t;return`${r}px ${n}px ${i}px ${a}`}return""},[t])}),js=(t,e)=>({flipStyle:N.useMemo(()=>{let n="";return t&&e?n="rotateX(180deg) rotateY(180deg)":e?n="rotateX(180deg)":t&&(n="rotateY(180deg)"),n},[t,e])});var pv=(t=>(t.RECT="rect",t.ELLIPSE="ellipse",t.POLYGON="polygon",t))(pv||{});const gv={rect:{name:"矩形",type:"rect",radius:"0",style:""},rect2:{name:"矩形2",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(t,e)=>`M 0 0 L ${t*.8} 0 L ${t} ${e*.2} L ${t} ${e} L 0 ${e} Z`},rect3:{name:"矩形3",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(t,e)=>`M 0 0 L ${t*.8} 0 L ${t} ${e*.2} L ${t} ${e} L ${t*.2} ${e} L 0 ${e*.8} Z`},roundRect:{name:"圆角矩形",type:"rect",radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",type:"ellipse",style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:"polygon",style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(t,e)=>`M ${t*.5} 0 L 0 ${e} L ${t} ${e} Z`},triangle2:{name:"三角形2",type:"polygon",style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(t,e)=>`M ${t*.5} ${e} L 0 0 L ${t} 0 Z`},triangle3:{name:"三角形3",type:"polygon",style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(t,e)=>`M 0 0 L 0 ${e} L ${t} ${e} Z`},rhombus:{name:"菱形",type:"polygon",style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t} ${e*.5} L ${t*.5} ${e} L 0 ${e*.5} Z`},pentagon:{name:"五边形",type:"polygon",style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t} ${.38*e} L ${.82*t} ${e} L ${.18*t} ${e} L 0 ${.38*e} Z`},hexagon:{name:"六边形",type:"polygon",style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(t,e)=>`M ${t*.2} 0 L ${t*.8} 0 L ${t} ${e*.5} L ${t*.8} ${e} L ${t*.2} ${e} L 0 ${e*.5} Z`},heptagon:{name:"七边形",type:"polygon",style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t*.9} ${e*.2} L ${t} ${e*.6} L ${t*.75} ${e} L ${t*.25} ${e} L 0 ${e*.6} L ${t*.1} ${e*.2} Z`},octagon:{name:"八边形",type:"polygon",style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(t,e)=>`M ${t*.3} 0 L ${t*.7} 0 L ${t} ${e*.3} L ${t} ${e*.7} L ${t*.7} ${e} L ${t*.3} ${e} L 0 ${e*.7} L 0 ${e*.3} Z`},chevron:{name:"V形",type:"polygon",style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(t,e)=>`M ${t*.75} 0 L ${t} ${e*.5} L ${t*.75} ${e} L 0 ${e} L ${t*.25} ${e*.5} L 0 0 Z`},point:{name:"点",type:"polygon",style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(t,e)=>`M 0 0 L ${t*.75} 0 L ${t} ${e*.5} L ${t*.75} ${e} L 0 ${e} Z`},arrow:{name:"箭头",type:"polygon",style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(t,e)=>`M 0 ${e*.2} L ${t*.6} ${e*.2} L ${t*.6} 0 L ${t} ${e*.5} L ${t*.6} ${e} L ${t*.6} ${e*.8} L 0 ${e*.8} Z`},parallelogram:{name:"平行四边形",type:"polygon",style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(t,e)=>`M ${t*.3} 0 L ${t} 0 L ${t*.7} ${e} L 0 ${e} Z`},parallelogram2:{name:"平行四边形2",type:"polygon",style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(t,e)=>`M ${t*.3} ${e} L ${t} ${e} L ${t*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:"polygon",style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(t,e)=>`M ${t*.25} 0 L ${t*.75} 0 L ${t} ${e} L 0 ${e} Z`},trapezoid2:{name:"梯形2",type:"polygon",style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(t,e)=>`M 0 0 L ${t} 0 L ${t*.75} ${e} L ${t*.25} ${e} Z`}},_c=t=>{const e=N.useMemo(()=>{let n=gv.rect;if(t.clip){const i=t.clip.shape||pv.RECT;n=gv[i]}return n.radius!==void 0&&t.radius&&(n={...n,radius:`${t.radius}px`,style:`inset(0 round ${t.radius}px)`}),n},[t.clip,t.radius]),r=N.useMemo(()=>{if(!t.clip)return{top:"0",left:"0",width:"100%",height:"100%"};const[n,i]=t.clip.range,a=(i[0]-n[0])/100,o=(i[1]-n[1])/100,s=n[0]/a,l=n[1]/o;return{left:-s+"%",top:-l+"%",width:100/a+"%",height:100/o+"%"}},[t.clip]);return{clipShape:e,imgPosition:r}},mv=t=>({filter:N.useMemo(()=>{if(!t)return"";let r="";const n=Object.keys(t);for(const i of n)r+=`${i}(${t[i]}) `;return r},[t])}),ta=t=>{const{canvasScale:e}=Tt(),r=N.useMemo(()=>t!=null&&t.width?t.width*e:0,[t==null?void 0:t.width,e]),n=N.useMemo(()=>(t==null?void 0:t.color)||"#d14424",[t==null?void 0:t.color]),i=N.useMemo(()=>(t==null?void 0:t.style)||"solid",[t==null?void 0:t.style]),a=N.useMemo(()=>{const o=r;return i==="dashed"?o<=6?`${o*4.5} ${o*2}`:`${o*4} ${o*1.5}`:i==="dotted"?o<=6?`${o*1.8} ${o*1.6}`:`${o*1.5} ${o*1.2}`:"0 0"},[t==null?void 0:t.style]);return{outlineWidth:r,outlineColor:n,strokeDashArray:a}},g3={imageRectOutlineSvg:"_imageRectOutlineSvg_y1xie_1"},m3=({width:t,height:e,outline:r,radius:n="0"})=>{const{outlineWidth:i,outlineColor:a,strokeDashArray:o}=ta(r);return r?D.jsx("svg",{className:g3.imageRectOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("rect",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",rx:n,ry:n,width:t,height:e,stroke:a,strokeWidth:i,strokeDasharray:o})}):null},y3={imageEllipseOutlineSvg:"_imageEllipseOutlineSvg_qmj4q_1"},_3=({width:t,height:e,outline:r})=>{const{outlineWidth:n,outlineColor:i,strokeDashArray:a}=ta(r);return r?D.jsx("svg",{className:y3.imageEllipseOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("ellipse",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:8,fill:"transparent",cx:t/2,cy:e/2,rx:t/2,ry:e/2,stroke:i,strokeWidth:n,strokeDasharray:a})}):null},x3={imagePolygonOutlineSvg:"_imagePolygonOutlineSvg_1jxdb_1"},b3=({width:t,height:e,createPath:r,outline:n})=>{const{outlineWidth:i,outlineColor:a,strokeDashArray:o}=ta(n);return n?D.jsx("svg",{className:x3.imagePolygonOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",d:r(t,e),stroke:a,strokeWidth:i,strokeDasharray:o})}):null},yv=({elementInfo:t})=>{const{clipShape:e}=_c(t);return e.type==="rect"?D.jsx(m3,{width:t.width,height:t.height,radius:e.radius,outline:t.outline}):e.type==="ellipse"?D.jsx(_3,{width:t.width,height:t.height,outline:t.outline}):e.type==="polygon"&&e.createPath?D.jsx(b3,{width:t.width,height:t.height,outline:t.outline,createPath:e.createPath}):null},Pe={imageClipHandler:"_imageClipHandler_1vtws_1",bottomImg:"_bottomImg_1vtws_6",topImageContent:"_topImageContent_1vtws_17",operate:"_operate_1vtws_25",clipPoint:"_clipPoint_1vtws_34",leftTop:"_leftTop_1vtws_42",rightTop:"_rightTop_1vtws_46",leftBottom:"_leftBottom_1vtws_52",rightBottom:"_rightBottom_1vtws_58",top:"_top_1vtws_17",bottom:"_bottom_1vtws_6",left:"_left_1vtws_42",right:"_right_1vtws_46",rotate0:"_rotate0_1vtws_87",rotate45:"_rotate45_1vtws_87",rotate90:"_rotate90_1vtws_87",rotate135:"_rotate135_1vtws_87"},S3=(t,e)=>{N.useEffect(()=>{const r=n=>{!t.current||t.current.contains(n.target)||e()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[t,e])},w3=({src:t,clipPath:e,width:r,height:n,rotate:i,clipData:a,onClip:o})=>{const{canvasScale:s}=Tt(),{ctrlOrShiftKeyActive:l}=pr(),[u,c]=N.useState({top:"0%",left:"0%"}),f=N.useRef(!1),d=N.useRef(null),h=N.useRef(null),v=N.useCallback(()=>{const[E,P]=a?a.range:[[0,0],[100,100]],I=(P[0]-E[0])/100,k=(P[1]-E[1])/100,R=E[0]/I,H=E[1]/k;return{widthScale:I,heightScale:k,left:R,top:H}},[a]),p=N.useMemo(()=>{const{widthScale:E,heightScale:P,left:I,top:k}=v();return{left:-I,top:-k,width:100/E,height:100/P}},[v]),g=N.useMemo(()=>({top:p.top+"%",left:p.left+"%",width:p.width+"%",height:p.height+"%"}),[p]),[m,y]=N.useState({top:0,left:0,width:0,height:0}),_=N.useMemo(()=>{const{top:E,left:P,width:I,height:k}=m;return{top:E+"%",left:P+"%",width:I+"%",height:k+"%"}},[m]),x=N.useMemo(()=>{const E=p.width,P=p.height,{top:I,left:k,width:R,height:H}=m;return R===0||H===0?{}:{left:-k*(100/R)+"%",top:-I*(100/H)+"%",width:E/R*100+"%",height:P/H*100+"%"}},[p,m]);N.useEffect(()=>{const{left:E,top:P}=v();y({left:E,top:P,width:100,height:100}),c({top:-P+"%",left:-E+"%"})},[v]);const S=N.useCallback(()=>{const E=p.width,P=p.height,{top:I,left:k,width:R,height:H}=m;if(R===0||H===0)return;const B=-k*(100/R),F=-I*(100/H),O=E/R*100,G=P/H*100,j={left:B,top:F,width:O,height:G},Y=100/j.width,et=100/j.height,ft=[-j.left*Y,-j.top*et],gt=[Y*100+ft[0],et*100+ft[1]];d.current=[ft,gt]},[p,m]),b=N.useCallback(()=>{if(f.current)return;if(d.current||S(),!d.current){o(null);return}const{left:E,top:P}=v(),I={left:(m.left-E)/100*r,top:(m.top-P)/100*n,width:(m.width-100)/100*r,height:(m.height-100)/100*n},k={range:d.current,position:I};o(k)},[v,m,r,n,o,S]);S3(h,b),N.useEffect(()=>{const E=P=>{P.key.toUpperCase()===me.ENTER&&b()};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[b]);const w=E=>{E.stopPropagation(),f.current=!0;let P=!0;const I=E.pageX,k=E.pageY,R=p,H={...m},B=O=>{if(!P)return;const G=O.pageX,j=O.pageY,Y=(G-I)/s,et=(j-k)/s,ft=Math.sqrt(Y*Y+et*et),$=Math.atan2(et,Y)-i/180*Math.PI,U=ft*Math.cos($)/r*100,q=ft*Math.sin($)/n*100;let tt=H.left+U,nt=H.top+q;tt<0?tt=0:tt+H.width>R.width&&(tt=R.width-H.width),nt<0?nt=0:nt+H.height>R.height&&(nt=R.height-H.height),y({...H,left:tt,top:nt,width:H.width,height:H.height})},F=()=>{P=!1,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",F),S(),setTimeout(()=>{f.current=!1},0)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",F)},T=(E,P)=>{E.stopPropagation(),f.current=!0;let I=!0;const k=50/r*100,R=50/n*100,H=E.pageX,B=E.pageY,F=p,O={...m},G=m.width/m.height,j=et=>{if(!I)return;const ft=et.pageX,gt=et.pageY,$=(ft-H)/s,U=(gt-B)/s,q=Math.sqrt($*$+U*U),nt=Math.atan2(U,$)-i/180*Math.PI;let at=q*Math.cos(nt)/r*100,st=q*Math.sin(nt)/n*100;l&&((P===it.RIGHT_BOTTOM||P===it.LEFT_TOP)&&(st=at/G),(P===it.LEFT_BOTTOM||P===it.RIGHT_TOP)&&(st=-at/G));let Et=O.left,K=O.top,J=O.width,_t=O.height;P===it.LEFT_TOP?(O.left+at<0&&(at=-O.left),O.top+st<0&&(st=-O.top),O.width-at<k&&(at=O.width-k),O.height-st<R&&(st=O.height-R),J=O.width-at,_t=O.height-st,Et=O.left+at,K=O.top+st):P===it.RIGHT_TOP?(O.left+O.width+at>F.width&&(at=F.width-(O.left+O.width)),O.top+st<0&&(st=-O.top),O.width+at<k&&(at=k-O.width),O.height-st<R&&(st=O.height-R),J=O.width+at,_t=O.height-st,Et=O.left,K=O.top+st):P===it.LEFT_BOTTOM?(O.left+at<0&&(at=-O.left),O.top+O.height+st>F.height&&(st=F.height-(O.top+O.height)),O.width-at<k&&(at=O.width-k),O.height+st<R&&(st=R-O.height),J=O.width-at,_t=O.height+st,Et=O.left+at,K=O.top):P===it.RIGHT_BOTTOM?(O.left+O.width+at>F.width&&(at=F.width-(O.left+O.width)),O.top+O.height+st>F.height&&(st=F.height-(O.top+O.height)),O.width+at<k&&(at=k-O.width),O.height+st<R&&(st=R-O.height),J=O.width+at,_t=O.height+st,Et=O.left,K=O.top):P===it.TOP?(O.top+st<0&&(st=-O.top),O.height-st<R&&(st=O.height-R),J=O.width,_t=O.height-st,Et=O.left,K=O.top+st):P===it.BOTTOM?(O.top+O.height+st>F.height&&(st=F.height-(O.top+O.height)),O.height+st<R&&(st=R-O.height),J=O.width,_t=O.height+st,Et=O.left,K=O.top):P===it.LEFT?(O.left+at<0&&(at=-O.left),O.width-at<k&&(at=O.width-k),J=O.width-at,_t=O.height,Et=O.left+at,K=O.top):(O.left+O.width+at>F.width&&(at=F.width-(O.left+O.width)),O.width+at<k&&(at=k-O.width),_t=O.height,J=O.width+at,Et=O.left,K=O.top),y({left:Et,top:K,width:J,height:_t})},Y=()=>{I=!1,document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",Y),S(),setTimeout(()=>f.current=!1,0)};document.addEventListener("mousemove",j),document.addEventListener("mouseup",Y)},L=N.useMemo(()=>{const E="rotate",P=i;return P>-22.5&&P<=22.5?E+0:P>22.5&&P<=67.5?E+45:P>67.5&&P<=112.5?E+90:P>112.5&&P<=157.5?E+135:P>157.5||P<=-157.5?E+0:P>-157.5&&P<=-112.5?E+45:P>-112.5&&P<=-67.5?E+90:P>-67.5&&P<=-22.5?E+135:E+0},[i]),C=[it.LEFT_TOP,it.RIGHT_TOP,it.LEFT_BOTTOM,it.RIGHT_BOTTOM],M=[it.TOP,it.BOTTOM,it.LEFT,it.RIGHT],A={[it.LEFT_TOP]:Pe.leftTop,[it.TOP]:Pe.top,[it.RIGHT_TOP]:Pe.rightTop,[it.LEFT]:Pe.left,[it.RIGHT]:Pe.right,[it.LEFT_BOTTOM]:Pe.leftBottom,[it.BOTTOM]:Pe.bottom,[it.RIGHT_BOTTOM]:Pe.rightBottom};return D.jsxs("div",{className:Pe.imageClipHandler,style:u,ref:h,children:[D.jsx("img",{className:Pe.bottomImg,src:t,draggable:!1,alt:"",style:g}),D.jsx("div",{className:Pe.topImageContent,style:{..._,clipPath:e},children:D.jsx("img",{className:Pe.topImg,src:t,draggable:!1,alt:"",style:x})}),D.jsxs("div",{className:Pe.operate,style:_,onMouseDown:w,children:[C.map(E=>D.jsx("div",{className:kt(Pe.clipPoint,A[E],Pe[L]),onMouseDown:P=>T(P,E),children:D.jsx("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333",children:D.jsx("path",{strokeWidth:"0.3",shapeRendering:"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})})},E)),M.map(E=>D.jsx("div",{className:kt(Pe.clipPoint,A[E],Pe[L]),onMouseDown:P=>T(P,E),children:D.jsx("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333",children:D.jsx("path",{strokeWidth:"0.3",shapeRendering:"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})})},E))]})]})},so={editableElementImage:"_editableElementImage_1jzf6_1",rotateWrapper:"_rotateWrapper_1jzf6_5",elementContent:"_elementContent_1jzf6_10",imageContent:"_imageContent_1jzf6_16",colorMask:"_colorMask_1jzf6_26"},T3=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=N.useRef(null),{clipingImageElementId:i,setClipingImageElementId:a}=Tt(),{updateElement:o}=Bt(),{addHistorySnapshot:s}=Be(),l=N.useMemo(()=>i===t.id,[i,t.id]),{shadowStyle:u}=Ln(t.shadow),{flipStyle:c}=js(t.flipH,t.flipV),{clipShape:f,imgPosition:d}=_c(t),{filter:h}=mv(t.filters),v=g=>{g.stopPropagation(),e==null||e(g.nativeEvent,t)},p=g=>{if(a(""),!g)return;const{range:m,position:y}=g,_=t.clip||{shape:"rect",range:[[0,0],[100,100]]},x=t.left+y.left,S=t.top+y.top,b=t.width+y.width,w=t.height+y.height;let T=0,L=0;if(t.rotate){const M=x+b/2-(t.left+t.width/2),A=-(S+w/2-(t.top+t.height/2)),E=-t.rotate*Math.PI/180,P=M*Math.cos(E)-A*Math.sin(E),I=M*Math.sin(E)+A*Math.cos(E);T=P-M,L=-(I-A)}const C={clip:{..._,range:m},left:x+T,top:S+L,width:b,height:w};o({id:t.id,props:C}),s()};return Xr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:so.editableElementImage,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:so.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:l?D.jsx(w3,{src:t.src,clipData:t.clip,width:t.width,height:t.height,top:t.top,left:t.left,rotate:t.rotate,clipPath:f.style,onClip:g=>p(g)}):D.jsxs("div",{ref:n,className:so.elementContent,style:{filter:u?`drop-shadow(${u})`:"",transform:c},onMouseDown:v,onTouchStart:v,children:[D.jsx(yv,{elementInfo:t}),D.jsxs("div",{className:so.imageContent,style:{clipPath:f.style},children:[D.jsx("img",{src:t.src,draggable:!1,style:{top:d.top,left:d.left,width:d.width,height:d.height,filter:h},onDragStart:g=>g.preventDefault(),alt:""}),t.colorMask&&D.jsx("div",{className:so.colorMask,style:{backgroundColor:t.colorMask}})]})]})})})},L3={elementOutlineSvg:"_elementOutlineSvg_1jkv6_1"},Xs=({width:t,height:e,outline:r})=>{const{outlineWidth:n,outlineColor:i,strokeDashArray:a}=ta(r);return r?D.jsx("svg",{className:L3.elementOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",d:`M0,0 L${t},0 L${t},${e} L0,${e} Z`,stroke:i,strokeWidth:n,strokeDasharray:a})}):null},M3=t=>{const e={},r=(n,i)=>e[n]=i;return r("Alt-ArrowUp",ee.joinUp),r("Alt-ArrowDown",ee.joinDown),r("Mod-z",hc.undo),r("Mod-y",hc.redo),r("Backspace",jr.undoInputRule),r("Escape",ee.selectParentNode),r("Mod-b",ee.toggleMark(t.marks.strong)),r("Mod-i",ee.toggleMark(t.marks.em)),r("Mod-u",ee.toggleMark(t.marks.underline)),r("Mod-d",ee.toggleMark(t.marks.strikethrough)),r("Mod-e",ee.toggleMark(t.marks.code)),r("Mod-;",ee.toggleMark(t.marks.superscript)),r("Mod-'",ee.toggleMark(t.marks.subscript)),r("Enter",ee.chainCommands(oi.splitListItem(t.nodes.list_item),ee.newlineInCode,ee.createParagraphNear,ee.liftEmptyBlock,ee.splitBlockKeepMarks)),r("Mod-[",oi.liftListItem(t.nodes.list_item)),r("Mod-]",oi.sinkListItem(t.nodes.list_item)),r("Tab",oi.sinkListItem(t.nodes.list_item)),e},C3=t=>jr.wrappingInputRule(/^\s*>\s$/,t),E3=t=>jr.wrappingInputRule(/^(\d+)\.\s$/,t,e=>({order:+e[1]}),(e,r)=>r.childCount+r.attrs.order===+e[1]),D3=t=>jr.wrappingInputRule(/^\s*([-+*])\s$/,t),A3=()=>{const t=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new jr.InputRule(t,(e,r,n,i)=>{const{schema:a}=e,o=e.tr.insertText(`${r[2]} `,n,i),s=a.marks.code.create();return o.addMark(n,n+r[2].length,s)})},P3=()=>{const t=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new jr.InputRule(t,(e,r,n,i)=>{const{schema:a}=e,o=e.tr.insertText(r[0],n,i),s=a.marks.link.create({href:r[0],title:r[0]});return o.addMark(n,n+r[0].length,s)})},R3=t=>{const e=[...jr.smartQuotes,jr.ellipsis,jr.emDash];return e.push(C3(t.nodes.blockquote)),e.push(E3(t.nodes.ordered_list)),e.push(D3(t.nodes.bullet_list)),e.push(A3()),e.push(P3()),jr.inputRules({rules:e})},k3=(t,e)=>[R3(t),Vd.keymap(M3(t)),Vd.keymap(ee.baseKeymap),n_.dropCursor(),i_.gapCursor(),hc.history()],N3={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:t=>{const r={order:+((t.hasAttribute("start")?t.getAttribute("start"):1)||1)},{listStyleType:n,fontSize:i,color:a}=t.style;return n&&(r.listStyleType=n),i&&(r.fontsize=i),a&&(r.color=a),r}}],toDOM:t=>{const{order:e,listStyleType:r,fontsize:n,color:i}=t.attrs;let a="";r&&(a+=`list-style-type: ${r};`),n&&(a+=`font-size: ${n};`),i&&(a+=`color: ${i};`);const o={style:a};return e!==1&&(o.start=e),["ol",o,0]}},O3={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:t=>{const e={},{listStyleType:r,fontSize:n,color:i}=t.style;return r&&(e.listStyleType=r),n&&(e.fontsize=n),i&&(e.color=i),e}}],toDOM:t=>{const{listStyleType:e,fontsize:r,color:n}=t.attrs;let i="";return e&&(i+=`list-style-type: ${e};`),r&&(i+=`font-size: ${r};`),n&&(i+=`color: ${n};`),["ul",{style:i},0]}},I3={...oi.listItem,content:"paragraph block*",group:"block"},B3={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:t=>{const{textAlign:e,textIndent:r}=t.style;let n=t.getAttribute("align")||e||"";n=/(left|right|center|justify)/.test(n)?n:"";let i=0;r&&(/em/.test(r)?i=parseInt(r):/px/.test(r)&&(i=Math.floor(parseInt(r)/16),i||(i=1)));const a=+(t.getAttribute("data-indent")||0);return{align:n,indent:a,textIndent:i}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:t=>{const{align:e,indent:r,textIndent:n}=t.attrs;let i="";e&&e!=="left"&&(i+=`text-align: ${e};`),n&&(i+=`text-indent: ${n}em;`);const a={style:i};return r&&(a["data-indent"]=r),["p",a,0]}},{doc:V3,blockquote:z3,text:F3}=zd.nodes,H3={doc:V3,paragraph:B3,blockquote:z3,text:F3,ordered_list:N3,bullet_list:O3,list_item:I3},W3={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:t=>t==="sub"&&null}],toDOM:()=>["sub",0]},G3={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:t=>t==="super"&&null}],toDOM:()=>["sup",0]},j3={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:t=>t==="line-through"&&null},{style:"text-decoration-line",getAttrs:t=>t==="line-through"&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},X3={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:t=>t==="underline"&&null},{style:"text-decoration-line",getAttrs:t=>t==="underline"&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},Y3={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:t=>t?{color:t}:{}}],toDOM:t=>{const{color:e}=t.attrs;let r="";return e&&(r+=`color: ${e};`),["span",{style:r},0]}},U3={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:t=>t?{backcolor:t}:{}}],toDOM:t=>{const{backcolor:e}=t.attrs;let r="";return e&&(r+=`background-color: ${e};`),["span",{style:r},0]}},$3={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:t=>t?{fontsize:t}:{}}],toDOM:t=>{const{fontsize:e}=t.attrs;let r="";return e&&(r+=`font-size: ${e};`),["span",{style:r},0]}},Z3={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:t=>({fontname:t&&typeof t=="string"?t.replace(/[\"\']/g,""):""})}],toDOM:t=>{const{fontname:e}=t.attrs;let r="";return e&&(r+=`font-family: ${e};`),["span",{style:r},0]}},K3={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href"),r=t.getAttribute("title");return{href:e,title:r}}}],toDOM:t=>["a",t.attrs,0]},Q3={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:t=>({index:t.dataset.index})}],toDOM:t=>["mark",{"data-index":t.attrs.index},0]},{em:J3,strong:q3,code:t7}=zd.marks,e7={em:J3,strong:q3,fontsize:$3,fontname:Z3,code:t7,forecolor:Y3,backcolor:U3,subscript:W3,superscript:G3,strikethrough:j3,underline:X3,link:K3,mark:Q3},r7=H3,n7=e7,_v=new Bd.Schema({nodes:r7,marks:n7}),xv=t=>{const e=`<div>${t}</div>`,n=new window.DOMParser().parseFromString(e,"text/html").body.firstElementChild;return Bd.DOMParser.fromSchema(_v).parse(n)},i7=(t,e,r,n)=>new r_.EditorView(t,{state:fc.EditorState.create({doc:xv(e),plugins:k3(_v)}),...r});var ui=(t=>(t.RICH_TEXT_COMMAND="RICH_TEXT_COMMAND",t.SYNC_RICH_TEXT_ATTRS_TO_STORE="SYNC_RICH_TEXT_ATTRS_TO_STORE",t.OPEN_CHART_DATA_EDITOR="OPEN_CHART_DATA_EDITOR",t.OPEN_LATEX_EDITOR="OPEN_LATEX_EDITOR",t))(ui||{});const ea=a_(),a7=(t,e,r)=>{const{selection:n,doc:i}=t;if(!n||!i)return t;const{from:a,to:o}=n,{nodes:s}=e,l=s.blockquote,u=s.list_item,c=s.paragraph,f=[];r=r||"";const d=new Set([l,u,c]);return i.nodesBetween(a,o,(h,v)=>{const p=h.type;return(h.attrs.align||"")!==r&&d.has(p)&&f.push({node:h,pos:v,nodeType:p}),!0}),f.length&&f.forEach(h=>{const{node:v,pos:p,nodeType:g}=h;let{attrs:m}=v;r?m={...m,align:r}:m={...m,align:null},t=t.setNodeMarkup(p,g,m,v.marks)}),t},o7=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=a7(r.tr.setSelection(i),n,e);t.dispatch(a)};function s7(t,e,r,n){if(!t.doc)return t;const i=t.doc.nodeAt(e);if(!i)return t;const a=0,o=8;let s=(i.attrs[n]||0)+r;if(s<a&&(s=a),s>o&&(s=o),s===i.attrs[n])return t;const l={...i.attrs,[n]:s};return t.setNodeMarkup(e,i.type,l,i.marks)}const bv=(t,e,r,n)=>{const{selection:i,doc:a}=t;if(!i||!a||!(i instanceof fc.TextSelection||i instanceof fc.AllSelection))return t;const{from:o,to:s}=i;return a.nodesBetween(o,s,(l,u)=>{const c=l.type;return c.name==="paragraph"||c.name==="blockquote"?(t=s7(t,u,r,n),!1):!Bs(l,e)}),t},l7=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=bv(r.tr.setSelection(i),n,e,"indent");return a.docChanged?(t.dispatch(a),!0):!1},u7=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=bv(r.tr.setSelection(i),n,e,"textIndent");return a.docChanged?(t.dispatch(a),!0):!1},Sv=(t,e,r,n={})=>(i,a)=>{const{schema:o,selection:s}=i,{$from:l,$to:u}=s,c=l.blockRange(u);if(!c)return!1;const f=Wd(h=>Bs(h,o))(s);if(c.depth>=1&&f&&c.depth-f.depth<=1){if(f.node.type===t&&!r)return oi.liftListItem(e)(i,a);if(Bs(f.node,o)&&t.validContent(f.node.content)){const{tr:h}=i,v={...f.node.attrs,...n};return r&&(v.listStyleType=r),h.setNodeMarkup(f.pos,t,v),a&&a(h),!1}}const d={...n};return r&&(d.listStyleType=r),oi.wrapInList(t,d)(i,a)},lo=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=r.tr.setSelection(i),{doc:o}=a;if(!o)return a;const{from:s,to:l}=i;o.nodesBetween(s,l,(u,c)=>{if(Bs(u,n)&&s-3<=c&&l+3>=c+u.nodeSize){const f=Array.isArray(e)?e:[e];for(const d of f)a.setNodeAttribute(c,d.key,d.value)}return!1}),t.dispatch(a)},c7=(t,e)=>{const{state:r}=t,{schema:n,doc:i}=r;let a=[],o=n.nodes.paragraph;if(i.content.size>2){const c=i.resolve(1);a=[...c.marks()],o=c.parent.type}const l=e.split(`
|
|
32
|
-
`).map(c=>{if(c.trim()==="")return o.create();const f=n.text(c,a);return o.create(null,f)}),u=r.tr;u.replaceWith(0,i.content.size,l),t.dispatch(u)},wv={prosemirrorEditor:"_prosemirrorEditor_461xq_1",formatPainter:"_formatPainter_461xq_5"},Tv=N.forwardRef(({elementId:t,defaultColor:e,defaultFontName:r,value:n,editable:i=!1,autoFocus:a=!1,style:o,onUpdate:s,onFocus:l,onBlur:u,onMouseDown:c,className:f},d)=>{const h=N.useRef(null),v=N.useRef(null),{handleElementId:p,textFormatPainter:g,richTextAttrs:m,activeElementIdList:y,setDisableHotkeysState:_,setRichtextAttrs:x,setTextFormatPainter:S}=Tt(),{ctrlOrShiftKeyActive:b}=pr();N.useImperativeHandle(d,()=>({focus:()=>{var I;return(I=v.current)==null?void 0:I.focus()}}));const w=N.useCallback(Ar.debounce((I=!1)=>{if(!v.current)return;const k=v.current.dom.innerHTML;n.replace(/ style=""/g,"")!==k.replace(/ style=""/g,"")&&(s==null||s({value:k,ignore:I}))},300,{trailing:!0}),[n,s]),T=N.useCallback(()=>{(!b||y.length<=1)&&_(!0),l==null||l()},[b,y,_,l]),L=N.useCallback(()=>{_(!1),u==null||u()},[_,u]),C=N.useCallback(Ar.debounce(()=>{if(!v.current)return;const I=p_(v.current,{color:e,fontname:r});x(I)},30,{trailing:!0}),[e,r,x]),M=N.useCallback((I,k)=>{const{ctrlKey:R,shiftKey:H,metaKey:B}=k,F=R||H||B,O=k.key.toUpperCase(),G=F&&(O===me.Z||O===me.Y);w(G),C()},[w,C]),A=N.useCallback(()=>{if(!g)return;const{keep:I,...k}=g,R=[{command:"clear"}];for(const H of Object.keys(k)){const B=H,F=g[H];F===!0?R.push({command:B}):F&&R.push({command:B,value:F})}E({action:R}),I||S(null)},[g,S]);N.useEffect(()=>{if(!h.current)return;const I=i7(h.current,n,{handleDOMEvents:{focus:T,blur:L,keydown:M,click:C,mouseup:A},editable:()=>i});return v.current=I,a&&I.focus(),()=>{I.destroy(),v.current=null}},[]),N.useEffect(()=>{if(!v.current||v.current.hasFocus())return;const{doc:I,tr:k}=v.current.state;v.current.dispatch(k.replaceRangeWith(0,I.content.size,xv(n)))},[n]),N.useEffect(()=>{v.current&&v.current.setProps({editable:()=>i})},[i]);const E=N.useCallback(({target:I,action:k})=>{const R=v.current;if(!R||!I&&p!==t||I&&I!==t)return;const H="command"in k?[k]:k;for(const B of H)if(B.command==="fontname"&&B.value!==void 0){const F=R.state.schema.marks.fontname.create({fontname:B.value});vr(R),Tn(R,F),B.value&&!document.fonts.check(`16px ${B.value}`)&&console.warn("字体需要等待加载下载后生效,请稍等")}else if(B.command==="fontsize"&&B.value){const F=R.state.schema.marks.fontsize.create({fontsize:B.value});vr(R),Tn(R,F),lo(R,{key:"fontsize",value:B.value})}else if(B.command==="fontsize-add"){const F=B.value?+B.value:2;vr(R);const O=Yd(R)+F+"px",G=R.state.schema.marks.fontsize.create({fontsize:O});Tn(R,G),lo(R,{key:"fontsize",value:O})}else if(B.command==="fontsize-reduce"){const F=B.value?+B.value:2;vr(R);let O=Yd(R)-F;O<12&&(O=12);const G=R.state.schema.marks.fontsize.create({fontsize:O+"px"});Tn(R,G),lo(R,{key:"fontsize",value:O+"px"})}else if(B.command==="color"&&B.value){const F=R.state.schema.marks.forecolor.create({color:B.value});vr(R),Tn(R,F),lo(R,{key:"color",value:B.value})}else if(B.command==="backcolor"&&B.value){const F=R.state.schema.marks.backcolor.create({backcolor:B.value});vr(R),Tn(R,F)}else if(B.command==="bold")vr(R),ee.toggleMark(R.state.schema.marks.strong)(R.state,R.dispatch);else if(B.command==="em")vr(R),ee.toggleMark(R.state.schema.marks.em)(R.state,R.dispatch);else if(B.command==="underline")vr(R),ee.toggleMark(R.state.schema.marks.underline)(R.state,R.dispatch);else if(B.command==="strikethrough")vr(R),ee.toggleMark(R.state.schema.marks.strikethrough)(R.state,R.dispatch);else if(B.command==="subscript")ee.toggleMark(R.state.schema.marks.subscript)(R.state,R.dispatch);else if(B.command==="superscript")ee.toggleMark(R.state.schema.marks.superscript)(R.state,R.dispatch);else if(B.command==="blockquote")Vs("blockquote",R.state)?ee.lift(R.state,R.dispatch):ee.wrapIn(R.state.schema.nodes.blockquote)(R.state,R.dispatch);else if(B.command==="code")ee.toggleMark(R.state.schema.marks.code)(R.state,R.dispatch);else if(B.command==="align"&&B.value)o7(R,B.value);else if(B.command==="indent"&&B.value)l7(R,+B.value);else if(B.command==="textIndent"&&B.value)u7(R,+B.value);else if(B.command==="bulletList"){const F=B.value||"",{bullet_list:O,list_item:G}=R.state.schema.nodes,j={color:m.color,fontsize:m.fontsize};Sv(O,G,F,j)(R.state,R.dispatch)}else if(B.command==="orderedList"){const F=B.value||"",{ordered_list:O,list_item:G}=R.state.schema.nodes,j={color:m.color,fontsize:m.fontsize};Sv(O,G,F,j)(R.state,R.dispatch)}else if(B.command==="clear"){vr(R);const{$from:F,$to:O}=R.state.selection;R.dispatch(R.state.tr.removeMark(F.pos,O.pos)),lo(R,[{key:"fontsize",value:""},{key:"color",value:""}])}else if(B.command==="link"){const F=R.state.schema.marks.link,{from:O,to:G}=R.state.selection,j=u_(R.state.doc,O,G,F);if(j)if(B.value){const Y=R.state.schema.marks.link.create({href:B.value,title:B.value});Tn(R,Y,{from:j.from.pos,to:j.to.pos+1})}else R.dispatch(R.state.tr.removeMark(j.from.pos,j.to.pos+1,F));else if(d_(R.state,F))if(B.value){const Y=R.state.schema.marks.link.create({href:B.value,title:B.value});Tn(R,Y)}else ee.toggleMark(F)(R.state,R.dispatch);else B.value&&(vr(R),ee.toggleMark(F,{href:B.value,title:B.value})(R.state,R.dispatch))}else B.command==="insert"&&B.value?R.dispatch(R.state.tr.insertText(B.value)):B.command==="replace"&&B.value&&c7(R,B.value);R.focus(),w(),C()},[p,t,m,w,C]),P=N.useCallback(()=>{p===t&&C()},[p,t,C]);return N.useEffect(()=>(ea.on(ui.RICH_TEXT_COMMAND,E),ea.on(ui.SYNC_RICH_TEXT_ATTRS_TO_STORE,P),()=>{ea.off(ui.RICH_TEXT_COMMAND,E),ea.off(ui.SYNC_RICH_TEXT_ATTRS_TO_STORE,P)}),[E,P]),D.jsx("div",{className:kt(wv.prosemirrorEditor,{[wv.formatPainter]:g,[f]:f}),ref:h,onMouseDown:c,style:o})}),Mn={editableElementText:"_editableElementText_hvfx9_1",rotateWrapper:"_rotateWrapper_hvfx9_5",elementContent:"_elementContent_hvfx9_10",text:"_text_hvfx9_17",dragHandler:"_dragHandler_hvfx9_21",top:"_top_hvfx9_27",bottom:"_bottom_hvfx9_30"},f7=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,{handleElementId:i,isScaling:a}=Tt(),{updateElement:o,deleteElement:s}=Bt(),{addHistorySnapshot:l}=Be(),u=N.useRef(null),{shadowStyle:c}=Ln(n.shadow),f=(y,_=!0)=>{y.stopPropagation(),e==null||e(y.nativeEvent,n,_)},d=N.useRef(-1),h=N.useRef(-1);N.useEffect(()=>{!a&&i===n.id&&(!n.vertical&&d.current!==-1&&(o({id:n.id,props:{height:d.current}}),d.current=-1),n.vertical&&h.current!==-1&&(o({id:n.id,props:{width:h.current}}),h.current=-1))},[a,i,n.id,n.vertical,o]);const v=N.useCallback(y=>{const _=y[0].contentRect;if(!u.current)return;const x=_.height+20,S=_.width+20;!n.vertical&&n.height!==x&&(a?d.current=x:o({id:n.id,props:{height:x}})),n.vertical&&n.width!==S&&(a?h.current=S:o({id:n.id,props:{width:S}}))},[n.vertical,n.height,n.width,n.id,a,o]);N.useEffect(()=>{const y=new ResizeObserver(v);return u.current&&y.observe(u.current),()=>{u.current&&y.unobserve(u.current),y.disconnect()}},[v]);const p=(y,_=!1)=>{o({id:n.id,props:{content:y}}),_||l()},g=N.useMemo(()=>Ar.debounce(()=>{n.content.replace(/<[^>]+>/g,"")||s(n.id)},300,{trailing:!0}),[n.content,n.id,s]),m=i===n.id;return N.useEffect(()=>{m||g()},[m]),Xr(u,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Mn.editableElementText,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:D.jsx("div",{className:Mn.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{className:Mn.elementContent,ref:u,style:{width:n.vertical?"auto":n.width+"px",height:n.vertical?n.height+"px":"auto",backgroundColor:n.fill,opacity:n.opacity,textShadow:c,lineHeight:n.lineHeight,letterSpacing:(n.wordSpace||0)+"px",color:n.defaultColor,fontFamily:n.defaultFontName,writingMode:n.vertical?"vertical-rl":"horizontal-tb"},onMouseDown:y=>f(y),onTouchStart:y=>f(y),children:[D.jsx(Xs,{width:n.width,height:n.height,outline:n.outline}),D.jsx(Tv,{className:Mn.text,elementId:n.id,defaultColor:n.defaultColor,defaultFontName:n.defaultFontName,editable:!0,value:n.content,style:{"--paragraphSpace":`${n.paragraphSpace===void 0?5:n.paragraphSpace}px`},onUpdate:({value:y,ignore:_})=>p(y,_),onMouseDown:y=>f(y,!1)}),D.jsx("div",{className:kt(Mn.dragHandler,Mn.top)}),D.jsx("div",{className:kt(Mn.dragHandler,Mn.bottom)})]})})})},Lv=(t,e)=>({fill:N.useMemo(()=>t.pattern?`url(#${e}-pattern-${t.id})`:t.gradient?`url(#${e}-gradient-${t.id})`:t.fill||"none",[t.pattern,t.gradient,t.fill,t.id,e])}),Mv=({id:t,type:e,colors:r,rotate:n=0})=>D.jsx(D.Fragment,{children:e==="linear"?D.jsx("linearGradient",{id:t,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${n},0.5,0.5)`,children:r.map((i,a)=>D.jsx("stop",{offset:`${i.pos}%`,stopColor:i.color},a))}):D.jsx("radialGradient",{id:t,children:r.map((i,a)=>D.jsx("stop",{offset:`${i.pos}%`,stopColor:i.color},a))})}),Cv=({id:t,src:e})=>D.jsx("pattern",{id:t,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",height:"1",children:D.jsx("image",{href:e,width:"1",height:"1",preserveAspectRatio:"xMidYMid slice"})}),Cn={editableElementShape:"_editableElementShape_38zop_1",formatPainter:"_formatPainter_38zop_7",elementContent:"_elementContent_38zop_7",rotateWrapper:"_rotateWrapper_38zop_11",shapePath:"_shapePath_38zop_27",editable:"_editable_38zop_1",shapeText:"_shapeText_38zop_35",top:"_top_38zop_52",middle:"_middle_38zop_56",bottom:"_bottom_38zop_60"},h7=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,i=N.useRef(null),{handleElementId:a,shapeFormatPainter:o,setShapeFormatPainter:s}=Tt(),{theme:l,updateElement:u,removeElementProps:c}=Bt(),{addHistorySnapshot:f}=Be(),{fill:d}=Lv(n,"editable"),{outlineWidth:h,outlineColor:v,strokeDashArray:p}=ta(n.outline),{shadowStyle:g}=Ln(n.shadow),{flipStyle:m}=js(n.flipH,n.flipV),[y,_]=N.useState(!1),x=N.useRef(null),S=N.useMemo(()=>{const M={content:"",align:"middle",defaultFontName:l.fontName,defaultColor:l.fontColor};return n.text?n.text:M},[n.text,l]),b=(M,A=!0)=>{M.stopPropagation(),e==null||e(M.nativeEvent,n,A)},w=()=>{if(!o)return;const{keep:M,...A}=o;u({id:n.id,props:A}),f(),M||s(null)};N.useEffect(()=>{a!==n.id&&y&&_(!1)},[a,n.id,y]);const T=(M,A=!1)=>{const E={...S,content:M};u({id:n.id,props:{text:E}}),A||f()},L=()=>{if(!n.text)return;n.text.content.replace(/<[^>]+>/g,"")||(c({id:n.id,propName:"text"}),f())},C=()=>{_(!0),setTimeout(()=>{var M;return(M=x.current)==null?void 0:M.focus()},0)};return Xr(i,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:kt(Cn.editableElementShape,{[Cn.formatPainter]:o}),style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:D.jsx("div",{className:Cn.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{className:Cn.elementContent,style:{opacity:n.opacity,filter:g?`drop-shadow(${g})`:"",transform:m,color:S.defaultColor,fontFamily:S.defaultFontName},ref:i,onMouseDown:b,onMouseUp:w,onTouchStart:b,onDoubleClick:C,children:[D.jsxs("svg",{overflow:"visible",width:n.width,height:n.height,children:[D.jsx("defs",{children:n.pattern?D.jsx(Cv,{id:`editable-pattern-${n.id}`,src:n.pattern}):n.gradient?D.jsx(Mv,{id:`editable-gradient-${n.id}`,type:n.gradient.type,colors:n.gradient.colors,rotate:n.gradient.rotate}):null}),D.jsx("g",{transform:`scale(${n.width/n.viewBox[0]}, ${n.height/n.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{className:Cn.shapePath,vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:n.path,fill:d,stroke:v,strokeWidth:h,strokeDasharray:p})})]}),D.jsx("div",{className:kt(Cn.shapeText,Cn[S.align],{[Cn.editable]:y||S.content}),children:(y||S.content)&&D.jsx(Tv,{ref:x,elementId:n.id,defaultColor:S.defaultColor,defaultFontName:S.defaultFontName,editable:!0,value:S.content,onUpdate:({value:M,ignore:A})=>T(M,A),onBlur:L,onMouseDown:M=>b(M,!1)})})]})})})},Ys=({id:t,position:e,type:r,baseSize:n,color:i})=>{const a={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},o={"arrow-start":180,"arrow-end":0},s=a[r],l=o[`${r}-${e}`]||0,u=N.useMemo(()=>n<2?2:n,[n]);return D.jsx("marker",{id:`${t}-${r}-${e}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:u*3,markerHeight:u*3,refX:u*1.5,refY:u*1.5,children:D.jsx("path",{d:s,fill:i,transform:`scale(${u*.3}, ${u*.3}) rotate(${l}, 5, 5)`})})},Us={editableElementLine:"_editableElementLine_1j2mb_1",elementContent:"_elementContent_1j2mb_6",linePath:"_linePath_1j2mb_16",linePoint:"_linePoint_1j2mb_16"},d7=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=N.useRef(null),i=t,{shadowStyle:a}=Ln(i.shadow),o=h=>{h.stopPropagation(),e==null||e(h.nativeEvent,i)},s=N.useMemo(()=>{const h=Math.abs(i.start[0]-i.end[0]);return h<24?24:h},[i.start,i.end]),l=N.useMemo(()=>{const h=Math.abs(i.start[1]-i.end[1]);return h<24?24:h},[i.start,i.end]),u=N.useMemo(()=>{const h=i.width;return i.style==="dashed"?h<=8?`${h*5} ${h*2.5}`:`${h*5} ${h*1.5}`:i.style==="dotted"?h<=8?`${h*1.8} ${h*1.6}`:`${h*1.5} ${h*1.2}`:"0 0"},[i.width,i.style]),c=N.useMemo(()=>tv(i),[i]),f=i.points[0],d=i.points[1];return Xr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Us.editableElementLine,style:{top:i.top+"px",left:i.left+"px"},children:D.jsx("div",{className:Us.elementContent,style:{filter:a?`drop-shadow(${a})`:""},onMouseDown:o,onTouchStart:o,children:D.jsxs("svg",{overflow:"visible",width:s,height:l,children:[D.jsxs("defs",{children:[f&&D.jsx(Ys,{id:i.id,position:"start",type:f,color:i.color,baseSize:i.width}),d&&D.jsx(Ys,{id:i.id,position:"end",type:d,color:i.color,baseSize:i.width})]}),D.jsx("path",{className:Us.linePoint,d:c,stroke:i.color,strokeWidth:i.width,strokeDasharray:u,fill:"none",markerStart:f?`url(#${i.id}-${f}-start)`:"",markerEnd:d?`url(#${i.id}-${d}-end)`:""}),D.jsx("path",{className:Us.linePath,d:c,stroke:"transparent",strokeWidth:"20",fill:"none",ref:n})]})})})};/*! *****************************************************************************
|
|
1
|
+
(function($t,ps){typeof exports=="object"&&typeof module<"u"?ps(exports,require("@icon-park/react/styles/index.css"),require("prosemirror-view/style/prosemirror.css"),require("animate.css"),require("react/jsx-runtime"),require("react"),require("lodash"),require("nanoid"),require("zustand"),require("prosemirror-commands"),require("clipboard"),require("crypto-js"),require("tinycolor2"),require("clsx"),require("@icon-park/react"),require("react-dom"),require("prosemirror-state"),require("prosemirror-view"),require("prosemirror-model"),require("prosemirror-keymap"),require("prosemirror-history"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-schema-list"),require("prosemirror-inputrules"),require("prosemirror-schema-basic"),require("mitt"),require("svg-pathdata"),require("svg-arc-to-cubic-bezier")):typeof define=="function"&&define.amd?define(["exports","@icon-park/react/styles/index.css","prosemirror-view/style/prosemirror.css","animate.css","react/jsx-runtime","react","lodash","nanoid","zustand","prosemirror-commands","clipboard","crypto-js","tinycolor2","clsx","@icon-park/react","react-dom","prosemirror-state","prosemirror-view","prosemirror-model","prosemirror-keymap","prosemirror-history","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-schema-list","prosemirror-inputrules","prosemirror-schema-basic","mitt","svg-pathdata","svg-arc-to-cubic-bezier"],ps):($t=typeof globalThis<"u"?globalThis:$t||self,ps($t.WujiePPT={},null,null,null,$t.jsxRuntime,$t.React,$t._,$t.nanoid$1,$t.zustand,$t.prosemirrorCommands,$t.Clipboard,$t.CryptoJS,$t.tinycolor,$t.clsx,$t.react$1,$t.ReactDOM,$t.prosemirrorState,$t.prosemirrorView,$t.prosemirrorModel,$t.prosemirrorKeymap,$t.prosemirrorHistory,$t.prosemirrorDropcursor,$t.prosemirrorGapcursor,$t.prosemirrorSchemaList,$t.prosemirrorInputrules,$t.prosemirrorSchemaBasic,$t.mitt,$t.svgPathdata))})(this,function($t,ps,NE,kE,D,O,mr,Rt,gs,Ut,x4,Wu,ms,Dt,Le,w4,Xu,T4,dd,vd,Yu,L4,M4,Un,Ar,pd,C4,E4){"use strict";const ys=(t,e)=>t.type===e.nodes.bullet_list||t.type===e.nodes.ordered_list,rr=t=>{const{empty:e}=t.state.selection;e&&Ut.selectAll(t.state,t.dispatch)},fn=(t,e,r)=>{if(r)t.dispatch(t.state.tr.addMark(r.from,r.to,e));else{const{$from:n,$to:i}=t.state.selection;t.dispatch(t.state.tr.addMark(n.pos,i.pos,e))}},D4=(t,e,r,n)=>{let i=e;const a=d=>d.type===n;let o=null,s=null,l=null;for(;i<=r;){const d=t.nodeAt(i);if(!d||!d.marks)return null;const h=d.marks.find(a);if(!h||o&&h!==o)return null;s=s||d,o=o||h,l=d,i++}let u=e,c=r,f=0;for(i=e-1;i>f;){const d=t.nodeAt(i),h=d&&d.marks.find(a);if(!h||h!==o)break;u=i,s=d,i--}for(i=r+1,f=t.nodeSize-2;i<f;){const d=t.nodeAt(i),h=d&&d.marks.find(a);if(!h||h!==o)break;c=i,l=d,i++}return{mark:o,from:{node:s,pos:u},to:{node:l,pos:c}}},A4=(t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t,P4=(t,e)=>{for(let r=t.depth;r>0;r--){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}},gd=t=>e=>P4(e.$from,t),N4=t=>e=>gd(r=>A4(t,r))(e),_s=(t,e)=>{const r=e.schema.nodes[t];return!!N4(r)(e.selection)},md=t=>t?t.type.name==="text"?t:t.lastChild?md(t.lastChild):null:null,yd=t=>{const{selection:e,doc:r}=t.state,{from:n}=e;let i=r.nodeAt(n)||r.nodeAt(n-1);return i=md(i),(i==null?void 0:i.marks)||[]},Ri=(t,e,r)=>{for(const n of t)if(n.type.name===e&&n.attrs[r])return n.attrs[r];return null},Zn=(t,e)=>{for(const r of t)if(r.type.name===e)return!0;return!1},k4=(t,e)=>{const{from:r,$from:n,to:i,empty:a}=t.selection;return a?e.isInSet(t.storedMarks||n.marks()):t.doc.rangeHasMark(r,i,e)},O4=(t,e)=>{const{selection:r,doc:n}=t.state,{from:i,to:a}=r;let o=!0,s="";return n.nodesBetween(i,a,l=>(o&&l.attrs[e]&&(o=!1,s=l.attrs[e]),o)),s},_d={color:"#000000",backcolor:"",fontsize:"16px",fontname:"",align:"left"},I4=(t,e={})=>{const r={..._d,...e},n=yd(t),i=Zn(n,"strong"),a=Zn(n,"em"),o=Zn(n,"underline"),s=Zn(n,"strikethrough"),l=Zn(n,"superscript"),u=Zn(n,"subscript"),c=Zn(n,"code"),f=Ri(n,"forecolor","color")||r.color,d=Ri(n,"backcolor","backcolor")||r.backcolor,h=Ri(n,"fontsize","fontsize")||r.fontsize,v=Ri(n,"fontname","fontname")||r.fontname,p=Ri(n,"link","href")||"",g=O4(t,"align")||r.align,m=_s("bullet_list",t.state),y=_s("ordered_list",t.state),_=_s("blockquote",t.state);return{bold:i,em:a,underline:o,strikethrough:s,superscript:l,subscript:u,code:c,color:f,backcolor:d,fontsize:h,fontname:v,link:p,align:g,bulletList:m,orderedList:y,blockquote:_}},bd=t=>{const e=yd(t),r=Ri(e,"fontsize","fontsize")||_d.fontsize;return parseInt(r)},B4={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000000",backcolor:"",fontsize:"16px",fontname:"",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},yr=t=>{const e=t.slides||[],r=t.slideIndex!==void 0?t.slideIndex:0,n=e[r]||null,i=[],a=[];if(n&&n.animations){const s=n.elements.map(u=>u.id),l=n.animations.filter(u=>s.includes(u.elId));i.push(...l);for(const u of l)if(u.trigger==="click"||!a.length)a.push({animations:[u],autoNext:!1});else if(u.trigger==="meantime"){const c=a[a.length-1];c.animations=c.animations.filter(f=>f.elId!==u.elId),c.animations.push(u),a[a.length-1]=c}else if(u.trigger==="auto"){const c=a[a.length-1];c.autoNext=!0,a[a.length-1]=c,a.push({animations:[u],autoNext:!1})}}return{currentSlide:n,currentSlideAnimations:i,formatedAnimations:a}},kt=gs.create((t,e)=>({title:"未命名演示文稿",theme:{themeColors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"],fontColor:"#333",fontName:"",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},slides:[],slideIndex:0,viewportSize:1e3,viewportRatio:.5625,templates:[{name:"山河映红",id:"template_1",cover:"./imgs/template_1.webp",origin:"官方制作"},{name:"都市蓝调",id:"template_2",cover:"./imgs/template_2.webp",origin:"官方制作"},{name:"智感几何",id:"template_3",cover:"./imgs/template_3.webp",origin:"官方制作"},{name:"柔光莫兰迪",id:"template_4",cover:"./imgs/template_4.webp",origin:"官方制作"},{name:"简约绿意",id:"template_5",cover:"./imgs/template_5.webp",origin:"社区贡献+官方深度完善优化"},{name:"暖色复古",id:"template_6",cover:"./imgs/template_6.webp",origin:"社区贡献+官方深度完善优化"},{name:"深邃沉稳",id:"template_7",cover:"./imgs/template_7.webp",origin:"社区贡献+官方深度完善优化"},{name:"浅蓝小清新",id:"template_8",cover:"./imgs/template_8.webp",origin:"社区贡献+官方深度完善优化"}],currentSlide:null,currentSlideAnimations:[],formatedAnimations:[],setTitle:r=>t({title:r||"未命名演示文稿"}),setTheme:r=>t(n=>({theme:{...n.theme,...r}})),setViewportSize:r=>t({viewportSize:r}),setViewportRatio:r=>t({viewportRatio:r}),setSlides:r=>t(n=>{const i={...n,slides:r};return{...i,...yr(i)}}),setTemplates:r=>t({templates:r}),addSlide:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=[...n.slides],o=i.map(u=>{const c={...u};return c.sectionTag&&delete c.sectionTag,c}),s=n.slideIndex+1;a.splice(s,0,...o);const l={...n,slides:a,slideIndex:s};return{...l,...yr(l)}}),updateSlide:(r,n)=>t(i=>{const a=n?i.slides.findIndex(l=>l.id===n):i.slideIndex;if(a===-1)return{};const o=[...i.slides];o[a]={...o[a],...r};const s={...i,slides:o};return{...s,...yr(s)}}),removeSlideProps:r=>t(n=>{const{id:i,propName:a}=r,o=n.slides.map(l=>l.id===i?mr.omit(l,a):l),s={...n,slides:o};return{...s,...yr(s)}}),deleteSlide:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=JSON.parse(JSON.stringify(n.slides)),o=[];for(const c of i){const f=a.findIndex(h=>h.id===c);if(f===-1)continue;o.push(f);const d=a[f].sectionTag;if(d){const h=a[f+1];h&&!h.sectionTag&&(delete a[f].sectionTag,a[f+1].sectionTag=d)}a.splice(f,1)}if(a.length===0){const c={...n,slides:[],slideIndex:0};return{...c,...yr(c)}}let s=Math.min(...o);const l=a.length-1;s>l&&(s=l);const u={...n,slides:a,slideIndex:s};return{...u,...yr(u)}}),updateSlideIndex:r=>t(n=>{const i={...n,slideIndex:r};return{...i,...yr(i)}}),addElement:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=n.slides[n.slideIndex];if(!a)return{};const o=[...n.slides],s=[...a.elements,...i];o[n.slideIndex]={...a,elements:s};const l={...n,slides:o};return{...l,...yr(l)}}),deleteElement:r=>t(n=>{const i=Array.isArray(r)?r:[r],a=n.slides[n.slideIndex];if(!a)return{};const o=[...n.slides],s=a.elements.filter(u=>!i.includes(u.id));o[n.slideIndex]={...a,elements:s};const l={...n,slides:o};return{...l,...yr(l)}}),updateElement:r=>t(n=>{const{id:i,props:a,slideId:o}=r,s=typeof i=="string"?[i]:i,l=o?n.slides.findIndex(h=>h.id===o):n.slideIndex;if(l===-1)return{};const u=n.slides[l],c=u.elements.map(h=>s.includes(h.id)?{...h,...a}:h),f=[...n.slides];f[l]={...u,elements:c};const d={...n,slides:f};return{...d,...yr(d)}}),removeElementProps:r=>t(n=>{const{id:i,propName:a}=r,o=typeof a=="string"?[a]:a,s=n.slideIndex,l=n.slides[s],u=l.elements.map(d=>d.id===i?mr.omit(d,o):d),c=[...n.slides];c[s]={...l,elements:u};const f={...n,slides:c};return{...f,...yr(f)}})})),R4=Rt.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")(10),St=gs.create(t=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,gridLinesState:!1,showRuler:!1,creatingElement:null,creatingCustomShape:!1,clipingImageElementId:"",richTextAttrs:B4,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],databaseId:R4,textFormatPainter:null,shapeFormatPainter:null,setActiveElementIdList:e=>t(()=>{const r=e.length===1?e[0]:"";return{activeElementIdList:e,handleElementId:r}}),setHandleElementId:e=>t({handleElementId:e}),setActiveGroupElementId:e=>t({activeGroupElementId:e}),setHiddenElementIdList:e=>t({hiddenElementIdList:e}),setCanvasPercentage:e=>t({canvasPercentage:e}),setCanvasScale:e=>t({canvasScale:e}),setCanvasDragged:e=>t({canvasDragged:e}),setThumbnailsFocus:e=>t({thumbnailsFocus:e}),setEditorareaFocus:e=>t({editorAreaFocus:e}),setDisableHotkeysState:e=>t({disableHotkeys:e}),setGridLineSize:e=>t({gridLineSize:e}),setGridLinesState:e=>t({gridLinesState:e}),setRulerState:e=>t({showRuler:e}),setCreatingElement:e=>t({creatingElement:e}),setCreatingCustomShapeState:e=>t({creatingCustomShape:e}),setClipingImageElementId:e=>t({clipingImageElementId:e}),setRichtextAttrs:e=>t({richTextAttrs:e}),setSelectedTableCells:e=>t({selectedTableCells:e}),setScalingState:e=>t({isScaling:e}),updateSelectedSlidesIndex:e=>t({selectedSlidesIndex:e}),setTextFormatPainter:e=>t({textFormatPainter:e}),setShapeFormatPainter:e=>t({shapeFormatPainter:e})})),$4=gs.create((t,e)=>({snapshotCursor:-1,snapshotLength:0,snapshots:[],setSnapshotCursor:r=>t({snapshotCursor:r}),setSnapshotLength:r=>t({snapshotLength:r}),addSnapshot:()=>{const{slides:r,slideIndex:n}=kt.getState(),{snapshotCursor:i,snapshots:a}=e();let o=[...a];i>=0&&i<a.length-1&&(o=o.slice(0,i+1));const s={index:n,slides:JSON.parse(JSON.stringify(r))};if(o.length>=1){const f=o.length-1;o[f]={...o[f],index:n}}o.push(s),o.length>20&&o.shift();const u=o.length,c=u-1;t({snapshots:o,snapshotCursor:c,snapshotLength:u})},unDo:()=>{const{snapshotCursor:r,snapshots:n}=e();if(r<=0)return;const i=r-1,a=n[i],{index:o,slides:s}=a,{setSlides:l,updateSlideIndex:u}=kt.getState(),{setActiveElementIdList:c}=St.getState(),f=o>s.length-1?s.length-1:o;l(s),u(f),t({snapshotCursor:i}),c([])},reDo:()=>{const{snapshotCursor:r,snapshotLength:n,snapshots:i}=e();if(r>=n-1)return;const a=r+1,o=i[a],{index:s,slides:l}=o,{setSlides:u,updateSlideIndex:c}=kt.getState(),{setActiveElementIdList:f}=St.getState(),d=s>l.length-1?l.length-1:s;u(l),c(d),t({snapshotCursor:a}),f([])}})),nr=gs.create(t=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1,ctrlOrShiftKeyActive:!1,setCtrlKeyState:e=>t(r=>({ctrlKeyState:e,ctrlOrShiftKeyActive:e||r.shiftKeyState})),setShiftKeyState:e=>t(r=>({shiftKeyState:e,ctrlOrShiftKeyActive:r.ctrlKeyState||e})),setSpaceKeyState:e=>t({spaceKeyState:e})}));var se=(t=>(t.C="C",t.X="X",t.Z="Z",t.Y="Y",t.A="A",t.G="G",t.L="L",t.F="F",t.D="D",t.B="B",t.P="P",t.O="O",t.R="R",t.T="T",t.MINUS="-",t.EQUAL="=",t.DIGIT_0="0",t.DELETE="DELETE",t.UP="ARROWUP",t.DOWN="ARROWDOWN",t.LEFT="ARROWLEFT",t.RIGHT="ARROWRIGHT",t.ENTER="ENTER",t.SPACE=" ",t.TAB="TAB",t.BACKSPACE="BACKSPACE",t.ESC="ESCAPE",t.PAGEUP="PAGEUP",t.PAGEDOWN="PAGEDOWN",t.F5="F5",t))(se||{});const V4=t=>new Promise(e=>{const r=document.createElement("img");r.src=t,r.style.opacity="0",document.body.appendChild(r),r.onload=()=>{const n=r.clientWidth,i=r.clientHeight;r.onload=null,r.onerror=null,document.body.removeChild(r),e({width:n,height:i})},r.onerror=()=>{r.onload=null,r.onerror=null}}),Sd=t=>new Promise(e=>{const r=new FileReader;r.addEventListener("load",()=>{e(r.result)}),r.readAsDataURL(t)}),z4=t=>{if(!/<svg[\s\S]*?>[\s\S]*?<\/svg>/i.test(t))return!1;try{return new DOMParser().parseFromString(t,"image/svg+xml").documentElement.nodeName==="svg"}catch{return!1}},F4=t=>{const e=new Blob([t],{type:"image/svg+xml"});return new File([e],`${Date.now()}.svg`,{type:"image/svg+xml"})};var At=(t=>(t.ROUND_RECT="roundRect",t.ROUND_RECT_DIAGONAL="roundRectDiagonal",t.ROUND_RECT_SINGLE="roundRectSingle",t.ROUND_RECT_SAMESIDE="roundRectSameSide",t.CUT_RECT_DIAGONAL="cutRectDiagonal",t.CUT_RECT_SINGLE="cutRectSingle",t.CUT_RECT_SAMESIDE="cutRectSameSide",t.CUT_ROUND_RECT="cutRoundRect",t.MESSAGE="message",t.ROUND_MESSAGE="roundMessage",t.L="L",t.RING_RECT="ringRect",t.PLUS="plus",t.TRIANGLE="triangle",t.PARALLELOGRAM_LEFT="parallelogramLeft",t.PARALLELOGRAM_RIGHT="parallelogramRight",t.TRAPEZOID="trapezoid",t.BULLET="bullet",t.INDICATOR="indicator",t))(At||{}),Ft=(t=>(t.TEXT="text",t.IMAGE="image",t.SHAPE="shape",t.LINE="line",t.CHART="chart",t.TABLE="table",t.LATEX="latex",t.VIDEO="video",t.AUDIO="audio",t))(Ft||{});const Ra={[At.ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${n} 0 L ${t-n} 0 Q ${t} 0 ${t} ${n} L ${t} ${e-n} Q ${t} ${e} ${t-n} ${e} L ${n} ${e} Q 0 ${e} 0 ${e-n} L 0 ${n} Q 0 0 ${n} 0 Z`}},[At.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${e-n} L 0 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} L ${n} ${e} Z`}},[At.CUT_RECT_SINGLE]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${e} L 0 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} Z`}},[At.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:[.2],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${n} L ${n} 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} L 0 ${e} Z`}},[At.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${n} 0 L ${t} 0 L ${t} ${e-n} Q ${t} ${e} ${t-n} ${e} L 0 ${e} L 0 ${n} Q 0 0 ${n} 0 Z`}},[At.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["right"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 0 L ${t-n} 0 Q ${t} 0 ${t} ${n} L ${t} ${e} L 0 ${e} L 0 0 Z`}},[At.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 ${n} Q 0 0 ${n} 0 L ${t-n} 0 Q ${t} 0 ${t} ${n} L ${t} ${e} L 0 ${e} Z`}},[At.CUT_ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${n} 0 L ${t-n} 0 L ${t} ${n} L ${t} ${e} L 0 ${e} L 0 ${n} Q 0 0 ${n} 0 Z`}},[At.MESSAGE]:{editable:!0,range:[[0,.8],[.1,.3]],defaultValue:[.3,.2],relative:["left_bottom","bottom"],getBaseSize:[t=>t,(t,e)=>e],formula:(t,e,r)=>{const n=t*r[0],i=t*.2,a=e*r[1];return`M 0 0 L ${t} 0 L ${t} ${e-a} L ${n+i} ${e-a} L ${n} ${e} L ${n} ${e-a} L 0 ${e-a} Z`}},[At.ROUND_MESSAGE]:{formula:(t,e)=>{const r=Math.min(t,e)*.125,n=Math.min(t,e)*.2,i=Math.min(t,e)*.2;return`M 0 ${r} Q 0 0 ${r} 0 L ${t-r} 0 Q ${t} 0 ${t} ${r} L ${t} ${e-r-i} Q ${t} ${e-i} ${t-r} ${e-i} L ${t/2} ${e-i} L ${t/2-n} ${e} L ${t/2-n} ${e-i} L ${r} ${e-i} Q 0 ${e-i} 0 ${e-r-i} L 0 ${r} Z`}},[At.L]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 0 L 0 ${e} L ${t} ${e} L ${t} ${e-n} L ${n} ${e-n} L ${n} 0 Z`}},[At.RING_RECT]:{editable:!0,defaultValue:[.25],range:[[.1,.45]],relative:["left"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M 0 0 ${t} 0 ${t} ${e} L 0 ${e} L 0 0 Z M ${n} ${n} L ${n} ${e-n} L ${t-n} ${e-n} L ${t-n} ${n} Z`}},[At.PLUS]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["center"],getBaseSize:[(t,e)=>Math.min(t,e)],formula:(t,e,r)=>{const n=Math.min(t,e)*r[0];return`M ${t/2-n/2} 0 L ${t/2-n/2} ${e/2-n/2} L 0 ${e/2-n/2} L 0 ${e/2+n/2} L ${t/2-n/2} ${e/2+n/2} L ${t/2-n/2} ${e} L ${t/2+n/2} ${e} L ${t/2+n/2} ${e/2+n/2} L ${t} ${e/2+n/2} L ${t} ${e/2-n/2} L ${t/2+n/2} ${e/2-n/2} L ${t/2+n/2} 0 Z`}},[At.TRIANGLE]:{editable:!0,defaultValue:[.5],range:[[0,1]],relative:["left"],getBaseSize:[t=>t],formula:(t,e,r)=>`M ${t*r[0]} 0 L 0 ${e} L ${t} ${e} Z`},[At.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["left"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M ${n} 0 L ${t} 0 L ${t-n} ${e} L 0 ${e} Z`}},[At.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["right"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M 0 0 L ${t-n} 0 L ${t} ${e} L ${n} ${e} Z`}},[At.TRAPEZOID]:{editable:!0,defaultValue:[.25],range:[[0,.5]],relative:["left"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M ${n} 0 L ${t-n} 0 L ${t} ${e} L 0 ${e} Z`}},[At.BULLET]:{editable:!0,defaultValue:[.2],range:[[0,1]],relative:["top"],getBaseSize:[(t,e)=>e],formula:(t,e,r)=>{const n=e*r[0];return`M ${t/2} 0 L 0 ${n} L 0 ${e} L ${t} ${e} L ${t} ${n} Z`}},[At.INDICATOR]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[t=>t],formula:(t,e,r)=>{const n=t*r[0];return`M ${t} ${e/2} L ${t-n} 0 L 0 0 L ${n} ${e/2} L 0 ${e} L ${t-n} ${e} Z`}}},H4=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:At.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:At.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:At.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:At.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:At.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:At.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:At.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:At.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:At.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:At.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:At.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:At.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:At.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:At.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M100,0 L200,76.6 L161.8,200 L38.2,200 L0,76.6 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M100,0 L170.71,29.29 L200,100 L170.71,170.71 L100,200 L29.29,170.71 L0,100 L29.29,29.29 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z",pptxShapeType:"dodecagon"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z",pptxShapeType:"flowChartManualInput"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 150 C 110 140 110 240 0 180 Z",pptxShapeType:"flowChartDocument"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z",pptxShapeType:"diagStripe"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:At.L,pptxShapeType:"corner"},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:At.RING_RECT,pptxShapeType:"frame"},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z",pptxShapeType:"donut"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:At.PLUS,pptxShapeType:"mathPlus"},{viewBox:[200,200],path:"M 0 70 L 200 70 L 200 130 L 0 130 Z",pptxShapeType:"mathMinus"},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z",pptxShapeType:"mathMultiply"},{viewBox:[200,200],path:"M 0 80 L 200 80 L 200 120 L 0 120 Z M 100 0 A 25 25 0 1 1 100 50 A 25 25 0 1 1 100 0 M 100 200 A 25 25 0 1 1 100 150 A 25 25 0 1 1 100 200",pptxShapeType:"mathDivide"},{viewBox:[200,200],path:"M 0 30 L 200 30 L 200 80 L 0 80 Z M 0 120 L 200 120 L 200 170 L 0 170 Z",pptxShapeType:"mathEqual"},{viewBox:[200,200],path:"M 120 0 L 170 0 L 150 40 L 200 40 L 200 80 L 130 80 L 110 120 L 200 120 L 200 160 L 90 160 L 70 200 L 20 200 L 40 160 L 0 160 L 0 120 L 60 120 L 80 80 L 0 80 L 0 40 L 100 40 Z",pptxShapeType:"mathNotEqual"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:At.MESSAGE,pptxShapeType:"wedgeRectCallout"},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:At.ROUND_MESSAGE,pptxShapeType:"wedgeRoundRectCallout"},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z",pptxShapeType:"flowChartMagneticTape"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z",pptxShapeType:"flowChartCollate"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z",pptxShapeType:"wave"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",pptxShapeType:"doubleWave"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 130 30 L 170 30 L 170 70 L 200 100 L 170 130 L 170 170 L 130 170 L 100 200 L 70 170 L 30 170 L 30 130 L 0 100 L 30 70 L 30 30 L 70 30 L 100 0",pptxShapeType:"star8"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 0 200 120 A 100 100 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 120 0 L 100 80 L 200 80 L 80 200 L 100 120 L 0 120 L 120 0 Z"},{viewBox:[200,200],path:"M 30 50 Q 40 -20 120 10 Q 180 -10 180 40 Q 210 70 190 100 C 210 140 180 170 160 170 Q 140 210 100 180 C 70 210 20 190 30 150 C -10 140 -10 80 30 50",pptxShapeType:"cloud"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z M 200 100 L 0 100",withborder:!0,pptxShapeType:"flowChartSort"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 30 30 L 170 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170 M 30 30 L 170 170",withborder:!0,pptxShapeType:"flowChartSummingJunction"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 200 100 L 0 100 M 100 0 L 100 200",withborder:!0,pptxShapeType:"flowChartOr"},{viewBox:[200,200],path:"M 160 0 A 40 100 0 1 1 160 200 L 40 200 A 40 100 0 1 1 40 0 L 160 0 Z M 160 200 A 40 100 0 1 1 160 0",withborder:!0,pptxShapeType:"flowChartMagneticDrum"},{viewBox:[200,200],path:"M 0 40 A 50 20 0 1 1 200 40 L 200 160 A 50 20 0 1 1 0 160 L 0 40 Z M 200 40 A 50 20 0 1 1 0 40",withborder:!0,pptxShapeType:"can"},{viewBox:[200,200],path:"M 200 0 L 50 0 L 0 50 L 0 200 L 150 200 L 200 150 L 200 0 Z M 200 0 L 150 50 M 150 50 L 0 50 M 150 50 L 150 200",withborder:!0,pptxShapeType:"cube"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z",pptxShapeType:"quadArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z",pptxShapeType:"leftArrowCallout"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z",pptxShapeType:"rightArrowCallout"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z",pptxShapeType:"bentUpArrow"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z",pptxShapeType:"leftUpArrow"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],G4={bar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},ring:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},area:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:["坐标1","坐标2","坐标3","坐标4","坐标5"],legends:["X","Y"],series:[[12,19,5,2,18],[7,11,13,21,9]]}},Me=()=>{const{addSnapshot:t,reDo:e,unDo:r}=$4(),n=O.useMemo(()=>mr.debounce(t,300,{trailing:!0}),[t]),i=O.useMemo(()=>mr.throttle(e,100,{leading:!0,trailing:!1}),[e]),a=O.useMemo(()=>mr.throttle(r,100,{leading:!0,trailing:!1}),[r]);return{addHistorySnapshot:n,redo:i,undo:a}},$a=()=>{const{creatingElement:t,setCreatingElement:e,setActiveElementIdList:r,setEditorareaFocus:n}=St(),{theme:i,viewportRatio:a,viewportSize:o,addElement:s}=kt(),{addHistorySnapshot:l}=Me(),u=(b,x)=>{s(b),r([b.id]),t&&e(null),setTimeout(()=>{n(!0)},0),x&&x(),l()};return{createElement:u,createImageElement:b=>{V4(b).then(({width:x,height:S})=>{const w=S/x;w<a&&x>o?(x=o,S=x*w):S>o*a&&(S=o*a,x=S/w),u({type:"image",id:Rt.nanoid(10),src:b,width:x,height:S,left:(o-x)/2,top:(o*a-S)/2,fixedRatio:!0,rotate:0})})},createChartElement:b=>{u({type:"chart",id:Rt.nanoid(10),chartType:b,left:300,top:81.25,width:400,height:400,rotate:0,themeColors:i.themeColors,textColor:i.fontColor,data:G4[b]})},createTableElement:(b,x)=>{const S={fontname:i.fontName,color:i.fontColor},w=[];for(let E=0;E<b;E++){const P=[];for(let B=0;B<x;B++)P.push({id:Rt.nanoid(10),colspan:1,rowspan:1,text:"",style:S});w.push(P)}const T=100,L=36,C=new Array(x).fill(1/x),M=x*T,A=b*L;u({type:"table",id:Rt.nanoid(10),width:M,height:A,colWidths:C,rotate:0,data:w,left:(o-M)/2,top:(o*a-A)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:i.themeColors[0],rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},createTextElement:(b,x)=>{const{left:S,top:w,width:T,height:L}=b,C=(x==null?void 0:x.content)||"",M=(x==null?void 0:x.vertical)||!1,A=Rt.nanoid(10);u({type:"text",id:A,left:S,top:w,width:T,height:L,content:C,rotate:0,defaultFontName:i.fontName,defaultColor:i.fontColor,vertical:M},()=>{setTimeout(()=>{const E=document.querySelector(`#editable-element-${A} .ProseMirror`);E&&E.focus()},0)})},createShapeElement:(b,x,S={})=>{const{left:w,top:T,width:L,height:C}=b,M={type:"shape",id:Rt.nanoid(10),left:w,top:T,width:L,height:C,viewBox:x.viewBox,path:x.path,fill:i.themeColors[0],fixedRatio:!1,rotate:0,...S};if(x.withborder&&(M.outline=i.outline),x.special&&(M.special=!0),x.pathFormula){M.pathFormula=x.pathFormula,M.viewBox=[L,C];const A=Ra[x.pathFormula];"editable"in A&&A.editable?(M.path=A.formula(L,C,A.defaultValue),M.keypoints=A.defaultValue):M.path=A.formula(L,C)}u(M)},createCustomShapeElement:b=>{const{start:x,viewBox:S,path:w,fill:T,outline:L}=b;u({type:"shape",id:Rt.nanoid(10),left:x[0],top:x[1],width:S[0],height:S[1],viewBox:S,path:w,fill:T||i.themeColors[0],rotate:0,outline:L,fixedRatio:!1})},createLineElement:(b,x)=>{const{left:S,top:w,start:T,end:L}=b,C={type:"line",id:Rt.nanoid(10),left:S,top:w,start:T,end:L,points:x.points,color:i.themeColors[0],style:x.style,width:2};x.isBroken&&(C.broken=[(T[0]+L[0])/2,(T[1]+L[1])/2]),x.isBroken2&&(C.broken2=[(T[0]+L[0])/2,(T[1]+L[1])/2]),x.isCurve&&(C.curve=[(T[0]+L[0])/2,(T[1]+L[1])/2]),x.isCubic&&(C.cubic=[[(T[0]+L[0])/2,(T[1]+L[1])/2],[(T[0]+L[0])/2,(T[1]+L[1])/2]]),u(C)},createLatexElement:b=>{u({type:"latex",id:Rt.nanoid(10),width:b.w,height:b.h,rotate:0,left:(o-b.w)/2,top:(o*a-b.h)/2,path:b.path,latex:b.latex,color:i.fontColor,strokeWidth:2,viewBox:[b.w,b.h],fixedRatio:!0})},createVideoElement:(b,x)=>{const S={type:"video",id:Rt.nanoid(10),width:500,height:300,rotate:0,left:(o-500)/2,top:(o*a-300)/2,src:b,autoplay:!1};x&&(S.ext=x),u(S)},createAudioElement:(b,x)=>{const S={type:"audio",id:Rt.nanoid(10),width:50,height:50,rotate:0,left:(o-50)/2,top:(o*a-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:i.themeColors[0],src:b};x&&(S.ext=x),u(S)}}},xd="pptist",wd=t=>Wu.AES.encrypt(t,xd).toString(),W4=t=>Wu.AES.decrypt(t,xd).toString(Wu.enc.Utf8),Td=t=>new Promise((e,r)=>{const n=document.createElement("button"),i=new x4(n,{text:()=>t,action:()=>"copy",container:document.body});i.on("success",a=>{i.destroy(),e(a)}),i.on("error",a=>{i.destroy(),r(a)}),document.body.appendChild(n),n.click(),document.body.removeChild(n)}),Ld=()=>new Promise((t,e)=>{var r;(r=navigator.clipboard)!=null&&r.readText?navigator.clipboard.readText().then(n=>(n||e("剪贴板为空或者不包含文本"),t(n))):e("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),Md=t=>{let e;try{e=JSON.parse(W4(t))}catch{e=t}return e},X4=t=>{const e=t.split(`\r
|
|
2
|
+
`);e[e.length-1]===""&&e.pop();let r=-1;const n=[];for(const i in e){if(n[i]=e[i].split(" "),n[i].length===1)return null;if(r===-1)r=n[i].length;else if(r!==n[i].length)return null}return n},Y4=t=>{const n=new DOMParser().parseFromString(t,"text/html").querySelector("table"),i=[];if(!n)return i;const a=n.querySelectorAll("tr");for(const o of a){const s=[],l=o.querySelectorAll("td, th");for(const u of l){const c=u.textContent?u.textContent.trim():"",f=parseInt(u.getAttribute("colspan")||"1",10);for(let d=0;d<f;d++)s.push(c)}i.push(s)}return i},bs=t=>{const{left:e,top:r,width:n,height:i,rotate:a=0}=t,o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2,s=Math.atan(i/n)*180/Math.PI,l=(180-a-s)*Math.PI/180,u=(s-a)*Math.PI/180,c=e+n/2,f=r+i/2,d=[c+o*Math.cos(l),c+o*Math.cos(u),c-o*Math.cos(l),c-o*Math.cos(u)],h=[f-o*Math.sin(l),f-o*Math.sin(u),f+o*Math.sin(l),f+o*Math.sin(u)];return{xRange:[Math.min(...d),Math.max(...d)],yRange:[Math.min(...h),Math.max(...h)]}},Va=t=>{let e,r,n,i;if(t.type==="line")e=t.left,r=t.left+Math.max(t.start[0],t.end[0]),n=t.top,i=t.top+Math.max(t.start[1],t.end[1]);else if("rotate"in t&&t.rotate){const{left:a,top:o,width:s,height:l,rotate:u}=t,{xRange:c,yRange:f}=bs({left:a,top:o,width:s,height:l,rotate:u});e=c[0],r=c[1],n=f[0],i=f[1]}else e=t.left,r=t.left+t.width,n=t.top,i=t.top+t.height;return{minX:e,maxX:r,minY:n,maxY:i}},Cd=t=>{const e=[],r=[],n=[],i=[];t.forEach(u=>{const{minX:c,maxX:f,minY:d,maxY:h}=Va(u);e.push(c),r.push(d),n.push(f),i.push(h)});const a=Math.min(...e),o=Math.max(...n),s=Math.min(...r),l=Math.max(...i);return{minX:a,maxX:o,minY:s,maxY:l}},Ss=t=>{const e=[];return t.forEach(r=>{const n=e.findIndex(i=>i.value===r.value);if(n===-1)e.push(r);else{const i=e[n],a=Math.min(i.range[0],r.range[0]),o=Math.max(i.range[1],r.range[1]),s=[a,o],l={value:r.value,range:s};e[n]=l}}),e},U4=t=>{const e={};for(const r of t)e[r.id]=Rt.nanoid(10);return e},Uu=t=>{const e={},r={};for(const n of t){const i=n.groupId;i&&!e[i]&&(e[i]=Rt.nanoid(10)),r[n.id]=Rt.nanoid(10)}return{groupIdMap:e,elIdMap:r}},Z4=t=>{const e=ms(t);return[e.setAlpha(.3).toRgbString(),e.setAlpha(.1).toRgbString()]},Ed=t=>{const e=t.start.join(","),r=t.end.join(",");if(t.broken){const n=t.broken.join(",");return`M${e} L${n} L${r}`}else if(t.broken2){const{minX:n,maxX:i,minY:a,maxY:o}=Va(t);return i-n>=o-a?`M${e} L${t.broken2[0]},${t.start[1]} L${t.broken2[0]},${t.end[1]} ${r}`:`M${e} L${t.start[0]},${t.broken2[1]} L${t.end[0]},${t.broken2[1]} ${r}`}else if(t.curve){const n=t.curve.join(",");return`M${e} Q${n} ${r}`}else if(t.cubic){const[n,i]=t.cubic,a=n.join(","),o=i.join(",");return`M${e} C${a} ${o} ${r}`}return`M${e} L${r}`},Zu=t=>{const r=t.replace(/[\n\r]+/g,"<br>").split("<br>");let n="";for(const i of r)i&&(n+=`<div>${i}</div>`);return n},q4=t=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(t),Dd=()=>{const{setActiveElementIdList:t}=St(),{currentSlide:e,addElement:r,addSlide:n}=kt(),{addHistorySnapshot:i}=Me();return{addElementsFromData:s=>{if(!e)return;const{groupIdMap:l,elIdMap:u}=Uu(s),c=s[0];let f=0,d;do d=e.elements.find(h=>{if(h.type!==c.type)return!1;const{minX:v,maxX:p,minY:g,maxY:m}=Va(h),{minX:y,maxX:_,minY:b,maxY:x}=Va({...c,left:c.left+f,top:c.top+f});return v===y&&p===_&&g===b&&m===x}),d&&(f+=10);while(d);for(const h of s)h.id=u[h.id],h.left=h.left+f,h.top=h.top+f,h.groupId&&(h.groupId=l[h.groupId]);r(s),t(Object.values(u)),i()},addSlidesFromData:s=>{const l=U4(s),u=s.map(c=>{const{groupIdMap:f,elIdMap:d}=Uu(c.elements);for(const h of c.elements)h.id=d[h.id],h.groupId&&(h.groupId=f[h.groupId]),h.link&&h.link.type==="slide"&&(l[h.link.target]?h.link.target=l[h.link.target]:delete h.link);if(c.animations)for(const h of c.animations)h.id=Rt.nanoid(10),h.elId=d[h.elId];return{...c,id:l[c.id]}});n(u),i()}}},j4=t=>{const e=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pexels\.com\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(t),r=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pptist\.cn\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(t);return e||r},Ad=()=>{const{shiftKeyState:t}=nr(),{createTextElement:e,createImageElement:r}=$a(),{addElementsFromData:n,addSlidesFromData:i}=Dd(),a=s=>{e({left:0,top:0,width:600,height:50},{content:s})};return{pasteTextClipboardData:(s,l)=>{const u=(l==null?void 0:l.onlySlide)||!1,c=(l==null?void 0:l.onlyElements)||!1,f=Md(s);if(typeof f=="object"){const{type:d,data:h}=f;d==="elements"&&!u?n(h):d==="slides"&&!c&&i(h)}else if(!c&&!u)if(t){const d=Zu(f);a(d)}else if(j4(f))r(f);else if(q4(f))a(`<a href="${f}" title="${f}" target="_blank">${f}</a>`);else if(z4(f)){const d=F4(f);Sd(d).then(h=>r(h))}else{const d=Zu(f);a(d)}}}},Q4=()=>{const{selectedSlidesIndex:t,activeElementIdList:e,setActiveElementIdList:r,setThumbnailsFocus:n,updateSelectedSlidesIndex:i}=St(),{currentSlide:a,slides:o,theme:s,slideIndex:l,updateSlideIndex:u,addSlide:c,deleteSlide:f,updateSlide:d,setSlides:h}=kt(),v=O.useMemo(()=>[...t,l],[t,l]),p=O.useMemo(()=>o.filter((k,N)=>v.includes(N)),[o,v]),g=O.useMemo(()=>p.map(k=>k.id),[p]),{pasteTextClipboardData:m}=Ad(),{addSlidesFromData:y}=Dd(),{addHistorySnapshot:_}=Me(),b=()=>{const k={id:Rt.nanoid(10),elements:[],background:{type:"solid",color:s.backgroundColor}};u(0),r([]),h([k])},x=k=>{k===se.UP&&l>0?(e.length&&r([]),u(l-1)):k===se.DOWN&&l<o.length-1&&(e.length&&r([]),u(l+1))},S=()=>{const k=wd(JSON.stringify({type:"slides",data:p}));Td(k).then(()=>{n(!0)})},w=()=>{Ld().then(k=>{m(k,{onlySlide:!0})}).catch(k=>console.warn(k))},T=()=>{const k={id:Rt.nanoid(10),elements:[],background:{type:"solid",color:s.backgroundColor}};r([]),c(k),_()},L=k=>{const{groupIdMap:N,elIdMap:z}=Uu(k.elements);for(const V of k.elements)V.id=z[V.id],V.groupId&&(V.groupId=N[V.groupId]);const R={...k,id:Rt.nanoid(10)};r([]),c(R),_()},C=()=>{const k=JSON.parse(JSON.stringify(a));y([k])},M=(k=g)=>{o.length===k.length?b():f(k),i([]),_()},A=()=>{const k=[...g];S(),M(k)},E=()=>{const k=Array.from(Array(o.length),(N,z)=>z);r([]),i(k)},P=(k,N)=>{if(N===k)return;const z=JSON.parse(JSON.stringify(o)),R=z[N],V=R.sectionTag;if(V){const H=z[N+1];delete R.sectionTag,H&&!H.sectionTag&&(H.sectionTag=V)}if(k===0){const H=z[0].sectionTag;H&&(delete z[0].sectionTag,R.sectionTag=H)}const I=z[N];z.splice(N,1),z.splice(k,0,I),h(z),u(k)},B=O.useMemo(()=>o.length===0?!0:!(o.length>1||o[0].elements.length>0),[o]);return{resetSlides:b,updateSlideIndex:x,copySlide:S,pasteSlide:w,createSlide:T,createSlideByTemplate:L,copyAndPasteSlide:C,deleteSlide:M,cutSlide:A,selectAllSlide:E,sortSlides:P,isEmptySlide:B}};function K4(t,e){O.useEffect(()=>{const r=n=>{var s;const i=t.current;if(!i)return;const a=(s=n.composedPath)==null?void 0:s.call(n);(a?!a.includes(i):!i.contains(n.target))&&e(n)};return document.addEventListener("click",r),()=>{document.removeEventListener("click",r)}},[t,e])}const J4=()=>{const t=window.getSelection();t&&t.removeAllRanges()},t_=t=>{const[e,r]=O.useState(0),[n,i]=O.useState(0),a=St(p=>p.canvasPercentage),o=St(p=>p.canvasDragged),s=St(p=>p.setCanvasScale),l=St(p=>p.setCanvasDragged),u=kt(p=>p.viewportRatio),c=kt(p=>p.viewportSize),f=O.useRef(a),d=O.useCallback(()=>{if(!t.current)return;const p=t.current.clientWidth,g=t.current.clientHeight;if(!(p===0||g===0))if(g/p>u){const m=p*(a/100);s(m/c),r((p-m)/2),i((g-m*u)/2)}else{const m=g*(a/100);s(m/(c*u)),r((p-m/u)/2),i((g-m)/2)}},[t,u,c,a,s]);return O.useEffect(()=>{const p=f.current,g=a;if(p===g||(f.current=g,!t.current))return;const m=t.current.clientWidth,y=t.current.clientHeight;if(y/m>u){const _=m*(g/100),b=m*(p/100),x=_*u,S=b*u;s(_/c),r(w=>w-(_-b)/2),i(w=>w-(x-S)/2)}else{const _=y*(g/100),b=y*(p/100),x=_/u,S=b/u;s(_/(c*u)),r(w=>w-(x-S)/2),i(w=>w-(_-b)/2)}},[a,u,c,s,t]),O.useEffect(()=>{d()},[d]),O.useEffect(()=>{o||d()},[o,d]),O.useEffect(()=>{const p=t.current;if(!p)return;d();const g=new ResizeObserver(()=>{d()});return g.observe(p),()=>{g.disconnect()}},[t,d]),{viewportStyles:O.useMemo(()=>({width:c,height:c*u,left:e,top:n}),[c,u,e,n]),dragViewport:p=>{let g=!0;const m=p.pageX,y=p.pageY,_=e,b=n,x=w=>{if(!g)return;const T=w.pageX,L=w.pageY;r(_+(T-m)),i(b+(L-y))},S=()=>{g=!1,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",S),l(!0)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",S)}}},e_=(t,e)=>{const[r,n]=O.useState(!1),[i,a]=O.useState({top:0,left:0,width:0,height:0,quadrant:1}),o=O.useRef({top:0,left:0,width:0,height:0,quadrant:1});return{selectionState:i,mouseSelectionVisible:r,updateMouseSelection:l=>{if(!e.current)return;l.stopPropagation();let u=!0;const c=e.current.getBoundingClientRect(),{canvasScale:f,hiddenElementIdList:d,setActiveElementIdList:h}=St.getState(),v=5,p=l.pageX,g=l.pageY,m=(p-c.x)/f,y=(g-c.y)/f;o.current={top:y,left:m,width:0,height:0,quadrant:4},a({...o.current}),n(!1);const _=x=>{if(!u)return;const S=x.pageX,w=x.pageY,T=(S-p)/f,L=(w-g)/f,C=Math.abs(T),M=Math.abs(L);if(C<v||M<v)return;let A=0;T>0&&L>0?A=4:T<0&&L<0?A=2:T>0&&L<0?A=1:T<0&&L>0&&(A=3),o.current={...o.current,width:C,height:M,quadrant:A},a({...o.current}),n(!0)},b=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),u=!1;const{ctrlOrShiftKeyActive:x}=nr.getState(),S=o.current,w=S.left,T=S.top,L=S.width,C=S.height,M=S.quadrant;let A=[];for(let P=0;P<t.length;P++){const B=t[P],{minX:k,maxX:N,minY:z,maxY:R}=Va(B);let V=!1;x?M===4?V=N>w&&k<w+L&&R>T&&z<T+C:M===2?V=N>w-L&&k<w-L+L&&R>T-C&&z<T-C+C:M===1?V=N>w&&k<w+L&&R>T-C&&z<T-C+C:M===3&&(V=N>w-L&&k<w-L+L&&R>T&&z<T+C):M===4?V=k>w&&N<w+L&&z>T&&R<T+C:M===2?V=k>w-L&&N<w-L+L&&z>T-C&&R<T-C+C:M===1?V=k>w&&N<w+L&&z>T-C&&R<T-C+C:M===3&&(V=k>w-L&&N<w-L+L&&z>T&&R<T+C),V&&!d.includes(B.id)&&A.push(B)}A=A.filter(P=>{if(P.groupId){const B=A.map(N=>N.id);return t.filter(N=>N.groupId===P.groupId).every(N=>B.includes(N.id))}return!0});const E=A.map(P=>P.id);h(E),n(!1)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",b)}}},Pd={"audio/aac":"aac","audio/mpeg":"mp3","audio/ogg":"oga","audio/wav":"wav","audio/webm":"weba","audio/flac":"flac","audio/mp4":"m4a","audio/x-aiff":"aif","audio/x-ms-wma":"wma","audio/midi":"mid","video/mp4":"mp4","video/mpeg":"mpeg","video/ogg":"ogv","video/webm":"webm","video/x-msvideo":"avi","video/quicktime":"mov","video/x-ms-wmv":"wmv","video/x-flv":"flv","video/3gpp":"3gp","video/3gpp2":"3g2"},r_=()=>{const{createImageElement:t,createVideoElement:e,createAudioElement:r}=$a();return{pasteDataTransfer:i=>{const a=i.items,o=a[0];let s=!1;for(const l of a)if(l.kind==="file"){if(l.type.indexOf("image")!==-1){const u=l.getAsFile();u&&(Sd(u).then(c=>t(c)),s=!0)}else if(l.type.indexOf("video")!==-1){const u=l.getAsFile();if(u){const c=URL.createObjectURL(u),f=Pd[u.type]||"";e(c,f),s=!0}}else if(l.type.indexOf("audio")!==-1){const u=l.getAsFile();if(u){const c=URL.createObjectURL(u),f=Pd[u.type]||"";r(c,f),s=!0}}}return{isFile:s,dataTransferFirstItem:o}}}},n_=t=>{const{createTextElement:e}=$a(),{pasteDataTransfer:r}=r_();O.useEffect(()=>{const n=o=>{if(!o.dataTransfer||o.dataTransfer.items.length===0)return;const{isFile:s,dataTransferFirstItem:l}=r(o.dataTransfer);s||l&&l.kind==="string"&&l.type==="text/plain"&&l.getAsString(u=>{if(St.getState().disableHotkeys)return;const c=Zu(u);e({left:0,top:0,width:600,height:50},{content:c})})},i=o=>o.preventDefault(),a=t.current;return a&&a.addEventListener("drop",n),document.addEventListener("dragleave",i),document.addEventListener("drop",i),document.addEventListener("dragenter",i),document.addEventListener("dragover",i),()=>{a&&a.removeEventListener("drop",n),document.removeEventListener("dragleave",i),document.removeEventListener("drop",i),document.removeEventListener("dragenter",i),document.removeEventListener("dragover",i)}},[t.current])},i_=t=>{const{canvasScale:e,creatingElement:r,setCreatingElement:n}=St(),{createTextElement:i,createShapeElement:a,createLineElement:o}=$a(),s=c=>{const{start:f,end:d}=c;if(!t.current)return;const h=t.current.getBoundingClientRect(),[v,p]=f,[g,m]=d,y=Math.min(v,g),_=Math.max(v,g),b=Math.min(p,m),x=Math.max(p,m),S=(y-h.x)/e,w=(b-h.y)/e,T=(_-y)/e,L=(x-b)/e;return{left:S,top:w,width:T,height:L}},l=c=>{const{start:f,end:d}=c;if(!t.current)return;const h=t.current.getBoundingClientRect(),[v,p]=f,[g,m]=d,y=Math.min(v,g),_=Math.max(v,g),b=Math.min(p,m),x=Math.max(p,m),S=(y-h.x)/e,w=(b-h.y)/e,T=(_-y)/e,L=(x-b)/e;return{left:S,top:w,start:[v===y?0:T,p===b?0:L],end:[g===y?0:T,m===b?0:L]}};return{formatCreateSelection:s,insertElementFromCreateSelection:c=>{if(!r)return;const f=r.type;if(f==="text"){const d=s(c);d&&i(d,{vertical:r.vertical})}else if(f==="shape"){const d=s(c);d&&a(d,r.data)}else if(f==="line"){const d=l(c);d&&o(d,r.data)}n(null)}}},a_=(t,e,r)=>{kt();const{addHistorySnapshot:n}=Me();return{dragElement:(a,o)=>{const s=!(a instanceof MouseEvent);if(s&&(!a.changedTouches||!a.changedTouches[0]))return;const{activeElementIdList:l,activeGroupElementId:u}=St.getState();if(!l.includes(o.id))return;let c=!0;const{viewportRatio:f,viewportSize:d}=kt.getState(),h=d,v=d*f,p=5,m=JSON.parse(JSON.stringify(t)).filter(G=>l.includes(G.id)),y=o.left,_=o.top,b=o.width,x="height"in o&&o.height?o.height:0,S="rotate"in o&&o.rotate?o.rotate:0,w=s?a.changedTouches[0].pageX:a.pageX,T=s?a.changedTouches[0].pageY:a.pageY,L=St.getState().canvasScale,C=nr.getState().shiftKeyState;let M=null;const A=o.id===u;let E=[],P=[];for(const G of t){if(G.type==="line"||A&&G.id===o.id||!A&&l.includes(G.id))continue;let X,J,ct,vt;if("rotate"in G&&G.rotate){const{xRange:_t,yRange:pt}=bs({left:G.left,top:G.top,width:G.width,height:G.height,rotate:G.rotate});X=_t[0],J=pt[0],ct=_t[1]-_t[0],vt=pt[1]-pt[0]}else X=G.left,J=G.top,ct=G.width,vt=G.height;const U=X+ct,Y=J+vt,tt=J+vt/2,j=X+ct/2,nt={value:J,range:[X,U]},it={value:Y,range:[X,U]},at={value:tt,range:[X,U]},Et={value:X,range:[J,Y]},Q={value:U,range:[J,Y]},K={value:j,range:[J,Y]};E.push(nt,it,at),P.push(Et,Q,K)}const B={value:0,range:[0,h]},k={value:v,range:[0,h]},N={value:v/2,range:[0,h]},z={value:0,range:[0,v]},R={value:h,range:[0,v]},V={value:h/2,range:[0,v]};E.push(B,k,N),P.push(z,R,V),E=Ss(E),P=Ss(P);const I=G=>{const X=G instanceof MouseEvent?G.pageX:G.changedTouches[0].pageX,J=G instanceof MouseEvent?G.pageY:G.changedTouches[0].pageY;if(M!==!1&&(M=Math.abs(w-X)<p&&Math.abs(T-J)<p),!c||M)return;let ct=(X-w)/L,vt=(J-T)/L;C&&(Math.abs(ct)>Math.abs(vt)&&(vt=0),Math.abs(ct)<Math.abs(vt)&&(ct=0));let U=y+ct,Y=_+vt,tt,j,nt,it;if(l.length===1||A)if(S){const{xRange:pt,yRange:yt}=bs({left:U,top:Y,width:b,height:x,rotate:S});tt=pt[0],j=pt[1],nt=yt[0],it=yt[1]}else o.type==="line"?(tt=U,j=U+Math.max(o.start[0],o.end[0]),nt=Y,it=Y+Math.max(o.start[1],o.end[1])):(tt=U,j=U+b,nt=Y,it=Y+x);else{const pt=[],yt=[],W=[],F=[];for(let q=0;q<m.length;q++){const Z=m[q],lt=Z.left+ct,ft=Z.top+vt,ht=Z.width,Yt="height"in Z&&Z.height?Z.height:0,Qt="rotate"in Z&&Z.rotate?Z.rotate:0;if("rotate"in Z&&Z.rotate){const{xRange:zt,yRange:we}=bs({left:lt,top:ft,width:ht,height:Yt,rotate:Qt});pt.push(zt[0]),yt.push(we[0]),W.push(zt[1]),F.push(we[1])}else Z.type==="line"?(pt.push(lt),yt.push(ft),W.push(lt+Math.max(Z.start[0],Z.end[0])),F.push(ft+Math.max(Z.start[1],Z.end[1]))):(pt.push(lt),yt.push(ft),W.push(lt+ht),F.push(ft+Yt))}tt=Math.min(...pt),j=Math.max(...W),nt=Math.min(...yt),it=Math.max(...F)}const at=tt+(j-tt)/2,Et=nt+(it-nt)/2,Q=[];let K=!1,_t=!1;for(let pt=0;pt<E.length;pt++){const{value:yt,range:W}=E[pt],F=Math.min(...W,tt,j),q=Math.max(...W,tt,j);Math.abs(nt-yt)<p&&!_t&&(Y=Y-(nt-yt),_t=!0,Q.push({type:"horizontal",axis:{x:F-50,y:yt},length:q-F+100})),Math.abs(it-yt)<p&&!_t&&(Y=Y-(it-yt),_t=!0,Q.push({type:"horizontal",axis:{x:F-50,y:yt},length:q-F+100})),Math.abs(Et-yt)<p&&!_t&&(Y=Y-(Et-yt),_t=!0,Q.push({type:"horizontal",axis:{x:F-50,y:yt},length:q-F+100}))}for(let pt=0;pt<P.length;pt++){const{value:yt,range:W}=P[pt],F=Math.min(...W,nt,it),q=Math.max(...W,nt,it);Math.abs(tt-yt)<p&&!K&&(U=U-(tt-yt),K=!0,Q.push({type:"vertical",axis:{x:yt,y:F-50},length:q-F+100})),Math.abs(j-yt)<p&&!K&&(U=U-(j-yt),K=!0,Q.push({type:"vertical",axis:{x:yt,y:F-50},length:q-F+100})),Math.abs(at-yt)<p&&!K&&(U=U-(at-yt),K=!0,Q.push({type:"vertical",axis:{x:yt,y:F-50},length:q-F+100}))}if(r(Q),l.length===1||A)e(pt=>pt.map(yt=>yt.id===o.id?{...yt,left:U,top:Y}:yt));else{const pt=t.find(yt=>yt.id===o.id);if(!pt)return;e(yt=>yt.map(W=>l.includes(W.id)?W.id===o.id?{...W,left:U,top:Y}:{...W,left:W.left+(U-pt.left),top:W.top+(Y-pt.top)}:W))}},H=G=>{c=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,r([]);const X=G instanceof MouseEvent?G.pageX:G.changedTouches[0].pageX,J=G instanceof MouseEvent?G.pageY:G.changedTouches[0].pageY;w===X&&T===J||n()};s?(document.ontouchmove=I,document.ontouchend=H):(document.onmousemove=I,document.onmouseup=H)}}},o_=(t,e)=>{const r=St();return{selectElement:(i,a,o=!0)=>{if(!i)return;const{activeElementIdList:s,activeGroupElementId:l,handleElementId:u,editorAreaFocus:c}=St.getState(),{ctrlOrShiftKeyActive:f}=nr.getState();if(c||r.setEditorareaFocus(!0),s.includes(a.id)){if(f){let d=[];if(a.groupId){const h=[];t.forEach(v=>{v.groupId===a.groupId&&h.push(v.id)}),d=s.filter(v=>!h.includes(v))}else d=s.filter(h=>h!==a.id);d.length>0&&r.setActiveElementIdList(d)}else if(u!==a.id)r.setHandleElementId(a.id);else if(l!==a.id){let d=0,h=0;if(i instanceof MouseEvent?(d=i.pageX,h=i.pageY):"changedTouches"in i&&i.changedTouches&&i.changedTouches.length>0&&(d=i.changedTouches[0].pageX,h=i.changedTouches[0].pageY),d||h){const v=i.target;v.onmouseup=p=>{const g=p.pageX,m=p.pageY;d===g&&h===m&&(r.setActiveGroupElementId(a.id),v.onmouseup=null)}}}}else{let d=[];if(f?d=[...s,a.id]:d=[a.id],a.groupId){const h=[];t.forEach(v=>{v.groupId===a.groupId&&h.push(v.id)}),d=[...d,...h]}r.setActiveElementIdList(mr.uniq(d)),r.setHandleElementId(a.id)}o&&e(i,a)}}},s_=(t,e)=>{const r=Math.atan2(t,e);return 180/Math.PI*r},l_=(t,e,r)=>{kt();const{addHistorySnapshot:n}=Me();return{rotateElement:(a,o)=>{const s=!(a instanceof MouseEvent);if(s&&(!a.changedTouches||!a.changedTouches[0]))return;let l=!0,u=0;const c=o.rotate||0,f=o.left,d=o.top,h=o.width,v=o.height,p=St.getState().canvasScale,g=f+h/2,m=d+v/2;if(!r.current)return;const y=r.current.getBoundingClientRect(),_=x=>{if(!l)return;const S=x instanceof MouseEvent?x.pageX:x.changedTouches[0].pageX,w=x instanceof MouseEvent?x.pageY:x.changedTouches[0].pageY,T=(S-y.left)/p,L=(w-y.top)/p,C=T-g,M=m-L;u=s_(C,M);const A=5;Math.abs(u)<=A?u=0:u>0&&Math.abs(u-45)<=A?u-=u-45:u<0&&Math.abs(u+45)<=A?u-=u+45:u>0&&Math.abs(u-90)<=A?u-=u-90:u<0&&Math.abs(u+90)<=A?u-=u+90:u>0&&Math.abs(u-135)<=A?u-=u-135:u<0&&Math.abs(u+135)<=A?u-=u+135:u>0&&Math.abs(u-180)<=A?u-=u-180:u<0&&Math.abs(u+180)<=A&&(u-=u+180),e(E=>E.map(P=>o.id===P.id?{...P,rotate:u}:P))},b=()=>{l=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&n()};s?(document.ontouchmove=_,document.ontouchend=b):(document.onmousemove=_,document.onmouseup=b)}}};var _r=(t=>(t.UP="up",t.DOWN="down",t.TOP="top",t.BOTTOM="bottom",t))(_r||{}),pe=(t=>(t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.CENTER="center",t))(pe||{}),za=(t=>(t.T="top",t.B="bottom",t.L="left",t.R="right",t))(za||{}),et=(t=>(t.LEFT_TOP="left-top",t.TOP="top",t.RIGHT_TOP="right-top",t.LEFT="left",t.RIGHT="right",t.LEFT_BOTTOM="left-bottom",t.BOTTOM="bottom",t.RIGHT_BOTTOM="right-bottom",t))(et||{}),Ve=(t=>(t.START="start",t.END="end",t.C="ctrl",t.C1="ctrl1",t.C2="ctrl2",t))(Ve||{});const u_={text:40,image:20,shape:20,chart:200,table:30,video:250,audio:20,latex:20},Nd=(t,e)=>{const{left:r,top:n,width:i,height:a}=t,o=Math.sqrt(Math.pow(i,2)+Math.pow(a,2))/2,s=Math.atan(a/i)*180/Math.PI,l=(180-e-s)*Math.PI/180,u=(s-e)*Math.PI/180,c=(90-e)*Math.PI/180,f=e*Math.PI/180,d=i/2,h=a/2,v=r+d,p=n+h,g={left:v+o*Math.cos(l),top:p-o*Math.sin(l)},m={left:v+h*Math.cos(c),top:p-h*Math.sin(c)},y={left:v+o*Math.cos(u),top:p-o*Math.sin(u)},_={left:v+d*Math.cos(f),top:p+d*Math.sin(f)},b={left:v-o*Math.cos(l),top:p+o*Math.sin(l)},x={left:v-h*Math.sin(f),top:p+h*Math.cos(f)},S={left:v-o*Math.cos(u),top:p+o*Math.sin(u)},w={left:v-d*Math.cos(f),top:p-d*Math.sin(f)};return{leftTopPoint:g,topPoint:m,rightTopPoint:y,rightPoint:_,rightBottomPoint:b,bottomPoint:x,leftBottomPoint:S,leftPoint:w}},kd=(t,e)=>({[et.RIGHT_BOTTOM]:e.leftTopPoint,[et.LEFT_BOTTOM]:e.rightTopPoint,[et.LEFT_TOP]:e.rightBottomPoint,[et.RIGHT_TOP]:e.leftBottomPoint,[et.TOP]:e.bottomPoint,[et.BOTTOM]:e.topPoint,[et.LEFT]:e.rightPoint,[et.RIGHT]:e.leftPoint})[t],c_=(t,e,r)=>{const n=St();kt();const{addHistorySnapshot:i}=Me();return{scaleElement:(s,l,u)=>{const c=!(s instanceof MouseEvent);if(c&&(!s.changedTouches||!s.changedTouches[0]))return;let f=!0;n.setScalingState(!0);const d=l.left,h=l.top,v=l.width,p=l.height,g=l.type==="table"?l.cellMinHeight:0,m="rotate"in l&&l.rotate?l.rotate:0,y=Math.PI*m/180,b=nr.getState().ctrlOrShiftKeyActive||"fixedRatio"in l&&l.fixedRatio,x=v/p,S=c?s.changedTouches[0].pageX:s.pageX,w=c?s.changedTouches[0].pageY:s.pageY,T=St.getState().canvasScale,L=u_[l.type]||20,C=(R,V)=>{if(!b)return R<L?L:R;let I=L,H=L;const G=l.width/l.height;return G<1&&(H=L/G),G>1&&(I=L*G),V==="width"?R<I?I:R:R<H?H:R};let M,A=0,E=0,P=[],B=[];if("rotate"in l&&l.rotate){const{left:R,top:V,width:I,height:H}=l;M=Nd({left:R,top:V,width:I,height:H},m);const G=kd(u,M);A=G.left,E=G.top}else{const{viewportRatio:R,viewportSize:V}=kt.getState(),{activeElementIdList:I,activeGroupElementId:H}=St.getState(),G=V,X=V*R,J=l.id===H;for(const nt of t){if("rotate"in nt&&nt.rotate||nt.type==="line"||J&&nt.id===l.id||!J&&I.includes(nt.id))continue;const it=nt.left,at=nt.top,Et=nt.width,Q=nt.height,K=it+Et,_t=at+Q,pt={value:at,range:[it,K]},yt={value:_t,range:[it,K]},W={value:it,range:[at,_t]},F={value:K,range:[at,_t]};P.push(pt,yt),B.push(W,F)}const ct={value:0,range:[0,G]},vt={value:X,range:[0,G]},U={value:X/2,range:[0,G]},Y={value:0,range:[0,X]},tt={value:G,range:[0,X]},j={value:G/2,range:[0,X]};P.push(ct,vt,U),B.push(Y,tt,j),P=Ss(P),B=Ss(B)}const k=(R,V)=>{const H=[];let G=!1,X=!1;const J={offsetX:0,offsetY:0};if(V||V===0)for(let ct=0;ct<P.length;ct++){const{value:vt,range:U}=P[ct],Y=Math.min(...U,R||0),tt=Math.max(...U,R||0);Math.abs(V-vt)<5&&!X&&(J.offsetY=V-vt,X=!0,H.push({type:"horizontal",axis:{x:Y-50,y:vt},length:tt-Y+100}))}if(R||R===0)for(let ct=0;ct<B.length;ct++){const{value:vt,range:U}=B[ct],Y=Math.min(...U,V||0),tt=Math.max(...U,V||0);Math.abs(R-vt)<5&&!G&&(J.offsetX=R-vt,G=!0,H.push({type:"vertical",axis:{x:vt,y:Y-50},length:tt-Y+100}))}return r(H),J},N=R=>{if(!f)return;const V=R instanceof MouseEvent?R.pageX:R.changedTouches[0].pageX,I=R instanceof MouseEvent?R.pageY:R.changedTouches[0].pageY,H=V-S,G=I-w;let X=v,J=p,ct=d,vt=h;if(m){const U=(Math.cos(y)*H+Math.sin(y)*G)/T;let Y=(Math.cos(y)*G-Math.sin(y)*H)/T;b&&((u===et.RIGHT_BOTTOM||u===et.LEFT_TOP)&&(Y=U/x),(u===et.LEFT_BOTTOM||u===et.RIGHT_TOP)&&(Y=-U/x)),u===et.RIGHT_BOTTOM?(X=C(v+U,"width"),J=C(p+Y,"height")):u===et.LEFT_BOTTOM?(X=C(v-U,"width"),J=C(p+Y,"height"),ct=d-(X-v)):u===et.LEFT_TOP?(X=C(v-U,"width"),J=C(p-Y,"height"),ct=d-(X-v),vt=h-(J-p)):u===et.RIGHT_TOP?(X=C(v+U,"width"),J=C(p-Y,"height"),vt=h-(J-p)):u===et.TOP?(J=C(p-Y,"height"),vt=h-(J-p)):u===et.BOTTOM?J=C(p+Y,"height"):u===et.LEFT?(X=C(v-U,"width"),ct=d-(X-v)):u===et.RIGHT&&(X=C(v+U,"width"));const tt=Nd({width:X,height:J,left:ct,top:vt},m),j=kd(u,tt),nt=j.left,it=j.top,at=nt-A,Et=it-E;ct=ct-at,vt=vt-Et}else{let U=H/T,Y=G/T;if(b&&((u===et.RIGHT_BOTTOM||u===et.LEFT_TOP)&&(Y=U/x),(u===et.LEFT_BOTTOM||u===et.RIGHT_TOP)&&(Y=-U/x)),u===et.RIGHT_BOTTOM){const{offsetX:tt,offsetY:j}=k(d+v+U,h+p+Y);U=U-tt,Y=Y-j,b&&(j?U=Y*x:Y=U/x),X=C(v+U,"width"),J=C(p+Y,"height")}else if(u===et.LEFT_BOTTOM){const{offsetX:tt,offsetY:j}=k(d+U,h+p+Y);U=U-tt,Y=Y-j,b&&(j?U=-Y*x:Y=-U/x),X=C(v-U,"width"),J=C(p+Y,"height"),ct=d-(X-v)}else if(u===et.LEFT_TOP){const{offsetX:tt,offsetY:j}=k(d+U,h+Y);U=U-tt,Y=Y-j,b&&(j?U=Y*x:Y=U/x),X=C(v-U,"width"),J=C(p-Y,"height"),ct=d-(X-v),vt=h-(J-p)}else if(u===et.RIGHT_TOP){const{offsetX:tt,offsetY:j}=k(d+v+U,h+Y);U=U-tt,Y=Y-j,b&&(j?U=-Y*x:Y=-U/x),X=C(v+U,"width"),J=C(p-Y,"height"),vt=h-(J-p)}else if(u===et.LEFT){const{offsetX:tt}=k(d+U,null);U=U-tt,X=C(v-U,"width"),ct=d-(X-v)}else if(u===et.RIGHT){const{offsetX:tt}=k(d+v+U,null);U=U-tt,X=C(v+U,"width")}else if(u===et.TOP){const{offsetY:tt}=k(null,h+Y);Y=Y-tt,J=C(p-Y,"height"),vt=h-(J-p)}else if(u===et.BOTTOM){const{offsetY:tt}=k(null,h+p+Y);Y=Y-tt,J=C(p+Y,"height")}}e(U=>U.map(Y=>{if(l.id!==Y.id)return Y;if(Y.type==="shape"&&"pathFormula"in Y&&Y.pathFormula){const tt=Ra[Y.pathFormula];let j="";return"editable"in tt?j=tt.formula(X,J,Y.keypoints):j=tt.formula(X,J),{...Y,left:ct,top:vt,width:X,height:J,viewBox:[X,J],path:j}}if(Y.type==="table"){let tt=g+(J-p)/Y.data.length;return tt=tt<36?36:tt,tt===g?{...Y,left:ct,width:X}:{...Y,left:ct,top:vt,width:X,height:J,cellMinHeight:tt<36?36:tt}}return{...Y,left:ct,top:vt,width:X,height:J}}))},z=R=>{f=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,r([]);const V=R instanceof MouseEvent?R.pageX:R.changedTouches[0].pageX,I=R instanceof MouseEvent?R.pageY:R.changedTouches[0].pageY;S===V&&w===I||(i(),n.setScalingState(!1))};c?(document.ontouchmove=N,document.ontouchend=z):(document.onmousemove=N,document.onmouseup=z)},scaleMultiElement:(s,l,u)=>{let c=!0;const{minX:f,maxX:d,minY:h,maxY:v}=l,p=d-f,g=v-h,m=p/g,y=s.pageX,_=s.pageY,b=St.getState().canvasScale,{activeElementIdList:x}=St.getState(),{ctrlOrShiftKeyActive:S}=nr.getState(),w=JSON.parse(JSON.stringify(t));document.onmousemove=T=>{if(!c)return;const L=T.pageX,C=T.pageY,M=(L-y)/b;let A=(C-_)/b;S&&((u===et.RIGHT_BOTTOM||u===et.LEFT_TOP)&&(A=M/m),(u===et.LEFT_BOTTOM||u===et.RIGHT_TOP)&&(A=-M/m));let E=f,P=d,B=h,k=v;u===et.RIGHT_BOTTOM?(P=d+M,k=v+A):u===et.LEFT_BOTTOM?(E=f+M,k=v+A):u===et.LEFT_TOP?(E=f+M,B=h+A):u===et.RIGHT_TOP?(P=d+M,B=h+A):u===et.TOP?B=h+A:u===et.BOTTOM?k=v+A:u===et.LEFT?E=f+M:u===et.RIGHT&&(P=d+M);const N=P-E,z=k-B;let R=N/p,V=z/g;R<=0&&(R=0),V<=0&&(V=0),e(I=>I.map(H=>{if((H.type==="image"||H.type==="shape")&&x.includes(H.id)){const G=w.find(X=>X.id===H.id);return G?{...H,width:G.width*R,height:G.height*V,left:E+(G.left-f)*R,top:B+(G.top-h)*V}:H}return H}))},document.onmouseup=T=>{c=!1,document.onmousemove=null,document.onmouseup=null,!(y===T.pageX&&_===T.pageY)&&i()}}}},f_=(t,e)=>{kt();const{addHistorySnapshot:r}=Me();return{dragLineElement:(i,a,o)=>{let s=!0;const l=8,u=i.pageX,c=i.pageY,f=St.getState().canvasScale,d=nr.getState().ctrlOrShiftKeyActive,h=[];for(let v=0;v<t.length;v++){const p=t[v];if(p.type==="line"||p.rotate)continue;const g=p.left,m=p.top,y=p.width,_=p.height,b=g+y,x=m+_,S=m+_/2,w=g+y/2,T={x:w,y:m},L={x:w,y:x},C={x:g,y:S},M={x:b,y:S},A={x:g,y:m},E={x:b,y:m},P={x:g,y:x},B={x:b,y:x};h.push(T,L,C,M,A,E,P,B)}document.onmousemove=v=>{if(!s)return;const p=v.pageX,g=v.pageY,m=(p-u)/f,y=(g-c)/f;let _=a.left+a.start[0],b=a.top+a.start[1],x=a.left+a.end[0],S=a.top+a.end[1];const w=a.broken||a.broken2||a.curve||[0,0];let T=a.left+w[0],L=a.top+w[1];const[C,M]=a.cubic||[[0,0],[0,0]];let A=a.left+C[0],E=a.top+C[1],P=a.left+M[0],B=a.top+M[1];if(o===Ve.START){_=_+m,b=b+y,Math.abs(_-x)<l&&(_=x),Math.abs(b-S)<l&&(b=S);for(const H of h){const{x:G,y:X}=H;if(Math.abs(G-_)<l&&Math.abs(X-b)<l){_=G,b=X;break}}}else if(o===Ve.END){x=x+m,S=S+y,Math.abs(_-x)<l&&(x=_),Math.abs(b-S)<l&&(S=b);for(const H of h){const{x:G,y:X}=H;if(Math.abs(G-x)<l&&Math.abs(X-S)<l){x=G,S=X;break}}}else o===Ve.C?(T=T+m,L=L+y,Math.abs(T-_)<l&&(T=_),Math.abs(L-b)<l&&(L=b),Math.abs(T-x)<l&&(T=x),Math.abs(L-S)<l&&(L=S),Math.abs(T-(_+x)/2)<l&&Math.abs(L-(b+S)/2)<l&&(T=(_+x)/2,L=(b+S)/2)):o===Ve.C1?(A=A+m,E=E+y,Math.abs(A-_)<l&&(A=_),Math.abs(E-b)<l&&(E=b),Math.abs(A-x)<l&&(A=x),Math.abs(E-S)<l&&(E=S)):o===Ve.C2&&(P=P+m,B=B+y,Math.abs(P-_)<l&&(P=_),Math.abs(B-b)<l&&(B=b),Math.abs(P-x)<l&&(P=x),Math.abs(B-S)<l&&(B=S));const k=Math.min(_,x),N=Math.min(b,S),z=Math.max(_,x),R=Math.max(b,S),V=[0,0],I=[z-k,R-N];_>x&&(V[0]=z-k,I[0]=0),b>S&&(V[1]=R-N,I[1]=0),e(H=>H.map(G=>{if(G.id===a.id){const X={...G,left:k,top:N,start:V,end:I};return o===Ve.START||o===Ve.END?(d?(a.broken&&(X.broken=[T-k,L-N]),a.curve&&(X.curve=[T-k,L-N]),a.cubic&&(X.cubic=[[A-k,E-N],[P-k,B-N]])):(a.broken&&(X.broken=[(V[0]+I[0])/2,(V[1]+I[1])/2]),a.curve&&(X.curve=[(V[0]+I[0])/2,(V[1]+I[1])/2]),a.cubic&&(X.cubic=[[(V[0]+I[0])/2,(V[1]+I[1])/2],[(V[0]+I[0])/2,(V[1]+I[1])/2]])),a.broken2&&(X.broken2=[(V[0]+I[0])/2,(V[1]+I[1])/2])):o===Ve.C?(a.broken&&(X.broken=[T-k,L-N]),a.curve&&(X.curve=[T-k,L-N]),a.broken2&&(z-k>=R-N?X.broken2=[T-k,X.broken2[1]]:X.broken2=[X.broken2[0],L-N])):a.cubic&&(X.cubic=[[A-k,E-N],[P-k,B-N]]),X}return G}))},document.onmouseup=v=>{s=!1,document.onmousemove=null,document.onmouseup=null;const p=v.pageX,g=v.pageY;u===p&&c===g||r()}}}},h_=(t,e)=>{kt();const{addHistorySnapshot:r}=Me();return{moveShapeKeypoint:(i,a,o=0)=>{const s=!(i instanceof MouseEvent);if(s&&(!i.changedTouches||!i.changedTouches[0]))return;let l=!0;const u=St.getState().canvasScale,c=s?i.changedTouches[0].pageX:i.pageX,f=s?i.changedTouches[0].pageY:i.pageY,d=a.keypoints,h=Ra[a.pathFormula];let v=null;if("editable"in h&&h.editable){const m=h.getBaseSize[o],y=h.range[o],_=h.relative[o],b=d[o],x=m(a.width,a.height),S=x*b,[w,T]=y;v={baseSize:x,originPos:S,min:w,max:T,relative:_}}const p=m=>{if(!l)return;const y=m instanceof MouseEvent?m.pageX:m.changedTouches[0].pageX,_=m instanceof MouseEvent?m.pageY:m.changedTouches[0].pageY,b=(y-c)/u,x=(_-f)/u;e(S=>S.map(w=>{if(w.id===a.id&&v){const{baseSize:T,originPos:L,min:C,max:M,relative:A}=v,E=w;let P=0;A==="center"?P=(L-b*2)/T:A==="left"?P=(L+b)/T:A==="right"?P=(L-b)/T:A==="top"?P=(L+x)/T:A==="bottom"?P=(L-x)/T:A==="left_bottom"?P=(L+b)/T:A==="right_bottom"?P=(L-b)/T:A==="top_right"?P=(L+x)/T:A==="bottom_right"&&(P=(L-x)/T),P<C&&(P=C),P>M&&(P=M);let B=[];return Array.isArray(d)?(B=[...d],B[o]=P):B=[P],{...w,keypoints:B,path:h.formula(E.width,E.height,B)}}return w}))},g=m=>{l=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const y=m instanceof MouseEvent?m.pageX:m.changedTouches[0].pageX,_=m instanceof MouseEvent?m.pageY:m.changedTouches[0].pageY;c===y&&f===_||r()};s?(document.ontouchmove=p,document.ontouchend=g):(document.onmousemove=p,document.onmouseup=g)}}},d_={gridLines:"_gridLines_fow0c_1"},v_=()=>{const{canvasScale:t,gridLineSize:e}=St(),{currentSlide:r,viewportRatio:n,viewportSize:i}=kt(),a=r==null?void 0:r.background,o=O.useMemo(()=>{const l=(a==null?void 0:a.color)||"#fff",u=["#000","#fff"];return ms.mostReadable(l,u,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()},[a]),s=O.useMemo(()=>{if(!e)return"";const l=i,u=i*n;let c="";for(let f=0;f<=Math.floor(u/e);f++)c+=`M0 ${f*e} L${l} ${f*e} `;for(let f=0;f<=Math.floor(l/e);f++)c+=`M${f*e} 0 L${f*e} ${u} `;return c},[i,n,e]);return D.jsx("svg",{className:d_.gridLines,children:D.jsx("path",{style:{transform:`scale(${t})`},d:s,fill:"none",stroke:o,strokeWidth:"0.3",strokeDasharray:"5"})})},Od=t=>({backgroundStyle:O.useMemo(()=>{if(!t)return{backgroundColor:"#fff"};const{type:r,color:n,image:i,gradient:a}=t;if(r==="solid")return{backgroundColor:n};if(r==="image")return i?i.size==="repeat"?{backgroundImage:`url("${i.src}")`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url("${i.src}")`,backgroundRepeat:"no-repeat",backgroundSize:i.size||"cover"}:{backgroundColor:"#fff"};if(r==="gradient"){const o=(a==null?void 0:a.rotate)||0,s=(a==null?void 0:a.colors[0].color)||"#fff",l=(a==null?void 0:a.colors[1].color)||"#fff";return(a==null?void 0:a.type)==="radial"?{backgroundImage:`radial-gradient(${s}, ${l})`}:{backgroundImage:`linear-gradient(${o}deg, ${s}, ${l})`}}return{backgroundColor:"#fff"}},[t])}),p_={viewportBackground:"_viewportBackground_19tuy_1"},g_=()=>{const{gridLineSize:t}=St(),{currentSlide:e}=kt(),r=e==null?void 0:e.background,{backgroundStyle:n}=Od(r);return D.jsx("div",{className:p_.viewportBackground,style:n,children:t>0&&D.jsx(v_,{})})},$i=(t,e)=>{const r=O.useMemo(()=>[{direction:et.LEFT_TOP,style:{}},{direction:et.TOP,style:{left:t/2+"px"}},{direction:et.RIGHT_TOP,style:{left:t+"px"}},{direction:et.LEFT,style:{top:e/2+"px"}},{direction:et.RIGHT,style:{left:t+"px",top:e/2+"px"}},{direction:et.LEFT_BOTTOM,style:{top:e+"px"}},{direction:et.BOTTOM,style:{left:t/2+"px",top:e+"px"}},{direction:et.RIGHT_BOTTOM,style:{left:t+"px",top:e+"px"}}],[t,e]),n=O.useMemo(()=>[{direction:et.LEFT,style:{top:e/2+"px"}},{direction:et.RIGHT,style:{left:t+"px",top:e/2+"px"}}],[t,e]),i=O.useMemo(()=>[{direction:et.TOP,style:{left:t/2+"px"}},{direction:et.BOTTOM,style:{left:t/2+"px",top:e+"px"}}],[t,e]),a=O.useMemo(()=>[{type:za.T,style:{width:t+"px"}},{type:za.B,style:{top:e+"px",width:t+"px"}},{type:za.L,style:{height:e+"px"}},{type:za.R,style:{left:t+"px",height:e+"px"}}],[t,e]);return{resizeHandlers:r,textElementResizeHandlers:n,verticalTextElementResizeHandlers:i,borderLines:a}},m_={rotateHandler:"_rotateHandler_1pyuz_1"},Fa=({style:t,onMouseDown:e})=>D.jsx("div",{className:m_.rotateHandler,style:t,onMouseDown:e}),qu={resizeHandler:"_resizeHandler_vk7ul_1","left-top":"_left-top_vk7ul_14","rotate-0":"_rotate-0_vk7ul_14","right-bottom":"_right-bottom_vk7ul_14",left:"_left_vk7ul_14","rotate-45":"_rotate-45_vk7ul_14",right:"_right_vk7ul_14","left-bottom":"_left-bottom_vk7ul_14","rotate-90":"_rotate-90_vk7ul_14","right-top":"_right-top_vk7ul_14",top:"_top_vk7ul_14","rotate-135":"_rotate-135_vk7ul_14",bottom:"_bottom_vk7ul_14"},qn=({type:t,rotate:e=0,style:r,onMouseDown:n})=>{const i=O.useMemo(()=>{const a="rotate-",o=e;return o>-22.5&&o<=22.5?a+0:o>22.5&&o<=67.5?a+45:o>67.5&&o<=112.5?a+90:o>112.5&&o<=157.5?a+135:o>157.5||o<=-157.5?a+0:o>-157.5&&o<=-112.5?a+45:o>-112.5&&o<=-67.5?a+90:o>-67.5&&o<=-22.5?a+135:a+0},[e]);return D.jsx("div",{className:Dt(qu.resizeHandler,qu[i],qu[t]),style:r,onMouseDown:n})},ju={borderLine:"_borderLine_u4hgj_1",top:"_top_u4hgj_9",bottom:"_bottom_u4hgj_12",left:"_left_u4hgj_15",right:"_right_u4hgj_18",wide:"_wide_u4hgj_21"},Vi=({type:t,isWide:e=!1,style:r})=>D.jsx("div",{className:Dt(ju.borderLine,ju[t],{[ju.wide]:e}),style:r}),xs=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i}=St(),a=t.width*i,o=t.height*i,{resizeHandlers:s,borderLines:l}=$i(a,o),u=O.useMemo(()=>["chart","video","audio"].includes(t.type),[t.type]);return D.jsxs("div",{className:"common-element-operate",children:[l.map(c=>D.jsx(Vi,{type:c.type,style:c.style},c.type)),e&&D.jsxs(D.Fragment,{children:[s.map(c=>D.jsx(qn,{type:c.direction,rotate:t.rotate,style:c.style,onMouseDown:f=>{f.stopPropagation(),n(f,t,c.direction)}},c.direction)),!u&&D.jsx(Fa,{style:{left:a/2+"px"},onMouseDown:c=>{c.stopPropagation(),r(c,t)}})]})]})},Id={imageElementOperate:"_imageElementOperate_170vc_1",cliping:"_cliping_170vc_1"},y_=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i,clipingImageElementId:a}=St(),o=a===t.id,s=t.width*i,l=t.height*i,{resizeHandlers:u,borderLines:c}=$i(s,l);return D.jsxs("div",{className:Dt(Id.imageElementOperate,{[Id.cliping]:o}),children:[c.map(f=>D.jsx(Vi,{type:f.type,style:f.style},f.type)),e&&D.jsxs(D.Fragment,{children:[u.map(f=>D.jsx(qn,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:d=>{d.stopPropagation(),n(d,t,f.direction)}},f.direction)),D.jsx(Fa,{style:{left:s/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}})]})]})},__=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i}=St(),a=t.width*i,o=t.height*i,{textElementResizeHandlers:s,verticalTextElementResizeHandlers:l,borderLines:u}=$i(a,o),c=O.useMemo(()=>t.vertical?l:s,[t.vertical,l,s]);return D.jsxs("div",{className:"text-element-operate",children:[u.map(f=>D.jsx(Vi,{type:f.type,style:f.style},f.type)),e&&D.jsxs(D.Fragment,{children:[c.map(f=>D.jsx(qn,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:d=>{d.stopPropagation(),n(d,t,f.direction)}},f.direction)),D.jsx(Fa,{style:{left:a/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}})]})]})},Bd={operateKeypointHandler:"_operateKeypointHandler_6ci2w_1"},b_=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n,moveShapeKeypoint:i})=>{const{canvasScale:a}=St(),o=t.width*a,s=t.height*a,{resizeHandlers:l,borderLines:u}=$i(o,s),c=O.useMemo(()=>{if(!t.pathFormula||t.keypoints===void 0)return[];const f=Ra[t.pathFormula];return f?t.keypoints.map((d,h)=>{const v=f.getBaseSize[h],p=f.relative[h],g=v(t.width,t.height)*d;let m={};return p==="left"?m={left:g*a+"px"}:p==="right"?m={left:(t.width-g)*a+"px"}:p==="center"?m={left:(t.width-g)/2*a+"px"}:p==="top"?m={top:g*a+"px"}:p==="bottom"?m={top:(t.height-g)*a+"px"}:p==="left_bottom"?m={left:g*a+"px",top:t.height*a+"px"}:p==="right_bottom"?m={left:(t.width-g)*a+"px",top:t.height*a+"px"}:p==="top_right"?m={left:t.width*a+"px",top:g*a+"px"}:p==="bottom_right"&&(m={left:t.width*a+"px",top:(t.height-g)*a+"px"}),{keypoint:d,styles:m}}):[]},[t,a]);return D.jsxs("div",{className:Bd.shapeElementOperate,children:[u.map(f=>D.jsx(Vi,{type:f.type,style:f.style},f.type)),e&&D.jsxs(D.Fragment,{children:[l.map(f=>D.jsx(qn,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:d=>{d.stopPropagation(),n(d,t,f.direction)}},f.direction)),D.jsx(Fa,{style:{left:o/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}}),c.map((f,d)=>D.jsx("div",{className:Bd.operateKeypointHandler,style:f.styles,onMouseDown:h=>{h.stopPropagation(),i==null||i(h,t,d)}},d))]})]})},Ha={lineElementOperate:"_lineElementOperate_1300m_1",anchorLine:"_anchorLine_1300m_8"},S_=({elementInfo:t,handlerVisible:e,dragLineElement:r})=>{const{canvasScale:n}=St(),i=Math.max(t.start[0],t.end[0]),a=Math.max(t.start[1],t.end[1]),o=O.useMemo(()=>{const s=[{handler:Ve.START,style:{left:t.start[0]*n+"px",top:t.start[1]*n+"px"}},{handler:Ve.END,style:{left:t.end[0]*n+"px",top:t.end[1]*n+"px"}}];if(t.curve||t.broken||t.broken2){const l=t.curve||t.broken||t.broken2;s.push({handler:Ve.C,style:{left:l[0]*n+"px",top:l[1]*n+"px"}})}else if(t.cubic){const[l,u]=t.cubic;s.push({handler:Ve.C1,style:{left:l[0]*n+"px",top:l[1]*n+"px"}}),s.push({handler:Ve.C2,style:{left:u[0]*n+"px",top:u[1]*n+"px"}})}return s},[t,n]);return D.jsx("div",{className:Ha.lineElementOperate,children:e&&D.jsxs(D.Fragment,{children:[o.map(s=>D.jsx(qn,{type:s.handler,style:s.style,onMouseDown:l=>{l.stopPropagation(),r==null||r(l,t,s.handler)}},s.handler)),D.jsxs("svg",{width:i||1,height:a||1,stroke:t.color,overflow:"visible",style:{transform:`scale(${n})`},children:[t.curve&&D.jsxs("g",{children:[D.jsx("line",{className:Ha.anchorLine,x1:t.start[0],y1:t.start[1],x2:t.curve[0],y2:t.curve[1]}),D.jsx("line",{className:Ha.anchorLine,x1:t.end[0],y1:t.end[1],x2:t.curve[0],y2:t.curve[1]})]}),t.cubic&&t.cubic.map((s,l)=>D.jsxs("g",{children:[l===0&&D.jsx("line",{className:Ha.anchorLine,x1:t.start[0],y1:t.start[1],x2:s[0],y2:s[1]}),l===1&&D.jsx("line",{className:Ha.anchorLine,x1:t.end[0],y1:t.end[1],x2:s[0],y2:s[1]})]},l))]})]})})},x_=({elementInfo:t,handlerVisible:e,rotateElement:r,scaleElement:n})=>{const{canvasScale:i}=St(),a=t.outline.width||1,o=(t.width+a)*i,s=t.height*i,{resizeHandlers:l,borderLines:u}=$i(o,s);return D.jsxs("div",{className:"table-element-operate",children:[u.map(c=>D.jsx(Vi,{type:c.type,style:c.style},c.type)),e&&D.jsxs(D.Fragment,{children:[l.map(c=>D.jsx(qn,{type:c.direction,rotate:t.rotate,style:c.style,onMouseDown:f=>{f.stopPropagation(),n(f,t,c.direction)}},c.direction)),D.jsx(Fa,{style:{left:o/2+"px"},onMouseDown:c=>{c.stopPropagation(),r(c,t)}})]})]})},w_={linkHandler:"_linkHandler_1yjax_1",link:"_link_1yjax_1",btns:"_btns_1yjax_25",btn:"_btn_1yjax_25"},T_=({elementInfo:t,openLinkDialog:e})=>D.jsx("div",{className:w_.linkHandler,style:{left:t.width/2+"px"},onClick:e,children:D.jsx(Le.LinkOne,{size:14,fill:"#666"})}),Rd={operate:"_operate_5txtx_1",multiSelect:"_multiSelect_5txtx_7",animationIndex:"_animationIndex_5txtx_11",indexItem:"_indexItem_5txtx_17"},L_=({elementInfo:t,isSelected:e,isActive:r,isActiveGroupElement:n,isMultiSelect:i,rotateElement:a=()=>{},scaleElement:o=()=>{},dragLineElement:s=()=>{},moveShapeKeypoint:l=()=>{},openLinkDialog:u=()=>{}})=>{const{canvasScale:c}=St(),f="rotate"in t&&t.rotate||0,{formatedAnimations:d}=kt();O.useMemo(()=>{const m=[];for(let y=0;y<d.length;y++)d[y].animations.map(b=>b.elId).includes(t.id)&&m.push(y+1);return m},[d,t.id]);const h="height"in t&&t.height||0,v=O.useMemo(()=>({[Ft.IMAGE]:y_,[Ft.TEXT]:__,[Ft.SHAPE]:b_,[Ft.LINE]:S_,[Ft.TABLE]:x_,[Ft.CHART]:xs,[Ft.LATEX]:xs,[Ft.VIDEO]:xs,[Ft.AUDIO]:xs})[t.type]||null,[t.type]);if(!v)return null;const p=h===0&&t.type===Ft.TEXT?20:h,g=v;return D.jsxs("div",{className:Dt(Rd.operate,{[Rd.multiSelect]:i&&!r}),style:{top:t.top*c+"px",left:t.left*c+"px",transform:`rotate(${f}deg)`,transformOrigin:`${t.width*c/2}px ${p*c/2}px`},children:[e&&D.jsx(g,{elementInfo:{...t,height:p},handlerVisible:n||!i,rotateElement:a,scaleElement:o,dragLineElement:s,moveShapeKeypoint:l}),r&&t.link&&D.jsx(T_,{elementInfo:t,link:t.link,openLinkDialog:u})]})},M_=({type:t,axis:e,length:r,canvasScale:n})=>{const i={position:"absolute",zIndex:100,backgroundColor:"#d14424"};return t==="vertical"?(i.left=e.x*n,i.top=e.y*n,i.width=1,i.height=r*n):(i.left=e.x*n,i.top=e.y*n,i.width=r*n,i.height=1),D.jsx("div",{className:"alignment-line",style:i})},Qu={elementCreateSelection:"_elementCreateSelection_dvlwf_1",selection:"_selection_dvlwf_14",line:"_line_dvlwf_18"},C_=({onCreated:t})=>{const{creatingElement:e,setCreatingElement:r}=St(),{ctrlOrShiftKeyActive:n}=nr(),[i,a]=O.useState(null),[o,s]=O.useState(null),l=O.useRef(null),u=O.useRef({x:0,y:0});O.useEffect(()=>{if(!l.current)return;const{x:h,y:v}=l.current.getBoundingClientRect();u.current={x:h,y:v}},[]);const c=O.useMemo(()=>{if(!i||!o||!e||e.type!=="line")return null;const[h,v]=i,[p,g]=o,m=Math.min(h,p),y=Math.max(h,p),_=Math.min(v,g),b=Math.max(v,g),x=y-m>=24?y-m:24,S=b-_>=24?b-_:24,w=h===m?0:y-m,T=v===_?0:b-_,L=p===m?0:y-m,C=g===_?0:b-_,M=`M${w}, ${T} L${L}, ${C}`;return{svgWidth:x,svgHeight:S,path:M}},[i,o,e]),f=O.useMemo(()=>{if(!i||!o)return{};const[h,v]=i,[p,g]=o,m=Math.min(h,p),y=Math.max(h,p),_=Math.min(v,g),b=Math.max(v,g),x=y-m,S=b-_;return{left:m-u.current.x+"px",top:_-u.current.y+"px",width:x+"px",height:S+"px"}},[i,o]),d=h=>{h.stopPropagation();let v=!0;const p=h.pageX,g=h.pageY;a([p,g]);const m=_=>{if(!e||!v)return;let b=_.pageX,x=_.pageY;if(n){const S=b-p,w=x-g,T=Math.abs(S),L=Math.abs(w);if(e.type==="shape"){const C=w>0&&S<0||w<0&&S>0;T>L?x=C?g-S:g+S:b=C?p-w:p+w}else e.type==="line"&&(T>L?x=g:b=p)}s([b,x])},y=_=>{if(document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),_.button===2){setTimeout(()=>r(null),0);return}v=!1;const b=_.pageX,x=_.pageY,S=30;let w=b,T=x;if(n&&e){const L=b-p,C=x-g,M=Math.abs(L),A=Math.abs(C);if(e.type==="shape"){const E=C>0&&L<0||C<0&&L>0;M>A?T=E?g-L:g+L:w=E?p-C:p+C}else e.type==="line"&&(M>A?T=g:w=p)}if((e==null?void 0:e.type)==="line"&&(Math.abs(w-p)>=S||Math.abs(T-g)>=S))t({start:[p,g],end:[w,T]});else if((e==null?void 0:e.type)!=="line"&&Math.abs(w-p)>=S&&Math.abs(T-g)>=S)t({start:[p,g],end:[w,T]});else{const C=Math.min(w,p),M=Math.min(T,g),A=Math.max(w,p),E=Math.max(T,g),P=A-C>=S?A-C:200,B=E-M>=S?E-M:200;t({start:[C,M],end:[C+P,M+B]})}};document.addEventListener("mousemove",m),document.addEventListener("mouseup",y)};return D.jsx("div",{className:Qu.elementCreateSelection,ref:l,onMouseDown:d,onContextMenu:h=>{h.stopPropagation(),h.preventDefault()},children:i&&o&&D.jsx("div",{className:Dt(Qu.selection,{[Qu.line]:(e==null?void 0:e.type)==="line"}),style:f,children:(e==null?void 0:e.type)==="line"&&c&&D.jsx("svg",{overflow:"visible",width:c.svgWidth,height:c.svgHeight,children:D.jsx("path",{d:c.path,stroke:"#d14424",fill:"none",strokeWidth:"2"})})})})},E_={shapeCreateCanvas:"_shapeCreateCanvas_112bd_1"},D_=({onCreated:t,onClose:e})=>{const{ctrlOrShiftKeyActive:r}=nr(),{theme:n}=kt(),i=O.useRef(null),a=O.useRef(!1),o=O.useRef({x:0,y:0}),[s,l]=O.useState(null),[u,c]=O.useState([]),[f,d]=O.useState(!1);O.useEffect(()=>{if(!i.current)return;const{x:b,y:x}=i.current.getBoundingClientRect();o.current={x:b,y:x}},[]);const h=(b,x=!1)=>{let S=b.pageX-o.current.x,w=b.pageY-o.current.y;if(x)return{pageX:S,pageY:w};if(r&&u.length){const[T,L]=u[u.length-1];Math.abs(T-S)-Math.abs(L-w)>0?w=L:S=T}return{pageX:S,pageY:w}},v=b=>{if(a.current){const{pageX:w,pageY:T}=h(b,!0);c(L=>[...L,[w,T]]),l(null);return}const{pageX:x,pageY:S}=h(b);if(l([x,S]),u.length>=2){const[w,T]=u[0];Math.abs(w-x)<5&&Math.abs(T-S)<5?d(!0):d(!1)}else d(!1)},p=O.useMemo(()=>{let b="";for(let x=0;x<u.length;x++){const S=u[x];x===0?b+=`M ${S[0]} ${S[1]} `:b+=`L ${S[0]} ${S[1]} `}return u.length&&s&&(b+=`L ${s[0]} ${s[1]}`),b},[u,s]),g=(b=!0)=>{const x=u.map(k=>k[0]),S=u.map(k=>k[1]),w=Math.min(...x),T=Math.min(...S),L=Math.max(...x),C=Math.max(...S),M=u.map(k=>[k[0]-w,k[1]-T]);let A="";for(let k=0;k<M.length;k++){const N=M[k];k===0?A+=`M ${N[0]} ${N[1]} `:A+=`L ${N[0]} ${N[1]} `}b&&(A+="Z");const E=[w+o.current.x,T+o.current.y],P=[L+o.current.x,C+o.current.y],B=[L-w,C-T];return{start:E,end:P,path:A,viewBox:B}},m=b=>{const{pageX:x,pageY:S}=h(b);a.current=!0,f?t(g()):c(T=>[...T,[x,S]]);const w=()=>{a.current=!1,document.removeEventListener("mouseup",w)};document.addEventListener("mouseup",w)},y=()=>{e()},_=O.useCallback(()=>{t({...g(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:n.themeColors[0],style:"solid"}}),y()},[t,n,u]);return O.useEffect(()=>{const b=x=>{const S=x.key.toUpperCase();S===se.ESC&&y(),S===se.ENTER&&_()};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[_]),D.jsx("div",{className:E_.shapeCreateCanvas,ref:i,onMouseDown:b=>{b.stopPropagation(),m(b)},onMouseMove:b=>v(b),onContextMenu:b=>{b.stopPropagation(),b.preventDefault(),y()},children:D.jsx("svg",{overflow:"visible",children:D.jsx("path",{d:p,stroke:"#d14424",fill:f?"rgba(226, 83, 77, 0.15)":"none",strokeWidth:"2"})})})},$d={mouseSelection:"_mouseSelection_13fbu_1",quadrant1:"_quadrant1_13fbu_8",quadrant2:"_quadrant2_13fbu_13",quadrant3:"_quadrant3_13fbu_18",quadrant4:"_quadrant4_13fbu_23"},A_=({top:t,left:e,width:r,height:n,quadrant:i})=>D.jsx("div",{className:Dt($d.mouseSelection,$d[`quadrant${i}`]),style:{top:t+"px",left:e+"px",width:r+"px",height:n+"px"}}),P_={multiSelectOperate:"_multiSelectOperate_17xs4_1",borderLine:"_borderLine_17xs4_5",top:"_top_17xs4_13",bottom:"_bottom_17xs4_16",left:"_left_17xs4_19",right:"_right_17xs4_22"},N_=({elementList:t,scaleMultiElement:e})=>{const{activeElementIdList:r,canvasScale:n}=St(),i=O.useMemo(()=>t.filter(f=>r.includes(f.id)),[t,r]),a=O.useMemo(()=>{const{minX:f,maxX:d,minY:h,maxY:v}=Cd(i);return{minX:f,maxX:d,minY:h,maxY:v}},[i]),o=(a.maxX-a.minX)*n,s=(a.maxY-a.minY)*n,{resizeHandlers:l,borderLines:u}=$i(o,s),c=O.useMemo(()=>i.some(f=>!((f.type==="image"||f.type==="shape")&&!f.rotate)),[i]);return D.jsxs("div",{className:P_.multiSelectOperate,style:{left:a.minX*n+"px",top:a.minY*n+"px"},children:[u.map(f=>D.jsx(Vi,{type:f.type,style:f.style},f.type)),!c&&l.map(f=>D.jsx(qn,{type:f.direction,style:f.style,onMouseDown:d=>{d.stopPropagation(),e==null||e(d,a,f.direction)}},f.direction))]})},Vd=()=>{const{activeElementIdList:t,activeGroupElementId:e,setActiveElementIdList:r}=St(),{currentSlide:n,updateSlide:i}=kt(),{addHistorySnapshot:a}=Me();return{deleteElement:()=>{if(!t.length||!n)return;let l=[];e?l=n.elements.filter(u=>u.id!==e):l=n.elements.filter(u=>!t.includes(u.id)),r([]),i({elements:l}),a()},deleteAllElements:()=>{!n||!n.elements.length||(r([]),i({elements:[]}),a())}}},k_=()=>{const{currentSlide:t,updateSlide:e}=kt(),{addHistorySnapshot:r}=Me(),n=(u,c)=>({minLevel:u.findIndex(f=>f.id===c[0].id),maxLevel:u.findIndex(f=>f.id===c[c.length-1].id)}),i=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(m=>m.groupId===c.groupId),{minLevel:h,maxLevel:v}=n(u,d);if(v===u.length-1)return;const p=f[v+1],g=f.splice(h,d.length);if(p.groupId){const m=f.filter(y=>y.groupId===p.groupId);f.splice(h+m.length,0,...g)}else f.splice(h+1,0,...g)}else{const d=u.findIndex(p=>p.id===c.id);if(d===u.length-1)return;const h=f[d+1],v=f.splice(d,1)[0];if(h.groupId){const p=f.filter(g=>g.groupId===h.groupId);f.splice(d+p.length,0,v)}else f.splice(d+1,0,v)}return f},a=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(g=>g.groupId===c.groupId),{minLevel:h}=n(u,d);if(h===0)return;const v=f[h-1],p=f.splice(h,d.length);if(v.groupId){const g=f.filter(m=>m.groupId===v.groupId);f.splice(h-g.length,0,...p)}else f.splice(h-1,0,...p)}else{const d=u.findIndex(p=>p.id===c.id);if(d===0)return;const h=f[d-1],v=f.splice(d,1)[0];if(h.groupId){const p=f.filter(g=>g.groupId===h.groupId);f.splice(d-p.length,0,v)}else f.splice(d-1,0,v)}return f},o=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(g=>g.groupId===c.groupId),{minLevel:h,maxLevel:v}=n(u,d);if(v===u.length-1)return null;const p=f.splice(h,d.length);f.push(...p)}else{const d=u.findIndex(h=>h.id===c.id);if(d===u.length-1)return null;f.splice(d,1),f.push(c)}return f},s=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const d=f.filter(p=>p.groupId===c.groupId),{minLevel:h}=n(u,d);if(h===0)return;const v=f.splice(h,d.length);f.unshift(...v)}else{const d=u.findIndex(h=>h.id===c.id);if(d===0)return;f.splice(d,1),f.unshift(c)}return f};return{orderElement:(u,c)=>{if(!t)return;let f;c===_r.UP?f=i(t.elements,u):c===_r.DOWN?f=a(t.elements,u):c===_r.TOP?f=o(t.elements,u):c===_r.BOTTOM&&(f=s(t.elements,u)),f&&(e({elements:f}),r())}}},O_=()=>{const{activeElementIdList:t}=St(),{currentSlide:e,viewportRatio:r,viewportSize:n,updateSlide:i}=kt(),a=O.useMemo(()=>!e||!e.elements?[]:e.elements.filter(l=>t.includes(l.id)),[e,t]),{addHistorySnapshot:o}=Me();return{alignElementToCanvas:l=>{if(!e)return;const u=n,c=n*r,{minX:f,maxX:d,minY:h,maxY:v}=Cd(a),p=JSON.parse(JSON.stringify(e.elements));for(const g of p)if(t.includes(g.id)){if(l===pe.CENTER){const m=h+(v-h)/2-c/2,y=f+(d-f)/2-u/2;g.top=g.top-m,g.left=g.left-y}if(l===pe.TOP){const m=h-0;g.top=g.top-m}else if(l===pe.VERTICAL){const m=h+(v-h)/2-c/2;g.top=g.top-m}else if(l===pe.BOTTOM){const m=v-c;g.top=g.top-m}else if(l===pe.LEFT){const m=f-0;g.left=g.left-m}else if(l===pe.HORIZONTAL){const m=f+(d-f)/2-u/2;g.left=g.left-m}else if(l===pe.RIGHT){const m=d-u;g.left=g.left-m}}i({elements:p}),o()}}},I_=()=>{const{activeElementIdList:t,setEditorareaFocus:e}=St(),{currentSlide:r}=kt(),n=O.useMemo(()=>!r||!r.elements?[]:r.elements.filter(c=>t.includes(c.id)),[r,t]),{pasteTextClipboardData:i}=Ad(),{deleteElement:a}=Vd(),o=()=>{if(!t.length)return;const c=wd(JSON.stringify({type:"elements",data:n}));Td(c).then(()=>{e(!0)})},s=()=>{o(),a()},l=()=>{Ld().then(c=>{i(c)}).catch(c=>console.warn(c))};return{copyElement:o,cutElement:s,pasteElement:l,quickCopyElement:()=>{o(),l()}}};var ws,Ts=w4;if(process.env.NODE_ENV==="production")ws=Ts.createRoot,Ts.hydrateRoot;else{var zd=Ts.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ws=function(t,e){zd.usingClientEntryPoint=!0;try{return Ts.createRoot(t,e)}finally{zd.usingClientEntryPoint=!1}}}const Fd=({menus:t,handleClickMenuItem:e})=>D.jsx("ul",{className:"menu-content",children:t.map((r,n)=>r.hide?null:D.jsx("li",{className:Dt("menu-item",{divider:r.divider,disable:r.disable}),onClick:i=>{i.stopPropagation(),e(r)},children:!r.divider&&D.jsxs("div",{className:Dt("menu-item-content",{"has-children":r.children&&r.children.length>0,"has-handler":!!r.handler}),children:[D.jsx("span",{className:"text",children:r.text}),r.subText&&(!r.children||r.children.length===0)&&D.jsx("span",{className:"sub-text",children:r.subText}),r.children&&r.children.length>0&&D.jsx("div",{className:"sub-menu",children:D.jsx(Fd,{menus:r.children,handleClickMenuItem:e})})]})},r.text||n))}),Hd=({axis:t,el:e,menus:r,removeContextmenu:n})=>{const i=O.useMemo(()=>{const{x:c,y:f}=t,d=r.filter(y=>!(y.divider||y.hide)).length,h=r.filter(y=>y.divider).length,v=180,p=d*30+h*11+5*2,g=document.body.clientWidth,m=document.body.clientHeight;return{left:g<=c+v?c-v:c,top:m<=f+p?f-p:f}},[t,r]),a=o=>{o.disable||o.children&&!o.handler||(o.handler&&o.handler(e),n())};return D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"contextmenu-mask",onContextMenu:o=>{o.preventDefault(),n()},onMouseDown:o=>{o.button===0&&n()}}),D.jsx("div",{className:"contextmenu",style:{left:i.left,top:i.top},onContextMenu:o=>o.preventDefault(),children:D.jsx(Fd,{menus:r,handleClickMenuItem:a})})]})};function Pr(t,e,r=!0){O.useEffect(()=>{if(!r)return;const n=t.current;if(!n)return;const i=a=>{const o=a;o.preventDefault(),o.stopPropagation();const s=typeof e=="function"?e(n):e;if(!s||s.length===0)return;const l=document.getElementById("global-contextmenu-container");l&&document.body.removeChild(l);const u=document.createElement("div");u.id="global-contextmenu-container",document.body.appendChild(u);const c=ws(u),f=()=>{setTimeout(()=>{c.unmount(),document.body.contains(u)&&document.body.removeChild(u),n.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",f),window.removeEventListener("resize",f)},0)};c.render(D.jsx(Hd,{axis:{x:o.clientX,y:o.clientY},el:n,menus:s,removeContextmenu:f})),n.classList.add("contextmenu-active"),document.body.addEventListener("scroll",f),window.addEventListener("resize",f)};return n.addEventListener("contextmenu",i),()=>{n.removeEventListener("contextmenu",i)}},[t,e,r])}const hn=t=>({shadowStyle:O.useMemo(()=>{if(t){const{h:r,v:n,blur:i,color:a}=t;return`${r}px ${n}px ${i}px ${a}`}return""},[t])}),Ls=(t,e)=>({flipStyle:O.useMemo(()=>{let n="";return t&&e?n="rotateX(180deg) rotateY(180deg)":e?n="rotateX(180deg)":t&&(n="rotateY(180deg)"),n},[t,e])});var Gd=(t=>(t.RECT="rect",t.ELLIPSE="ellipse",t.POLYGON="polygon",t))(Gd||{});const Wd={rect:{name:"矩形",type:"rect",radius:"0",style:""},rect2:{name:"矩形2",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(t,e)=>`M 0 0 L ${t*.8} 0 L ${t} ${e*.2} L ${t} ${e} L 0 ${e} Z`},rect3:{name:"矩形3",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(t,e)=>`M 0 0 L ${t*.8} 0 L ${t} ${e*.2} L ${t} ${e} L ${t*.2} ${e} L 0 ${e*.8} Z`},roundRect:{name:"圆角矩形",type:"rect",radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",type:"ellipse",style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:"polygon",style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(t,e)=>`M ${t*.5} 0 L 0 ${e} L ${t} ${e} Z`},triangle2:{name:"三角形2",type:"polygon",style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(t,e)=>`M ${t*.5} ${e} L 0 0 L ${t} 0 Z`},triangle3:{name:"三角形3",type:"polygon",style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(t,e)=>`M 0 0 L 0 ${e} L ${t} ${e} Z`},rhombus:{name:"菱形",type:"polygon",style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t} ${e*.5} L ${t*.5} ${e} L 0 ${e*.5} Z`},pentagon:{name:"五边形",type:"polygon",style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t} ${.38*e} L ${.82*t} ${e} L ${.18*t} ${e} L 0 ${.38*e} Z`},hexagon:{name:"六边形",type:"polygon",style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(t,e)=>`M ${t*.2} 0 L ${t*.8} 0 L ${t} ${e*.5} L ${t*.8} ${e} L ${t*.2} ${e} L 0 ${e*.5} Z`},heptagon:{name:"七边形",type:"polygon",style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t*.9} ${e*.2} L ${t} ${e*.6} L ${t*.75} ${e} L ${t*.25} ${e} L 0 ${e*.6} L ${t*.1} ${e*.2} Z`},octagon:{name:"八边形",type:"polygon",style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(t,e)=>`M ${t*.3} 0 L ${t*.7} 0 L ${t} ${e*.3} L ${t} ${e*.7} L ${t*.7} ${e} L ${t*.3} ${e} L 0 ${e*.7} L 0 ${e*.3} Z`},chevron:{name:"V形",type:"polygon",style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(t,e)=>`M ${t*.75} 0 L ${t} ${e*.5} L ${t*.75} ${e} L 0 ${e} L ${t*.25} ${e*.5} L 0 0 Z`},point:{name:"点",type:"polygon",style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(t,e)=>`M 0 0 L ${t*.75} 0 L ${t} ${e*.5} L ${t*.75} ${e} L 0 ${e} Z`},arrow:{name:"箭头",type:"polygon",style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(t,e)=>`M 0 ${e*.2} L ${t*.6} ${e*.2} L ${t*.6} 0 L ${t} ${e*.5} L ${t*.6} ${e} L ${t*.6} ${e*.8} L 0 ${e*.8} Z`},parallelogram:{name:"平行四边形",type:"polygon",style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(t,e)=>`M ${t*.3} 0 L ${t} 0 L ${t*.7} ${e} L 0 ${e} Z`},parallelogram2:{name:"平行四边形2",type:"polygon",style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(t,e)=>`M ${t*.3} ${e} L ${t} ${e} L ${t*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:"polygon",style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(t,e)=>`M ${t*.25} 0 L ${t*.75} 0 L ${t} ${e} L 0 ${e} Z`},trapezoid2:{name:"梯形2",type:"polygon",style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(t,e)=>`M 0 0 L ${t} 0 L ${t*.75} ${e} L ${t*.25} ${e} Z`}},Ku=t=>{const e=O.useMemo(()=>{let n=Wd.rect;if(t.clip){const i=t.clip.shape||Gd.RECT;n=Wd[i]}return n.radius!==void 0&&t.radius&&(n={...n,radius:`${t.radius}px`,style:`inset(0 round ${t.radius}px)`}),n},[t.clip,t.radius]),r=O.useMemo(()=>{if(!t.clip)return{top:"0",left:"0",width:"100%",height:"100%"};const[n,i]=t.clip.range,a=(i[0]-n[0])/100,o=(i[1]-n[1])/100,s=n[0]/a,l=n[1]/o;return{left:-s+"%",top:-l+"%",width:100/a+"%",height:100/o+"%"}},[t.clip]);return{clipShape:e,imgPosition:r}},Xd=t=>({filter:O.useMemo(()=>{if(!t)return"";let r="";const n=Object.keys(t);for(const i of n)r+=`${i}(${t[i]}) `;return r},[t])}),zi=t=>{const{canvasScale:e}=St(),r=O.useMemo(()=>t!=null&&t.width?t.width*e:0,[t==null?void 0:t.width,e]),n=O.useMemo(()=>(t==null?void 0:t.color)||"#d14424",[t==null?void 0:t.color]),i=O.useMemo(()=>(t==null?void 0:t.style)||"solid",[t==null?void 0:t.style]),a=O.useMemo(()=>{const o=r;return i==="dashed"?o<=6?`${o*4.5} ${o*2}`:`${o*4} ${o*1.5}`:i==="dotted"?o<=6?`${o*1.8} ${o*1.6}`:`${o*1.5} ${o*1.2}`:"0 0"},[t==null?void 0:t.style]);return{outlineWidth:r,outlineColor:n,strokeDashArray:a}},B_={imageRectOutlineSvg:"_imageRectOutlineSvg_y1xie_1"},R_=({width:t,height:e,outline:r,radius:n="0"})=>{const{outlineWidth:i,outlineColor:a,strokeDashArray:o}=zi(r);return r?D.jsx("svg",{className:B_.imageRectOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("rect",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",rx:n,ry:n,width:t,height:e,stroke:a,strokeWidth:i,strokeDasharray:o})}):null},$_={imageEllipseOutlineSvg:"_imageEllipseOutlineSvg_qmj4q_1"},V_=({width:t,height:e,outline:r})=>{const{outlineWidth:n,outlineColor:i,strokeDashArray:a}=zi(r);return r?D.jsx("svg",{className:$_.imageEllipseOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("ellipse",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:8,fill:"transparent",cx:t/2,cy:e/2,rx:t/2,ry:e/2,stroke:i,strokeWidth:n,strokeDasharray:a})}):null},z_={imagePolygonOutlineSvg:"_imagePolygonOutlineSvg_1jxdb_1"},F_=({width:t,height:e,createPath:r,outline:n})=>{const{outlineWidth:i,outlineColor:a,strokeDashArray:o}=zi(n);return n?D.jsx("svg",{className:z_.imagePolygonOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",d:r(t,e),stroke:a,strokeWidth:i,strokeDasharray:o})}):null},Yd=({elementInfo:t})=>{const{clipShape:e}=Ku(t);return e.type==="rect"?D.jsx(R_,{width:t.width,height:t.height,radius:e.radius,outline:t.outline}):e.type==="ellipse"?D.jsx(V_,{width:t.width,height:t.height,outline:t.outline}):e.type==="polygon"&&e.createPath?D.jsx(F_,{width:t.width,height:t.height,outline:t.outline,createPath:e.createPath}):null},ye={imageClipHandler:"_imageClipHandler_1vtws_1",bottomImg:"_bottomImg_1vtws_6",topImageContent:"_topImageContent_1vtws_17",operate:"_operate_1vtws_25",clipPoint:"_clipPoint_1vtws_34",leftTop:"_leftTop_1vtws_42",rightTop:"_rightTop_1vtws_46",leftBottom:"_leftBottom_1vtws_52",rightBottom:"_rightBottom_1vtws_58",top:"_top_1vtws_17",bottom:"_bottom_1vtws_6",left:"_left_1vtws_42",right:"_right_1vtws_46",rotate0:"_rotate0_1vtws_87",rotate45:"_rotate45_1vtws_87",rotate90:"_rotate90_1vtws_87",rotate135:"_rotate135_1vtws_87"},H_=(t,e)=>{O.useEffect(()=>{const r=n=>{!t.current||t.current.contains(n.target)||e()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[t,e])},G_=({src:t,clipPath:e,width:r,height:n,rotate:i,clipData:a,onClip:o})=>{const{canvasScale:s}=St(),{ctrlOrShiftKeyActive:l}=nr(),[u,c]=O.useState({top:"0%",left:"0%"}),f=O.useRef(!1),d=O.useRef(null),h=O.useRef(null),v=O.useCallback(()=>{const[E,P]=a?a.range:[[0,0],[100,100]],B=(P[0]-E[0])/100,k=(P[1]-E[1])/100,N=E[0]/B,z=E[1]/k;return{widthScale:B,heightScale:k,left:N,top:z}},[a]),p=O.useMemo(()=>{const{widthScale:E,heightScale:P,left:B,top:k}=v();return{left:-B,top:-k,width:100/E,height:100/P}},[v]),g=O.useMemo(()=>({top:p.top+"%",left:p.left+"%",width:p.width+"%",height:p.height+"%"}),[p]),[m,y]=O.useState({top:0,left:0,width:0,height:0}),_=O.useMemo(()=>{const{top:E,left:P,width:B,height:k}=m;return{top:E+"%",left:P+"%",width:B+"%",height:k+"%"}},[m]),b=O.useMemo(()=>{const E=p.width,P=p.height,{top:B,left:k,width:N,height:z}=m;return N===0||z===0?{}:{left:-k*(100/N)+"%",top:-B*(100/z)+"%",width:E/N*100+"%",height:P/z*100+"%"}},[p,m]);O.useEffect(()=>{const{left:E,top:P}=v();y({left:E,top:P,width:100,height:100}),c({top:-P+"%",left:-E+"%"})},[v]);const x=O.useCallback(()=>{const E=p.width,P=p.height,{top:B,left:k,width:N,height:z}=m;if(N===0||z===0)return;const R=-k*(100/N),V=-B*(100/z),I=E/N*100,H=P/z*100,G={left:R,top:V,width:I,height:H},X=100/G.width,J=100/G.height,ct=[-G.left*X,-G.top*J],vt=[X*100+ct[0],J*100+ct[1]];d.current=[ct,vt]},[p,m]),S=O.useCallback(()=>{if(f.current)return;if(d.current||x(),!d.current){o(null);return}const{left:E,top:P}=v(),B={left:(m.left-E)/100*r,top:(m.top-P)/100*n,width:(m.width-100)/100*r,height:(m.height-100)/100*n},k={range:d.current,position:B};o(k)},[v,m,r,n,o,x]);H_(h,S),O.useEffect(()=>{const E=P=>{P.key.toUpperCase()===se.ENTER&&S()};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[S]);const w=E=>{E.stopPropagation(),f.current=!0;let P=!0;const B=E.pageX,k=E.pageY,N=p,z={...m},R=I=>{if(!P)return;const H=I.pageX,G=I.pageY,X=(H-B)/s,J=(G-k)/s,ct=Math.sqrt(X*X+J*J),U=Math.atan2(J,X)-i/180*Math.PI,Y=ct*Math.cos(U)/r*100,tt=ct*Math.sin(U)/n*100;let j=z.left+Y,nt=z.top+tt;j<0?j=0:j+z.width>N.width&&(j=N.width-z.width),nt<0?nt=0:nt+z.height>N.height&&(nt=N.height-z.height),y({...z,left:j,top:nt,width:z.width,height:z.height})},V=()=>{P=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",V),x(),setTimeout(()=>{f.current=!1},0)};document.addEventListener("mousemove",R),document.addEventListener("mouseup",V)},T=(E,P)=>{E.stopPropagation(),f.current=!0;let B=!0;const k=50/r*100,N=50/n*100,z=E.pageX,R=E.pageY,V=p,I={...m},H=m.width/m.height,G=J=>{if(!B)return;const ct=J.pageX,vt=J.pageY,U=(ct-z)/s,Y=(vt-R)/s,tt=Math.sqrt(U*U+Y*Y),nt=Math.atan2(Y,U)-i/180*Math.PI;let it=tt*Math.cos(nt)/r*100,at=tt*Math.sin(nt)/n*100;l&&((P===et.RIGHT_BOTTOM||P===et.LEFT_TOP)&&(at=it/H),(P===et.LEFT_BOTTOM||P===et.RIGHT_TOP)&&(at=-it/H));let Et=I.left,Q=I.top,K=I.width,_t=I.height;P===et.LEFT_TOP?(I.left+it<0&&(it=-I.left),I.top+at<0&&(at=-I.top),I.width-it<k&&(it=I.width-k),I.height-at<N&&(at=I.height-N),K=I.width-it,_t=I.height-at,Et=I.left+it,Q=I.top+at):P===et.RIGHT_TOP?(I.left+I.width+it>V.width&&(it=V.width-(I.left+I.width)),I.top+at<0&&(at=-I.top),I.width+it<k&&(it=k-I.width),I.height-at<N&&(at=I.height-N),K=I.width+it,_t=I.height-at,Et=I.left,Q=I.top+at):P===et.LEFT_BOTTOM?(I.left+it<0&&(it=-I.left),I.top+I.height+at>V.height&&(at=V.height-(I.top+I.height)),I.width-it<k&&(it=I.width-k),I.height+at<N&&(at=N-I.height),K=I.width-it,_t=I.height+at,Et=I.left+it,Q=I.top):P===et.RIGHT_BOTTOM?(I.left+I.width+it>V.width&&(it=V.width-(I.left+I.width)),I.top+I.height+at>V.height&&(at=V.height-(I.top+I.height)),I.width+it<k&&(it=k-I.width),I.height+at<N&&(at=N-I.height),K=I.width+it,_t=I.height+at,Et=I.left,Q=I.top):P===et.TOP?(I.top+at<0&&(at=-I.top),I.height-at<N&&(at=I.height-N),K=I.width,_t=I.height-at,Et=I.left,Q=I.top+at):P===et.BOTTOM?(I.top+I.height+at>V.height&&(at=V.height-(I.top+I.height)),I.height+at<N&&(at=N-I.height),K=I.width,_t=I.height+at,Et=I.left,Q=I.top):P===et.LEFT?(I.left+it<0&&(it=-I.left),I.width-it<k&&(it=I.width-k),K=I.width-it,_t=I.height,Et=I.left+it,Q=I.top):(I.left+I.width+it>V.width&&(it=V.width-(I.left+I.width)),I.width+it<k&&(it=k-I.width),_t=I.height,K=I.width+it,Et=I.left,Q=I.top),y({left:Et,top:Q,width:K,height:_t})},X=()=>{B=!1,document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",X),x(),setTimeout(()=>f.current=!1,0)};document.addEventListener("mousemove",G),document.addEventListener("mouseup",X)},L=O.useMemo(()=>{const E="rotate",P=i;return P>-22.5&&P<=22.5?E+0:P>22.5&&P<=67.5?E+45:P>67.5&&P<=112.5?E+90:P>112.5&&P<=157.5?E+135:P>157.5||P<=-157.5?E+0:P>-157.5&&P<=-112.5?E+45:P>-112.5&&P<=-67.5?E+90:P>-67.5&&P<=-22.5?E+135:E+0},[i]),C=[et.LEFT_TOP,et.RIGHT_TOP,et.LEFT_BOTTOM,et.RIGHT_BOTTOM],M=[et.TOP,et.BOTTOM,et.LEFT,et.RIGHT],A={[et.LEFT_TOP]:ye.leftTop,[et.TOP]:ye.top,[et.RIGHT_TOP]:ye.rightTop,[et.LEFT]:ye.left,[et.RIGHT]:ye.right,[et.LEFT_BOTTOM]:ye.leftBottom,[et.BOTTOM]:ye.bottom,[et.RIGHT_BOTTOM]:ye.rightBottom};return D.jsxs("div",{className:ye.imageClipHandler,style:u,ref:h,children:[D.jsx("img",{className:ye.bottomImg,src:t,draggable:!1,alt:"",style:g}),D.jsx("div",{className:ye.topImageContent,style:{..._,clipPath:e},children:D.jsx("img",{className:ye.topImg,src:t,draggable:!1,alt:"",style:b})}),D.jsxs("div",{className:ye.operate,style:_,onMouseDown:w,children:[C.map(E=>D.jsx("div",{className:Dt(ye.clipPoint,A[E],ye[L]),onMouseDown:P=>T(P,E),children:D.jsx("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333",children:D.jsx("path",{strokeWidth:"0.3",shapeRendering:"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})})},E)),M.map(E=>D.jsx("div",{className:Dt(ye.clipPoint,A[E],ye[L]),onMouseDown:P=>T(P,E),children:D.jsx("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333",children:D.jsx("path",{strokeWidth:"0.3",shapeRendering:"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})})},E))]})]})},Ga={editableElementImage:"_editableElementImage_1jzf6_1",rotateWrapper:"_rotateWrapper_1jzf6_5",elementContent:"_elementContent_1jzf6_10",imageContent:"_imageContent_1jzf6_16",colorMask:"_colorMask_1jzf6_26"},W_=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=O.useRef(null),{clipingImageElementId:i,setClipingImageElementId:a}=St(),{updateElement:o}=kt(),{addHistorySnapshot:s}=Me(),l=O.useMemo(()=>i===t.id,[i,t.id]),{shadowStyle:u}=hn(t.shadow),{flipStyle:c}=Ls(t.flipH,t.flipV),{clipShape:f,imgPosition:d}=Ku(t),{filter:h}=Xd(t.filters),v=g=>{g.stopPropagation(),e==null||e(g.nativeEvent,t)},p=g=>{if(a(""),!g)return;const{range:m,position:y}=g,_=t.clip||{shape:"rect",range:[[0,0],[100,100]]},b=t.left+y.left,x=t.top+y.top,S=t.width+y.width,w=t.height+y.height;let T=0,L=0;if(t.rotate){const M=b+S/2-(t.left+t.width/2),A=-(x+w/2-(t.top+t.height/2)),E=-t.rotate*Math.PI/180,P=M*Math.cos(E)-A*Math.sin(E),B=M*Math.sin(E)+A*Math.cos(E);T=P-M,L=-(B-A)}const C={clip:{..._,range:m},left:b+T,top:x+L,width:S,height:w};o({id:t.id,props:C}),s()};return Pr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Ga.editableElementImage,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Ga.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:l?D.jsx(G_,{src:t.src,clipData:t.clip,width:t.width,height:t.height,top:t.top,left:t.left,rotate:t.rotate,clipPath:f.style,onClip:g=>p(g)}):D.jsxs("div",{ref:n,className:Ga.elementContent,style:{filter:u?`drop-shadow(${u})`:"",transform:c},onMouseDown:v,onTouchStart:v,children:[D.jsx(Yd,{elementInfo:t}),D.jsxs("div",{className:Ga.imageContent,style:{clipPath:f.style},children:[D.jsx("img",{src:t.src,draggable:!1,style:{top:d.top,left:d.left,width:d.width,height:d.height,filter:h},onDragStart:g=>g.preventDefault(),alt:""}),t.colorMask&&D.jsx("div",{className:Ga.colorMask,style:{backgroundColor:t.colorMask}})]})]})})})},X_={elementOutlineSvg:"_elementOutlineSvg_1jkv6_1"},Ms=({width:t,height:e,outline:r})=>{const{outlineWidth:n,outlineColor:i,strokeDashArray:a}=zi(r);return r?D.jsx("svg",{className:X_.elementOutlineSvg,width:t,height:e,overflow:"visible",children:D.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",d:`M0,0 L${t},0 L${t},${e} L0,${e} Z`,stroke:i,strokeWidth:n,strokeDasharray:a})}):null},Y_=t=>{const e={},r=(n,i)=>e[n]=i;return r("Alt-ArrowUp",Ut.joinUp),r("Alt-ArrowDown",Ut.joinDown),r("Mod-z",Yu.undo),r("Mod-y",Yu.redo),r("Backspace",Ar.undoInputRule),r("Escape",Ut.selectParentNode),r("Mod-b",Ut.toggleMark(t.marks.strong)),r("Mod-i",Ut.toggleMark(t.marks.em)),r("Mod-u",Ut.toggleMark(t.marks.underline)),r("Mod-d",Ut.toggleMark(t.marks.strikethrough)),r("Mod-e",Ut.toggleMark(t.marks.code)),r("Mod-;",Ut.toggleMark(t.marks.superscript)),r("Mod-'",Ut.toggleMark(t.marks.subscript)),r("Enter",Ut.chainCommands(Un.splitListItem(t.nodes.list_item),Ut.newlineInCode,Ut.createParagraphNear,Ut.liftEmptyBlock,Ut.splitBlockKeepMarks)),r("Mod-[",Un.liftListItem(t.nodes.list_item)),r("Mod-]",Un.sinkListItem(t.nodes.list_item)),r("Tab",Un.sinkListItem(t.nodes.list_item)),e},U_=t=>Ar.wrappingInputRule(/^\s*>\s$/,t),Z_=t=>Ar.wrappingInputRule(/^(\d+)\.\s$/,t,e=>({order:+e[1]}),(e,r)=>r.childCount+r.attrs.order===+e[1]),q_=t=>Ar.wrappingInputRule(/^\s*([-+*])\s$/,t),j_=()=>{const t=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Ar.InputRule(t,(e,r,n,i)=>{const{schema:a}=e,o=e.tr.insertText(`${r[2]} `,n,i),s=a.marks.code.create();return o.addMark(n,n+r[2].length,s)})},Q_=()=>{const t=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Ar.InputRule(t,(e,r,n,i)=>{const{schema:a}=e,o=e.tr.insertText(r[0],n,i),s=a.marks.link.create({href:r[0],title:r[0]});return o.addMark(n,n+r[0].length,s)})},K_=t=>{const e=[...Ar.smartQuotes,Ar.ellipsis,Ar.emDash];return e.push(U_(t.nodes.blockquote)),e.push(Z_(t.nodes.ordered_list)),e.push(q_(t.nodes.bullet_list)),e.push(j_()),e.push(Q_()),Ar.inputRules({rules:e})},J_=(t,e)=>[K_(t),vd.keymap(Y_(t)),vd.keymap(Ut.baseKeymap),L4.dropCursor(),M4.gapCursor(),Yu.history()],t3={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:t=>{const r={order:+((t.hasAttribute("start")?t.getAttribute("start"):1)||1)},{listStyleType:n,fontSize:i,color:a}=t.style;return n&&(r.listStyleType=n),i&&(r.fontsize=i),a&&(r.color=a),r}}],toDOM:t=>{const{order:e,listStyleType:r,fontsize:n,color:i}=t.attrs;let a="";r&&(a+=`list-style-type: ${r};`),n&&(a+=`font-size: ${n};`),i&&(a+=`color: ${i};`);const o={style:a};return e!==1&&(o.start=e),["ol",o,0]}},e3={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:t=>{const e={},{listStyleType:r,fontSize:n,color:i}=t.style;return r&&(e.listStyleType=r),n&&(e.fontsize=n),i&&(e.color=i),e}}],toDOM:t=>{const{listStyleType:e,fontsize:r,color:n}=t.attrs;let i="";return e&&(i+=`list-style-type: ${e};`),r&&(i+=`font-size: ${r};`),n&&(i+=`color: ${n};`),["ul",{style:i},0]}},r3={...Un.listItem,content:"paragraph block*",group:"block"},n3={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:t=>{const{textAlign:e,textIndent:r}=t.style;let n=t.getAttribute("align")||e||"";n=/(left|right|center|justify)/.test(n)?n:"";let i=0;r&&(/em/.test(r)?i=parseInt(r):/px/.test(r)&&(i=Math.floor(parseInt(r)/16),i||(i=1)));const a=+(t.getAttribute("data-indent")||0);return{align:n,indent:a,textIndent:i}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:t=>{const{align:e,indent:r,textIndent:n}=t.attrs;let i="";e&&e!=="left"&&(i+=`text-align: ${e};`),n&&(i+=`text-indent: ${n}em;`);const a={style:i};return r&&(a["data-indent"]=r),["p",a,0]}},{doc:i3,blockquote:a3,text:o3}=pd.nodes,s3={doc:i3,paragraph:n3,blockquote:a3,text:o3,ordered_list:t3,bullet_list:e3,list_item:r3},l3={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:t=>t==="sub"&&null}],toDOM:()=>["sub",0]},u3={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:t=>t==="super"&&null}],toDOM:()=>["sup",0]},c3={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:t=>t==="line-through"&&null},{style:"text-decoration-line",getAttrs:t=>t==="line-through"&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},f3={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:t=>t==="underline"&&null},{style:"text-decoration-line",getAttrs:t=>t==="underline"&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},h3={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:t=>t?{color:t}:{}}],toDOM:t=>{const{color:e}=t.attrs;let r="";return e&&(r+=`color: ${e};`),["span",{style:r},0]}},d3={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:t=>t?{backcolor:t}:{}}],toDOM:t=>{const{backcolor:e}=t.attrs;let r="";return e&&(r+=`background-color: ${e};`),["span",{style:r},0]}},v3={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:t=>t?{fontsize:t}:{}}],toDOM:t=>{const{fontsize:e}=t.attrs;let r="";return e&&(r+=`font-size: ${e};`),["span",{style:r},0]}},p3={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:t=>({fontname:t&&typeof t=="string"?t.replace(/[\"\']/g,""):""})}],toDOM:t=>{const{fontname:e}=t.attrs;let r="";return e&&(r+=`font-family: ${e};`),["span",{style:r},0]}},g3={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href"),r=t.getAttribute("title");return{href:e,title:r}}}],toDOM:t=>["a",t.attrs,0]},m3={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:t=>({index:t.dataset.index})}],toDOM:t=>["mark",{"data-index":t.attrs.index},0]},{em:y3,strong:_3,code:b3}=pd.marks,S3={em:y3,strong:_3,fontsize:v3,fontname:p3,code:b3,forecolor:h3,backcolor:d3,subscript:l3,superscript:u3,strikethrough:c3,underline:f3,link:g3,mark:m3},x3=s3,w3=S3,Ud=new dd.Schema({nodes:x3,marks:w3}),Zd=t=>{const e=`<div>${t}</div>`,n=new window.DOMParser().parseFromString(e,"text/html").body.firstElementChild;return dd.DOMParser.fromSchema(Ud).parse(n)},T3=(t,e,r,n)=>new T4.EditorView(t,{state:Xu.EditorState.create({doc:Zd(e),plugins:J_(Ud)}),...r});var jn=(t=>(t.RICH_TEXT_COMMAND="RICH_TEXT_COMMAND",t.SYNC_RICH_TEXT_ATTRS_TO_STORE="SYNC_RICH_TEXT_ATTRS_TO_STORE",t.OPEN_CHART_DATA_EDITOR="OPEN_CHART_DATA_EDITOR",t.OPEN_LATEX_EDITOR="OPEN_LATEX_EDITOR",t))(jn||{});const Fi=C4(),L3=(t,e,r)=>{const{selection:n,doc:i}=t;if(!n||!i)return t;const{from:a,to:o}=n,{nodes:s}=e,l=s.blockquote,u=s.list_item,c=s.paragraph,f=[];r=r||"";const d=new Set([l,u,c]);return i.nodesBetween(a,o,(h,v)=>{const p=h.type;return(h.attrs.align||"")!==r&&d.has(p)&&f.push({node:h,pos:v,nodeType:p}),!0}),f.length&&f.forEach(h=>{const{node:v,pos:p,nodeType:g}=h;let{attrs:m}=v;r?m={...m,align:r}:m={...m,align:null},t=t.setNodeMarkup(p,g,m,v.marks)}),t},M3=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=L3(r.tr.setSelection(i),n,e);t.dispatch(a)};function C3(t,e,r,n){if(!t.doc)return t;const i=t.doc.nodeAt(e);if(!i)return t;const a=0,o=8;let s=(i.attrs[n]||0)+r;if(s<a&&(s=a),s>o&&(s=o),s===i.attrs[n])return t;const l={...i.attrs,[n]:s};return t.setNodeMarkup(e,i.type,l,i.marks)}const qd=(t,e,r,n)=>{const{selection:i,doc:a}=t;if(!i||!a||!(i instanceof Xu.TextSelection||i instanceof Xu.AllSelection))return t;const{from:o,to:s}=i;return a.nodesBetween(o,s,(l,u)=>{const c=l.type;return c.name==="paragraph"||c.name==="blockquote"?(t=C3(t,u,r,n),!1):!ys(l,e)}),t},E3=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=qd(r.tr.setSelection(i),n,e,"indent");return a.docChanged?(t.dispatch(a),!0):!1},D3=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=qd(r.tr.setSelection(i),n,e,"textIndent");return a.docChanged?(t.dispatch(a),!0):!1},jd=(t,e,r,n={})=>(i,a)=>{const{schema:o,selection:s}=i,{$from:l,$to:u}=s,c=l.blockRange(u);if(!c)return!1;const f=gd(h=>ys(h,o))(s);if(c.depth>=1&&f&&c.depth-f.depth<=1){if(f.node.type===t&&!r)return Un.liftListItem(e)(i,a);if(ys(f.node,o)&&t.validContent(f.node.content)){const{tr:h}=i,v={...f.node.attrs,...n};return r&&(v.listStyleType=r),h.setNodeMarkup(f.pos,t,v),a&&a(h),!1}}const d={...n};return r&&(d.listStyleType=r),Un.wrapInList(t,d)(i,a)},Wa=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=r.tr.setSelection(i),{doc:o}=a;if(!o)return a;const{from:s,to:l}=i;o.nodesBetween(s,l,(u,c)=>{if(ys(u,n)&&s-3<=c&&l+3>=c+u.nodeSize){const f=Array.isArray(e)?e:[e];for(const d of f)a.setNodeAttribute(c,d.key,d.value)}return!1}),t.dispatch(a)},A3=(t,e)=>{const{state:r}=t,{schema:n,doc:i}=r;let a=[],o=n.nodes.paragraph;if(i.content.size>2){const c=i.resolve(1);a=[...c.marks()],o=c.parent.type}const l=e.split(`
|
|
3
|
+
`).map(c=>{if(c.trim()==="")return o.create();const f=n.text(c,a);return o.create(null,f)}),u=r.tr;u.replaceWith(0,i.content.size,l),t.dispatch(u)},Qd={prosemirrorEditor:"_prosemirrorEditor_461xq_1",formatPainter:"_formatPainter_461xq_5"},Kd=O.forwardRef(({elementId:t,defaultColor:e,defaultFontName:r,value:n,editable:i=!1,autoFocus:a=!1,style:o,onUpdate:s,onFocus:l,onBlur:u,onMouseDown:c,className:f},d)=>{const h=O.useRef(null),v=O.useRef(null),{handleElementId:p,textFormatPainter:g,richTextAttrs:m,activeElementIdList:y,setDisableHotkeysState:_,setRichtextAttrs:b,setTextFormatPainter:x}=St(),{ctrlOrShiftKeyActive:S}=nr();O.useImperativeHandle(d,()=>({focus:()=>{var B;return(B=v.current)==null?void 0:B.focus()}}));const w=O.useCallback(mr.debounce((B=!1)=>{if(!v.current)return;const k=v.current.dom.innerHTML;n.replace(/ style=""/g,"")!==k.replace(/ style=""/g,"")&&(s==null||s({value:k,ignore:B}))},300,{trailing:!0}),[n,s]),T=O.useCallback(()=>{(!S||y.length<=1)&&_(!0),l==null||l()},[S,y,_,l]),L=O.useCallback(()=>{_(!1),u==null||u()},[_,u]),C=O.useCallback(mr.debounce(()=>{if(!v.current)return;const B=I4(v.current,{color:e,fontname:r});b(B)},30,{trailing:!0}),[e,r,b]),M=O.useCallback((B,k)=>{const{ctrlKey:N,shiftKey:z,metaKey:R}=k,V=N||z||R,I=k.key.toUpperCase(),H=V&&(I===se.Z||I===se.Y);w(H),C()},[w,C]),A=O.useCallback(()=>{if(!g)return;const{keep:B,...k}=g,N=[{command:"clear"}];for(const z of Object.keys(k)){const R=z,V=g[z];V===!0?N.push({command:R}):V&&N.push({command:R,value:V})}E({action:N}),B||x(null)},[g,x]);O.useEffect(()=>{if(!h.current)return;const B=T3(h.current,n,{handleDOMEvents:{focus:T,blur:L,keydown:M,click:C,mouseup:A},editable:()=>i});return v.current=B,a&&B.focus(),()=>{B.destroy(),v.current=null}},[]),O.useEffect(()=>{if(!v.current||v.current.hasFocus())return;const{doc:B,tr:k}=v.current.state;v.current.dispatch(k.replaceRangeWith(0,B.content.size,Zd(n)))},[n]),O.useEffect(()=>{v.current&&v.current.setProps({editable:()=>i})},[i]);const E=O.useCallback(({target:B,action:k})=>{const N=v.current;if(!N||!B&&p!==t||B&&B!==t)return;const z="command"in k?[k]:k;for(const R of z)if(R.command==="fontname"&&R.value!==void 0){const V=N.state.schema.marks.fontname.create({fontname:R.value});rr(N),fn(N,V),R.value&&!document.fonts.check(`16px ${R.value}`)&&console.warn("字体需要等待加载下载后生效,请稍等")}else if(R.command==="fontsize"&&R.value){const V=N.state.schema.marks.fontsize.create({fontsize:R.value});rr(N),fn(N,V),Wa(N,{key:"fontsize",value:R.value})}else if(R.command==="fontsize-add"){const V=R.value?+R.value:2;rr(N);const I=bd(N)+V+"px",H=N.state.schema.marks.fontsize.create({fontsize:I});fn(N,H),Wa(N,{key:"fontsize",value:I})}else if(R.command==="fontsize-reduce"){const V=R.value?+R.value:2;rr(N);let I=bd(N)-V;I<12&&(I=12);const H=N.state.schema.marks.fontsize.create({fontsize:I+"px"});fn(N,H),Wa(N,{key:"fontsize",value:I+"px"})}else if(R.command==="color"&&R.value){const V=N.state.schema.marks.forecolor.create({color:R.value});rr(N),fn(N,V),Wa(N,{key:"color",value:R.value})}else if(R.command==="backcolor"&&R.value){const V=N.state.schema.marks.backcolor.create({backcolor:R.value});rr(N),fn(N,V)}else if(R.command==="bold")rr(N),Ut.toggleMark(N.state.schema.marks.strong)(N.state,N.dispatch);else if(R.command==="em")rr(N),Ut.toggleMark(N.state.schema.marks.em)(N.state,N.dispatch);else if(R.command==="underline")rr(N),Ut.toggleMark(N.state.schema.marks.underline)(N.state,N.dispatch);else if(R.command==="strikethrough")rr(N),Ut.toggleMark(N.state.schema.marks.strikethrough)(N.state,N.dispatch);else if(R.command==="subscript")Ut.toggleMark(N.state.schema.marks.subscript)(N.state,N.dispatch);else if(R.command==="superscript")Ut.toggleMark(N.state.schema.marks.superscript)(N.state,N.dispatch);else if(R.command==="blockquote")_s("blockquote",N.state)?Ut.lift(N.state,N.dispatch):Ut.wrapIn(N.state.schema.nodes.blockquote)(N.state,N.dispatch);else if(R.command==="code")Ut.toggleMark(N.state.schema.marks.code)(N.state,N.dispatch);else if(R.command==="align"&&R.value)M3(N,R.value);else if(R.command==="indent"&&R.value)E3(N,+R.value);else if(R.command==="textIndent"&&R.value)D3(N,+R.value);else if(R.command==="bulletList"){const V=R.value||"",{bullet_list:I,list_item:H}=N.state.schema.nodes,G={color:m.color,fontsize:m.fontsize};jd(I,H,V,G)(N.state,N.dispatch)}else if(R.command==="orderedList"){const V=R.value||"",{ordered_list:I,list_item:H}=N.state.schema.nodes,G={color:m.color,fontsize:m.fontsize};jd(I,H,V,G)(N.state,N.dispatch)}else if(R.command==="clear"){rr(N);const{$from:V,$to:I}=N.state.selection;N.dispatch(N.state.tr.removeMark(V.pos,I.pos)),Wa(N,[{key:"fontsize",value:""},{key:"color",value:""}])}else if(R.command==="link"){const V=N.state.schema.marks.link,{from:I,to:H}=N.state.selection,G=D4(N.state.doc,I,H,V);if(G)if(R.value){const X=N.state.schema.marks.link.create({href:R.value,title:R.value});fn(N,X,{from:G.from.pos,to:G.to.pos+1})}else N.dispatch(N.state.tr.removeMark(G.from.pos,G.to.pos+1,V));else if(k4(N.state,V))if(R.value){const X=N.state.schema.marks.link.create({href:R.value,title:R.value});fn(N,X)}else Ut.toggleMark(V)(N.state,N.dispatch);else R.value&&(rr(N),Ut.toggleMark(V,{href:R.value,title:R.value})(N.state,N.dispatch))}else R.command==="insert"&&R.value?N.dispatch(N.state.tr.insertText(R.value)):R.command==="replace"&&R.value&&A3(N,R.value);N.focus(),w(),C()},[p,t,m,w,C]),P=O.useCallback(()=>{p===t&&C()},[p,t,C]);return O.useEffect(()=>(Fi.on(jn.RICH_TEXT_COMMAND,E),Fi.on(jn.SYNC_RICH_TEXT_ATTRS_TO_STORE,P),()=>{Fi.off(jn.RICH_TEXT_COMMAND,E),Fi.off(jn.SYNC_RICH_TEXT_ATTRS_TO_STORE,P)}),[E,P]),D.jsx("div",{className:Dt(Qd.prosemirrorEditor,{[Qd.formatPainter]:g,[f]:f}),ref:h,onMouseDown:c,style:o})}),dn={editableElementText:"_editableElementText_hvfx9_1",rotateWrapper:"_rotateWrapper_hvfx9_5",elementContent:"_elementContent_hvfx9_10",text:"_text_hvfx9_17",dragHandler:"_dragHandler_hvfx9_21",top:"_top_hvfx9_27",bottom:"_bottom_hvfx9_30"},P3=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,{handleElementId:i,isScaling:a}=St(),{updateElement:o,deleteElement:s}=kt(),{addHistorySnapshot:l}=Me(),u=O.useRef(null),{shadowStyle:c}=hn(n.shadow),f=(y,_=!0)=>{y.stopPropagation(),e==null||e(y.nativeEvent,n,_)},d=O.useRef(-1),h=O.useRef(-1);O.useEffect(()=>{!a&&i===n.id&&(!n.vertical&&d.current!==-1&&(o({id:n.id,props:{height:d.current}}),d.current=-1),n.vertical&&h.current!==-1&&(o({id:n.id,props:{width:h.current}}),h.current=-1))},[a,i,n.id,n.vertical,o]);const v=O.useCallback(y=>{const _=y[0].contentRect;if(!u.current)return;const b=_.height+20,x=_.width+20;!n.vertical&&n.height!==b&&(a?d.current=b:o({id:n.id,props:{height:b}})),n.vertical&&n.width!==x&&(a?h.current=x:o({id:n.id,props:{width:x}}))},[n.vertical,n.height,n.width,n.id,a,o]);O.useEffect(()=>{const y=new ResizeObserver(v);return u.current&&y.observe(u.current),()=>{u.current&&y.unobserve(u.current),y.disconnect()}},[v]);const p=(y,_=!1)=>{o({id:n.id,props:{content:y}}),_||l()},g=O.useMemo(()=>mr.debounce(()=>{n.content.replace(/<[^>]+>/g,"")||s(n.id)},300,{trailing:!0}),[n.content,n.id,s]),m=i===n.id;return O.useEffect(()=>{m||g()},[m]),Pr(u,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:dn.editableElementText,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:D.jsx("div",{className:dn.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{className:dn.elementContent,ref:u,style:{width:n.vertical?"auto":n.width+"px",height:n.vertical?n.height+"px":"auto",backgroundColor:n.fill,opacity:n.opacity,textShadow:c,lineHeight:n.lineHeight,letterSpacing:(n.wordSpace||0)+"px",color:n.defaultColor,fontFamily:n.defaultFontName,writingMode:n.vertical?"vertical-rl":"horizontal-tb"},onMouseDown:y=>f(y),onTouchStart:y=>f(y),children:[D.jsx(Ms,{width:n.width,height:n.height,outline:n.outline}),D.jsx(Kd,{className:dn.text,elementId:n.id,defaultColor:n.defaultColor,defaultFontName:n.defaultFontName,editable:!0,value:n.content,style:{"--paragraphSpace":`${n.paragraphSpace===void 0?5:n.paragraphSpace}px`},onUpdate:({value:y,ignore:_})=>p(y,_),onMouseDown:y=>f(y,!1)}),D.jsx("div",{className:Dt(dn.dragHandler,dn.top)}),D.jsx("div",{className:Dt(dn.dragHandler,dn.bottom)})]})})})},Jd=(t,e)=>({fill:O.useMemo(()=>t.pattern?`url(#${e}-pattern-${t.id})`:t.gradient?`url(#${e}-gradient-${t.id})`:t.fill||"none",[t.pattern,t.gradient,t.fill,t.id,e])}),tv=({id:t,type:e,colors:r,rotate:n=0})=>D.jsx(D.Fragment,{children:e==="linear"?D.jsx("linearGradient",{id:t,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${n},0.5,0.5)`,children:r.map((i,a)=>D.jsx("stop",{offset:`${i.pos}%`,stopColor:i.color},a))}):D.jsx("radialGradient",{id:t,children:r.map((i,a)=>D.jsx("stop",{offset:`${i.pos}%`,stopColor:i.color},a))})}),ev=({id:t,src:e})=>D.jsx("pattern",{id:t,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",height:"1",children:D.jsx("image",{href:e,width:"1",height:"1",preserveAspectRatio:"xMidYMid slice"})}),vn={editableElementShape:"_editableElementShape_38zop_1",formatPainter:"_formatPainter_38zop_7",elementContent:"_elementContent_38zop_7",rotateWrapper:"_rotateWrapper_38zop_11",shapePath:"_shapePath_38zop_27",editable:"_editable_38zop_1",shapeText:"_shapeText_38zop_35",top:"_top_38zop_52",middle:"_middle_38zop_56",bottom:"_bottom_38zop_60"},N3=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,i=O.useRef(null),{handleElementId:a,shapeFormatPainter:o,setShapeFormatPainter:s}=St(),{theme:l,updateElement:u,removeElementProps:c}=kt(),{addHistorySnapshot:f}=Me(),{fill:d}=Jd(n,"editable"),{outlineWidth:h,outlineColor:v,strokeDashArray:p}=zi(n.outline),{shadowStyle:g}=hn(n.shadow),{flipStyle:m}=Ls(n.flipH,n.flipV),[y,_]=O.useState(!1),b=O.useRef(null),x=O.useMemo(()=>{const M={content:"",align:"middle",defaultFontName:l.fontName,defaultColor:l.fontColor};return n.text?n.text:M},[n.text,l]),S=(M,A=!0)=>{M.stopPropagation(),e==null||e(M.nativeEvent,n,A)},w=()=>{if(!o)return;const{keep:M,...A}=o;u({id:n.id,props:A}),f(),M||s(null)};O.useEffect(()=>{a!==n.id&&y&&_(!1)},[a,n.id,y]);const T=(M,A=!1)=>{const E={...x,content:M};u({id:n.id,props:{text:E}}),A||f()},L=()=>{if(!n.text)return;n.text.content.replace(/<[^>]+>/g,"")||(c({id:n.id,propName:"text"}),f())},C=()=>{_(!0),setTimeout(()=>{var M;return(M=b.current)==null?void 0:M.focus()},0)};return Pr(i,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Dt(vn.editableElementShape,{[vn.formatPainter]:o}),style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:D.jsx("div",{className:vn.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{className:vn.elementContent,style:{opacity:n.opacity,filter:g?`drop-shadow(${g})`:"",transform:m,color:x.defaultColor,fontFamily:x.defaultFontName},ref:i,onMouseDown:S,onMouseUp:w,onTouchStart:S,onDoubleClick:C,children:[D.jsxs("svg",{overflow:"visible",width:n.width,height:n.height,children:[D.jsx("defs",{children:n.pattern?D.jsx(ev,{id:`editable-pattern-${n.id}`,src:n.pattern}):n.gradient?D.jsx(tv,{id:`editable-gradient-${n.id}`,type:n.gradient.type,colors:n.gradient.colors,rotate:n.gradient.rotate}):null}),D.jsx("g",{transform:`scale(${n.width/n.viewBox[0]}, ${n.height/n.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{className:vn.shapePath,vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:n.path,fill:d,stroke:v,strokeWidth:h,strokeDasharray:p})})]}),D.jsx("div",{className:Dt(vn.shapeText,vn[x.align],{[vn.editable]:y||x.content}),children:(y||x.content)&&D.jsx(Kd,{ref:b,elementId:n.id,defaultColor:x.defaultColor,defaultFontName:x.defaultFontName,editable:!0,value:x.content,onUpdate:({value:M,ignore:A})=>T(M,A),onBlur:L,onMouseDown:M=>S(M,!1)})})]})})})},Cs=({id:t,position:e,type:r,baseSize:n,color:i})=>{const a={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},o={"arrow-start":180,"arrow-end":0},s=a[r],l=o[`${r}-${e}`]||0,u=O.useMemo(()=>n<2?2:n,[n]);return D.jsx("marker",{id:`${t}-${r}-${e}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:u*3,markerHeight:u*3,refX:u*1.5,refY:u*1.5,children:D.jsx("path",{d:s,fill:i,transform:`scale(${u*.3}, ${u*.3}) rotate(${l}, 5, 5)`})})},Es={editableElementLine:"_editableElementLine_1j2mb_1",elementContent:"_elementContent_1j2mb_6",linePath:"_linePath_1j2mb_16",linePoint:"_linePoint_1j2mb_16"},k3=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=O.useRef(null),i=t,{shadowStyle:a}=hn(i.shadow),o=h=>{h.stopPropagation(),e==null||e(h.nativeEvent,i)},s=O.useMemo(()=>{const h=Math.abs(i.start[0]-i.end[0]);return h<24?24:h},[i.start,i.end]),l=O.useMemo(()=>{const h=Math.abs(i.start[1]-i.end[1]);return h<24?24:h},[i.start,i.end]),u=O.useMemo(()=>{const h=i.width;return i.style==="dashed"?h<=8?`${h*5} ${h*2.5}`:`${h*5} ${h*1.5}`:i.style==="dotted"?h<=8?`${h*1.8} ${h*1.6}`:`${h*1.5} ${h*1.2}`:"0 0"},[i.width,i.style]),c=O.useMemo(()=>Ed(i),[i]),f=i.points[0],d=i.points[1];return Pr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Es.editableElementLine,style:{top:i.top+"px",left:i.left+"px"},children:D.jsx("div",{className:Es.elementContent,style:{filter:a?`drop-shadow(${a})`:""},onMouseDown:o,onTouchStart:o,children:D.jsxs("svg",{overflow:"visible",width:s,height:l,children:[D.jsxs("defs",{children:[f&&D.jsx(Cs,{id:i.id,position:"start",type:f,color:i.color,baseSize:i.width}),d&&D.jsx(Cs,{id:i.id,position:"end",type:d,color:i.color,baseSize:i.width})]}),D.jsx("path",{className:Es.linePoint,d:c,stroke:i.color,strokeWidth:i.width,strokeDasharray:u,fill:"none",markerStart:f?`url(#${i.id}-${f}-start)`:"",markerEnd:d?`url(#${i.id}-${d}-end)`:""}),D.jsx("path",{className:Es.linePath,d:c,stroke:"transparent",strokeWidth:"20",fill:"none",ref:n})]})})})};/*! *****************************************************************************
|
|
33
4
|
Copyright (c) Microsoft Corporation.
|
|
34
5
|
|
|
35
6
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -42,8 +13,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
42
13
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
14
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
15
|
PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
-
***************************************************************************** */var xc=function(t,e){return xc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},xc(t,e)};function ht(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");xc(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var v7=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),p7=function(){function t(){this.browser=new v7,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 t}(),Zt=new p7;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Zt.wxa=!0,Zt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Zt.worker=!0:!Zt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Zt.node=!0,Zt.svgSupported=!0):g7(navigator.userAgent,Zt);function g7(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var bc=12,Ev="sans-serif",un=bc+"px "+Ev,m7=20,y7=100,_7="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function x7(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),i=(t.charCodeAt(r)-m7)/y7;e[n]=i}return e}var b7=x7(_7),En={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var t,e;return function(r,n){if(!t){var i=En.createCanvas();t=i&&i.getContext("2d")}if(t)return e!==n&&(e=t.font=n||un),t.measureText(r);r=r||"",n=n||un;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||bc,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=b7[r[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n}},Dv=Dn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),Av=Dn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),ra=Object.prototype.toString,$s=Array.prototype,S7=$s.forEach,w7=$s.filter,Sc=$s.slice,T7=$s.map,Pv=(function(){}).constructor,Zs=Pv?Pv.prototype:null,wc="__proto__",L7=2311;function Rv(){return L7++}function na(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function zt(t){if(t==null||typeof t!="object")return t;var e=t,r=ra.call(t);if(r==="[object Array]"){if(!uo(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=zt(t[n])}}else if(Av[r]){if(!uo(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}}}else if(!Dv[r]&&!uo(t)&&!Ks(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==wc&&(e[o]=zt(t[o]))}return e}function re(t,e,r){if(!Mt(e)||!Mt(t))return r?zt(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==wc){var i=t[n],a=e[n];Mt(a)&&Mt(i)&&!bt(a)&&!bt(i)&&!Ks(a)&&!Ks(i)&&!Ov(a)&&!Ov(i)&&!uo(a)&&!uo(i)?re(i,a,r):(r||!(n in t))&&(t[n]=zt(e[n]))}return t}function ot(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==wc&&(t[r]=e[r]);return t}function Ft(t,e,r){for(var n=Ht(e),i=0,a=n.length;i<a;i++){var o=n[i];t[o]==null&&(t[o]=e[o])}return t}function ne(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function M7(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function kr(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&t[a]==null&&(t[a]=e[a])}else Ft(t,e)}function Je(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function z(t,e,r){if(t&&e)if(t.forEach&&t.forEach===S7)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function yt(t,e,r){if(!t)return[];if(!e)return Lc(t);if(t.map&&t.map===T7)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}function Dn(t,e,r,n){if(t&&e){for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function Se(t,e,r){if(!t)return[];if(!e)return Lc(t);if(t.filter&&t.filter===w7)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}function kv(t,e,r){if(t&&e){for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]}}function Ht(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function C7(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(Sc.call(arguments)))}}var ce=Zs&&Dt(Zs.bind)?Zs.call.bind(Zs.bind):C7;function or(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(Sc.call(arguments)))}}function bt(t){return Array.isArray?Array.isArray(t):ra.call(t)==="[object Array]"}function Dt(t){return typeof t=="function"}function Lt(t){return typeof t=="string"}function Nv(t){return ra.call(t)==="[object String]"}function ie(t){return typeof t=="number"}function Mt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function Ov(t){return!!Dv[ra.call(t)]}function Xe(t){return!!Av[ra.call(t)]}function Ks(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function Tc(t){return t.colorStops!=null}function E7(t){return ra.call(t)==="[object RegExp]"}function ia(t){return t!==t}function aa(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function St(t,e){return t??e}function cn(t,e,r){return t??e??r}function Lc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return Sc.apply(t,e)}function Mc(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function wt(t,e){if(!t)throw new Error(e)}function An(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Iv="__ec_primitive__";function Cc(t){t[Iv]=!0}function uo(t){return t[Iv]}var D7=function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return Ht(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&e(r[n],n)},t}(),Bv=typeof Map=="function";function A7(){return Bv?new Map:new D7}var P7=function(){function t(e){var r=bt(e);this.data=A7();var n=this;e instanceof t?e.each(i):e&&z(e,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(n,i){e.call(r,n,i)})},t.prototype.keys=function(){var e=this.data.keys();return Bv?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t}();function Ot(t){return new P7(t)}function R7(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var i=t.length,n=0;n<e.length;n++)r[n+i]=e[n];return r}function Qs(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&ot(r,e),r}function Yr(t,e){return t.hasOwnProperty(e)}function sr(){}var Js=180/Math.PI;function oa(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function k7(t){return[t[0],t[1]]}function Vv(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function N7(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function O7(t){return Math.sqrt(I7(t))}function I7(t){return t[0]*t[0]+t[1]*t[1]}function Ec(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function B7(t,e){var r=O7(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function Dc(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Ac=Dc;function V7(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var sa=V7;function Pc(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function gr(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function la(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function ua(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var ca=function(){function t(e,r){this.target=e,this.topTarget=r&&r.topTarget}return t}(),z7=function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var r=e.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new ca(r,e),"dragstart",e.event))},t.prototype._drag=function(e){var r=this._draggingTarget;if(r){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,e),this.handler.dispatchToElement(new ca(r,e),"drag",e.event);var s=this.handler.findHover(n,i,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new ca(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new ca(s,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new ca(r,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new ca(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t}(),fn=function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!e)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var l={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},t.prototype.isSilent=function(e){var r=this._$handlers;return!r||!r[e]||!r[e].length},t.prototype.off=function(e,r){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(r){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==r&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},t.prototype.trigger=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,r[0]);break;case 2:c.h.call(s,r[0],r[1]);break;default:c.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t}(),F7=Math.log(2);function Rc(t,e,r,n,i,a){var o=n+"-"+i,s=t.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/F7);return t[r][l]}for(var u=n|1<<r,c=r+1;n&1<<c;)c++;for(var f=0,d=0,h=0;d<s;d++){var v=1<<d;v&i||(f+=(h%2?-1:1)*t[r][d]*Rc(t,e-1,c,u,i|v,a),h++)}return a[o]=f,f}function H7(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},i=Rc(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Rc(r,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var zv="___zrEVENTSAVED";function W7(t,e,r,n,i){if(e.getBoundingClientRect&&Zt.domSupported&&!Fv(e)){var a=e[zv]||(e[zv]={}),o=G7(e,a),s=j7(o,a);if(s)return s(t,r,n),!0}return!1}function G7(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>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",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){z(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function j7(t,e,r){for(var n="trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&a&&d===a[f]&&h===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=H7(o,s))}function Fv(t){return t.nodeName.toUpperCase()==="CANVAS"}var X7=/([&<>"'])/g,Y7={"&":"&","<":"<",">":">",'"':""","'":"'"};function U7(t){return t==null?"":(t+"").replace(X7,function(e,r){return Y7[r]})}var $7=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kc=[],Z7=Zt.browser.firefox&&+Zt.browser.version.split(".")[0]<39;function Nc(t,e,r,n){return r=r||{},n?Hv(t,e,r):Z7&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Hv(t,e,r),r}function Hv(t,e,r){if(Zt.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(Fv(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(W7(kc,t,n,i)){r.zrX=kc[0],r.zrY=kc[1];return}}r.zrX=r.zrY=0}function Oc(t){return t||window.event}function Nr(t,e,r){if(e=Oc(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Nc(t,o,e,r)}else{Nc(t,e,e,r);var a=K7(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&$7.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function K7(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function Q7(t,e,r,n){t.addEventListener(e,r,n)}function J7(t,e,r,n){t.removeEventListener(e,r,n)}var q7=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},t6=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=Nc(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},t.prototype._recognize=function(e){for(var r in Ic)if(Ic.hasOwnProperty(r)){var n=Ic[r](this._track,e);if(n)return n}},t}();function Wv(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function e6(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Ic={pinch:function(t,e){var r=t.length;if(r){var n=(t[r-1]||{}).points,i=(t[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=Wv(n)/Wv(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=e6(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function Pn(){return[1,0,0,1,0,0]}function Bc(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Gv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function co(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function jv(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function Xv(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function r6(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function fo(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}var Pt=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),ci=Math.min,fa=Math.max,Vc=Math.abs,Yv=["x","y"],n6=["width","height"],fi=new Pt,hi=new Pt,di=new Pt,vi=new Pt,lr=$v(),ho=lr.minTv,zc=lr.maxTv,vo=[0,0],It=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=ci(e.x,this.x),n=ci(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=fa(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=fa(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=Pn();return jv(a,a,[-r.x,-r.y]),r6(a,a,[n,i]),jv(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Pt.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(i6,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(a6,r.x,r.y,r.width,r.height));var s=!!n;lr.reset(i,s);var l=lr.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,h=r.x+l,v=r.x+r.width-l,p=r.y+l,g=r.y+r.height-l;if(u>c||f>d||h>v||p>g)return!1;var m=!(c<h||v<u||d<p||g<f);return(s||a)&&(vo[0]=1/0,vo[1]=0,Uv(u,c,h,v,0,s,a,o),Uv(f,d,p,g,1,s,a,o),s&&Pt.copy(n,m?lr.useDir?lr.dirMinTv:ho:zc)),m},t.contain=function(e,r,n){return r>=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}fi.x=di.x=r.x,fi.y=vi.y=r.y,hi.x=vi.x=r.x+r.width,hi.y=di.y=r.y+r.height,fi.transform(n),vi.transform(n),hi.transform(n),di.transform(n),e.x=ci(fi.x,hi.x,di.x,vi.x),e.y=ci(fi.y,hi.y,di.y,vi.y);var l=fa(fi.x,hi.x,di.x,vi.x),u=fa(fi.y,hi.y,di.y,vi.y);e.width=l-e.x,e.height=u-e.y},t}(),i6=new It(0,0,0,0),a6=new It(0,0,0,0);function Uv(t,e,r,n,i,a,o,s){var l=Vc(e-r),u=Vc(n-t),c=ci(l,u),f=Yv[i],d=Yv[1-i],h=n6[i];e<r||n<t?l<u?(a&&(zc[f]=-l),s&&(o[f]=e,o[h]=0)):(a&&(zc[f]=u),s&&(o[f]=t,o[h]=0)):(o&&(o[f]=fa(t,r),o[h]=ci(e,n)-o[f]),a&&(c<vo[0]||lr.useDir)&&(vo[0]=ci(c,vo[0]),(l<u||!lr.bidirectional)&&(ho[f]=l,ho[d]=0,lr.useDir&&lr.calcDirMTV()),(l>=u||!lr.bidirectional)&&(ho[f]=-u,ho[d]=0,lr.useDir&&lr.calcDirMTV())))}function $v(){var t=0,e=new Pt,r=new Pt,n={minTv:new Pt,maxTv:new Pt,useDir:!1,dirMinTv:new Pt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=fa(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return Vc(a)<1e-10}return n}var Zv="silent";function o6(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:s6}}function s6(){q7(this.event)}var l6=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(fn),po=function(){function t(e,r){this.x=e,this.y=r}return t}(),u6=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Fc=new It(0,0,0,0),Kv=function(t){ht(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new po(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new l6,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new z7(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(z(u6,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=Jv(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new po(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new po(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=o6(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.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(r,n,i){var a=this.storage.getDisplayList(),o=new po(r,n);if(Qv(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new It(r-u,n-u,l,l),f=a.length-1;f>=0;f--){var d=a[f];d!==i&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Fc.copy(d.getBoundingRect()),d.transform&&Fc.applyTransform(d.transform),Fc.intersect(c)&&s.push(d))}if(s.length)for(var h=4,v=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=h)for(var m=0;m<p;m+=v){var y=r+g*Math.cos(m),_=n+g*Math.sin(m);if(Qv(s,o,y,_,i),o.target)return o}}return o},e.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new t6);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new po;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(fn);z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Kv.prototype[t]=function(e){var r=e.zrX,n=e.zrY,i=Jv(this,r,n),a,o;if((t!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||Ac(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function c6(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?Zv:!0}return!1}function Qv(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=c6(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==Zv)){e.target=o;break}}}function Jv(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var qv=32,go=7;function f6(t){for(var e=0;t>=qv;)e|=t&1,t>>=1;return t+e}function tp(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i<r&&n(t[i],t[i-1])<0;)i++;h6(t,e,i)}else for(;i<r&&n(t[i],t[i-1])>=0;)i++;return i-e}function h6(t,e,r){for(r--;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}function ep(t,e,r,n,i){for(n===e&&n++;n<r;n++){for(var a=t[n],o=e,s=n,l;o<s;)l=o+s>>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function Hc(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l<s&&a(t,e[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(t,e[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function Wc(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;l<s&&a(t,e[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(t,e[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function d6(t,e){var r=go,n,i,a=0,o=[];n=[],i=[];function s(h,v){n[a]=h,i[a]=v,a+=1}function l(){for(;a>1;){var h=a-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]<i[h+1]&&h--;else if(i[h]>i[h+1])break;c(h)}}function u(){for(;a>1;){var h=a-2;h>0&&i[h-1]<i[h+1]&&h--,c(h)}}function c(h){var v=n[h],p=i[h],g=n[h+1],m=i[h+1];i[h]=p+m,h===a-3&&(n[h+1]=n[h+2],i[h+1]=i[h+2]),a--;var y=Wc(t[g],t,v,p,0,e);v+=y,p-=y,p!==0&&(m=Hc(t[v+p-1],t,g,m,m-1,e),m!==0&&(p<=m?f(v,p,g,m):d(v,p,g,m)))}function f(h,v,p,g){var m=0;for(m=0;m<v;m++)o[m]=t[h+m];var y=0,_=p,x=h;if(t[x++]=t[_++],--g===0){for(m=0;m<v;m++)t[x+m]=o[y+m];return}if(v===1){for(m=0;m<g;m++)t[x+m]=t[_+m];t[x+g]=o[y];return}for(var S=r,b,w,T;;){b=0,w=0,T=!1;do if(e(t[_],o[y])<0){if(t[x++]=t[_++],w++,b=0,--g===0){T=!0;break}}else if(t[x++]=o[y++],b++,w=0,--v===1){T=!0;break}while((b|w)<S);if(T)break;do{if(b=Wc(t[_],o,y,v,0,e),b!==0){for(m=0;m<b;m++)t[x+m]=o[y+m];if(x+=b,y+=b,v-=b,v<=1){T=!0;break}}if(t[x++]=t[_++],--g===0){T=!0;break}if(w=Hc(o[y],t,_,g,0,e),w!==0){for(m=0;m<w;m++)t[x+m]=t[_+m];if(x+=w,_+=w,g-=w,g===0){T=!0;break}}if(t[x++]=o[y++],--v===1){T=!0;break}S--}while(b>=go||w>=go);if(T)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),v===1){for(m=0;m<g;m++)t[x+m]=t[_+m];t[x+g]=o[y]}else{if(v===0)throw new Error;for(m=0;m<v;m++)t[x+m]=o[y+m]}}function d(h,v,p,g){var m=0;for(m=0;m<g;m++)o[m]=t[p+m];var y=h+v-1,_=g-1,x=p+g-1,S=0,b=0;if(t[x--]=t[y--],--v===0){for(S=x-(g-1),m=0;m<g;m++)t[S+m]=o[m];return}if(g===1){for(x-=v,y-=v,b=x+1,S=y+1,m=v-1;m>=0;m--)t[b+m]=t[S+m];t[x]=o[_];return}for(var w=r;;){var T=0,L=0,C=!1;do if(e(o[_],t[y])<0){if(t[x--]=t[y--],T++,L=0,--v===0){C=!0;break}}else if(t[x--]=o[_--],L++,T=0,--g===1){C=!0;break}while((T|L)<w);if(C)break;do{if(T=v-Wc(o[_],t,h,v,v-1,e),T!==0){for(x-=T,y-=T,v-=T,b=x+1,S=y+1,m=T-1;m>=0;m--)t[b+m]=t[S+m];if(v===0){C=!0;break}}if(t[x--]=o[_--],--g===1){C=!0;break}if(L=g-Hc(t[y],o,0,g,g-1,e),L!==0){for(x-=L,_-=L,g-=L,b=x+1,S=_+1,m=0;m<L;m++)t[b+m]=o[S+m];if(g<=1){C=!0;break}}if(t[x--]=t[y--],--v===0){C=!0;break}w--}while(T>=go||L>=go);if(C)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),g===1){for(x-=v,y-=v,b=x+1,S=y+1,m=v-1;m>=0;m--)t[b+m]=t[S+m];t[x]=o[_]}else{if(g===0)throw new Error;for(S=x-(g-1),m=0;m<g;m++)t[S+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function qs(t,e,r,n){r||(r=0),n||(n=t.length);var i=n-r;if(!(i<2)){var a=0;if(i<qv){a=tp(t,r,n,e),ep(t,r,n,r+a,e);return}var o=d6(t,e),s=f6(i);do{if(a=tp(t,r,n,e),a<s){var l=i;l>s&&(l=s),ep(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Ur=1,mo=2,ha=4,rp=!1;function Gc(){rp||(rp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function np(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var v6=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=np}return t.prototype.traverse=function(e,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,r)},t.prototype.getDisplayList=function(e,r){r=r||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(r),n},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,e);n.length=this._displayListLen,qs(n,np)},t.prototype._updateAndAddDisplayable=function(e,r,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),a=r&&r.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(a||i)){if(s||(s=e.__clipPaths=[]),a)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=i,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|=Ur),this._updateAndAddDisplayable(h,s,n)}e.__dirty=0}else{var v=e;isNaN(v.z)&&(Gc(),v.z=0),isNaN(v.z2)&&(Gc(),v.z2=0),isNaN(v.zlevel)&&(Gc(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var p=e.getDecalElement&&e.getDecalElement();p&&this._updateAndAddDisplayable(p,s,n);var g=e.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,n);var m=e.getTextContent();m&&this._updateAndAddDisplayable(m,s,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r<n;r++)this.delRoot(e[r]);return}var i=ne(this._roots,e);i>=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),jc;jc=Zt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var yo={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-yo.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?yo.bounceIn(t*2)*.5:yo.bounceOut(t*2-1)*.5+.5}},tl=Math.pow,Rn=Math.sqrt,el=1e-8,ip=1e-4,ap=Rn(3),rl=1/3,$r=oa(),mr=oa(),da=oa();function kn(t){return t>-el&&t<el}function op(t){return t>el||t<-el}function Re(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function sp(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function nl(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(kn(c)&&kn(f))if(kn(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[h++]=v)}else{var p=f*f-4*c*d;if(kn(p)){var g=f/c,v=-s/o+g,m=-g/2;v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m)}else if(p>0){var y=Rn(p),_=c*s+1.5*o*(-f+y),x=c*s+1.5*o*(-f-y);_<0?_=-tl(-_,rl):_=tl(_,rl),x<0?x=-tl(-x,rl):x=tl(x,rl);var v=(-s-(_+x))/(3*o);v>=0&&v<=1&&(a[h++]=v)}else{var S=(2*c*s-3*o*f)/(2*Rn(c*c*c)),b=Math.acos(S)/3,w=Rn(c),T=Math.cos(b),v=(-s-2*w*T)/(3*o),m=(-s+w*(T+ap*Math.sin(b)))/(3*o),L=(-s+w*(T-ap*Math.sin(b)))/(3*o);v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m),L>=0&&L<=1&&(a[h++]=L)}}return h}function lp(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(kn(o)){if(op(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(kn(c))i[0]=-a/(2*o);else if(c>0){var f=Rn(c),u=(-a+f)/(2*o),d=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function il(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function p6(t,e,r,n,i,a,o,s,l,u,c){var f,d=.005,h=1/0,v,p,g,m;$r[0]=l,$r[1]=u;for(var y=0;y<1;y+=.05)mr[0]=Re(t,r,i,o,y),mr[1]=Re(e,n,a,s,y),g=sa($r,mr),g<h&&(f=y,h=g);h=1/0;for(var _=0;_<32&&!(d<ip);_++)v=f-d,p=f+d,mr[0]=Re(t,r,i,o,v),mr[1]=Re(e,n,a,s,v),g=sa(mr,$r),v>=0&&g<h?(f=v,h=g):(da[0]=Re(t,r,i,o,p),da[1]=Re(e,n,a,s,p),m=sa(da,$r),p<=1&&m<h?(f=p,h=m):d*=.5);return Rn(h)}function g6(t,e,r,n,i,a,o,s,l){for(var u=t,c=e,f=0,d=1/l,h=1;h<=l;h++){var v=h*d,p=Re(t,r,i,o,v),g=Re(e,n,a,s,v),m=p-u,y=g-c;f+=Math.sqrt(m*m+y*y),u=p,c=g}return f}function qe(t,e,r,n){var i=1-n;return i*(i*t+2*n*e)+n*n*r}function up(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))}function m6(t,e,r,n,i){var a=t-2*e+r,o=2*(e-t),s=t-n,l=0;if(kn(a)){if(op(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(kn(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=Rn(c),u=(-o+f)/(2*a),d=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function cp(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function al(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function y6(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;$r[0]=o,$r[1]=s;for(var d=0;d<1;d+=.05){mr[0]=qe(t,r,i,d),mr[1]=qe(e,n,a,d);var h=sa($r,mr);h<f&&(u=d,f=h)}f=1/0;for(var v=0;v<32&&!(c<ip);v++){var p=u-c,g=u+c;mr[0]=qe(t,r,i,p),mr[1]=qe(e,n,a,p);var h=sa(mr,$r);if(p>=0&&h<f)u=p,f=h;else{da[0]=qe(t,r,i,g),da[1]=qe(e,n,a,g);var m=sa(da,$r);g<=1&&m<f?(u=g,f=m):c*=.5}}return Rn(f)}function _6(t,e,r,n,i,a,o){for(var s=t,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,h=qe(t,r,i,d),v=qe(e,n,a,d),p=h-s,g=v-l;u+=Math.sqrt(p*p+g*g),s=h,l=v}return u}var x6=/cubic-bezier\(([0-9,\.e ]+)\)/;function Xc(t){var e=t&&x6.exec(t);if(e){var r=e[1].split(","),n=+An(r[0]),i=+An(r[1]),a=+An(r[2]),o=+An(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:nl(0,n,a,1,l,s)&&Re(0,i,o,1,s[0])}}}var b6=function(){function t(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||sr,this.ondestroy=e.ondestroy||sr,this.onrestart=e.onrestart||sr,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Dt(e)?e:yo[e]||Xc(e)},t}(),fp=function(){function t(e){this.value=e}return t}(),S6=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new fp(e);return this.insertEntry(r),r},t.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++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),va=function(){function t(e){this._list=new S6,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new fp(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),hp={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 Nn(t){return t=Math.round(t),t<0?0:t>255?255:t}function Yc(t){return t<0?0:t>1?1:t}function Uc(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Nn(parseFloat(e)/100*255):Nn(parseInt(e,10))}function pi(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Yc(parseFloat(e)/100):Yc(parseFloat(e))}function $c(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function ol(t,e,r){return t+(e-t)*r}function yr(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Zc(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var dp=new va(20),sl=null;function pa(t,e){sl&&Zc(sl,e),sl=dp.put(t,sl||e.slice())}function Or(t,e){if(t){e=e||[];var r=dp.get(t);if(r)return Zc(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in hp)return Zc(e,hp[n]),pa(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){yr(e,0,0,0,1);return}return yr(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),pa(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){yr(e,0,0,0,1);return}return yr(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),pa(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){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?yr(e,+u[0],+u[1],+u[2],1):yr(e,0,0,0,1);c=pi(u.pop());case"rgb":if(u.length>=3)return yr(e,Uc(u[0]),Uc(u[1]),Uc(u[2]),u.length===3?c:pi(u[3])),pa(t,e),e;yr(e,0,0,0,1);return;case"hsla":if(u.length!==4){yr(e,0,0,0,1);return}return u[3]=pi(u[3]),Kc(u,e),pa(t,e),e;case"hsl":if(u.length!==3){yr(e,0,0,0,1);return}return Kc(u,e),pa(t,e),e;default:return}}yr(e,0,0,0,1)}}function Kc(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=pi(t[1]),i=pi(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],yr(e,Nn($c(o,a,r+1/3)*255),Nn($c(o,a,r)*255),Nn($c(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function w6(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-r)/6+o/2)/o,d=((a-n)/6+o/2)/o;e===a?l=d-f:r===a?l=1/3+c-d:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return t[3]!=null&&h.push(t[3]),h}}function vp(t,e){var r=Or(t);if(r){for(var n=0;n<3;n++)r[n]=r[n]*(1-e)|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return _o(r,r.length===4?"rgba":"rgb")}}function T6(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Or(e[i]),s=Or(e[a]),l=n-i,u=_o([Nn(ol(o[0],s[0],l)),Nn(ol(o[1],s[1],l)),Nn(ol(o[2],s[2],l)),Yc(ol(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function Qc(t,e,r,n){var i=Or(t);if(t)return i=w6(i),r!=null&&(i[1]=pi(Dt(r)?r(i[1]):r)),n!=null&&(i[2]=pi(Dt(n)?n(i[2]):n)),_o(Kc(i),"rgba")}function _o(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function ll(t,e){var r=Or(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var pp=new va(100);function Jc(t){if(Lt(t)){var e=pp.get(t);return e||(e=vp(t,-.1),pp.put(t,e)),e}else if(Tc(t)){var r=ot({},t);return r.colorStops=yt(t.colorStops,function(n){return{offset:n.offset,color:vp(n.color,-.1)}}),r}return t}var ul=Math.round;function xo(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Or(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var gp=1e-4;function On(t){return t<gp&&t>-gp}function cl(t){return ul(t*1e3)/1e3}function qc(t){return ul(t*1e4)/1e4}function L6(t){return"matrix("+cl(t[0])+","+cl(t[1])+","+cl(t[2])+","+cl(t[3])+","+qc(t[4])+","+qc(t[5])+")"}var M6={left:"start",right:"end",center:"middle",middle:"middle"};function C6(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function E6(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function D6(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function mp(t){return t&&!!t.image}function A6(t){return t&&!!t.svgElement}function tf(t){return mp(t)||A6(t)}function yp(t){return t.type==="linear"}function _p(t){return t.type==="radial"}function xp(t){return t&&(t.type==="linear"||t.type==="radial")}function fl(t){return"url(#"+t+")"}function bp(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function Sp(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*Js,i=St(t.scaleX,1),a=St(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+ul(o*Js)+"deg, "+ul(s*Js)+"deg)"),l.join(" ")}var P6=function(){return Zt.hasGlobalWindow&&Dt(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return process.env.NODE_ENV!=="production"&&na("Base64 isn't natively supported in the current environment."),null}}(),ef=Array.prototype.slice;function hn(t,e,r){return(e-t)*r+t}function rf(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=hn(e[a],r[a],n);return t}function R6(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=hn(e[o][s],r[o][s],n)}return t}function hl(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=e[a]+r[a]*n;return t}function wp(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=e[o][s]+r[o][s]*n}return t}function k6(t,e){for(var r=t.length,n=e.length,i=r>n?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function N6(t,e,r){var n=t,i=e;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(r===1?i[l]:ef.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(r===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function dl(t){if(Je(t)){var e=t.length;if(Je(t[0])){for(var r=[],n=0;n<e;n++)r.push(ef.call(t[n]));return r}return ef.call(t)}return t}function vl(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function O6(t){return Je(t&&t[0])?2:1}var pl=0,gl=1,Tp=2,bo=3,nf=4,af=5,Lp=6;function Mp(t){return t===nf||t===af}function ml(t){return t===gl||t===Tp}var So=[0,0,0,0],I6=function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Lp,l=r;if(Je(r)){var u=O6(r);s=u,(u===1&&!ie(r[0])||u===2&&!ie(r[0][0]))&&(o=!0)}else if(ie(r)&&!ia(r))s=pl;else if(Lt(r))if(!isNaN(+r))s=pl;else{var c=Or(r);c&&(l=c,s=bo)}else if(Tc(r)){var f=ot({},l);f.colorStops=yt(r.colorStops,function(h){return{offset:h.offset,color:Or(h.color)}}),yp(r)?s=nf:_p(r)&&(s=af),l=f}a===0?this.valType=s:(s!==this.valType||s===Lp)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:r,percent:0};return n&&(d.easing=n,d.easingFunc=Dt(n)?n:yo[n]||Xc(n)),i.push(d),d},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=ml(i),u=Mp(i),c=0;c<a;c++){var f=n[c],d=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==a-1?N6(d,h,i):u&&k6(d.colorStops,h.colorStops))}if(!s&&i!==af&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var v=n[0].value,c=0;c<a;c++)i===pl?n[c].additiveValue=n[c].value-v:i===bo?n[c].additiveValue=hl([],n[c].value,v,-1):ml(i)&&(n[c].additiveValue=i===gl?hl([],n[c].value,v,-1):wp([],n[c].value,v,-1))}},t.prototype.step=function(e,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===bo,c,f=this._lastFr,d=Math.min,h,v;if(s===1)h=v=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var p=d(f+1,s-1);for(c=p;c>=0&&!(o[c].percent<=r);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>r);c++);c=d(c-1,s-2)}v=o[c+1],h=o[c]}if(h&&v){this._lastFr=c,this._lastFrP=r;var g=v.percent-h.percent,m=g===0?1:d((r-h.percent)/g,1);v.easingFunc&&(m=v.easingFunc(m));var y=n?this._additiveValue:u?So:e[l];if((ml(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?h.rawValue:v.rawValue;else if(ml(a))a===gl?rf(y,h[i],v[i],m):R6(y,h[i],v[i],m);else if(Mp(a)){var _=h[i],x=v[i],S=a===nf;e[l]={type:S?"linear":"radial",x:hn(_.x,x.x,m),y:hn(_.y,x.y,m),colorStops:yt(_.colorStops,function(w,T){var L=x.colorStops[T];return{offset:hn(w.offset,L.offset,m),color:vl(rf([],w.color,L.color,m))}}),global:x.global},S?(e[l].x2=hn(_.x2,x.x2,m),e[l].y2=hn(_.y2,x.y2,m)):e[l].r=hn(_.r,x.r,m)}else if(u)rf(y,h[i],v[i],m),n||(e[l]=vl(y));else{var b=hn(h[i],v[i],m);n?this._additiveValue=b:e[l]=b}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===pl?e[n]=e[n]+i:r===bo?(Or(e[n],So),hl(So,So,i,1),e[n]=vl(So)):r===gl?hl(e[n],e[n],i,1):r===Tp&&wp(e[n],e[n],i,1)},t}(),of=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){na("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Ht(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new I6(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===bo&&u&&(u=vl(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,dl(u),i),this._trackKeys.push(s)}l.addKeyframe(e,dl(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n<r;n++)e[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,r=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)e[r[n]].setFinished()},t.prototype._getAdditiveTrack=function(e){var r,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(r=a)}return r},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(r._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var d=new b6({life:i,loop:this._loop,delay:this._delay||0,onframe:function(h){r._started=2;var v=r._additiveAnimators;if(v){for(var p=!1,g=0;g<v.length;g++)if(v[g]._clip){p=!0;break}p||(r._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(r._target,h);var m=r._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](r._target,h)},ondestroy:function(){r._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(this._clip){var r=this._clip;e&&r.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return yt(this._trackKeys,function(r){return e._tracks[r]})},t.prototype.stopTracks=function(e,r){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},t.prototype.saveTo=function(e,r,n){if(e){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[a]=dl(l.rawValue))}}}},t.prototype.__changeFinalValue=function(e,r){r=r||Ht(e);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function ga(){return new Date().getTime()}var B6=function(t){ht(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=ga()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(jc(n),!r._paused&&r.update())}jc(n)},e.prototype.start=function(){this._running||(this._time=ga(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=ga(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=ga()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new of(r,n.loop);return this.addAnimator(i),i},e}(fn),V6=300,sf=Zt.domSupported,lf=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=yt(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),Cp={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Ep=!1;function uf(t){var e=t.pointerType;return e==="pen"||e==="touch"}function z6(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function cf(t){t&&(t.zrByTouch=!0)}function F6(t,e){return Nr(t.dom,new H6(t,e),!0)}function Dp(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var H6=function(){function t(e,r){this.stopPropagation=sr,this.stopImmediatePropagation=sr,this.preventDefault=sr,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),Ir={mousedown:function(t){t=Nr(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Nr(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Nr(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Nr(this.dom,t);var e=t.toElement||t.relatedTarget;Dp(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Ep=!0,t=Nr(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Ep||(t=Nr(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Nr(this.dom,t),cf(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Ir.mousemove.call(this,t),Ir.mousedown.call(this,t)},touchmove:function(t){t=Nr(this.dom,t),cf(t),this.handler.processGesture(t,"change"),Ir.mousemove.call(this,t)},touchend:function(t){t=Nr(this.dom,t),cf(t),this.handler.processGesture(t,"end"),Ir.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<V6&&Ir.click.call(this,t)},pointerdown:function(t){Ir.mousedown.call(this,t)},pointermove:function(t){uf(t)||Ir.mousemove.call(this,t)},pointerup:function(t){Ir.mouseup.call(this,t)},pointerout:function(t){uf(t)||Ir.mouseout.call(this,t)}};z(["click","dblclick","contextmenu"],function(t){Ir[t]=function(e){e=Nr(this.dom,e),this.trigger(t,e)}});var ff={pointermove:function(t){uf(t)||ff.mousemove.call(this,t)},pointerup:function(t){ff.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function W6(t,e){var r=e.domHandlers;Zt.pointerEventsSupported?z(lf.pointer,function(n){yl(e,n,function(i){r[n].call(t,i)})}):(Zt.touchEventsSupported&&z(lf.touch,function(n){yl(e,n,function(i){r[n].call(t,i),z6(e)})}),z(lf.mouse,function(n){yl(e,n,function(i){i=Oc(i),e.touching||r[n].call(t,i)})}))}function G6(t,e){Zt.pointerEventsSupported?z(Cp.pointer,r):Zt.touchEventsSupported||z(Cp.mouse,r);function r(n){function i(a){a=Oc(a),Dp(t,a.target)||(a=F6(t,a),e.domHandlers[n].call(t,a))}yl(e,n,i,{capture:!0})}}function yl(t,e,r,n){t.mounted[e]=r,t.listenerOpts[e]=n,Q7(t.domTarget,e,r,n)}function hf(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&J7(t.domTarget,r,e[r],t.listenerOpts[r]);t.mounted={}}var Ap=function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t}(),j6=function(t){ht(e,t);function e(r,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new Ap(r,Ir),sf&&(i._globalHandlerScope=new Ap(document,ff)),W6(i,i._localHandlerScope),i}return e.prototype.dispose=function(){hf(this._localHandlerScope),sf&&hf(this._globalHandlerScope)},e.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},e.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,sf&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?G6(this,n):hf(n)}},e}(fn),Pp=1;Zt.hasGlobalWindow&&(Pp=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Rp=Pp,df=.4,vf="#333",pf="#ccc",X6="#eee",kp=Bc,Np=5e-5;function gi(t){return t>Np||t<-Np}var mi=[],ma=[],gf=Pn(),mf=Math.abs,Y6=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return gi(this.rotation)||gi(this.x)||gi(this.y)||gi(this.scaleX-1)||gi(this.scaleY-1)||gi(this.skewX)||gi(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(kp(n),this.invTransform=null);return}n=n||Pn(),r?this.getLocalTransform(n):kp(n),e&&(r?co(n,e,n):Gv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(mi);var n=mi[0]<0?-1:1,i=mi[1]<0?-1:1,a=((mi[0]-n)*r+n)/mi[0]||0,o=((mi[1]-i)*r+i)/mi[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Pn(),fo(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Pn(),co(ma,e.invTransform,r),r=ma);var n=this.originX,i=this.originY;(n||i)&&(gf[4]=n,gf[5]=i,co(ma,r,gf),ma[4]-=n,ma[5]-=i,r=ma),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&gr(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&gr(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&mf(e[0]-1)>1e-10&&mf(e[3]-1)>1e-10?Math.sqrt(mf(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){_l(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=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||i||s||l){var v=n+s,p=i+l;r[4]=-v*a-d*p*o,r[5]=-p*o-h*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=d*o,u&&Xv(r,r,u),r[4]+=n+c,r[5]+=i+f,r},t.initDefaultProps=function(){var e=t.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}(),t}(),wo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function _l(t,e){for(var r=0;r<wo.length;r++){var n=wo[r];t[n]=e[n]}}const yf=Y6;function Zr(t){xl||(xl=new va(100)),t=t||un;var e=xl.get(t);return e||(e={font:t,strWidthCache:new va(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:En.measureText("国",t).width,asciiCharWidth:En.measureText("a",t).width},xl.put(t,e)),e}var xl;function U6(t){if(!(_f>=Op)){t=t||un;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=En.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?_f=Op:i>2&&_f++,e}}var _f=0,Op=5;function Ip(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=U6(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function Kr(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=En.measureText(e,t.font).width,r.put(e,n)),n}function Bp(t,e,r,n){var i=Kr(Zr(e),t),a=To(e),o=ya(0,i,r),s=yi(0,a,n),l=new It(o,s,i,a);return l}function $6(t,e,r,n){var i=((t||"")+"").split(`
|
|
46
|
-
`),a=i.length;if(a===1)return Bp(i[0],e,r,n);for(var o=new It(0,0,0,0),s=0;s<i.length;s++){var l=Bp(i[s],e,r,n);s===0?o.copy(l):o.union(l)}return o}function ya(t,e,r,n){return r==="right"?n?t+=e:t-=e:r==="center"&&(n?t+=e/2:t-=e/2),t}function yi(t,e,r,n){return r==="middle"?n?t+=e/2:t-=e/2:r==="bottom"&&(n?t+=e:t-=e),t}function To(t){return Zr(t).stWideCharWidth}function In(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function bl(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=In(n[0],r.width),u+=In(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var xf="__zr_normal__",bf=wo.concat(["ignore"]),Z6=Dn(wo,function(t,e){return t[e]=!0,t},{ignore:!1}),_a={},K6=new It(0,0,0,0),Sl=[],wl=function(){function t(e){this.id=Rv(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,d=void 0;if((f||c)&&(d=K6,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),i||d.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(_a,n,d):bl(_a,n,d),a.x=_a.x,a.y=_a.y,o=_a.align,s=_a.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var v=void 0,p=void 0;h==="center"?(v=d.width*.5,p=d.height*.5):(v=In(h[0],d.width),p=In(h[1],d.height)),u=!0,a.originX=-a.x+v+(i?0:d.x),a.originY=-a.y+p+(i?0:d.y)}}n.rotation!=null&&(a.rotation=n.rotation);var g=n.offset;g&&(a.x+=g[0],a.y+=g[1],u||(a.originX=-g[0],a.originY=-g[1]));var m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var y=m.overflowRect=m.overflowRect||new It(0,0,0,0);a.getLocalTransform(Sl),fo(Sl,Sl),It.copy(y,d),y.applyTransform(Sl)}else m.overflowRect=null;var _=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,x=void 0,S=void 0,b=void 0;_&&this.canBeInsideText()?(x=n.insideFill,S=n.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(S==null||S==="auto")&&(S=this.getInsideTextStroke(x),b=!0)):(x=n.outsideFill,S=n.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(S==null||S==="auto")&&(S=this.getOutsideStroke(x),b=!0)),x=x||"#000",(x!==m.fill||S!==m.stroke||b!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=x,m.stroke=S,m.autoStroke=b,m.align=o,m.verticalAlign=s,r.setDefaultTextStyle(m)),r.__dirty|=Ur,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?pf:vf},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Or(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,_o(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},ot(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(Mt(e))for(var n=e,i=Ht(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==xf)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},t.prototype._innerSaveToNormal=function(e){var r=this._normalState;r||(r=this._normalState={}),e.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(e,r,bf)},t.prototype._savePrimaryToNormal=function(e,r,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in r)&&(r[a]=this[a])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(xf,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===xf,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ne(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){na("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(e,r,n,c),d&&d.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ur),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[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&&i.push(c)}var f=i[o-1],d=!!(f&&f.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),v=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!r&&!this.__inHover&&v&&v.duration>0,v);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,r,d),g&&g.useStates(e,r,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ur)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var r=this.animators[e];r.targetName&&r.changeTarget(this[r.targetName])}},t.prototype.removeState=function(e){var r=ne(this.currentStates,e);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=ne(i,e),o=ne(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i<e.length;i++){var a=e[i];ot(r,a),a.textConfig&&(n=n||{},ot(n,a.textConfig))}return n&&(r.textConfig=n),r},t.prototype._applyStateObj=function(e,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=ot({},i?this.textConfig:n.textConfig),ot(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<bf.length;c++){var f=bf[c],d=a&&Z6[f];r&&r[f]!=null?d?(u=!0,l[f]=r[f]):this[f]=r[f]:s&&n[f]!=null&&(d?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!a)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],v=h.targetName;h.getLoop()||h.__changeFinalValue(v?(r||n)[v]:r||n)}u&&this._transitionState(e,l,o)},t.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(e===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var r=this.__zr;r&&e.addSelfToZr(r),e.__zr=r,e.__hostTarget=this},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var r=this._textContent;if(r!==e){if(r&&r!==e&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new yf,this._attachComponent(e),this._textContent=e,this.markRedraw()}},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ot(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=Ur;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=e),n&&(n.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,r,n){var i=e?this[e]:this;if(process.env.NODE_ENV!=="production"&&!i){na('Property "'+e+'" is not existed in element '+this.id);return}var a=new of(i,r,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},t.prototype.addAnimator=function(e,r){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=ne(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},t.prototype.animateTo=function(e,r,n){Sf(this,e,r,n)},t.prototype.animateFrom=function(e,r,n){Sf(this,e,r,n,!0)},t.prototype._transitionState=function(e,r,n,i){for(var a=Sf(this,r,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.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=Ur;var r={};function n(a,o,s){r[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),r[a+o+s]=!0)}function i(a,o,s,l){Object.defineProperty(e,a,{get:function(){if(process.env.NODE_ENV!=="production"&&n(a,s,l),!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){process.env.NODE_ENV!=="production"&&n(a,s,l),this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,f){Object.defineProperty(f,0,{get:function(){return c[s]},set:function(d){c[s]=d}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(d){c[l]=d}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();kr(wl,fn),kr(wl,yf);function Sf(t,e,r,n,i){r=r||{};var a=[];Vp(t,"",t,e,r,n,a,i);var o=a.length,s=!1,l=r.done,u=r.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(),a.length>0&&r.during&&a[0].during(function(v,p){r.during(p)});for(var d=0;d<a.length;d++){var h=a[d];c&&h.done(c),f&&h.aborted(f),r.force&&h.duration(r.duration),h.start(r.easing)}return a}function wf(t,e,r){for(var n=0;n<r;n++)t[n]=e[n]}function Q6(t){return Je(t[0])}function J6(t,e,r){if(Je(e[r]))if(Je(t[r])||(t[r]=[]),Xe(e[r])){var n=e[r].length;t[r].length!==n&&(t[r]=new e[r].constructor(n),wf(t[r],e[r],n))}else{var i=e[r],a=t[r],o=i.length;if(Q6(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?wf(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else wf(a,i,o);a.length=i.length}else t[r]=e[r]}function q6(t,e){return t===e||Je(t)&&Je(e)&&t8(t,e)}function t8(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Vp(t,e,r,n,i,a,o,s){for(var l=Ht(n),u=i.duration,c=i.delay,f=i.additive,d=i.setToFinal,h=!Mt(a),v=t.animators,p=[],g=0;g<l.length;g++){var m=l[g],y=n[m];if(y!=null&&r[m]!=null&&(h||a[m]))if(Mt(y)&&!Je(y)&&!Tc(y)){if(e){s||(r[m]=y,t.updateDuringAnimation(e));continue}Vp(t,m,r[m],y,i,a&&a[m],o,s)}else p.push(m);else s||(r[m]=y,t.updateDuringAnimation(e),p.push(m))}var _=p.length;if(!f&&_)for(var x=0;x<v.length;x++){var S=v[x];if(S.targetName===e){var b=S.stopTracks(p);if(b){var w=ne(v,S);v.splice(w,1)}}}if(i.force||(p=Se(p,function(M){return!q6(n[M],r[M])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,L=void 0,C=void 0;if(s){L={},d&&(T={});for(var x=0;x<_;x++){var m=p[x];L[m]=r[m],d?T[m]=n[m]:r[m]=n[m]}}else if(d){C={};for(var x=0;x<_;x++){var m=p[x];C[m]=dl(r[m]),J6(r,n,m)}}var S=new of(r,!1,!1,f?Se(v,function(A){return A.targetName===e}):null);S.targetName=e,i.scope&&(S.scope=i.scope),d&&T&&S.whenWithKeys(0,T,p),C&&S.whenWithKeys(0,C,p),S.whenWithKeys(u??500,s?L:n,p).delay(c||0),t.addAnimator(S,e),o.push(S)}}var ye=function(t){ht(e,t);function e(r){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(r){if(r&&(r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),process.env.NODE_ENV!=="production"&&r.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=ne(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=ne(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},e.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},e.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},e.prototype.getBoundingRect=function(r){for(var n=new It(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(It.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(wl);ye.prototype.type="group";/*!
|
|
16
|
+
***************************************************************************** */var Ju=function(t,e){return Ju=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ju(t,e)};function st(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ju(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var O3=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),I3=function(){function t(){this.browser=new O3,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 t}(),Ht=new I3;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ht.wxa=!0,Ht.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ht.worker=!0:!Ht.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ht.node=!0,Ht.svgSupported=!0):B3(navigator.userAgent,Ht);function B3(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var tc=12,rv="sans-serif",Zr=tc+"px "+rv,R3=20,$3=100,V3="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function z3(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),i=(t.charCodeAt(r)-R3)/$3;e[n]=i}return e}var F3=z3(V3),pn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var t,e;return function(r,n){if(!t){var i=pn.createCanvas();t=i&&i.getContext("2d")}if(t)return e!==n&&(e=t.font=n||Zr),t.measureText(r);r=r||"",n=n||Zr;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||tc,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=F3[r[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n}},nv=gn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),iv=gn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),Hi=Object.prototype.toString,Ds=Array.prototype,H3=Ds.forEach,G3=Ds.filter,ec=Ds.slice,W3=Ds.map,av=(function(){}).constructor,As=av?av.prototype:null,rc="__proto__",X3=2311;function ov(){return X3++}function Gi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function Ot(t){if(t==null||typeof t!="object")return t;var e=t,r=Hi.call(t);if(r==="[object Array]"){if(!Xa(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=Ot(t[n])}}else if(iv[r]){if(!Xa(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}}}else if(!nv[r]&&!Xa(t)&&!Ps(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==rc&&(e[o]=Ot(t[o]))}return e}function Zt(t,e,r){if(!wt(e)||!wt(t))return r?Ot(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==rc){var i=t[n],a=e[n];wt(a)&&wt(i)&&!gt(a)&&!gt(i)&&!Ps(a)&&!Ps(i)&&!uv(a)&&!uv(i)&&!Xa(a)&&!Xa(i)?Zt(i,a,r):(r||!(n in t))&&(t[n]=Ot(e[n]))}return t}function rt(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==rc&&(t[r]=e[r]);return t}function It(t,e,r){for(var n=Bt(e),i=0,a=n.length;i<a;i++){var o=n[i];t[o]==null&&(t[o]=e[o])}return t}function qt(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function Y3(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function br(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&t[a]==null&&(t[a]=e[a])}else It(t,e)}function ze(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function $(t,e,r){if(t&&e)if(t.forEach&&t.forEach===H3)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function dt(t,e,r){if(!t)return[];if(!e)return ic(t);if(t.map&&t.map===W3)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}function gn(t,e,r,n){if(t&&e){for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function fe(t,e,r){if(!t)return[];if(!e)return ic(t);if(t.filter&&t.filter===G3)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}function sv(t,e,r){if(t&&e){for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]}}function Bt(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function U3(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(ec.call(arguments)))}}var re=As&&Lt(As.bind)?As.call.bind(As.bind):U3;function Ue(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(ec.call(arguments)))}}function gt(t){return Array.isArray?Array.isArray(t):Hi.call(t)==="[object Array]"}function Lt(t){return typeof t=="function"}function xt(t){return typeof t=="string"}function lv(t){return Hi.call(t)==="[object String]"}function jt(t){return typeof t=="number"}function wt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function uv(t){return!!nv[Hi.call(t)]}function Ie(t){return!!iv[Hi.call(t)]}function Ps(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function nc(t){return t.colorStops!=null}function Z3(t){return Hi.call(t)==="[object RegExp]"}function Wi(t){return t!==t}function Xi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function mt(t,e){return t??e}function qr(t,e,r){return t??e??r}function ic(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return ec.apply(t,e)}function ac(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function bt(t,e){if(!t)throw new Error(e)}function mn(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var cv="__ec_primitive__";function oc(t){t[cv]=!0}function Xa(t){return t[cv]}var q3=function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return Bt(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&e(r[n],n)},t}(),fv=typeof Map=="function";function j3(){return fv?new Map:new q3}var Q3=function(){function t(e){var r=gt(e);this.data=j3();var n=this;e instanceof t?e.each(i):e&&$(e,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(n,i){e.call(r,n,i)})},t.prototype.keys=function(){var e=this.data.keys();return fv?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t}();function Pt(t){return new Q3(t)}function K3(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var i=t.length,n=0;n<e.length;n++)r[n+i]=e[n];return r}function Ns(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&rt(r,e),r}function Nr(t,e){return t.hasOwnProperty(e)}function Ze(){}var ks=180/Math.PI;function Yi(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function J3(t){return[t[0],t[1]]}function hv(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function t7(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function e7(t){return Math.sqrt(r7(t))}function r7(t){return t[0]*t[0]+t[1]*t[1]}function sc(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function n7(t,e){var r=e7(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function lc(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var uc=lc;function i7(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Ui=i7;function cc(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function ir(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function Zi(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function qi(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var ji=function(){function t(e,r){this.target=e,this.topTarget=r&&r.topTarget}return t}(),a7=function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var r=e.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new ji(r,e),"dragstart",e.event))},t.prototype._drag=function(e){var r=this._draggingTarget;if(r){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,e),this.handler.dispatchToElement(new ji(r,e),"drag",e.event);var s=this.handler.findHover(n,i,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new ji(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new ji(s,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new ji(r,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new ji(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t}(),jr=function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!e)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var l={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},t.prototype.isSilent=function(e){var r=this._$handlers;return!r||!r[e]||!r[e].length},t.prototype.off=function(e,r){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(r){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==r&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},t.prototype.trigger=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,r[0]);break;case 2:c.h.call(s,r[0],r[1]);break;default:c.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t}(),o7=Math.log(2);function fc(t,e,r,n,i,a){var o=n+"-"+i,s=t.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/o7);return t[r][l]}for(var u=n|1<<r,c=r+1;n&1<<c;)c++;for(var f=0,d=0,h=0;d<s;d++){var v=1<<d;v&i||(f+=(h%2?-1:1)*t[r][d]*fc(t,e-1,c,u,i|v,a),h++)}return a[o]=f,f}function s7(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},i=fc(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*fc(r,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var dv="___zrEVENTSAVED";function l7(t,e,r,n,i){if(e.getBoundingClientRect&&Ht.domSupported&&!vv(e)){var a=e[dv]||(e[dv]={}),o=u7(e,a),s=c7(o,a);if(s)return s(t,r,n),!0}return!1}function u7(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>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",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){$(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function c7(t,e,r){for(var n="trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&a&&d===a[f]&&h===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=s7(o,s))}function vv(t){return t.nodeName.toUpperCase()==="CANVAS"}var f7=/([&<>"'])/g,h7={"&":"&","<":"<",">":">",'"':""","'":"'"};function d7(t){return t==null?"":(t+"").replace(f7,function(e,r){return h7[r]})}var v7=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,hc=[],p7=Ht.browser.firefox&&+Ht.browser.version.split(".")[0]<39;function dc(t,e,r,n){return r=r||{},n?pv(t,e,r):p7&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):pv(t,e,r),r}function pv(t,e,r){if(Ht.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(vv(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(l7(hc,t,n,i)){r.zrX=hc[0],r.zrY=hc[1];return}}r.zrX=r.zrY=0}function vc(t){return t||window.event}function Sr(t,e,r){if(e=vc(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&dc(t,o,e,r)}else{dc(t,e,e,r);var a=g7(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&v7.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function g7(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function m7(t,e,r,n){t.addEventListener(e,r,n)}function y7(t,e,r,n){t.removeEventListener(e,r,n)}var _7=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},b7=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=dc(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},t.prototype._recognize=function(e){for(var r in pc)if(pc.hasOwnProperty(r)){var n=pc[r](this._track,e);if(n)return n}},t}();function gv(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function S7(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var pc={pinch:function(t,e){var r=t.length;if(r){var n=(t[r-1]||{}).points,i=(t[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=gv(n)/gv(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=S7(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function yn(){return[1,0,0,1,0,0]}function gc(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function mv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ya(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function yv(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function _v(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function x7(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function Ua(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}var Mt=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),Qn=Math.min,Qi=Math.max,mc=Math.abs,bv=["x","y"],w7=["width","height"],Kn=new Mt,Jn=new Mt,ti=new Mt,ei=new Mt,qe=xv(),Za=qe.minTv,yc=qe.maxTv,qa=[0,0],Nt=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Qn(e.x,this.x),n=Qn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Qi(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Qi(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=yn();return yv(a,a,[-r.x,-r.y]),x7(a,a,[n,i]),yv(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Mt.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(T7,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(L7,r.x,r.y,r.width,r.height));var s=!!n;qe.reset(i,s);var l=qe.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,h=r.x+l,v=r.x+r.width-l,p=r.y+l,g=r.y+r.height-l;if(u>c||f>d||h>v||p>g)return!1;var m=!(c<h||v<u||d<p||g<f);return(s||a)&&(qa[0]=1/0,qa[1]=0,Sv(u,c,h,v,0,s,a,o),Sv(f,d,p,g,1,s,a,o),s&&Mt.copy(n,m?qe.useDir?qe.dirMinTv:Za:yc)),m},t.contain=function(e,r,n){return r>=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Kn.x=ti.x=r.x,Kn.y=ei.y=r.y,Jn.x=ei.x=r.x+r.width,Jn.y=ti.y=r.y+r.height,Kn.transform(n),ei.transform(n),Jn.transform(n),ti.transform(n),e.x=Qn(Kn.x,Jn.x,ti.x,ei.x),e.y=Qn(Kn.y,Jn.y,ti.y,ei.y);var l=Qi(Kn.x,Jn.x,ti.x,ei.x),u=Qi(Kn.y,Jn.y,ti.y,ei.y);e.width=l-e.x,e.height=u-e.y},t}(),T7=new Nt(0,0,0,0),L7=new Nt(0,0,0,0);function Sv(t,e,r,n,i,a,o,s){var l=mc(e-r),u=mc(n-t),c=Qn(l,u),f=bv[i],d=bv[1-i],h=w7[i];e<r||n<t?l<u?(a&&(yc[f]=-l),s&&(o[f]=e,o[h]=0)):(a&&(yc[f]=u),s&&(o[f]=t,o[h]=0)):(o&&(o[f]=Qi(t,r),o[h]=Qn(e,n)-o[f]),a&&(c<qa[0]||qe.useDir)&&(qa[0]=Qn(c,qa[0]),(l<u||!qe.bidirectional)&&(Za[f]=l,Za[d]=0,qe.useDir&&qe.calcDirMTV()),(l>=u||!qe.bidirectional)&&(Za[f]=-u,Za[d]=0,qe.useDir&&qe.calcDirMTV())))}function xv(){var t=0,e=new Mt,r=new Mt,n={minTv:new Mt,maxTv:new Mt,useDir:!1,dirMinTv:new Mt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Qi(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return mc(a)<1e-10}return n}var wv="silent";function M7(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:C7}}function C7(){_7(this.event)}var E7=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(jr),ja=function(){function t(e,r){this.x=e,this.y=r}return t}(),D7=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_c=new Nt(0,0,0,0),Tv=function(t){st(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new ja(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new E7,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new a7(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&($(D7,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=Mv(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new ja(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new ja(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=M7(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.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(r,n,i){var a=this.storage.getDisplayList(),o=new ja(r,n);if(Lv(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Nt(r-u,n-u,l,l),f=a.length-1;f>=0;f--){var d=a[f];d!==i&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(_c.copy(d.getBoundingRect()),d.transform&&_c.applyTransform(d.transform),_c.intersect(c)&&s.push(d))}if(s.length)for(var h=4,v=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=h)for(var m=0;m<p;m+=v){var y=r+g*Math.cos(m),_=n+g*Math.sin(m);if(Lv(s,o,y,_,i),o.target)return o}}return o},e.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new b7);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new ja;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(jr);$(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Tv.prototype[t]=function(e){var r=e.zrX,n=e.zrY,i=Mv(this,r,n),a,o;if((t!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||uc(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function A7(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?wv:!0}return!1}function Lv(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=A7(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==wv)){e.target=o;break}}}function Mv(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var Cv=32,Qa=7;function P7(t){for(var e=0;t>=Cv;)e|=t&1,t>>=1;return t+e}function Ev(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i<r&&n(t[i],t[i-1])<0;)i++;N7(t,e,i)}else for(;i<r&&n(t[i],t[i-1])>=0;)i++;return i-e}function N7(t,e,r){for(r--;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}function Dv(t,e,r,n,i){for(n===e&&n++;n<r;n++){for(var a=t[n],o=e,s=n,l;o<s;)l=o+s>>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function bc(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l<s&&a(t,e[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(t,e[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function Sc(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;l<s&&a(t,e[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(t,e[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function k7(t,e){var r=Qa,n,i,a=0,o=[];n=[],i=[];function s(h,v){n[a]=h,i[a]=v,a+=1}function l(){for(;a>1;){var h=a-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]<i[h+1]&&h--;else if(i[h]>i[h+1])break;c(h)}}function u(){for(;a>1;){var h=a-2;h>0&&i[h-1]<i[h+1]&&h--,c(h)}}function c(h){var v=n[h],p=i[h],g=n[h+1],m=i[h+1];i[h]=p+m,h===a-3&&(n[h+1]=n[h+2],i[h+1]=i[h+2]),a--;var y=Sc(t[g],t,v,p,0,e);v+=y,p-=y,p!==0&&(m=bc(t[v+p-1],t,g,m,m-1,e),m!==0&&(p<=m?f(v,p,g,m):d(v,p,g,m)))}function f(h,v,p,g){var m=0;for(m=0;m<v;m++)o[m]=t[h+m];var y=0,_=p,b=h;if(t[b++]=t[_++],--g===0){for(m=0;m<v;m++)t[b+m]=o[y+m];return}if(v===1){for(m=0;m<g;m++)t[b+m]=t[_+m];t[b+g]=o[y];return}for(var x=r,S,w,T;;){S=0,w=0,T=!1;do if(e(t[_],o[y])<0){if(t[b++]=t[_++],w++,S=0,--g===0){T=!0;break}}else if(t[b++]=o[y++],S++,w=0,--v===1){T=!0;break}while((S|w)<x);if(T)break;do{if(S=Sc(t[_],o,y,v,0,e),S!==0){for(m=0;m<S;m++)t[b+m]=o[y+m];if(b+=S,y+=S,v-=S,v<=1){T=!0;break}}if(t[b++]=t[_++],--g===0){T=!0;break}if(w=bc(o[y],t,_,g,0,e),w!==0){for(m=0;m<w;m++)t[b+m]=t[_+m];if(b+=w,_+=w,g-=w,g===0){T=!0;break}}if(t[b++]=o[y++],--v===1){T=!0;break}x--}while(S>=Qa||w>=Qa);if(T)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),v===1){for(m=0;m<g;m++)t[b+m]=t[_+m];t[b+g]=o[y]}else{if(v===0)throw new Error;for(m=0;m<v;m++)t[b+m]=o[y+m]}}function d(h,v,p,g){var m=0;for(m=0;m<g;m++)o[m]=t[p+m];var y=h+v-1,_=g-1,b=p+g-1,x=0,S=0;if(t[b--]=t[y--],--v===0){for(x=b-(g-1),m=0;m<g;m++)t[x+m]=o[m];return}if(g===1){for(b-=v,y-=v,S=b+1,x=y+1,m=v-1;m>=0;m--)t[S+m]=t[x+m];t[b]=o[_];return}for(var w=r;;){var T=0,L=0,C=!1;do if(e(o[_],t[y])<0){if(t[b--]=t[y--],T++,L=0,--v===0){C=!0;break}}else if(t[b--]=o[_--],L++,T=0,--g===1){C=!0;break}while((T|L)<w);if(C)break;do{if(T=v-Sc(o[_],t,h,v,v-1,e),T!==0){for(b-=T,y-=T,v-=T,S=b+1,x=y+1,m=T-1;m>=0;m--)t[S+m]=t[x+m];if(v===0){C=!0;break}}if(t[b--]=o[_--],--g===1){C=!0;break}if(L=g-bc(t[y],o,0,g,g-1,e),L!==0){for(b-=L,_-=L,g-=L,S=b+1,x=_+1,m=0;m<L;m++)t[S+m]=o[x+m];if(g<=1){C=!0;break}}if(t[b--]=t[y--],--v===0){C=!0;break}w--}while(T>=Qa||L>=Qa);if(C)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),g===1){for(b-=v,y-=v,S=b+1,x=y+1,m=v-1;m>=0;m--)t[S+m]=t[x+m];t[b]=o[_]}else{if(g===0)throw new Error;for(x=b-(g-1),m=0;m<g;m++)t[x+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Os(t,e,r,n){r||(r=0),n||(n=t.length);var i=n-r;if(!(i<2)){var a=0;if(i<Cv){a=Ev(t,r,n,e),Dv(t,r,n,r+a,e);return}var o=k7(t,e),s=P7(i);do{if(a=Ev(t,r,n,e),a<s){var l=i;l>s&&(l=s),Dv(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var kr=1,Ka=2,Ki=4,Av=!1;function xc(){Av||(Av=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Pv(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var O7=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Pv}return t.prototype.traverse=function(e,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,r)},t.prototype.getDisplayList=function(e,r){r=r||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(r),n},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,e);n.length=this._displayListLen,Os(n,Pv)},t.prototype._updateAndAddDisplayable=function(e,r,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),a=r&&r.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(a||i)){if(s||(s=e.__clipPaths=[]),a)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=i,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|=kr),this._updateAndAddDisplayable(h,s,n)}e.__dirty=0}else{var v=e;isNaN(v.z)&&(xc(),v.z=0),isNaN(v.z2)&&(xc(),v.z2=0),isNaN(v.zlevel)&&(xc(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var p=e.getDecalElement&&e.getDecalElement();p&&this._updateAndAddDisplayable(p,s,n);var g=e.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,n);var m=e.getTextContent();m&&this._updateAndAddDisplayable(m,s,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r<n;r++)this.delRoot(e[r]);return}var i=qt(this._roots,e);i>=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),wc;wc=Ht.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var Ja={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Ja.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Ja.bounceIn(t*2)*.5:Ja.bounceOut(t*2-1)*.5+.5}},Is=Math.pow,_n=Math.sqrt,Bs=1e-8,Nv=1e-4,kv=_n(3),Rs=1/3,Or=Yi(),ar=Yi(),Ji=Yi();function bn(t){return t>-Bs&&t<Bs}function Ov(t){return t>Bs||t<-Bs}function _e(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function Iv(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function $s(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(bn(c)&&bn(f))if(bn(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[h++]=v)}else{var p=f*f-4*c*d;if(bn(p)){var g=f/c,v=-s/o+g,m=-g/2;v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m)}else if(p>0){var y=_n(p),_=c*s+1.5*o*(-f+y),b=c*s+1.5*o*(-f-y);_<0?_=-Is(-_,Rs):_=Is(_,Rs),b<0?b=-Is(-b,Rs):b=Is(b,Rs);var v=(-s-(_+b))/(3*o);v>=0&&v<=1&&(a[h++]=v)}else{var x=(2*c*s-3*o*f)/(2*_n(c*c*c)),S=Math.acos(x)/3,w=_n(c),T=Math.cos(S),v=(-s-2*w*T)/(3*o),m=(-s+w*(T+kv*Math.sin(S)))/(3*o),L=(-s+w*(T-kv*Math.sin(S)))/(3*o);v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m),L>=0&&L<=1&&(a[h++]=L)}}return h}function Bv(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(bn(o)){if(Ov(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(bn(c))i[0]=-a/(2*o);else if(c>0){var f=_n(c),u=(-a+f)/(2*o),d=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function Vs(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function I7(t,e,r,n,i,a,o,s,l,u,c){var f,d=.005,h=1/0,v,p,g,m;Or[0]=l,Or[1]=u;for(var y=0;y<1;y+=.05)ar[0]=_e(t,r,i,o,y),ar[1]=_e(e,n,a,s,y),g=Ui(Or,ar),g<h&&(f=y,h=g);h=1/0;for(var _=0;_<32&&!(d<Nv);_++)v=f-d,p=f+d,ar[0]=_e(t,r,i,o,v),ar[1]=_e(e,n,a,s,v),g=Ui(ar,Or),v>=0&&g<h?(f=v,h=g):(Ji[0]=_e(t,r,i,o,p),Ji[1]=_e(e,n,a,s,p),m=Ui(Ji,Or),p<=1&&m<h?(f=p,h=m):d*=.5);return _n(h)}function B7(t,e,r,n,i,a,o,s,l){for(var u=t,c=e,f=0,d=1/l,h=1;h<=l;h++){var v=h*d,p=_e(t,r,i,o,v),g=_e(e,n,a,s,v),m=p-u,y=g-c;f+=Math.sqrt(m*m+y*y),u=p,c=g}return f}function Fe(t,e,r,n){var i=1-n;return i*(i*t+2*n*e)+n*n*r}function Rv(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))}function R7(t,e,r,n,i){var a=t-2*e+r,o=2*(e-t),s=t-n,l=0;if(bn(a)){if(Ov(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(bn(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=_n(c),u=(-o+f)/(2*a),d=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function $v(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function zs(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function $7(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;Or[0]=o,Or[1]=s;for(var d=0;d<1;d+=.05){ar[0]=Fe(t,r,i,d),ar[1]=Fe(e,n,a,d);var h=Ui(Or,ar);h<f&&(u=d,f=h)}f=1/0;for(var v=0;v<32&&!(c<Nv);v++){var p=u-c,g=u+c;ar[0]=Fe(t,r,i,p),ar[1]=Fe(e,n,a,p);var h=Ui(ar,Or);if(p>=0&&h<f)u=p,f=h;else{Ji[0]=Fe(t,r,i,g),Ji[1]=Fe(e,n,a,g);var m=Ui(Ji,Or);g<=1&&m<f?(u=g,f=m):c*=.5}}return _n(f)}function V7(t,e,r,n,i,a,o){for(var s=t,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,h=Fe(t,r,i,d),v=Fe(e,n,a,d),p=h-s,g=v-l;u+=Math.sqrt(p*p+g*g),s=h,l=v}return u}var z7=/cubic-bezier\(([0-9,\.e ]+)\)/;function Tc(t){var e=t&&z7.exec(t);if(e){var r=e[1].split(","),n=+mn(r[0]),i=+mn(r[1]),a=+mn(r[2]),o=+mn(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:$s(0,n,a,1,l,s)&&_e(0,i,o,1,s[0])}}}var F7=function(){function t(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||Ze,this.ondestroy=e.ondestroy||Ze,this.onrestart=e.onrestart||Ze,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Lt(e)?e:Ja[e]||Tc(e)},t}(),Vv=function(){function t(e){this.value=e}return t}(),H7=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new Vv(e);return this.insertEntry(r),r},t.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++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ta=function(){function t(e){this._list=new H7,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new Vv(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),zv={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 Sn(t){return t=Math.round(t),t<0?0:t>255?255:t}function Lc(t){return t<0?0:t>1?1:t}function Mc(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Sn(parseFloat(e)/100*255):Sn(parseInt(e,10))}function ri(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Lc(parseFloat(e)/100):Lc(parseFloat(e))}function Cc(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Fs(t,e,r){return t+(e-t)*r}function or(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Ec(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Fv=new ta(20),Hs=null;function ea(t,e){Hs&&Ec(Hs,e),Hs=Fv.put(t,Hs||e.slice())}function xr(t,e){if(t){e=e||[];var r=Fv.get(t);if(r)return Ec(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in zv)return Ec(e,zv[n]),ea(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){or(e,0,0,0,1);return}return or(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),ea(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){or(e,0,0,0,1);return}return or(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),ea(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){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?or(e,+u[0],+u[1],+u[2],1):or(e,0,0,0,1);c=ri(u.pop());case"rgb":if(u.length>=3)return or(e,Mc(u[0]),Mc(u[1]),Mc(u[2]),u.length===3?c:ri(u[3])),ea(t,e),e;or(e,0,0,0,1);return;case"hsla":if(u.length!==4){or(e,0,0,0,1);return}return u[3]=ri(u[3]),Dc(u,e),ea(t,e),e;case"hsl":if(u.length!==3){or(e,0,0,0,1);return}return Dc(u,e),ea(t,e),e;default:return}}or(e,0,0,0,1)}}function Dc(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=ri(t[1]),i=ri(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],or(e,Sn(Cc(o,a,r+1/3)*255),Sn(Cc(o,a,r)*255),Sn(Cc(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function G7(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-r)/6+o/2)/o,d=((a-n)/6+o/2)/o;e===a?l=d-f:r===a?l=1/3+c-d:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return t[3]!=null&&h.push(t[3]),h}}function Hv(t,e){var r=xr(t);if(r){for(var n=0;n<3;n++)r[n]=r[n]*(1-e)|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return to(r,r.length===4?"rgba":"rgb")}}function W7(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=xr(e[i]),s=xr(e[a]),l=n-i,u=to([Sn(Fs(o[0],s[0],l)),Sn(Fs(o[1],s[1],l)),Sn(Fs(o[2],s[2],l)),Lc(Fs(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function Ac(t,e,r,n){var i=xr(t);if(t)return i=G7(i),r!=null&&(i[1]=ri(Lt(r)?r(i[1]):r)),n!=null&&(i[2]=ri(Lt(n)?n(i[2]):n)),to(Dc(i),"rgba")}function to(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function Gs(t,e){var r=xr(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var Gv=new ta(100);function Pc(t){if(xt(t)){var e=Gv.get(t);return e||(e=Hv(t,-.1),Gv.put(t,e)),e}else if(nc(t)){var r=rt({},t);return r.colorStops=dt(t.colorStops,function(n){return{offset:n.offset,color:Hv(n.color,-.1)}}),r}return t}var Ws=Math.round;function eo(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=xr(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var Wv=1e-4;function xn(t){return t<Wv&&t>-Wv}function Xs(t){return Ws(t*1e3)/1e3}function Nc(t){return Ws(t*1e4)/1e4}function X7(t){return"matrix("+Xs(t[0])+","+Xs(t[1])+","+Xs(t[2])+","+Xs(t[3])+","+Nc(t[4])+","+Nc(t[5])+")"}var Y7={left:"start",right:"end",center:"middle",middle:"middle"};function U7(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function Z7(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function q7(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function Xv(t){return t&&!!t.image}function j7(t){return t&&!!t.svgElement}function kc(t){return Xv(t)||j7(t)}function Yv(t){return t.type==="linear"}function Uv(t){return t.type==="radial"}function Zv(t){return t&&(t.type==="linear"||t.type==="radial")}function Ys(t){return"url(#"+t+")"}function qv(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function jv(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*ks,i=mt(t.scaleX,1),a=mt(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+Ws(o*ks)+"deg, "+Ws(s*ks)+"deg)"),l.join(" ")}var Q7=function(){return Ht.hasGlobalWindow&&Lt(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return process.env.NODE_ENV!=="production"&&Gi("Base64 isn't natively supported in the current environment."),null}}(),Oc=Array.prototype.slice;function Qr(t,e,r){return(e-t)*r+t}function Ic(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=Qr(e[a],r[a],n);return t}function K7(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=Qr(e[o][s],r[o][s],n)}return t}function Us(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=e[a]+r[a]*n;return t}function Qv(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=e[o][s]+r[o][s]*n}return t}function J7(t,e){for(var r=t.length,n=e.length,i=r>n?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function t6(t,e,r){var n=t,i=e;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(r===1?i[l]:Oc.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(r===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function Zs(t){if(ze(t)){var e=t.length;if(ze(t[0])){for(var r=[],n=0;n<e;n++)r.push(Oc.call(t[n]));return r}return Oc.call(t)}return t}function qs(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function e6(t){return ze(t&&t[0])?2:1}var js=0,Qs=1,Kv=2,ro=3,Bc=4,Rc=5,Jv=6;function tp(t){return t===Bc||t===Rc}function Ks(t){return t===Qs||t===Kv}var no=[0,0,0,0],r6=function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Jv,l=r;if(ze(r)){var u=e6(r);s=u,(u===1&&!jt(r[0])||u===2&&!jt(r[0][0]))&&(o=!0)}else if(jt(r)&&!Wi(r))s=js;else if(xt(r))if(!isNaN(+r))s=js;else{var c=xr(r);c&&(l=c,s=ro)}else if(nc(r)){var f=rt({},l);f.colorStops=dt(r.colorStops,function(h){return{offset:h.offset,color:xr(h.color)}}),Yv(r)?s=Bc:Uv(r)&&(s=Rc),l=f}a===0?this.valType=s:(s!==this.valType||s===Jv)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:r,percent:0};return n&&(d.easing=n,d.easingFunc=Lt(n)?n:Ja[n]||Tc(n)),i.push(d),d},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Ks(i),u=tp(i),c=0;c<a;c++){var f=n[c],d=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==a-1?t6(d,h,i):u&&J7(d.colorStops,h.colorStops))}if(!s&&i!==Rc&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var v=n[0].value,c=0;c<a;c++)i===js?n[c].additiveValue=n[c].value-v:i===ro?n[c].additiveValue=Us([],n[c].value,v,-1):Ks(i)&&(n[c].additiveValue=i===Qs?Us([],n[c].value,v,-1):Qv([],n[c].value,v,-1))}},t.prototype.step=function(e,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===ro,c,f=this._lastFr,d=Math.min,h,v;if(s===1)h=v=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var p=d(f+1,s-1);for(c=p;c>=0&&!(o[c].percent<=r);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>r);c++);c=d(c-1,s-2)}v=o[c+1],h=o[c]}if(h&&v){this._lastFr=c,this._lastFrP=r;var g=v.percent-h.percent,m=g===0?1:d((r-h.percent)/g,1);v.easingFunc&&(m=v.easingFunc(m));var y=n?this._additiveValue:u?no:e[l];if((Ks(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?h.rawValue:v.rawValue;else if(Ks(a))a===Qs?Ic(y,h[i],v[i],m):K7(y,h[i],v[i],m);else if(tp(a)){var _=h[i],b=v[i],x=a===Bc;e[l]={type:x?"linear":"radial",x:Qr(_.x,b.x,m),y:Qr(_.y,b.y,m),colorStops:dt(_.colorStops,function(w,T){var L=b.colorStops[T];return{offset:Qr(w.offset,L.offset,m),color:qs(Ic([],w.color,L.color,m))}}),global:b.global},x?(e[l].x2=Qr(_.x2,b.x2,m),e[l].y2=Qr(_.y2,b.y2,m)):e[l].r=Qr(_.r,b.r,m)}else if(u)Ic(y,h[i],v[i],m),n||(e[l]=qs(y));else{var S=Qr(h[i],v[i],m);n?this._additiveValue=S:e[l]=S}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===js?e[n]=e[n]+i:r===ro?(xr(e[n],no),Us(no,no,i,1),e[n]=qs(no)):r===Qs?Us(e[n],e[n],i,1):r===Kv&&Qv(e[n],e[n],i,1)},t}(),$c=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){Gi("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Bt(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new r6(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===ro&&u&&(u=qs(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Zs(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Zs(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n<r;n++)e[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,r=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)e[r[n]].setFinished()},t.prototype._getAdditiveTrack=function(e){var r,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(r=a)}return r},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(r._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var d=new F7({life:i,loop:this._loop,delay:this._delay||0,onframe:function(h){r._started=2;var v=r._additiveAnimators;if(v){for(var p=!1,g=0;g<v.length;g++)if(v[g]._clip){p=!0;break}p||(r._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(r._target,h);var m=r._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](r._target,h)},ondestroy:function(){r._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(this._clip){var r=this._clip;e&&r.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return dt(this._trackKeys,function(r){return e._tracks[r]})},t.prototype.stopTracks=function(e,r){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},t.prototype.saveTo=function(e,r,n){if(e){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[a]=Zs(l.rawValue))}}}},t.prototype.__changeFinalValue=function(e,r){r=r||Bt(e);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function ra(){return new Date().getTime()}var n6=function(t){st(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=ra()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(wc(n),!r._paused&&r.update())}wc(n)},e.prototype.start=function(){this._running||(this._time=ra(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=ra(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=ra()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new $c(r,n.loop);return this.addAnimator(i),i},e}(jr),i6=300,Vc=Ht.domSupported,zc=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=dt(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),ep={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},rp=!1;function Fc(t){var e=t.pointerType;return e==="pen"||e==="touch"}function a6(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Hc(t){t&&(t.zrByTouch=!0)}function o6(t,e){return Sr(t.dom,new s6(t,e),!0)}function np(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var s6=function(){function t(e,r){this.stopPropagation=Ze,this.stopImmediatePropagation=Ze,this.preventDefault=Ze,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),wr={mousedown:function(t){t=Sr(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Sr(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Sr(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Sr(this.dom,t);var e=t.toElement||t.relatedTarget;np(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){rp=!0,t=Sr(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){rp||(t=Sr(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Sr(this.dom,t),Hc(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),wr.mousemove.call(this,t),wr.mousedown.call(this,t)},touchmove:function(t){t=Sr(this.dom,t),Hc(t),this.handler.processGesture(t,"change"),wr.mousemove.call(this,t)},touchend:function(t){t=Sr(this.dom,t),Hc(t),this.handler.processGesture(t,"end"),wr.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<i6&&wr.click.call(this,t)},pointerdown:function(t){wr.mousedown.call(this,t)},pointermove:function(t){Fc(t)||wr.mousemove.call(this,t)},pointerup:function(t){wr.mouseup.call(this,t)},pointerout:function(t){Fc(t)||wr.mouseout.call(this,t)}};$(["click","dblclick","contextmenu"],function(t){wr[t]=function(e){e=Sr(this.dom,e),this.trigger(t,e)}});var Gc={pointermove:function(t){Fc(t)||Gc.mousemove.call(this,t)},pointerup:function(t){Gc.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function l6(t,e){var r=e.domHandlers;Ht.pointerEventsSupported?$(zc.pointer,function(n){Js(e,n,function(i){r[n].call(t,i)})}):(Ht.touchEventsSupported&&$(zc.touch,function(n){Js(e,n,function(i){r[n].call(t,i),a6(e)})}),$(zc.mouse,function(n){Js(e,n,function(i){i=vc(i),e.touching||r[n].call(t,i)})}))}function u6(t,e){Ht.pointerEventsSupported?$(ep.pointer,r):Ht.touchEventsSupported||$(ep.mouse,r);function r(n){function i(a){a=vc(a),np(t,a.target)||(a=o6(t,a),e.domHandlers[n].call(t,a))}Js(e,n,i,{capture:!0})}}function Js(t,e,r,n){t.mounted[e]=r,t.listenerOpts[e]=n,m7(t.domTarget,e,r,n)}function Wc(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&y7(t.domTarget,r,e[r],t.listenerOpts[r]);t.mounted={}}var ip=function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t}(),c6=function(t){st(e,t);function e(r,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new ip(r,wr),Vc&&(i._globalHandlerScope=new ip(document,Gc)),l6(i,i._localHandlerScope),i}return e.prototype.dispose=function(){Wc(this._localHandlerScope),Vc&&Wc(this._globalHandlerScope)},e.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},e.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,Vc&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?u6(this,n):Wc(n)}},e}(jr),ap=1;Ht.hasGlobalWindow&&(ap=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var op=ap,Xc=.4,Yc="#333",Uc="#ccc",f6="#eee",sp=gc,lp=5e-5;function ni(t){return t>lp||t<-lp}var ii=[],na=[],Zc=yn(),qc=Math.abs,h6=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return ni(this.rotation)||ni(this.x)||ni(this.y)||ni(this.scaleX-1)||ni(this.scaleY-1)||ni(this.skewX)||ni(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(sp(n),this.invTransform=null);return}n=n||yn(),r?this.getLocalTransform(n):sp(n),e&&(r?Ya(n,e,n):mv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(ii);var n=ii[0]<0?-1:1,i=ii[1]<0?-1:1,a=((ii[0]-n)*r+n)/ii[0]||0,o=((ii[1]-i)*r+i)/ii[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||yn(),Ua(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||yn(),Ya(na,e.invTransform,r),r=na);var n=this.originX,i=this.originY;(n||i)&&(Zc[4]=n,Zc[5]=i,Ya(na,r,Zc),na[4]-=n,na[5]-=i,r=na),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&ir(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&ir(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&qc(e[0]-1)>1e-10&&qc(e[3]-1)>1e-10?Math.sqrt(qc(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){tl(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=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||i||s||l){var v=n+s,p=i+l;r[4]=-v*a-d*p*o,r[5]=-p*o-h*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=d*o,u&&_v(r,r,u),r[4]+=n+c,r[5]+=i+f,r},t.initDefaultProps=function(){var e=t.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}(),t}(),io=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function tl(t,e){for(var r=0;r<io.length;r++){var n=io[r];t[n]=e[n]}}const jc=h6;function Ir(t){el||(el=new ta(100)),t=t||Zr;var e=el.get(t);return e||(e={font:t,strWidthCache:new ta(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:pn.measureText("国",t).width,asciiCharWidth:pn.measureText("a",t).width},el.put(t,e)),e}var el;function d6(t){if(!(Qc>=up)){t=t||Zr;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=pn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Qc=up:i>2&&Qc++,e}}var Qc=0,up=5;function cp(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=d6(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function Br(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=pn.measureText(e,t.font).width,r.put(e,n)),n}function fp(t,e,r,n){var i=Br(Ir(e),t),a=ao(e),o=ia(0,i,r),s=ai(0,a,n),l=new Nt(o,s,i,a);return l}function v6(t,e,r,n){var i=((t||"")+"").split(`
|
|
17
|
+
`),a=i.length;if(a===1)return fp(i[0],e,r,n);for(var o=new Nt(0,0,0,0),s=0;s<i.length;s++){var l=fp(i[s],e,r,n);s===0?o.copy(l):o.union(l)}return o}function ia(t,e,r,n){return r==="right"?n?t+=e:t-=e:r==="center"&&(n?t+=e/2:t-=e/2),t}function ai(t,e,r,n){return r==="middle"?n?t+=e/2:t-=e/2:r==="bottom"&&(n?t+=e:t-=e),t}function ao(t){return Ir(t).stWideCharWidth}function wn(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function rl(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=wn(n[0],r.width),u+=wn(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var Kc="__zr_normal__",Jc=io.concat(["ignore"]),p6=gn(io,function(t,e){return t[e]=!0,t},{ignore:!1}),aa={},g6=new Nt(0,0,0,0),nl=[],il=function(){function t(e){this.id=ov(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,d=void 0;if((f||c)&&(d=g6,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),i||d.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(aa,n,d):rl(aa,n,d),a.x=aa.x,a.y=aa.y,o=aa.align,s=aa.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var v=void 0,p=void 0;h==="center"?(v=d.width*.5,p=d.height*.5):(v=wn(h[0],d.width),p=wn(h[1],d.height)),u=!0,a.originX=-a.x+v+(i?0:d.x),a.originY=-a.y+p+(i?0:d.y)}}n.rotation!=null&&(a.rotation=n.rotation);var g=n.offset;g&&(a.x+=g[0],a.y+=g[1],u||(a.originX=-g[0],a.originY=-g[1]));var m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var y=m.overflowRect=m.overflowRect||new Nt(0,0,0,0);a.getLocalTransform(nl),Ua(nl,nl),Nt.copy(y,d),y.applyTransform(nl)}else m.overflowRect=null;var _=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,b=void 0,x=void 0,S=void 0;_&&this.canBeInsideText()?(b=n.insideFill,x=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(x==null||x==="auto")&&(x=this.getInsideTextStroke(b),S=!0)):(b=n.outsideFill,x=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(x==null||x==="auto")&&(x=this.getOutsideStroke(b),S=!0)),b=b||"#000",(b!==m.fill||x!==m.stroke||S!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=b,m.stroke=x,m.autoStroke=S,m.align=o,m.verticalAlign=s,r.setDefaultTextStyle(m)),r.__dirty|=kr,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Uc:Yc},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&xr(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,to(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},rt(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(wt(e))for(var n=e,i=Bt(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==Kc)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},t.prototype._innerSaveToNormal=function(e){var r=this._normalState;r||(r=this._normalState={}),e.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(e,r,Jc)},t.prototype._savePrimaryToNormal=function(e,r,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in r)&&(r[a]=this[a])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(Kc,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===Kc,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(qt(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){Gi("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(e,r,n,c),d&&d.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~kr),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[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&&i.push(c)}var f=i[o-1],d=!!(f&&f.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),v=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!r&&!this.__inHover&&v&&v.duration>0,v);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,r,d),g&&g.useStates(e,r,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~kr)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var r=this.animators[e];r.targetName&&r.changeTarget(this[r.targetName])}},t.prototype.removeState=function(e){var r=qt(this.currentStates,e);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=qt(i,e),o=qt(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i<e.length;i++){var a=e[i];rt(r,a),a.textConfig&&(n=n||{},rt(n,a.textConfig))}return n&&(r.textConfig=n),r},t.prototype._applyStateObj=function(e,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=rt({},i?this.textConfig:n.textConfig),rt(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<Jc.length;c++){var f=Jc[c],d=a&&p6[f];r&&r[f]!=null?d?(u=!0,l[f]=r[f]):this[f]=r[f]:s&&n[f]!=null&&(d?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!a)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],v=h.targetName;h.getLoop()||h.__changeFinalValue(v?(r||n)[v]:r||n)}u&&this._transitionState(e,l,o)},t.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(e===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var r=this.__zr;r&&e.addSelfToZr(r),e.__zr=r,e.__hostTarget=this},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var r=this._textContent;if(r!==e){if(r&&r!==e&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new jc,this._attachComponent(e),this._textContent=e,this.markRedraw()}},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),rt(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=kr;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=e),n&&(n.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,r,n){var i=e?this[e]:this;if(process.env.NODE_ENV!=="production"&&!i){Gi('Property "'+e+'" is not existed in element '+this.id);return}var a=new $c(i,r,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},t.prototype.addAnimator=function(e,r){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=qt(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},t.prototype.animateTo=function(e,r,n){tf(this,e,r,n)},t.prototype.animateFrom=function(e,r,n){tf(this,e,r,n,!0)},t.prototype._transitionState=function(e,r,n,i){for(var a=tf(this,r,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.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=kr;var r={};function n(a,o,s){r[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),r[a+o+s]=!0)}function i(a,o,s,l){Object.defineProperty(e,a,{get:function(){if(process.env.NODE_ENV!=="production"&&n(a,s,l),!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){process.env.NODE_ENV!=="production"&&n(a,s,l),this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,f){Object.defineProperty(f,0,{get:function(){return c[s]},set:function(d){c[s]=d}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(d){c[l]=d}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();br(il,jr),br(il,jc);function tf(t,e,r,n,i){r=r||{};var a=[];hp(t,"",t,e,r,n,a,i);var o=a.length,s=!1,l=r.done,u=r.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(),a.length>0&&r.during&&a[0].during(function(v,p){r.during(p)});for(var d=0;d<a.length;d++){var h=a[d];c&&h.done(c),f&&h.aborted(f),r.force&&h.duration(r.duration),h.start(r.easing)}return a}function ef(t,e,r){for(var n=0;n<r;n++)t[n]=e[n]}function m6(t){return ze(t[0])}function y6(t,e,r){if(ze(e[r]))if(ze(t[r])||(t[r]=[]),Ie(e[r])){var n=e[r].length;t[r].length!==n&&(t[r]=new e[r].constructor(n),ef(t[r],e[r],n))}else{var i=e[r],a=t[r],o=i.length;if(m6(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?ef(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else ef(a,i,o);a.length=i.length}else t[r]=e[r]}function _6(t,e){return t===e||ze(t)&&ze(e)&&b6(t,e)}function b6(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function hp(t,e,r,n,i,a,o,s){for(var l=Bt(n),u=i.duration,c=i.delay,f=i.additive,d=i.setToFinal,h=!wt(a),v=t.animators,p=[],g=0;g<l.length;g++){var m=l[g],y=n[m];if(y!=null&&r[m]!=null&&(h||a[m]))if(wt(y)&&!ze(y)&&!nc(y)){if(e){s||(r[m]=y,t.updateDuringAnimation(e));continue}hp(t,m,r[m],y,i,a&&a[m],o,s)}else p.push(m);else s||(r[m]=y,t.updateDuringAnimation(e),p.push(m))}var _=p.length;if(!f&&_)for(var b=0;b<v.length;b++){var x=v[b];if(x.targetName===e){var S=x.stopTracks(p);if(S){var w=qt(v,x);v.splice(w,1)}}}if(i.force||(p=fe(p,function(M){return!_6(n[M],r[M])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,L=void 0,C=void 0;if(s){L={},d&&(T={});for(var b=0;b<_;b++){var m=p[b];L[m]=r[m],d?T[m]=n[m]:r[m]=n[m]}}else if(d){C={};for(var b=0;b<_;b++){var m=p[b];C[m]=Zs(r[m]),y6(r,n,m)}}var x=new $c(r,!1,!1,f?fe(v,function(A){return A.targetName===e}):null);x.targetName=e,i.scope&&(x.scope=i.scope),d&&T&&x.whenWithKeys(0,T,p),C&&x.whenWithKeys(0,C,p),x.whenWithKeys(u??500,s?L:n,p).delay(c||0),t.addAnimator(x,e),o.push(x)}}var le=function(t){st(e,t);function e(r){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(r){if(r&&(r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),process.env.NODE_ENV!=="production"&&r.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=qt(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=qt(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},e.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},e.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},e.prototype.getBoundingRect=function(r){for(var n=new Nt(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(Nt.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(il);le.prototype.type="group";/*!
|
|
47
18
|
* ZRender, a high performance 2d drawing library.
|
|
48
19
|
*
|
|
49
20
|
* Copyright (c) 2013, Baidu Inc.
|
|
@@ -51,20 +22,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
51
22
|
*
|
|
52
23
|
* LICENSE
|
|
53
24
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
54
|
-
*/var Lo={},zp={};function e8(t){delete zp[t]}function r8(t){if(!t)return!1;if(typeof t=="string")return ll(t,1)<df;if(t.colorStops){for(var e=t.colorStops,r=0,n=e.length,i=0;i<n;i++)r+=ll(e[i].color,1);return r/=n,r<df}return!1}var n8=function(){function t(e,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=e;var a=new v6,o=n.renderer||"canvas";if(Lo[o]||(o=Ht(Lo)[0]),process.env.NODE_ENV!=="production"&&!Lo[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Lo[o](r,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Zt.node&&!Zt.worker&&!l?new j6(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?Zt.touchEventsSupported:!!c,d=44,h;f&&(h=St(n.pointerSize,d)),this.handler=new Kv(a,s,u,s.root,h),this.animation=new B6({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return t.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,r),this.refresh())},t.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=r8(e))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(e){var r,n=ga();this._needsRefresh&&(r=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=ga();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r<e.length;r++)e[r]instanceof ye&&e[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.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,e8(this.id))},t}();function Fp(t,e){var r=new n8(Rv(),t,e);return zp[r.id]=r,r}function i8(t,e){Lo[t]=e}var Tf;function a8(t){if(typeof Tf=="function")return Tf(t)}function o8(t){Tf=t}var Hp=1e-4,Wp=20;function s8(t){return t.replace(/^\s+|\s+$/g,"")}var Mo=Math.min,ur=Math.max,Qr=Math.abs;function Lf(t,e,r,n){var i=e[0],a=e[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=l8;function l8(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return Mf(t,e,r)}function Mf(t,e,r){return Lt(t)?s8(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function ke(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),Wp),t=(+t).toFixed(e),r?t:+t}function dn(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return Cf(t)}function Cf(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function u8(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Qr(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function c8(t,e){var r=Dn(t,function(h,v){return h+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=yt(t,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=yt(i,function(h){return Math.floor(h)}),s=Dn(o,function(h,v){return h+v},0),l=yt(i,function(h,v){return h-o[v]});s<a;){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 yt(o,function(h){return h/n})}function f8(t,e){var r=Math.max(dn(t),dn(e)),n=t+e;return r>Wp?n:ke(n,r)}function Gp(t){var e=Math.PI*2;return(t%e+e)%e}function Tl(t){return t>-Hp&&t<Hp}var h8=/^(?:(\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 Co(t){if(t instanceof Date)return t;if(Lt(t)){var e=h8.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(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(t==null)return new Date(NaN);return new Date(Math.round(t))}function d8(t){return Math.pow(10,Ll(t))}function Ll(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function jp(t,e){var r=Ll(t),n=Math.pow(10,r),i=t/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function v8(t){var e=parseFloat(t);return e==t&&(e!==0||!Lt(t)||t.indexOf("x")<=0)?e:NaN}function Xp(t){return!isNaN(v8(t))}function p8(){return Math.round(Math.random()*9)}function Yp(t,e){return e===0?t:Yp(e,t%e)}function Up(t,e){return t==null?e:e==null?t:t*e/Yp(t,e)}var g8="[ECharts] ",$p={},m8=typeof console<"u"&&console.warn&&console.log;function Ml(t,e,r){if(m8){if(r){if($p[e])return;$p[e]=!0}console[t](g8+e)}}function Zp(t,e){Ml("log",t,e)}function Ve(t,e){Ml("warn",t,e)}function qt(t,e){Ml("error",t,e)}function vn(t){process.env.NODE_ENV!=="production"&&Ml("warn","DEPRECATED: "+t,!0)}function we(t,e,r){process.env.NODE_ENV!=="production"&&vn((r?"["+r+"]":"")+(t+" is deprecated; use "+e+" instead."))}function Ef(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r="";if(process.env.NODE_ENV!=="production"){var n=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":ia(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":Dt(i)?"function () { ... }":E7(i)?i+"":null};r=yt(t,function(i){if(Lt(i))return i;var a=n(i);if(a!=null)return a;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var l=n(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return r}function cr(t){throw new Error(t)}function Kp(t,e,r){return(e-t)*r+t}var Qp="series\0",y8="\0_ec_\0";function Ye(t){return t instanceof Array?t:t==null?[]:[t]}function Df(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var Jp=["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 Eo(t){return Mt(t)&&!bt(t)&&!(t instanceof Date)?t.value:t}function _8(t){return Mt(t)&&!(t instanceof Array)}function x8(t,e,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";t=t||[],e=(e||[]).slice();var o=Ot();z(e,function(l,u){if(!Mt(l)){e[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!e1(l.id)&&t1(l.id),l.name!=null&&!e1(l.name)&&t1(l.name))});var s=b8(t,o,r);return(n||i)&&S8(s,t,o,e),n&&w8(s,e),n||i?T8(s,e,i):a&&L8(s,e),M8(s),s}function b8(t,e,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<t.length;i++){var a=t[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:r==="replaceMerge"||xa(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function S8(t,e,r,n){z(n,function(i,a){if(!(!i||i.id==null)){var o=Do(i.id),s=r.get(o);if(s!=null){var l=t[s];wt(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],n[a]=null}}})}function w8(t,e){z(e,function(r,n){if(!(!r||r.name==null))for(var i=0;i<t.length;i++){var a=t[i].existing;if(!t[i].newOption&&a&&(a.id==null||r.id==null)&&!xa(r)&&!xa(a)&&qp("name",a,r)){t[i].newOption=r,e[n]=null;return}}})}function T8(t,e,r){z(e,function(n){if(n){for(var i,a=0;(i=t[a])&&(i.newOption||xa(i.existing)||i.existing&&n.id!=null&&!qp("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):t.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function L8(t,e){z(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function M8(t){var e=Ot();z(t,function(r){var n=r.existing;n&&e.set(n.id,r)}),z(t,function(r){var n=r.newOption;wt(!n||n.id==null||!e.get(n.id)||e.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),z(t,function(r,n){var i=r.existing,a=r.newOption,o=r.keyInfo;if(Mt(a)){if(o.name=a.name!=null?Do(a.name):i?i.name:Qp+n,i)o.id=Do(i.id);else if(a.id!=null)o.id=Do(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function qp(t,e,r){var n=Jr(e[t],null),i=Jr(r[t],null);return n!=null&&i!=null&&n===i}function Do(t){if(process.env.NODE_ENV!=="production"&&t==null)throw new Error;return Jr(t,"")}function Jr(t,e){return t==null?e:Lt(t)?t:ie(t)||Nv(t)?t+"":e}function t1(t){process.env.NODE_ENV!=="production"&&Ve("`"+t+"` is invalid id or name. Must be a string or number.")}function e1(t){return Nv(t)||Xp(t)}function Af(t){var e=t.name;return!!(e&&e.indexOf(Qp))}function xa(t){return t&&t.id!=null&&Do(t.id).indexOf(y8)===0}function C8(t,e,r){z(t,function(n){var i=n.newOption;Mt(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=E8(e,i,n.existing,r))})}function E8(t,e,r,n){var i=e.type?e.type:r?r.subType:n.determineSubType(t,e);return i}function ba(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return bt(e.dataIndex)?yt(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return bt(e.name)?yt(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function de(){var t="__ec_inner_"+D8++;return function(e){return e[t]||(e[t]={})}}var D8=p8();function Pf(t,e,r){var n=r1(e,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=r?r.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=Cl(t,c,u,{useDefault:l===c,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function r1(t,e){var r;if(Lt(t)){var n={};n[t+"Index"]=0,r=n}else r=t;var i=Ot(),a={},o=!1;return z(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&ne(e.includeMainTypes,c)<0)){o=o||!!c;var d=i.get(c)||i.set(c,{});d[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var _r={useDefault:!0,enableAll:!1,enableNone:!1};function Cl(t,e,r,n){n=n||_r;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=t.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;process.env.NODE_ENV!=="production"&&qt('`"none"` or `false` is not a valid value on index option.'),i=-1}return i==="all"&&(n.enableAll?i=a=o=null:(process.env.NODE_ENV!=="production"&&qt('`"all"` is not a valid value on index option.'),i=-1)),s.models=t.queryComponents({mainType:e,index:i,id:a,name:o}),s}function n1(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function A8(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function P8(t,e,r,n,i){var a=e==null||e==="auto";if(n==null)return n;if(ie(n)){var o=Kp(r||0,n,i);return ke(o,a?Math.max(dn(r||0),dn(n)):e)}else{if(Lt(n))return i<1?r:n;for(var s=[],l=r,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var d=t.getDimensionInfo(f);if(d&&d.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,v=u[f],o=Kp(h,v,i);s[f]=ke(o,a?Math.max(dn(h),dn(v)):e)}}return s}}var R8=".",_i="___EC__COMPONENT__CONTAINER___",i1="___EC__EXTENDED_CLASS___";function qr(t){var e={main:"",sub:""};if(t){var r=t.split(R8);e.main=r[0]||"",e.sub=r[1]||""}return e}function k8(t){wt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function N8(t){return!!(t&&t[i1])}function Rf(t,e){t.$constructor=t,t.extend=function(r){process.env.NODE_ENV!=="production"&&z(e,function(a){r[a]||console.warn("Method `"+a+"` should be implemented"+(r.type?" in "+r.type:"")+".")});var n=this,i;return O8(n)?i=function(a){ht(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},M7(i,this)),ot(i.prototype,r),i[i1]=!0,i.extend=this.extend,i.superCall=V8,i.superApply=z8,i.superClass=n,i}}function O8(t){return Dt(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function a1(t,e){t.extend=e.extend}var I8=Math.round(Math.random()*10);function B8(t){var e=["__\0is_clz",I8++].join("_");t.prototype[e]=!0,process.env.NODE_ENV!=="production"&&wt(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function V8(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function z8(t,e,r){return this.superClass.prototype[e].apply(t,r)}function El(t){var e={};t.registerClass=function(n){var i=n.type||n.prototype.type;if(i){k8(i),n.prototype.type=i;var a=qr(i);if(!a.sub)process.env.NODE_ENV!=="production"&&e[a.main]&&console.warn(a.main+" exists."),e[a.main]=n;else if(a.sub!==_i){var o=r(a);o[a.sub]=n}}return n},t.getClass=function(n,i,a){var o=e[n];if(o&&o[_i]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var i=qr(n),a=[],o=e[i.main];return o&&o[_i]?z(o,function(s,l){l!==_i&&a.push(s)}):a.push(o),a},t.hasClass=function(n){var i=qr(n);return!!e[i.main]},t.getAllClassMainTypes=function(){var n=[];return z(e,function(i,a){n.push(a)}),n},t.hasSubTypes=function(n){var i=qr(n),a=e[i.main];return a&&a[_i]};function r(n){var i=e[n.main];return(!i||!i[_i])&&(i=e[n.main]={},i[_i]=!0),i}}function Ao(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<t.length;s++){var l=t[s][1];if(!(i&&ne(i,l)>=0||a&&ne(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var F8=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],H8=Ao(F8),W8=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return H8(this,e,r)},t}(),kf=new va(50);function G8(t){if(typeof t=="string"){var e=kf.get(t);return e&&e.image}else return t}function Nf(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=kf.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!Dl(e)&&a.pending.push(o)):(e=En.loadImage(t,o1,o1),e.__zrImageSrc=t,kf.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function o1(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function Dl(t){return t&&t.width&&t.height}var Of=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function j8(t,e,r,n,i,a){if(!r){t.text="",t.isTruncated=!1;return}var o=(e+"").split(`
|
|
55
|
-
`);a=
|
|
56
|
-
`),t.isTruncated=s}function
|
|
57
|
-
`):[];var y=m.length*d;if(g==null&&(g=y),y>g&&h){var _=Math.floor(g/d);v=v||m.length>_,m=m.slice(0,_),y=m.length*d}if(i&&c&&p!=null)for(var
|
|
58
|
-
`),u=!0),n.accumWidth=v}else{var p
|
|
59
|
-
`));for(var g=
|
|
60
|
-
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=Ip(f,h.charCodeAt(0)),p=n?!1:!J8(h);if(a.length?c+v>r:i+c+v>r){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=v)):p?(a.push(l),o.push(u),l=h,u=v):(a.push(h),o.push(v));continue}c+=v,p?(l+=h,u+=v):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function f1(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;It.set(h1,ya(r,o,i),yi(n,s,a),o,s),It.intersect(e,h1,null,d1);var l=d1.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=ya(l.x,l.width,i,!0),t.baseY=yi(l.y,l.height,a,!0)}}var h1=new It(0,0,0,0),d1={outIntersectRect:{},clamp:!0};function Bf(t){return t!=null?t+="":t=""}function q8(t){var e=Bf(t.text),r=t.font,n=Kr(Zr(r),e),i=To(r);return Vf(t,n,i,null)}function Vf(t,e,r,n){var i=new It(ya(t.x||0,e,t.textAlign),yi(t.y||0,r,t.textBaseline),e,r),a=n??(v1(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function v1(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var zf="__zr_style_"+Math.round(Math.random()*10),xi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Al={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};xi[zf]=!0;var p1=["z","z2","invisible"],t9=["invisible"],e9=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Ht(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):t.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&r9(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new It(0,0,0,0)),n?It.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new It(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:ot(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=mo,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&mo)},e.prototype.styleUpdated=function(){this.__dirty&=~mo},e.prototype.createStyle=function(r){return Qs(xi,r)},e.prototype.useStyle=function(r){r[zf]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[zf]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,p1)},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=Ht(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=Ht(u),d=0;d<v.length;d++){var h=v[d];this.style[h]=this.style[h]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?t9:p1,d=0;d<p.length;d++){var h=p[d];n&&n[h]!=null?this[h]=n[h]:l&&i[h]!=null&&(this[h]=i[h])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(r,n){return ot(r,n),r},e.prototype.getAnimationStyleProps=function(){return Al},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Ur|mo}(),e}(wl),Ff=new It(0,0,0,0),Hf=new It(0,0,0,0);function r9(t,e,r){return Ff.copy(t.getBoundingRect()),t.transform&&Ff.applyTransform(t.transform),Hf.width=e,Hf.height=r,!Ff.intersect(Hf)}const Po=e9;var xr=Math.min,br=Math.max,Wf=Math.sin,Gf=Math.cos,bi=Math.PI*2,Pl=oa(),Rl=oa(),kl=oa();function g1(t,e,r,n,i,a){i[0]=xr(t,r),i[1]=xr(e,n),a[0]=br(t,r),a[1]=br(e,n)}var m1=[],y1=[];function n9(t,e,r,n,i,a,o,s,l,u){var c=lp,f=Re,d=c(t,r,i,o,m1);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(t,r,i,o,m1[h]);l[0]=xr(v,l[0]),u[0]=br(v,u[0])}d=c(e,n,a,s,y1);for(var h=0;h<d;h++){var p=f(e,n,a,s,y1[h]);l[1]=xr(p,l[1]),u[1]=br(p,u[1])}l[0]=xr(t,l[0]),u[0]=br(t,u[0]),l[0]=xr(o,l[0]),u[0]=br(o,u[0]),l[1]=xr(e,l[1]),u[1]=br(e,u[1]),l[1]=xr(s,l[1]),u[1]=br(s,u[1])}function i9(t,e,r,n,i,a,o,s){var l=cp,u=qe,c=br(xr(l(t,r,i),1),0),f=br(xr(l(e,n,a),1),0),d=u(t,r,i,c),h=u(e,n,a,f);o[0]=xr(t,i,d),o[1]=xr(e,a,h),s[0]=br(t,i,d),s[1]=br(e,a,h)}function a9(t,e,r,n,i,a,o,s,l){var u=la,c=ua,f=Math.abs(i-a);if(f%bi<1e-4&&f>1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(Pl[0]=Gf(i)*r+t,Pl[1]=Wf(i)*n+e,Rl[0]=Gf(a)*r+t,Rl[1]=Wf(a)*n+e,u(s,Pl,Rl),c(l,Pl,Rl),i=i%bi,i<0&&(i=i+bi),a=a%bi,a<0&&(a=a+bi),i>a&&!o?a+=bi:i<a&&o&&(i+=bi),o){var d=a;a=i,i=d}for(var h=0;h<a;h+=Math.PI/2)h>i&&(kl[0]=Gf(h)*r+t,kl[1]=Wf(h)*n+e,u(s,kl,s),c(l,kl,l))}var Kt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Si=[],wi=[],tn=[],Bn=[],en=[],rn=[],jf=Math.min,Xf=Math.max,Ti=Math.cos,Li=Math.sin,pn=Math.abs,Yf=Math.PI,Vn=Yf*2,Uf=typeof Float32Array<"u",Ro=[];function $f(t){var e=Math.round(t/Yf*1e8)/1e8;return e%2*Yf}function _1(t,e){var r=$f(t[0]);r<0&&(r+=Vn);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Vn?i=r+Vn:e&&r-i>=Vn?i=r-Vn:!e&&r>i?i=r+(Vn-$f(r-i)):e&&r<i&&(i=r-(Vn-$f(i-r))),t[0]=r,t[1]=i}var zn=function(){function t(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 t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=pn(n/Rp/e)||0,this._uy=pn(n/Rp/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(Kt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=pn(e-this._xi),i=pn(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Kt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(Kt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(Kt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),Ro[0]=i,Ro[1]=a,_1(Ro,o),i=Ro[0],a=Ro[1];var s=a-i;return this.addData(Kt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Ti(a)*n+e,this._yi=Li(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(Kt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Kt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&Uf&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var r=e.length,n=0,i=this._len,a=0;a<r;a++)n+=e[a].len();var o=this.data;if(Uf&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<r;a++)for(var l=e[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},t.prototype.addData=function(e,r,n,i,a,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]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Uf&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){tn[0]=tn[1]=en[0]=en[1]=Number.MAX_VALUE,Bn[0]=Bn[1]=rn[0]=rn[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(r=e[o],n=e[o+1],i=r,a=n),s){case Kt.M:r=i=e[o++],n=a=e[o++],en[0]=i,en[1]=a,rn[0]=i,rn[1]=a;break;case Kt.L:g1(r,n,e[o],e[o+1],en,rn),r=e[o++],n=e[o++];break;case Kt.C:n9(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],en,rn),r=e[o++],n=e[o++];break;case Kt.Q:i9(r,n,e[o++],e[o++],e[o],e[o+1],en,rn),r=e[o++],n=e[o++];break;case Kt.A:var u=e[o++],c=e[o++],f=e[o++],d=e[o++],h=e[o++],v=e[o++]+h;o+=1;var p=!e[o++];l&&(i=Ti(h)*f+u,a=Li(h)*d+c),a9(u,c,f,d,h,v,p,en,rn),r=Ti(v)*f+u,n=Li(v)*d+c;break;case Kt.R:i=r=e[o++],a=n=e[o++];var g=e[o++],m=e[o++];g1(i,a,i+g,a+m,en,rn);break;case Kt.Z:r=i,n=a;break}la(tn,tn,en),ua(Bn,Bn,rn)}return o===0&&(tn[0]=tn[1]=Bn[0]=Bn[1]=0),new It(tn[0],tn[1],Bn[0]-tn[0],Bn[1]-tn[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,d=0;d<r;){var h=e[d++],v=d===1;v&&(a=e[d],o=e[d+1],s=a,l=o);var p=-1;switch(h){case Kt.M:a=s=e[d++],o=l=e[d++];break;case Kt.L:{var g=e[d++],m=e[d++],y=g-a,_=m-o;(pn(y)>n||pn(_)>i||d===r-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case Kt.C:{var x=e[d++],S=e[d++],g=e[d++],m=e[d++],b=e[d++],w=e[d++];p=g6(a,o,x,S,g,m,b,w,10),a=b,o=w;break}case Kt.Q:{var x=e[d++],S=e[d++],g=e[d++],m=e[d++];p=_6(a,o,x,S,g,m,10),a=g,o=m;break}case Kt.A:var T=e[d++],L=e[d++],C=e[d++],M=e[d++],A=e[d++],E=e[d++],P=E+A;d+=1,v&&(s=Ti(A)*C+T,l=Li(A)*M+L),p=Xf(C,M)*jf(Vn,Math.abs(E)),a=Ti(P)*C+T,o=Li(P)*M+L;break;case Kt.R:{s=a=e[d++],l=o=e[d++];var I=e[d++],k=e[d++];p=I*2+k*2;break}case Kt.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,d,h=r<1,v,p,g=0,m=0,y,_=0,x,S;if(!(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,p=this._pathLen,y=r*p,!y)))t:for(var b=0;b<o;){var w=n[b++],T=b===1;switch(T&&(u=n[b],c=n[b+1],s=u,l=c),w!==Kt.L&&_>0&&(e.lineTo(x,S),_=0),w){case Kt.M:s=u=n[b++],l=c=n[b++],e.moveTo(u,c);break;case Kt.L:{f=n[b++],d=n[b++];var L=pn(f-u),C=pn(d-c);if(L>i||C>a){if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;e.lineTo(u*(1-A)+f*A,c*(1-A)+d*A);break t}g+=M}e.lineTo(f,d),u=f,c=d,_=0}else{var E=L*L+C*C;E>_&&(x=f,S=d,_=E)}break}case Kt.C:{var P=n[b++],I=n[b++],k=n[b++],R=n[b++],H=n[b++],B=n[b++];if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;il(u,P,k,H,A,Si),il(c,I,R,B,A,wi),e.bezierCurveTo(Si[1],wi[1],Si[2],wi[2],Si[3],wi[3]);break t}g+=M}e.bezierCurveTo(P,I,k,R,H,B),u=H,c=B;break}case Kt.Q:{var P=n[b++],I=n[b++],k=n[b++],R=n[b++];if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;al(u,P,k,A,Si),al(c,I,R,A,wi),e.quadraticCurveTo(Si[1],wi[1],Si[2],wi[2]);break t}g+=M}e.quadraticCurveTo(P,I,k,R),u=k,c=R;break}case Kt.A:var F=n[b++],O=n[b++],G=n[b++],j=n[b++],Y=n[b++],et=n[b++],ft=n[b++],gt=!n[b++],$=G>j?G:j,U=pn(G-j)>.001,q=Y+et,tt=!1;if(h){var M=v[m++];g+M>y&&(q=Y+et*(y-g)/M,tt=!0),g+=M}if(U&&e.ellipse?e.ellipse(F,O,G,j,ft,Y,q,gt):e.arc(F,O,$,Y,q,gt),tt)break t;T&&(s=Ti(Y)*G+F,l=Li(Y)*j+O),u=Ti(q)*G+F,c=Li(q)*j+O;break;case Kt.R:s=u=n[b],l=c=n[b+1],f=n[b++],d=n[b++];var nt=n[b++],at=n[b++];if(h){var M=v[m++];if(g+M>y){var st=y-g;e.moveTo(f,d),e.lineTo(f+jf(st,nt),d),st-=nt,st>0&&e.lineTo(f+nt,d+jf(st,at)),st-=at,st>0&&e.lineTo(f+Xf(nt-st,0),d+at),st-=nt,st>0&&e.lineTo(f,d+Xf(at-st,0));break t}g+=M}e.rect(f,d,nt,at);break;case Kt.Z:if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;e.lineTo(u*(1-A)+s*A,c*(1-A)+l*A);break t}g+=M}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=Kt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Sa(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>r+s||a<t-s&&a<r-s)return!1;if(t!==r)l=(e-n)/(t-r),u=(t*n-r*e)/(t-r);else return Math.abs(a-t)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function o9(t,e,r,n,i,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>a+f&&c>s+f||c<e-f&&c<n-f&&c<a-f&&c<s-f||u>t+f&&u>r+f&&u>i+f&&u>o+f||u<t-f&&u<r-f&&u<i-f&&u<o-f)return!1;var d=p6(t,e,r,n,i,a,o,s,u,c);return d<=f/2}function s9(t,e,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>r+u&&s>i+u||s<t-u&&s<r-u&&s<i-u)return!1;var c=y6(t,e,r,n,i,a,s,l);return c<=u/2}var x1=Math.PI*2;function Nl(t){return t%=x1,t<0&&(t+=x1),t}var ko=Math.PI*2;function l9(t,e,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(n-i)%ko<1e-4)return!0;if(a){var f=n;n=Nl(i),i=Nl(f)}else n=Nl(n),i=Nl(i);n>i&&(i+=ko);var d=Math.atan2(l,s);return d<0&&(d+=ko),d>=n&&d<=i||d+ko>=n&&d+ko<=i}function Mi(t,e,r,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(r-t)+t;return l===i?1/0:l>i?s:0}var Fn=zn.CMD,Ci=Math.PI*2,u9=1e-4;function c9(t,e){return Math.abs(t-e)<u9}var Ue=[-1,-1,-1],Sr=[-1,-1];function f9(){var t=Sr[0];Sr[0]=Sr[1],Sr[1]=t}function h9(t,e,r,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var c=nl(e,n,a,s,u,Ue);if(c===0)return 0;for(var f=0,d=-1,h=void 0,v=void 0,p=0;p<c;p++){var g=Ue[p],m=g===0||g===1?.5:1,y=Re(t,r,i,o,g);y<l||(d<0&&(d=lp(e,n,a,s,Sr),Sr[1]<Sr[0]&&d>1&&f9(),h=Re(e,n,a,s,Sr[0]),d>1&&(v=Re(e,n,a,s,Sr[1]))),d===2?g<Sr[0]?f+=h<e?m:-m:g<Sr[1]?f+=v<h?m:-m:f+=s<v?m:-m:g<Sr[0]?f+=h<e?m:-m:f+=s<h?m:-m)}return f}function d9(t,e,r,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=m6(e,n,a,s,Ue);if(l===0)return 0;var u=cp(e,n,a);if(u>=0&&u<=1){for(var c=0,f=qe(e,n,a,u),d=0;d<l;d++){var h=Ue[d]===0||Ue[d]===1?.5:1,v=qe(t,r,i,Ue[d]);v<o||(Ue[d]<u?c+=f<e?h:-h:c+=a<f?h:-h)}return c}else{var h=Ue[0]===0||Ue[0]===1?.5:1,v=qe(t,r,i,Ue[0]);return v<o?0:a<e?h:-h}}function v9(t,e,r,n,i,a,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Ue[0]=-l,Ue[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ci-1e-4){n=0,i=Ci;var c=a?1:-1;return o>=Ue[0]+t&&o<=Ue[1]+t?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Ci,i+=Ci);for(var d=0,h=0;h<2;h++){var v=Ue[h];if(v+t>o){var p=Math.atan2(s,v),c=a?1:-1;p<0&&(p=Ci+p),(p>=n&&p<=i||p+Ci>=n&&p+Ci<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(c=-c),d+=c)}}return d}function b1(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,l=0,u=0,c=0,f=0,d,h,v=0;v<o;){var p=a[v++],g=v===1;switch(p===Fn.M&&v>1&&(r||(s+=Mi(l,u,c,f,n,i))),g&&(l=a[v],u=a[v+1],c=l,f=u),p){case Fn.M:c=a[v++],f=a[v++],l=c,u=f;break;case Fn.L:if(r){if(Sa(l,u,a[v],a[v+1],e,n,i))return!0}else s+=Mi(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Fn.C:if(r){if(o9(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=h9(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Fn.Q:if(r){if(s9(l,u,a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=d9(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Fn.A:var m=a[v++],y=a[v++],_=a[v++],x=a[v++],S=a[v++],b=a[v++];v+=1;var w=!!(1-a[v++]);d=Math.cos(S)*_+m,h=Math.sin(S)*x+y,g?(c=d,f=h):s+=Mi(l,u,d,h,n,i);var T=(n-m)*x/_+m;if(r){if(l9(m,y,x,S,S+b,w,e,T,i))return!0}else s+=v9(m,y,x,S,S+b,w,T,i);l=Math.cos(S+b)*_+m,u=Math.sin(S+b)*x+y;break;case Fn.R:c=l=a[v++],f=u=a[v++];var L=a[v++],C=a[v++];if(d=c+L,h=f+C,r){if(Sa(c,f,d,f,e,n,i)||Sa(d,f,d,h,e,n,i)||Sa(d,h,c,h,e,n,i)||Sa(c,h,c,f,e,n,i))return!0}else s+=Mi(d,f,d,h,n,i),s+=Mi(c,h,c,f,n,i);break;case Fn.Z:if(r){if(Sa(l,u,c,f,e,n,i))return!0}else s+=Mi(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!c9(u,f)&&(s+=Mi(l,u,c,f,n,i)||0),s!==0}function p9(t,e,r){return b1(t,0,!1,e,r)}function g9(t,e,r,n){return b1(t,e,!0,r,n)}var Ol=Ft({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},xi),m9={style:Ft({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Al.style)},Zf=wo.concat(["invisible","culling","z","z2","zlevel","parent"]),Yt=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<Zf.length;++s)i[Zf[s]]=this[Zf[s]];i.__dirty|=Ur}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Ht(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?ot(this.style,s):this.useStyle(s):o==="shape"?ot(this.shape,s):t.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 r=this.style.fill;if(r!=="none"){if(Lt(r)){var n=ll(r,0);return n>.5?vf:n>.2?X6:pf}else if(r)return pf}return vf},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(Lt(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=ll(r,0)<df;if(a===o)return n}},e.prototype.buildPath=function(r,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~ha},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new zn(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ha)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);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 r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,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)),g9(s,l/u,r,n)))return!0}if(this.hasFill())return p9(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=ha,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:ot(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&ha)},e.prototype.createStyle=function(r){return Qs(Ol,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=ot({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=ot({},i.shape),ot(u,n.shape)):(u=ot({},a?this.shape:i.shape),ot(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=ot({},this.shape);for(var c={},f=Ht(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(r,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return m9},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(a){ht(o,a);function o(s){var l=a.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return zt(r.style)},o.prototype.getDefaultShape=function(){return zt(r.shape)},o}(e);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Ur|mo|ha}(),e}(Po),y9=Ft({strokeFirst:!0,font:un,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Ol),No=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return v1(this.style)},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Qs(y9,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=q8(this.style)),this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(Po);No.prototype.type="tspan";var _9=Ft({x:0,y:0},xi),x9={style:Ft({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Al.style)};function b9(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var Br=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Qs(_9,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=b9(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return x9},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new It(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Po);Br.prototype.type="image";function S9(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),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>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var wa=Math.round;function S1(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(wa(n*2)===wa(i*2)&&(t.x1=t.x2=Ei(n,s,!0)),wa(a*2)===wa(o*2)&&(t.y1=t.y2=Ei(a,s,!0))),t}}function w1(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Ei(n,s,!0),t.y=Ei(i,s,!0),t.width=Math.max(Ei(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Ei(i+o,s,!1)-t.y,o===0?0:1)),t}}function Ei(t,e,r){if(!e)return t;var n=wa(t*2);return(n+wa(e))%2===0?n/2:(n+(r?1:-1))/2}var w9=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),T9={},_e=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new w9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=w1(T9,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?S9(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Yt);_e.prototype.type="rect";var T1={fill:"#000"},L1=2,nn={},L9={style:Ft({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},Al.style)},fr=function(t){ht(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=T1,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];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 r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,E9(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);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 r=new It(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(r.copy(l),r.applyTransform(u),a=a||r.clone(),a.union(r)):(a=a||l.clone(),a.union(l))}this._rect=a||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||T1},e.prototype.setTextContent=function(r){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return ot(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},e.prototype._mergeRich=function(r,n){for(var i=Ht(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},ot(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return L9},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||un,i=r.padding,a=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||a.align||"left",u=r.verticalAlign||a.verticalAlign||"top";f1(nn,a.overflowRect,o,s,l,u),o=nn.baseX,s=nn.baseY;var c=N1(r),f=Y8(c,r,nn.outerWidth,nn.outerHeight),d=Kf(r),h=!!r.backgroundColor,v=f.outerHeight,p=f.outerWidth,g=f.lines,m=f.lineHeight;this.isTruncated=!!f.isTruncated;var y=o,_=yi(s,f.contentHeight,u);if(d||i){var x=ya(o,p,l),S=yi(s,v,u);d&&this._renderBackground(r,r,x,S,p,v)}_+=m/2,i&&(y=k1(o,l,i),u==="top"?_+=i[0]:u==="bottom"&&(_-=i[2]));for(var b=0,w=!1,T=!1,L=R1("fill"in r?r.fill:(T=!0,a.fill)),C=P1("stroke"in r?r.stroke:!h&&(!a.autoStroke||T)?(b=L1,w=!0,a.stroke):null),M=r.textShadowBlur>0,A=0;A<g.length;A++){var E=this._getOrCreateChild(No),P=E.createStyle();E.useStyle(P),P.text=g[A],P.x=y,P.y=_,l&&(P.textAlign=l),P.textBaseline="middle",P.opacity=r.opacity,P.strokeFirst=!0,M&&(P.shadowBlur=r.textShadowBlur||0,P.shadowColor=r.textShadowColor||"transparent",P.shadowOffsetX=r.textShadowOffsetX||0,P.shadowOffsetY=r.textShadowOffsetY||0),P.stroke=C,P.fill=L,C&&(P.lineWidth=r.lineWidth||b,P.lineDash=r.lineDash,P.lineDashOffset=r.lineDashOffset||0),P.font=n,E1(P,r),_+=m,E.setBoundingRect(Vf(P,f.contentWidth,f.calculatedLineHeight,w?0:null))}},e.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,i=r.align||n.align,a=r.verticalAlign||n.verticalAlign,o=r.x||0,s=r.y||0;f1(nn,n.overflowRect,o,s,i,a),o=nn.baseX,s=nn.baseY;var l=N1(r),u=Z8(l,r,nn.outerWidth,nn.outerHeight,i),c=u.width,f=u.outerWidth,d=u.outerHeight,h=r.padding;this.isTruncated=!!u.isTruncated;var v=ya(o,f,i),p=yi(s,d,a),g=v,m=p;h&&(g+=h[3],m+=h[0]);var y=g+c;Kf(r)&&this._renderBackground(r,r,v,p,f,d);for(var _=!!r.backgroundColor,x=0;x<u.lines.length;x++){for(var S=u.lines[x],b=S.tokens,w=b.length,T=S.lineHeight,L=S.width,C=0,M=g,A=y,E=w-1,P=void 0;C<w&&(P=b[C],!P.align||P.align==="left");)this._placeToken(P,r,T,m,M,"left",_),L-=P.width,M+=P.width,C++;for(;E>=0&&(P=b[E],P.align==="right");)this._placeToken(P,r,T,m,A,"right",_),L-=P.width,A-=P.width,E--;for(M+=(c-(M-g)-(y-A)-L)/2;C<=E;)P=b[C],this._placeToken(P,r,T,m,M+P.width/2,"center",_),M+=P.width,C++;m+=T}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var d=!r.isLineHolder&&Kf(u);d&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var h=!!u.backgroundColor,v=r.textPadding;v&&(o=k1(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var p=this._getOrCreateChild(No),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,x=!1,S=R1("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),b=P1("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!m.autoStroke||y)?(_=L1,x=!0,m.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=r.text,g.x=o,g.y=f,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=r.font||un,g.opacity=cn(u.opacity,n.opacity,1),E1(g,u),b&&(g.lineWidth=cn(u.lineWidth,n.lineWidth,_),g.lineDash=St(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=b),S&&(g.fill=S),p.setBoundingRect(Vf(g,r.contentWidth,r.contentHeight,x?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,d=l&&!f,h=r.borderRadius,v=this,p,g;if(d||r.lineHeight||u&&c){p=this._getOrCreateChild(_e),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=h,p.dirtyShape()}if(d){var y=p.style;y.fill=l||null,y.fillOpacity=St(r.fillOpacity,1)}else if(f){g=this._getOrCreateChild(Br),g.onload=function(){v.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&c){var y=p.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=St(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(p||g).style;x.shadowBlur=r.shadowBlur||0,x.shadowColor=r.shadowColor||"transparent",x.shadowOffsetX=r.shadowOffsetX||0,x.shadowOffsetY=r.shadowOffsetY||0,x.opacity=cn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return D1(r)&&(n=[r.fontStyle,r.fontWeight,C1(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&An(n)||r.textFont||r.font},e}(Po),M9={left:!0,right:1,center:1},C9={top:1,bottom:1,middle:1},M1=["fontStyle","fontWeight","fontSize","fontFamily"];function C1(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?bc+"px":t+"px"}function E1(t,e){for(var r=0;r<M1.length;r++){var n=M1[r],i=e[n];i!=null&&(t[n]=i)}}function D1(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function E9(t){return A1(t),z(t.rich,A1),t}function A1(t){if(t){t.font=fr.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||M9[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||C9[r]?r:"top";var n=t.padding;n&&(t.padding=Mc(t.padding))}}function P1(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function R1(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function k1(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function N1(t){var e=t.text;return e!=null&&(e+=""),e}function Kf(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var se=de(),D9=function(t,e,r,n){if(n){var i=se(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=se(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},O1=1,I1={},B1=de(),Qf=de(),Jf=0,Il=1,Bl=2,wr=["emphasis","blur","select"],Vl=["normal","emphasis","blur","select"],A9=10,P9=9,Di="highlight",zl="downplay",Fl="select",qf="unselect",Hl="toggleSelect",th="selectchanged";function Ta(t){return t!=null&&t!=="none"}function Wl(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function V1(t){Wl(t,"emphasis",Bl)}function z1(t){t.hoverState===Bl&&Wl(t,"normal",Jf)}function eh(t){Wl(t,"blur",Il)}function F1(t){t.hoverState===Il&&Wl(t,"normal",Jf)}function R9(t){t.selected=!0}function k9(t){t.selected=!1}function H1(t,e,r){e(t,r)}function gn(t,e,r){H1(t,e,r),t.isGroup&&t.traverse(function(n){H1(n,e,r)})}function W1(t,e){switch(e){case"emphasis":t.hoverState=Bl;break;case"normal":t.hoverState=Jf;break;case"blur":t.hoverState=Il;break;case"select":t.selected=!0}}function N9(t,e,r,n){for(var i=t.style,a={},o=0;o<e.length;o++){var s=e[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<t.animators.length;o++){var u=t.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function O9(t,e,r,n){var i=r&&ne(r,"select")>=0,a=!1;if(t instanceof Yt){var o=B1(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Ta(s)||Ta(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=ot({},n),u=ot({},u),u.fill=s):!Ta(u.fill)&&Ta(s)?(a=!0,n=ot({},n),u=ot({},u),u.fill=Jc(s)):!Ta(u.stroke)&&Ta(l)&&(a||(n=ot({},n),u=ot({},u)),u.stroke=Jc(l)),n.style=u}}if(n&&n.z2==null){a||(n=ot({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??A9)}return n}function I9(t,e,r){if(r&&r.z2==null){r=ot({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??P9)}return r}function B9(t,e,r){var n=ne(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:N9(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=ot({},r),o=ot({opacity:n?i:a.opacity*.1},o),r.style=o),r}function rh(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return O9(this,t,e,r);if(t==="blur")return B9(this,t,r);if(t==="select")return I9(this,t,r)}return r}function V9(t){t.stateProxy=rh;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=rh),r&&(r.stateProxy=rh)}function G1(t,e){!$1(t,e)&&!t.__highByOuter&&gn(t,V1)}function j1(t,e){!$1(t,e)&&!t.__highByOuter&&gn(t,z1)}function Gl(t,e){t.__highByOuter|=1<<(e||0),gn(t,V1)}function jl(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&gn(t,z1)}function z9(t){gn(t,eh)}function X1(t){gn(t,F1)}function Y1(t){gn(t,R9)}function U1(t){gn(t,k9)}function $1(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Z1(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=Qf(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){F1(u)}),s&&r.push(a)),o.isBlured=!1}),z(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function nh(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var d=u.getItemGraphicEl(c[f]);d&&X1(d)}}if(t!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var d=f&&s?f===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!d||e==="series"&&c)){var h=n.getViewOfSeriesModel(u);if(h.group.traverse(function(g){g.__highByOuter&&c&&e==="self"||eh(g)}),Je(e))a(u.getData(),e);else if(Mt(e))for(var v=Ht(e),p=0;p<v.length;p++)a(u.getData(v[p]),e[v[p]]);l.push(u),Qf(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function ih(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(n){Qf(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){eh(a)})}}}function F9(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(!i){process.env.NODE_ENV!=="production"&&qt("Unknown dataType "+e.dataType);return}var a=ba(i,e);a=(bt(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=se(o);nh(n,u.focus,u.blurScope,r)}else{var c=t.get(["emphasis","focus"]),f=t.get(["emphasis","blurScope"]);c!=null&&nh(n,c,f,r)}}function ah(t,e,r,n){var i={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return i;var a=n.getModel().getComponent(t,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(process.env.NODE_ENV!=="production"&&!Ca(s[u])&&qt("param should be highDownDispatcher"),se(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function H9(t,e,r){process.env.NODE_ENV!=="production"&&!Ca(t)&&qt("param should be highDownDispatcher");var n=se(t),i=ah(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&ih(n.componentMainType,n.componentIndex,r),z(a,function(s){return G1(s,e)})):(nh(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&ih(n.componentMainType,n.componentIndex,r),G1(t,e))}function W9(t,e,r){process.env.NODE_ENV!=="production"&&!Ca(t)&&qt("param should be highDownDispatcher"),Z1(r);var n=se(t),i=ah(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?z(i,function(a){return j1(a,e)}):j1(t,e)}function G9(t,e,r){if(sh(e)){var n=e.dataType,i=t.getData(n),a=ba(i,e);bt(a)||(a=[a]),t[e.type===Hl?"toggleSelect":e.type===Fl?"select":"unselect"](a,n)}}function K1(t){var e=t.getAllData();z(e,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){t.isSelected(o,i)?Y1(a):U1(a)})})}function j9(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();z(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function oh(t,e,r){J1(t,!0),gn(t,V9),Y9(t,e,r)}function X9(t){J1(t,!1)}function La(t,e,r,n){n?X9(t):oh(t,e,r)}function Y9(t,e,r){var n=se(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var Q1=["emphasis","blur","select"],U9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ma(t,e,r,n){r=r||"itemStyle";for(var i=0;i<Q1.length;i++){var a=Q1[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=o[U9[r]]()}}function J1(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function Ca(t){return!!(t&&t.__highDownDispatcher)}function $9(t){var e=I1[t];return e==null&&O1<=32&&(e=I1[t]=O1++),e}function sh(t){var e=t.type;return e===Fl||e===qf||e===Hl}function q1(t){var e=t.type;return e===Di||e===zl}function Z9(t){var e=B1(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var Ea=zn.CMD,K9=[[],[],[]],tg=Math.sqrt,Q9=Math.atan2;function J9(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,l,u,c=Ea.M,f=Ea.C,d=Ea.L,h=Ea.R,v=Ea.A,p=Ea.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case c:a=1;break;case d:a=1;break;case f:a=3;break;case p:a=2;break;case v:var g=e[4],m=e[5],y=tg(e[0]*e[0]+e[1]*e[1]),_=tg(e[2]*e[2]+e[3]*e[3]),x=Q9(-e[1]/_,e[0]/y);r[o]*=y,r[o++]+=g,r[o]*=_,r[o++]+=m,r[o++]*=y,r[o++]*=_,r[o++]+=x,r[o++]+=x,o+=2,s=o;break;case h:u[0]=r[o++],u[1]=r[o++],gr(u,u,e),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],gr(u,u,e),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<a;l++){var S=K9[l];S[0]=r[o++],S[1]=r[o++],gr(S,S,e),r[s++]=S[0],r[s++]=S[1]}}t.increaseVersion()}}var lh=Math.sqrt,Xl=Math.sin,Yl=Math.cos,Oo=Math.PI;function eg(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function uh(t,e){return(t[0]*e[0]+t[1]*e[1])/(eg(t)*eg(e))}function rg(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(uh(t,e))}function ng(t,e,r,n,i,a,o,s,l,u,c){var f=l*(Oo/180),d=Yl(f)*(t-r)/2+Xl(f)*(e-n)/2,h=-1*Xl(f)*(t-r)/2+Yl(f)*(e-n)/2,v=d*d/(o*o)+h*h/(s*s);v>1&&(o*=lh(v),s*=lh(v));var p=(i===a?-1:1)*lh((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=p*o*h/s,m=p*-s*d/o,y=(t+r)/2+Yl(f)*g-Xl(f)*m,_=(e+n)/2+Xl(f)*g+Yl(f)*m,x=rg([1,0],[(d-g)/o,(h-m)/s]),S=[(d-g)/o,(h-m)/s],b=[(-1*d-g)/o,(-1*h-m)/s],w=rg(S,b);if(uh(S,b)<=-1&&(w=Oo),uh(S,b)>=1&&(w=0),w<0){var T=Math.round(w/Oo*1e6)/1e6;w=Oo*2+T%2*Oo}c.addData(u,y,_,o,s,x,w,f,a)}var q9=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,tx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ex(t){var e=new zn;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=zn.CMD,l=t.match(q9);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(tx)||[],v=h.length,p=0;p<v;p++)h[p]=parseFloat(h[p]);for(var g=0;g<v;){var m=void 0,y=void 0,_=void 0,x=void 0,S=void 0,b=void 0,w=void 0,T=r,L=n,C=void 0,M=void 0;switch(f){case"l":r+=h[g++],n+=h[g++],d=s.L,e.addData(d,r,n);break;case"L":r=h[g++],n=h[g++],d=s.L,e.addData(d,r,n);break;case"m":r+=h[g++],n+=h[g++],d=s.M,e.addData(d,r,n),i=r,a=n,f="l";break;case"M":r=h[g++],n=h[g++],d=s.M,e.addData(d,r,n),i=r,a=n,f="L";break;case"h":r+=h[g++],d=s.L,e.addData(d,r,n);break;case"H":r=h[g++],d=s.L,e.addData(d,r,n);break;case"v":n+=h[g++],d=s.L,e.addData(d,r,n);break;case"V":n=h[g++],d=s.L,e.addData(d,r,n);break;case"C":d=s.C,e.addData(d,h[g++],h[g++],h[g++],h[g++],h[g++],h[g++]),r=h[g-2],n=h[g-1];break;case"c":d=s.C,e.addData(d,h[g++]+r,h[g++]+n,h[g++]+r,h[g++]+n,h[g++]+r,h[g++]+n),r+=h[g-2],n+=h[g-1];break;case"S":m=r,y=n,C=e.len(),M=e.data,o===s.C&&(m+=r-M[C-4],y+=n-M[C-3]),d=s.C,T=h[g++],L=h[g++],r=h[g++],n=h[g++],e.addData(d,m,y,T,L,r,n);break;case"s":m=r,y=n,C=e.len(),M=e.data,o===s.C&&(m+=r-M[C-4],y+=n-M[C-3]),d=s.C,T=r+h[g++],L=n+h[g++],r+=h[g++],n+=h[g++],e.addData(d,m,y,T,L,r,n);break;case"Q":T=h[g++],L=h[g++],r=h[g++],n=h[g++],d=s.Q,e.addData(d,T,L,r,n);break;case"q":T=h[g++]+r,L=h[g++]+n,r+=h[g++],n+=h[g++],d=s.Q,e.addData(d,T,L,r,n);break;case"T":m=r,y=n,C=e.len(),M=e.data,o===s.Q&&(m+=r-M[C-4],y+=n-M[C-3]),r=h[g++],n=h[g++],d=s.Q,e.addData(d,m,y,r,n);break;case"t":m=r,y=n,C=e.len(),M=e.data,o===s.Q&&(m+=r-M[C-4],y+=n-M[C-3]),r+=h[g++],n+=h[g++],d=s.Q,e.addData(d,m,y,r,n);break;case"A":_=h[g++],x=h[g++],S=h[g++],b=h[g++],w=h[g++],T=r,L=n,r=h[g++],n=h[g++],d=s.A,ng(T,L,r,n,b,w,_,x,S,d,e);break;case"a":_=h[g++],x=h[g++],S=h[g++],b=h[g++],w=h[g++],T=r,L=n,r+=h[g++],n+=h[g++],d=s.A,ng(T,L,r,n,b,w,_,x,S,d,e);break}}(f==="z"||f==="Z")&&(d=s.Z,e.addData(d),r=i,n=a),o=d}return e.toStatic(),e}var ig=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(Yt);function ag(t){return t.setData!=null}function og(t,e){var r=ex(t),n=ot({},e);return n.buildPath=function(i){var a=ag(i);if(a&&i.canSave()){i.appendPath(r);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&r.rebuildPath(o,1)}},n.applyTransform=function(i){J9(r,i),this.dirtyShape()},n}function rx(t,e){return new ig(og(t,e))}function nx(t,e){var r=og(t,e),n=function(i){ht(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(ig);return n}function ix(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var a=t[i];r.push(a.getUpdatedPathProxy(!0))}var o=new Yt(e);return o.createPathProxy(),o.buildPath=function(s){if(ag(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var ax=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),Io=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new ax},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(Yt);Io.prototype.type="circle";var ox=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),ch=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new ox},e.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),r.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),r.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),r.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),r.closePath()},e}(Yt);ch.prototype.type="ellipse";var sg=Math.PI,fh=sg*2,Ai=Math.sin,Da=Math.cos,sx=Math.acos,ze=Math.atan2,lg=Math.abs,Bo=Math.sqrt,Vo=Math.max,an=Math.min,Vr=1e-4;function lx(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,f=s-a,d=f*l-c*u;if(!(d*d<Vr))return d=(c*(e-a)-f*(t-i))/d,[t+d*l,e+d*u]}function Ul(t,e,r,n,i,a,o){var s=t-r,l=e-n,u=(o?a:-a)/Bo(s*s+l*l),c=u*l,f=-u*s,d=t+c,h=e+f,v=r+c,p=n+f,g=(d+v)/2,m=(h+p)/2,y=v-d,_=p-h,x=y*y+_*_,S=i-a,b=d*p-v*h,w=(_<0?-1:1)*Bo(Vo(0,S*S*x-b*b)),T=(b*_-y*w)/x,L=(-b*y-_*w)/x,C=(b*_+y*w)/x,M=(-b*y+_*w)/x,A=T-g,E=L-m,P=C-g,I=M-m;return A*A+E*E>P*P+I*I&&(T=C,L=M),{cx:T,cy:L,x0:-c,y0:-f,x1:T*(i/S-1),y1:L*(i/S-1)}}function ux(t){var e;if(bt(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function cx(t,e){var r,n=Vo(e.r,0),i=Vo(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,d=!!e.clockwise,h=lg(u-l),v=h>fh&&h%fh;if(v>Vr&&(h=v),!(n>Vr))t.moveTo(c,f);else if(h>fh-Vr)t.moveTo(c+n*Da(l),f+n*Ai(l)),t.arc(c,f,n,l,u,!d),i>Vr&&(t.moveTo(c+i*Da(u),f+i*Ai(u)),t.arc(c,f,i,u,l,d));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,x=void 0,S=void 0,b=void 0,w=void 0,T=void 0,L=void 0,C=void 0,M=void 0,A=void 0,E=void 0,P=void 0,I=n*Da(l),k=n*Ai(l),R=i*Da(u),H=i*Ai(u),B=h>Vr;if(B){var F=e.cornerRadius;F&&(r=ux(F),p=r[0],g=r[1],m=r[2],y=r[3]);var O=lg(n-i)/2;if(_=an(O,m),x=an(O,y),S=an(O,p),b=an(O,g),L=w=Vo(_,x),C=T=Vo(S,b),(w>Vr||T>Vr)&&(M=n*Da(u),A=n*Ai(u),E=i*Da(l),P=i*Ai(l),h<sg)){var G=lx(I,k,E,P,M,A,R,H);if(G){var j=I-G[0],Y=k-G[1],et=M-G[0],ft=A-G[1],gt=1/Ai(sx((j*et+Y*ft)/(Bo(j*j+Y*Y)*Bo(et*et+ft*ft)))/2),$=Bo(G[0]*G[0]+G[1]*G[1]);L=an(w,(n-$)/(gt+1)),C=an(T,(i-$)/(gt-1))}}}if(!B)t.moveTo(c+I,f+k);else if(L>Vr){var U=an(m,L),q=an(y,L),tt=Ul(E,P,I,k,n,U,d),nt=Ul(M,A,R,H,n,q,d);t.moveTo(c+tt.cx+tt.x0,f+tt.cy+tt.y0),L<w&&U===q?t.arc(c+tt.cx,f+tt.cy,L,ze(tt.y0,tt.x0),ze(nt.y0,nt.x0),!d):(U>0&&t.arc(c+tt.cx,f+tt.cy,U,ze(tt.y0,tt.x0),ze(tt.y1,tt.x1),!d),t.arc(c,f,n,ze(tt.cy+tt.y1,tt.cx+tt.x1),ze(nt.cy+nt.y1,nt.cx+nt.x1),!d),q>0&&t.arc(c+nt.cx,f+nt.cy,q,ze(nt.y1,nt.x1),ze(nt.y0,nt.x0),!d))}else t.moveTo(c+I,f+k),t.arc(c,f,n,l,u,!d);if(!(i>Vr)||!B)t.lineTo(c+R,f+H);else if(C>Vr){var U=an(p,C),q=an(g,C),tt=Ul(R,H,M,A,i,-q,d),nt=Ul(I,k,E,P,i,-U,d);t.lineTo(c+tt.cx+tt.x0,f+tt.cy+tt.y0),C<T&&U===q?t.arc(c+tt.cx,f+tt.cy,C,ze(tt.y0,tt.x0),ze(nt.y0,nt.x0),!d):(q>0&&t.arc(c+tt.cx,f+tt.cy,q,ze(tt.y0,tt.x0),ze(tt.y1,tt.x1),!d),t.arc(c,f,i,ze(tt.cy+tt.y1,tt.cx+tt.x1),ze(nt.cy+nt.y1,nt.cx+nt.x1),d),U>0&&t.arc(c+nt.cx,f+nt.cy,U,ze(nt.y1,nt.x1),ze(nt.y0,nt.x0),!d))}else t.lineTo(c+R,f+H),t.arc(c,f,i,u,l,d)}t.closePath()}}}var fx=function(){function t(){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 t}(),Hn=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new fx},e.prototype.buildPath=function(r,n){cx(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Yt);Hn.prototype.type="sector";var hx=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),$l=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new hx},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Yt);$l.prototype.type="ring";function dx(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=t.length;d<h;d++)la(c,c,t[d]),ua(f,f,t[d]);la(c,c,n[0]),ua(f,f,n[1])}for(var d=0,h=t.length;d<h;d++){var v=t[d];if(r)l=t[d?d-1:h-1],u=t[(d+1)%h];else if(d===0||d===h-1){i.push(k7(t[d]));continue}else l=t[d-1],u=t[d+1];N7(a,u,l),Ec(a,a,e);var p=Dc(v,l),g=Dc(v,u),m=p+g;m!==0&&(p/=m,g/=m),Ec(o,a,-p),Ec(s,a,g);var y=Vv([],v,o),_=Vv([],v,s);n&&(ua(y,y,c),la(y,y,f),ua(_,_,c),la(_,_,f)),i.push(y),i.push(_)}return r&&i.push(i.shift()),i}function ug(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=dx(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)t.lineTo(i[s][0],i[s][1])}r&&t.closePath()}}var vx=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),zo=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new vx},e.prototype.buildPath=function(r,n){ug(r,n,!0)},e}(Yt);zo.prototype.type="polygon";var px=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),Pi=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new px},e.prototype.buildPath=function(r,n){ug(r,n,!1)},e}(Yt);Pi.prototype.type="polyline";var gx={},mx=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Wn=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new mx},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=S1(gx,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(r.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),r.lineTo(o,s))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(Yt);Wn.prototype.type="line";var tr=[],yx=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function cg(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?sp:Re)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?sp:Re)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?up:qe)(t.x1,t.cpx1,t.x2,e),(r?up:qe)(t.y1,t.cpy1,t.y2,e)]}var hh=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new yx},e.prototype.buildPath=function(r,n){var i=n.x1,a=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&&(r.moveTo(i,a),c==null||f==null?(d<1&&(al(i,l,o,d,tr),l=tr[1],o=tr[2],al(a,u,s,d,tr),u=tr[1],s=tr[2]),r.quadraticCurveTo(l,u,o,s)):(d<1&&(il(i,l,c,o,d,tr),l=tr[1],c=tr[2],o=tr[3],il(a,u,f,s,d,tr),u=tr[1],f=tr[2],s=tr[3]),r.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(r){return cg(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=cg(this.shape,r,!0);return B7(n,n)},e}(Yt);hh.prototype.type="bezier-curve";var _x=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Zl=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new _x},e.prototype.buildPath=function(r,n){var i=n.cx,a=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);r.moveTo(c*o+i,f*o+a),r.arc(i,a,o,s,l,!u)},e}(Yt);Zl.prototype.type="arc";var xx=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Yt.prototype.getBoundingRect.call(this)},e}(Yt);const fg=xx;var hg=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),dg=function(t){ht(e,t);function e(r,n,i,a,o,s){var l=t.call(this,o)||this;return l.x=r??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return e}(hg),bx=function(t){ht(e,t);function e(r,n,i,a,o){var s=t.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(hg);const Sx=bx;var dh=Math.min,Tx=Math.max,Kl=Math.abs,Ri=[0,0],ki=[0,0],Ee=$v(),Ql=Ee.minTv,Jl=Ee.maxTv,Lx=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Pt;for(var n=0;n<2;n++)this._axes[n]=new Pt;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),r)for(var u=0;u<4;u++)n[u].transform(r);Pt.sub(i[0],n[1],n[0]),Pt.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},t.prototype.intersect=function(e,r,n){var i=!0,a=!r;return r&&Pt.set(r,0,0),Ee.reset(n,!a),!this._intersectCheckOneSide(this,e,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(e,this,a,-1)&&(i=!1,a)||!a&&!Ee.negativeSize&&Pt.copy(r,i?Ee.useDir?Ee.dirMinTv:Ql:Jl),i},t.prototype._intersectCheckOneSide=function(e,r,n,i){for(var a=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,Ri),e._getProjMinMaxOnAxis(o,r._corners,ki),Ee.negativeSize||Ri[1]<ki[0]||Ri[0]>ki[1]){if(a=!1,Ee.negativeSize||n)return a;var l=Kl(ki[0]-Ri[1]),u=Kl(Ri[0]-ki[1]);dh(l,u)>Jl.len()&&(l<u?Pt.scale(Jl,s,-l*i):Pt.scale(Jl,s,u*i))}else if(!n){var l=Kl(ki[0]-Ri[1]),u=Kl(Ri[0]-ki[1]);(Ee.useDir||dh(l,u)<Ql.len())&&((l<u||!Ee.bidirectional)&&(Pt.scale(Ql,s,l*i),Ee.useDir&&Ee.calcDirMTV()),(l>=u||!Ee.bidirectional)&&(Pt.scale(Ql,s,-u*i),Ee.useDir&&Ee.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u<r.length;u++){var c=r[u].dot(i)+a[e];s=dh(c,s),l=Tx(c,l)}n[0]=s+Ee.touchThreshold,n[1]=l-Ee.touchThreshold,Ee.negativeSize=n[1]<n[0]},t}();const vg=Lx;var Mx=[],Cx=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.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(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new It(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(Mx)),r.union(a)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},e}(Po);const Ex=Cx;var Dx=de();function Ax(t,e,r,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=t==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=St(n.duration,200),c=St(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),Dt(f)&&(f=f(r,i)),Dt(u)&&(u=u(r));var d={duration:u||0,delay:f,easing:c};return d}else return null}function vh(t,e,r,n,i,a,o){var s=!1,l;Dt(i)?(o=a,a=i,i=null):Mt(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=t==="leave";u||e.stopAnimation("leave");var c=Ax(t,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):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:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,v):e.animateTo(r,v)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Fe(t,e,r,n,i,a){vh("update",t,e,r,n,i,a)}function er(t,e,r,n,i,a){vh("enter",t,e,r,n,i,a)}function Fo(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function ql(t,e,r,n,i,a){Fo(t)||vh("leave",t,e,r,n,i,a)}function pg(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),ql(t,{style:{opacity:0}},e,r,n)}function Ho(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||pg(i,e,r,n)}):pg(t,e,r,n)}function Wo(t){Dx(t).oldStyle=t.style}var ph={},Gn=["x","y"],Aa=["width","height"];function Px(t){return Yt.extend(t)}var Rx=nx;function kx(t,e){return Rx(t,e)}function zr(t,e){ph[t]=e}function Nx(t){if(ph.hasOwnProperty(t))return ph[t]}function gh(t,e,r,n){var i=rx(t,e);return r&&(n==="center"&&(r=mg(r,i.getBoundingRect())),yg(i,r)),i}function gg(t,e,r){var n=new Br({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(mg(e,a))}}});return n}function mg(t,e){var r=e.width/e.height,n=t.height*r,i;n<=t.width?i=t.height:(n=t.width,i=n/r);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var mh=ix;function yg(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function Go(t,e){return S1(t,t,{lineWidth:e}),t}function Ox(t,e){return w1(t,t,e),t}var Ix=Ei;function Bx(t,e){for(var r=Bc([]);t&&t!==e;)co(r,t.getLocalTransform(),r),t=t.parent;return r}function _g(t,e,r){return e&&!Je(e)&&(e=yf.getLocalTransform(e)),r&&(e=fo([],e)),gr([],t,e)}function Vx(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:Qr(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Qr(2*e[4]/e[2]),a=[t==="left"?-n:t==="right"?n:0,t==="top"?-i:t==="bottom"?i:0];return a=_g(a,e,r),Qr(a[0])>Qr(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function xg(t){return!t.isGroup}function zx(t){return t.shape!=null}function bg(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){xg(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return zx(o)&&(s.shape=zt(o.shape)),s}var a=n(t);e.traverse(function(o){if(xg(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Fe(o,l,r,se(o).dataIndex)}}})}function Fx(t,e){return yt(t,function(r){var n=r[0];n=ur(n,e.x),n=Mo(n,e.x+e.width);var i=r[1];return i=ur(i,e.y),i=Mo(i,e.y+e.height),[n,i]})}function Hx(t,e){var r=ur(t.x,e.x),n=Mo(t.x+t.width,e.x+e.width),i=ur(t.y,e.y),a=Mo(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Sg(t,e,r){var n=ot({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Ft(i,r),new Br(n)):gh(t.replace("path://",""),n,r,"center")}function Wx(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(wg(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function wg(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,f=s-a,d=yh(c,f,l,u);if(Gx(d))return!1;var h=t-i,v=e-a,p=yh(h,v,l,u)/d;if(p<0||p>1)return!1;var g=yh(h,v,c,f)/d;return!(g<0||g>1)}function yh(t,e,r,n){return t*n-r*e}function Gx(t){return t<=1e-6&&t>=-1e-6}function tu(t,e,r,n,i){return e==null||(ie(e)?le[0]=le[1]=le[2]=le[3]=e:(process.env.NODE_ENV!=="production"&&wt(e.length===4),le[0]=e[0],le[1]=e[1],le[2]=e[2],le[3]=e[3]),n&&(le[0]=ur(0,le[0]),le[1]=ur(0,le[1]),le[2]=ur(0,le[2]),le[3]=ur(0,le[3])),r&&(le[0]=-le[0],le[1]=-le[1],le[2]=-le[2],le[3]=-le[3]),Tg(t,le,"x","width",3,1,i&&i[0]||0),Tg(t,le,"y","height",0,2,i&&i[1]||0)),t}var le=[0,0,0,0];function Tg(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=ur(0,Mo(o,l)),t[n]<o?(t[n]=o,t[r]+=e[i]>=0?-e[i]:e[a]>=0?l+e[a]:Qr(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function eu(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=Lt(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&z(Ht(l),function(c){Yr(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=se(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Ft({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function _h(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function ru(t,e){if(t)if(bt(t))for(var r=0;r<t.length;r++)_h(t[r],e);else _h(t,e)}function xh(t){return!t||Qr(t[1])<nu&&Qr(t[2])<nu||Qr(t[0])<nu&&Qr(t[3])<nu}var nu=1e-5;function jo(t,e){return t?It.copy(t,e):e.clone()}function bh(t,e){return e?Gv(t||Pn(),e):void 0}function Lg(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function jx(t){var e=-1/0,r=1/0;_h(t,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>e&&(e=o),o<r&&(r=o)}}return r>e&&(r=e=0),{min:r,max:e}}function Mg(t,e,r){Cg(t,e,r,-1/0)}function Cg(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l<s.length;l++)n=ur(Cg(s[l],e,r,n),n);else t.z=e,t.zlevel=r,n=ur(t.z2||0,n);if(i&&(i.z=e,i.zlevel=r,isFinite(n)&&(i.z2=n+2)),a){var u=t.textGuideLineConfig;a.z=e,a.zlevel=r,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}zr("circle",Io),zr("ellipse",ch),zr("sector",Hn),zr("ring",$l),zr("polygon",zo),zr("polyline",Pi),zr("rect",_e),zr("line",Wn),zr("bezierCurve",hh),zr("arc",Zl);const Xx=Object.freeze(Object.defineProperty({__proto__:null,Arc:Zl,BezierCurve:hh,BoundingRect:It,Circle:Io,CompoundPath:fg,Ellipse:ch,Group:ye,Image:Br,IncrementalDisplayable:Ex,Line:Wn,LinearGradient:dg,OrientedBoundingRect:vg,Path:Yt,Point:Pt,Polygon:zo,Polyline:Pi,RadialGradient:Sx,Rect:_e,Ring:$l,Sector:Hn,Text:fr,WH:Aa,XY:Gn,applyTransform:_g,calcZ2Range:jx,clipPointsByRect:Fx,clipRectByRect:Hx,createIcon:Sg,ensureCopyRect:jo,ensureCopyTransform:bh,expandOrShrinkRect:tu,extendPath:kx,extendShape:Px,getShapeClass:Nx,getTransform:Bx,groupTransition:bg,initProps:er,isBoundingRectAxisAligned:xh,isElementRemoved:Fo,lineLineIntersect:wg,linePolygonIntersect:Wx,makeImage:gg,makePath:gh,mergePath:mh,registerShape:zr,removeElement:ql,removeElementWithFadeOut:Ho,resizePath:yg,retrieveZInfo:Lg,setTooltipConfig:eu,subPixelOptimize:Ix,subPixelOptimizeLine:Go,subPixelOptimizeRect:Ox,transformDirection:Vx,traverseElements:ru,traverseUpdateZ:Mg,updateProps:Fe},Symbol.toStringTag,{value:"Module"}));var iu={};function Yx(t,e){for(var r=0;r<wr.length;r++){var n=wr[r],i=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=i}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function Eg(t,e,r){var n=t.labelFetcher,i=t.labelDataIndex,a=t.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=Dt(t.defaultText)?t.defaultText(i,t,r):t.defaultText);for(var l={normal:s},u=0;u<wr.length;u++){var c=wr[u],f=e[c];l[c]=St(n?n.getFormattedLabel(i,c,null,a,f&&f.get("formatter")):null,s)}return l}function Pa(t,e,r,n){r=r||iu;for(var i=t instanceof fr,a=!1,o=0;o<Vl.length;o++){var s=e[Vl[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?t:t.getTextContent();if(a){i||(l||(l=new fr,t.setTextContent(l)),t.stateProxy&&(l.stateProxy=t.stateProxy));var u=Eg(r,e),c=e.normal,f=!!c.getShallow("show"),d=Xo(c,n&&n.normal,r,!1,!i);d.text=u.normal,i||t.setTextConfig(Dg(c,r,!1));for(var o=0;o<wr.length;o++){var h=wr[o],s=e[h];if(s){var v=l.ensureState(h),p=!!St(s.getShallow("show"),f);if(p!==f&&(v.ignore=!p),v.style=Xo(s,n&&n[h],r,!0,!i),v.style.text=u[h],!i){var g=t.ensureState(h);g.textConfig=Dg(s,r,!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(),r.enableTextSetter&&(au(l).setLabelText=function(m){var y=Eg(r,e,m);Yx(l,y)})}else l&&(l.ignore=!0);t.dirty()}function Ra(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<wr.length;n++){var i=wr[n];r[i]=t.getModel([i,e])}return r}function Xo(t,e,r,n,i){var a={};return Ux(a,t,r,n,i),e&&ot(a,e),a}function Dg(t,e,r){e=e||{};var n={},i,a=t.getShallow("rotate"),o=St(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return i=t.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function Ux(t,e,r,n,i){r=r||iu;var a=e.ecModel,o=a&&a.option.textStyle,s=$x(e),l;if(s){l={};var u="richInheritPlainLabel",c=St(e.get(u),a?a.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var d=e.getModel(["rich",f]);kg(l[f]={},d,o,e,c,r,n,i,!1,!0)}}l&&(t.rich=l);var h=e.get("overflow");h&&(t.overflow=h);var v=e.get("lineOverflow");v&&(t.lineOverflow=v);var p=t,g=e.get("minMargin");if(g!=null)g=ie(g)?g/2:0,p.margin=[g,g,g,g],p.__marginType=ka.minMargin;else{var m=e.get("textMargin");m!=null&&(p.margin=Mc(m),p.__marginType=ka.textMargin)}kg(t,e,o,null,null,r,n,i,!0,!1)}function $x(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||iu).rich;if(r){e=e||{};for(var n=Ht(r),i=0;i<n.length;i++){var a=n[i];e[a]=1}}t=t.parentModel}return e}var Ag=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Pg=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Rg=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function kg(t,e,r,n,i,a,o,s,l,u){r=!o&&r||iu;var c=a&&a.inheritColor,f=e.getShallow("color"),d=e.getShallow("textBorderColor"),h=St(e.getShallow("opacity"),r.opacity);(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&we("color: 'auto'","color: 'inherit'"),c?f=c:f=null),(d==="inherit"||d==="auto")&&(process.env.NODE_ENV!=="production"&&d==="auto"&&we("color: 'auto'","color: 'inherit'"),c?d=c:d=null),s||(f=f||r.color,d=d||r.textBorderColor),f!=null&&(t.fill=f),d!=null&&(t.stroke=d);var v=St(e.getShallow("textBorderWidth"),r.textBorderWidth);v!=null&&(t.lineWidth=v);var p=St(e.getShallow("textBorderType"),r.textBorderType);p!=null&&(t.lineDash=p);var g=St(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);g!=null&&(t.lineDashOffset=g),!o&&h==null&&!u&&(h=a&&a.defaultOpacity),h!=null&&(t.opacity=h),!o&&!s&&t.fill==null&&a.inheritColor&&(t.fill=a.inheritColor);for(var m=0;m<Ag.length;m++){var y=Ag[m],_=i!==!1&&n?cn(e.getShallow(y),n.getShallow(y),r[y]):St(e.getShallow(y),r[y]);_!=null&&(t[y]=_)}for(var m=0;m<Pg.length;m++){var y=Pg[m],_=e.getShallow(y);_!=null&&(t[y]=_)}if(t.verticalAlign==null){var x=e.getShallow("baseline");x!=null&&(t.verticalAlign=x)}if(!l||!a.disableBox){for(var m=0;m<Rg.length;m++){var y=Rg[m],_=e.getShallow(y);_!=null&&(t[y]=_)}var S=e.getShallow("borderType");S!=null&&(t.borderDash=S),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&c&&(process.env.NODE_ENV!=="production"&&t.backgroundColor==="auto"&&we("backgroundColor: 'auto'","backgroundColor: 'inherit'"),t.backgroundColor=c),(t.borderColor==="auto"||t.borderColor==="inherit")&&c&&(process.env.NODE_ENV!=="production"&&t.borderColor==="auto"&&we("borderColor: 'auto'","borderColor: 'inherit'"),t.borderColor=c)}}function Zx(t,e){var r=e&&e.getModel("textStyle");return An([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var au=de();function Kx(t,e,r,n){if(t){var i=au(t);i.prevValue=i.value,i.value=r;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}var ka={minMargin:1,textMargin:2},Qx=["textStyle","color"],Sh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],wh=new fr,Jx=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(Qx):null)},t.prototype.getFont=function(){return Zx({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Sh.length;n++)r[Sh[n]]=this.getShallow(Sh[n]);return wh.useStyle(r),wh.update(),wh.getBoundingRect()},t}(),Ng=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qx=Ao(Ng),tb=function(){function t(){}return t.prototype.getLineStyle=function(e){return qx(this,e)},t}(),Og=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],eb=Ao(Og),rb=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return eb(this,e,r)},t}(),Te=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){},t.prototype.mergeOption=function(e,r){re(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,i=n==null?n:n[e];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},t.prototype.getModel=function(e,r){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new t(a,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(zt(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Zt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();Rf(Te),B8(Te),kr(Te,tb),kr(Te,rb),kr(Te,W8),kr(Te,Jx);var nb=Math.round(Math.random()*10);function ou(t){return[t||"",nb++].join("_")}function ib(t){var e={};t.registerSubTypeDefaulter=function(r,n){var i=qr(r);e[i.main]=n},t.determineSubType=function(r,n){var i=n.type;if(!i){var a=qr(r).main;t.hasSubTypes(r)&&e[a]&&(i=e[a](n))}return i}}function ab(t,e){t.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),c=u.graph,f=u.noEntryList,d={};for(z(a,function(y){d[y]=!0});f.length;){var h=f.pop(),v=c[h],p=!!d[h];p&&(s.call(l,h,v.originalDeps.slice()),delete d[h]),z(v.successor,p?m:g)}z(d,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=Ef("Circular dependency may exists: ",d,a,o)),new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function m(y){d[y]=!0,g(y)}};function r(a){var o={},s=[];return z(a,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=i(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),z(f,function(d){ne(u.predecessor,d)<0&&u.predecessor.push(d);var h=n(o,d);ne(h.successor,d)<0&&h.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return z(a,function(l){ne(o,l)>=0&&s.push(l)}),s}}function Ig(t,e){return re(re({},t,!0),e,!0)}const ob={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:". "}}}},sb={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 su="ZH",Th="EN",Na=Th,lu={},Lh={},Bg=Zt.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Na).toUpperCase();return t.indexOf(su)>-1?su:Na}():Na;function Vg(t,e){t=t.toUpperCase(),Lh[t]=new Te(e),lu[t]=e}function lb(t){if(Lt(t)){var e=lu[t.toUpperCase()]||{};return t===su||t===Th?zt(e):re(zt(e),zt(lu[Na]),!1)}else return re(zt(t),zt(lu[Na]),!1)}function ub(t){return Lh[t]}function cb(){return Lh[Na]}Vg(Th,ob),Vg(su,sb);var fb=null;function uu(){return fb}var Mh=1e3,Ch=Mh*60,Yo=Ch*60,Tr=Yo*24,zg=Tr*365,hb={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})/},cu={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},db="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",fu="{yyyy}-{MM}-{dd}",Fg={year:"{yyyy}",month:"{yyyy}-{MM}",day:fu,hour:fu+" "+cu.hour,minute:fu+" "+cu.minute,second:fu+" "+cu.second,millisecond:db},Ni=["year","month","day","hour","minute","second","millisecond"],vb=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function pb(t){return!Lt(t)&&!Dt(t)?gb(t):t}function gb(t){t=t||{};var e={},r=!0;return z(Ni,function(n){r&&(r=t[n]==null)}),z(Ni,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Ni[s],u=Mt(a)&&!bt(a)?a[l]:a,c=void 0;bt(u)?(c=u.slice(),o=c[0]||""):Lt(u)?(o=u,c=[o]):(o==null?o=cu[n]:hb[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function jn(t,e){return t+="","0000".substr(0,e-t.length)+t}function Uo(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function mb(t){return t===Uo(t)}function yb(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Hg(t,e,r,n){var i=Co(t),a=i[Wg(r)](),o=i[Dh(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[Ah(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[Ph(r)](),f=(c-1)%12+1,d=i[Rh(r)](),h=i[kh(r)](),v=i[Nh(r)](),p=c>=12?"pm":"am",g=p.toUpperCase(),m=n instanceof Te?n:ub(n||Bg)||cb(),y=m.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),S=y.get("dayOfWeek"),b=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,jn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,jn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,jn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,jn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,jn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,jn(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,jn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,jn(v,3)).replace(/{S}/g,v+"")}function _b(t,e,r,n,i){var a=null;if(Lt(r))a=r;else if(Dt(r)){var o={time:t.time,level:t.time.level},s=uu();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=hu(t.value,i);a=r[c][c][0]}}return Hg(new Date(t.value),a,i,n)}function hu(t,e){var r=Co(t),n=r[Dh(e)]()+1,i=r[Ah(e)](),a=r[Ph(e)](),o=r[Rh(e)](),s=r[kh(e)](),l=r[Nh(e)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&a===0,h=d&&i===1,v=h&&n===1;return v?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Eh(t,e,r){switch(e){case"year":t[Gg(r)](0);case"month":t[jg(r)](1);case"day":t[Xg(r)](0);case"hour":t[Yg(r)](0);case"minute":t[Ug(r)](0);case"second":t[$g(r)](0)}return t}function Wg(t){return t?"getUTCFullYear":"getFullYear"}function Dh(t){return t?"getUTCMonth":"getMonth"}function Ah(t){return t?"getUTCDate":"getDate"}function Ph(t){return t?"getUTCHours":"getHours"}function Rh(t){return t?"getUTCMinutes":"getMinutes"}function kh(t){return t?"getUTCSeconds":"getSeconds"}function Nh(t){return t?"getUTCMilliseconds":"getMilliseconds"}function xb(t){return t?"setUTCFullYear":"setFullYear"}function Gg(t){return t?"setUTCMonth":"setMonth"}function jg(t){return t?"setUTCDate":"setDate"}function Xg(t){return t?"setUTCHours":"setHours"}function Yg(t){return t?"setUTCMinutes":"setMinutes"}function Ug(t){return t?"setUTCSeconds":"setSeconds"}function $g(t){return t?"setUTCMilliseconds":"setMilliseconds"}function bb(t){if(!Xp(t))return Lt(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}var Zg=Mc,Kg=["a","b","c","d","e","f","g"],Oh=function(t,e){return"{"+t+(e??"")+"}"};function Sb(t,e,r){bt(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=Kg[a];t=t.replace(Oh(o),Oh(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(Oh(Kg[l],s),u)}return t}function Ih(t,e){return e=e||"transparent",Lt(t)?t:Mt(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}var du={},Bh={},Vh=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(du,!0),this._normalMasterList=n(Bh,!1);function n(i,a){var o=[];return z(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[]),process.env.NODE_ENV!=="production"&&a&&z(u,function(c){return wt(!c.update)})}),o}},t.prototype.update=function(e,r){z(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){du[e]=r;return}Bh[e]=r},t.get=function(e){return Bh[e]||du[e]},t}();function wb(t){return!!du[t]}var zh={coord:1,coord2:2};function Tb(t){process.env.NODE_ENV!=="production"&&wt(!Fh.get(t.fullType)),Fh.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var Fh=Ot();function Lb(t){var e=t.getShallow("coord",!0),r=zh.coord;if(e==null){var n=Fh.get(t.type);n&&n.getCoord2&&(r=zh.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var mn={none:0,dataCoordSys:1,boxCoordSys:2};function Mb(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=n!=null,a=mn.none;if(r){var o=t.mainType==="series";n==null&&(n=o?"data":"box"),n==="data"?(a=mn.dataCoordSys,o||(process.env.NODE_ENV!=="production"&&i&&e&&qt('coordinateSystemUsage "data" is not supported in non-series components.'),a=mn.none)):n==="box"&&(a=mn.boxCoordSys,!o&&!wb(r)&&(process.env.NODE_ENV!=="production"&&i&&e&&qt('coordinateSystem "'+r+'" cannot be used'+(' as coordinateSystemUsage "box" for "'+t.type+'" yet.')),a=mn.none))}return{coordSysType:r,kind:a}}function Cb(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys,a=t.allowNotFound;process.env.NODE_ENV!=="production"&&wt(!!r);var o=Mb(e,!0),s=o.kind,l=o.coordSysType;if(i&&s!==mn.dataCoordSys&&(s=mn.dataCoordSys,l=r),s===mn.none||l!==r)return!1;var u=n(r,e);return u?(s===mn.dataCoordSys?(process.env.NODE_ENV!=="production"&&wt(e.mainType==="series"),e.coordinateSystem=u):e.boxCoordinateSystem=u,!0):(process.env.NODE_ENV!=="production"&&(a||qt(r+" cannot be found for"+(" "+e.type+" (index: "+e.componentIndex+")."))),!1)}var vu=z,Eb=["left","right","top","bottom","width","height"],pu=[["width","left","right"],["height","top","bottom"]];function Hh(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=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(t==="horizontal"){var p=c.width+(d?-d.x+c.x:0);h=a+p,h>n||l.newline?(a=0,h=p,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(d?-d.y+c.y:0);v=o+g,v>i||l.newline?(a+=s+r,o=0,v=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=h+r:o=v+r)})}var $o=Hh;or(Hh,"vertical"),or(Hh,"horizontal");function Db(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function Ab(t,e){var r=gu(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Zo.point)a=r.refPoint,i=Oa(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=bt(o)?o:[o,o];i=Oa(n,r.refContainer),a=r.boxCoordFrom===zh.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function Pb(t,e){var r=Ab(t,e),n=r.viewRect,i=r.center,a=t.get("radius");bt(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function Oa(t,e,r){r=Zg(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),f=r[2]+r[0],d=r[1]+r[3],h=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(c)&&(c=i-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-d;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new It((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return v.margin=r,v}var Zo={rect:1,point:2};function gu(t,e,r){var n,i,a,o=t.boxCoordinateSystem,s;if(o){var l=Lb(t),u=l.coord,c=l.from;if(o.dataToLayout){a=Zo.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint?(a=Zo.point,s=c,i=o.dataToPoint(u)):process.env.NODE_ENV!=="production"&&qt(t.type+"["+t.componentIndex+"]"+(" layout based on "+o.type+" is not supported."))}return a==null&&(a=Zo.rect),a===Zo.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function Ko(t){var e=t.layoutMode||t.constructor.layoutMode;return Mt(e)?e:e?{type:e}:null}function Xn(t,e,r){var n=r&&r.ignoreSize;!bt(n)&&(n=[n,n]);var i=o(pu[0],0),a=o(pu[1],1);l(pu[0],t,i),l(pu[1],t,a);function o(u,c){var f={},d=0,h={},v=0,p=2;if(vu(u,function(y){h[y]=t[y]}),vu(u,function(y){Yr(e,y)&&(f[y]=h[y]=e[y]),s(f,y)&&d++,s(h,y)&&v++}),n[c])return s(e,u[1])?h[u[2]]=null:s(e,u[2])&&(h[u[1]]=null),h;if(v===p||!d)return h;if(d>=p)return f;for(var g=0;g<u.length;g++){var m=u[g];if(!Yr(f,m)&&Yr(t,m)){f[m]=t[m];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){vu(u,function(d){c[d]=f[d]})}}function Qo(t){return Rb({},t)}function Rb(t,e){return e&&t&&vu(Eb,function(r){Yr(e,r)&&(t[r]=e[r])}),t}var kb=de(),te=function(t){ht(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.uid=ou("ec_cpt_model"),a}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Ko(this),a=i?Qo(r):{},o=n.getTheme();re(r,o.get(this.mainType)),re(r,this.getDefaultOption()),i&&Xn(r,a,i)},e.prototype.mergeOption=function(r,n){re(this.option,r,!0);var i=Ko(this);i&&Xn(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!N8(r))return r.defaultOption;var n=kb(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=re(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Cl(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return Db(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Te);a1(te,Te),El(te),ib(te),ab(te,Nb);function Nb(t){var e=[];return z(te.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=yt(e,function(r){return qr(r).main}),t!=="dataset"&&ne(e,"dataset")<=0&&e.unshift("dataset"),e}var Rt={color:{},darkColor:{},size:{}},fe=Rt.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)"};ot(fe,{primary:fe.neutral80,secondary:fe.neutral70,tertiary:fe.neutral60,quaternary:fe.neutral50,disabled:fe.neutral20,border:fe.neutral30,borderTint:fe.neutral20,borderShade:fe.neutral40,background:fe.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:fe.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:fe.neutral70,axisLineTint:fe.neutral40,axisTick:fe.neutral70,axisTickMinor:fe.neutral60,axisLabel:fe.neutral70,axisSplitLine:fe.neutral15,axisMinorSplitLine:fe.neutral05});for(var Oi in fe)if(fe.hasOwnProperty(Oi)){var Qg=fe[Oi];Oi==="theme"?Rt.darkColor.theme=fe.theme.slice():Oi==="highlight"?Rt.darkColor.highlight="rgba(255,231,130,0.4)":Oi.indexOf("accent")===0?Rt.darkColor[Oi]=Qc(Qg,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):Rt.darkColor[Oi]=Qc(Qg,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}Rt.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Jg="";typeof navigator<"u"&&(Jg=navigator.platform||"");var Ia="rgba(0, 0, 0, 0.2)",qg=Rt.color.theme[0],Ob=Qc(qg,null,null,.9);const Ib={darkMode:"auto",colorBy:"series",color:Rt.color.theme,gradientColor:[Ob,qg],aria:{decal:{decals:[{color:Ia,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ia,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ia,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ia,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ia,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ia,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Jg.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 Wh=Ot(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),hr="original",He="arrayRows",Lr="objectRows",Fr="keyedColumns",yn="typedArray",t2="unknown",on="column",Ii="row",Ne={Must:1,Might:2,Not:3},e2=de();function Bb(t){e2(t).datasetMap=Ot()}function Vb(t,e,r){var n={},i=Gh(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=e2(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),z(t,function(p,g){var m=Mt(p)?p:t[g]={name:p};m.type==="ordinal"&&c==null&&(c=g,f=v(m)),n[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});z(t,function(p,g){var m=p.name,y=v(p);if(c==null){var _=d.valueWayDim;h(n[m],_,y),h(o,_,y),d.valueWayDim+=y}else if(c===g)h(n[m],0,y),h(a,0,y);else{var _=d.categoryWayDim;h(n[m],_,y),h(o,_,y),d.categoryWayDim+=y}});function h(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function v(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function zb(t,e,r){var n={},i=Gh(t);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===Lr||a===Fr)&&z(o,function(c,f){(Mt(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},d=[],h=0,v=Math.min(5,r);h<v;h++){var p=n2(e.data,a,e.seriesLayoutBy,o,e.startIndex,h);d.push(p);var g=p===Ne.Not;if(g&&c.v==null&&h!==s&&(c.v=h),(c.n==null||c.n===c.v||!g&&d[c.n]===Ne.Not)&&(c.n=h),m(c)&&d[c.n]!==Ne.Not)return c;g||(p===Ne.Might&&f.v==null&&h!==s&&(f.v=h),(f.n==null||f.n===f.v)&&(f.n=h))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function Gh(t){var e=t.get("data",!0);if(!e)return Cl(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},_r).models[0]}function Fb(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:Cl(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},_r).models}function r2(t,e){return n2(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function n2(t,e,r,n,i,a){var o,s=5;if(Xe(t))return Ne.Not;var l,u;if(n){var c=n[a];Mt(c)?(l=c.name,u=c.type):Lt(c)&&(l=c)}if(u!=null)return u==="ordinal"?Ne.Must:Ne.Not;if(e===He){var f=t;if(r===Ii){for(var d=f[a],h=0;h<(d||[]).length&&h<s;h++)if((o=x(d[i+h]))!=null)return o}else for(var h=0;h<f.length&&h<s;h++){var v=f[i+h];if(v&&(o=x(v[a]))!=null)return o}}else if(e===Lr){var p=t;if(!l)return Ne.Not;for(var h=0;h<p.length&&h<s;h++){var g=p[h];if(g&&(o=x(g[l]))!=null)return o}}else if(e===Fr){var m=t;if(!l)return Ne.Not;var d=m[l];if(!d||Xe(d))return Ne.Not;for(var h=0;h<d.length&&h<s;h++)if((o=x(d[h]))!=null)return o}else if(e===hr)for(var y=t,h=0;h<y.length&&h<s;h++){var g=y[h],_=Eo(g);if(!bt(_))return Ne.Not;if((o=x(_[a]))!=null)return o}function x(S){var b=Lt(S);if(S!=null&&Number.isFinite(Number(S))&&S!=="")return b?Ne.Might:Ne.Not;if(b&&S!=="-")return Ne.Must}return Ne.Not}var Hb=Ot();function Wb(t,e,r){var n=Hb.get(e);if(!n)return r;var i=n(t);if(!i)return r;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)wt(xa(i[a]));return r.concat(i)}var i2=de();de();var jh=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=Ye(this.get("color",!0)),a=this.get("colorLayer",!0);return jb(this,i2,i,a,e,r,n)},t.prototype.clearColorPalette=function(){Xb(this,i2)},t}();function Gb(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function jb(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:Gb(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function Xb(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var mu,Jo,a2,Xh="\0_ec_inner",o2=1,Yb={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",matrix:"MatrixComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},Ub={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",chord:"ChordChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},yu={};function $b(t){z(t,function(e,r){if(!te.hasClass(r)){var n=Yb[r];n&&!yu[n]&&(qt("Component "+r+` is used but not imported.
|
|
25
|
+
*/var oo={},dp={};function S6(t){delete dp[t]}function x6(t){if(!t)return!1;if(typeof t=="string")return Gs(t,1)<Xc;if(t.colorStops){for(var e=t.colorStops,r=0,n=e.length,i=0;i<n;i++)r+=Gs(e[i].color,1);return r/=n,r<Xc}return!1}var w6=function(){function t(e,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=e;var a=new O7,o=n.renderer||"canvas";if(oo[o]||(o=Bt(oo)[0]),process.env.NODE_ENV!=="production"&&!oo[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new oo[o](r,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Ht.node&&!Ht.worker&&!l?new c6(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?Ht.touchEventsSupported:!!c,d=44,h;f&&(h=mt(n.pointerSize,d)),this.handler=new Tv(a,s,u,s.root,h),this.animation=new n6({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return t.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,r),this.refresh())},t.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=x6(e))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(e){var r,n=ra();this._needsRefresh&&(r=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=ra();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r<e.length;r++)e[r]instanceof le&&e[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.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,S6(this.id))},t}();function vp(t,e){var r=new w6(ov(),t,e);return dp[r.id]=r,r}function T6(t,e){oo[t]=e}var rf;function L6(t){if(typeof rf=="function")return rf(t)}function M6(t){rf=t}var pp=1e-4,gp=20;function C6(t){return t.replace(/^\s+|\s+$/g,"")}var so=Math.min,je=Math.max,Rr=Math.abs;function nf(t,e,r,n){var i=e[0],a=e[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var Kt=E6;function E6(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return af(t,e,r)}function af(t,e,r){return xt(t)?C6(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function be(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),gp),t=(+t).toFixed(e),r?t:+t}function Kr(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return of(t)}function of(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function D6(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Rr(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function A6(t,e){var r=gn(t,function(h,v){return h+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=dt(t,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=dt(i,function(h){return Math.floor(h)}),s=gn(o,function(h,v){return h+v},0),l=dt(i,function(h,v){return h-o[v]});s<a;){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 dt(o,function(h){return h/n})}function P6(t,e){var r=Math.max(Kr(t),Kr(e)),n=t+e;return r>gp?n:be(n,r)}function mp(t){var e=Math.PI*2;return(t%e+e)%e}function al(t){return t>-pp&&t<pp}var N6=/^(?:(\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 lo(t){if(t instanceof Date)return t;if(xt(t)){var e=N6.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(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(t==null)return new Date(NaN);return new Date(Math.round(t))}function k6(t){return Math.pow(10,ol(t))}function ol(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function yp(t,e){var r=ol(t),n=Math.pow(10,r),i=t/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function O6(t){var e=parseFloat(t);return e==t&&(e!==0||!xt(t)||t.indexOf("x")<=0)?e:NaN}function _p(t){return!isNaN(O6(t))}function I6(){return Math.round(Math.random()*9)}function bp(t,e){return e===0?t:bp(e,t%e)}function Sp(t,e){return t==null?e:e==null?t:t*e/bp(t,e)}var B6="[ECharts] ",xp={},R6=typeof console<"u"&&console.warn&&console.log;function sl(t,e,r){if(R6){if(r){if(xp[e])return;xp[e]=!0}console[t](B6+e)}}function wp(t,e){sl("log",t,e)}function Ce(t,e){sl("warn",t,e)}function Wt(t,e){sl("error",t,e)}function Jr(t){process.env.NODE_ENV!=="production"&&sl("warn","DEPRECATED: "+t,!0)}function he(t,e,r){process.env.NODE_ENV!=="production"&&Jr((r?"["+r+"]":"")+(t+" is deprecated; use "+e+" instead."))}function sf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r="";if(process.env.NODE_ENV!=="production"){var n=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":Wi(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":Lt(i)?"function () { ... }":Z3(i)?i+"":null};r=dt(t,function(i){if(xt(i))return i;var a=n(i);if(a!=null)return a;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var l=n(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return r}function Qe(t){throw new Error(t)}function Tp(t,e,r){return(e-t)*r+t}var Lp="series\0",$6="\0_ec_\0";function Be(t){return t instanceof Array?t:t==null?[]:[t]}function lf(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var Mp=["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 uo(t){return wt(t)&&!gt(t)&&!(t instanceof Date)?t.value:t}function V6(t){return wt(t)&&!(t instanceof Array)}function z6(t,e,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";t=t||[],e=(e||[]).slice();var o=Pt();$(e,function(l,u){if(!wt(l)){e[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!Dp(l.id)&&Ep(l.id),l.name!=null&&!Dp(l.name)&&Ep(l.name))});var s=F6(t,o,r);return(n||i)&&H6(s,t,o,e),n&&G6(s,e),n||i?W6(s,e,i):a&&X6(s,e),Y6(s),s}function F6(t,e,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<t.length;i++){var a=t[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:r==="replaceMerge"||oa(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function H6(t,e,r,n){$(n,function(i,a){if(!(!i||i.id==null)){var o=co(i.id),s=r.get(o);if(s!=null){var l=t[s];bt(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],n[a]=null}}})}function G6(t,e){$(e,function(r,n){if(!(!r||r.name==null))for(var i=0;i<t.length;i++){var a=t[i].existing;if(!t[i].newOption&&a&&(a.id==null||r.id==null)&&!oa(r)&&!oa(a)&&Cp("name",a,r)){t[i].newOption=r,e[n]=null;return}}})}function W6(t,e,r){$(e,function(n){if(n){for(var i,a=0;(i=t[a])&&(i.newOption||oa(i.existing)||i.existing&&n.id!=null&&!Cp("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):t.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function X6(t,e){$(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function Y6(t){var e=Pt();$(t,function(r){var n=r.existing;n&&e.set(n.id,r)}),$(t,function(r){var n=r.newOption;bt(!n||n.id==null||!e.get(n.id)||e.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),$(t,function(r,n){var i=r.existing,a=r.newOption,o=r.keyInfo;if(wt(a)){if(o.name=a.name!=null?co(a.name):i?i.name:Lp+n,i)o.id=co(i.id);else if(a.id!=null)o.id=co(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function Cp(t,e,r){var n=$r(e[t],null),i=$r(r[t],null);return n!=null&&i!=null&&n===i}function co(t){if(process.env.NODE_ENV!=="production"&&t==null)throw new Error;return $r(t,"")}function $r(t,e){return t==null?e:xt(t)?t:jt(t)||lv(t)?t+"":e}function Ep(t){process.env.NODE_ENV!=="production"&&Ce("`"+t+"` is invalid id or name. Must be a string or number.")}function Dp(t){return lv(t)||_p(t)}function uf(t){var e=t.name;return!!(e&&e.indexOf(Lp))}function oa(t){return t&&t.id!=null&&co(t.id).indexOf($6)===0}function U6(t,e,r){$(t,function(n){var i=n.newOption;wt(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=Z6(e,i,n.existing,r))})}function Z6(t,e,r,n){var i=e.type?e.type:r?r.subType:n.determineSubType(t,e);return i}function sa(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return gt(e.dataIndex)?dt(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return gt(e.name)?dt(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function ae(){var t="__ec_inner_"+q6++;return function(e){return e[t]||(e[t]={})}}var q6=I6();function cf(t,e,r){var n=Ap(e,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=r?r.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=ll(t,c,u,{useDefault:l===c,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function Ap(t,e){var r;if(xt(t)){var n={};n[t+"Index"]=0,r=n}else r=t;var i=Pt(),a={},o=!1;return $(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&qt(e.includeMainTypes,c)<0)){o=o||!!c;var d=i.get(c)||i.set(c,{});d[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var sr={useDefault:!0,enableAll:!1,enableNone:!1};function ll(t,e,r,n){n=n||sr;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=t.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;process.env.NODE_ENV!=="production"&&Wt('`"none"` or `false` is not a valid value on index option.'),i=-1}return i==="all"&&(n.enableAll?i=a=o=null:(process.env.NODE_ENV!=="production"&&Wt('`"all"` is not a valid value on index option.'),i=-1)),s.models=t.queryComponents({mainType:e,index:i,id:a,name:o}),s}function Pp(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function j6(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Q6(t,e,r,n,i){var a=e==null||e==="auto";if(n==null)return n;if(jt(n)){var o=Tp(r||0,n,i);return be(o,a?Math.max(Kr(r||0),Kr(n)):e)}else{if(xt(n))return i<1?r:n;for(var s=[],l=r,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var d=t.getDimensionInfo(f);if(d&&d.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,v=u[f],o=Tp(h,v,i);s[f]=be(o,a?Math.max(Kr(h),Kr(v)):e)}}return s}}var K6=".",oi="___EC__COMPONENT__CONTAINER___",Np="___EC__EXTENDED_CLASS___";function Vr(t){var e={main:"",sub:""};if(t){var r=t.split(K6);e.main=r[0]||"",e.sub=r[1]||""}return e}function J6(t){bt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function t8(t){return!!(t&&t[Np])}function ff(t,e){t.$constructor=t,t.extend=function(r){process.env.NODE_ENV!=="production"&&$(e,function(a){r[a]||console.warn("Method `"+a+"` should be implemented"+(r.type?" in "+r.type:"")+".")});var n=this,i;return e8(n)?i=function(a){st(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},Y3(i,this)),rt(i.prototype,r),i[Np]=!0,i.extend=this.extend,i.superCall=i8,i.superApply=a8,i.superClass=n,i}}function e8(t){return Lt(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function kp(t,e){t.extend=e.extend}var r8=Math.round(Math.random()*10);function n8(t){var e=["__\0is_clz",r8++].join("_");t.prototype[e]=!0,process.env.NODE_ENV!=="production"&&bt(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function i8(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function a8(t,e,r){return this.superClass.prototype[e].apply(t,r)}function ul(t){var e={};t.registerClass=function(n){var i=n.type||n.prototype.type;if(i){J6(i),n.prototype.type=i;var a=Vr(i);if(!a.sub)process.env.NODE_ENV!=="production"&&e[a.main]&&console.warn(a.main+" exists."),e[a.main]=n;else if(a.sub!==oi){var o=r(a);o[a.sub]=n}}return n},t.getClass=function(n,i,a){var o=e[n];if(o&&o[oi]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var i=Vr(n),a=[],o=e[i.main];return o&&o[oi]?$(o,function(s,l){l!==oi&&a.push(s)}):a.push(o),a},t.hasClass=function(n){var i=Vr(n);return!!e[i.main]},t.getAllClassMainTypes=function(){var n=[];return $(e,function(i,a){n.push(a)}),n},t.hasSubTypes=function(n){var i=Vr(n),a=e[i.main];return a&&a[oi]};function r(n){var i=e[n.main];return(!i||!i[oi])&&(i=e[n.main]={},i[oi]=!0),i}}function fo(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<t.length;s++){var l=t[s][1];if(!(i&&qt(i,l)>=0||a&&qt(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var o8=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],s8=fo(o8),l8=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return s8(this,e,r)},t}(),hf=new ta(50);function u8(t){if(typeof t=="string"){var e=hf.get(t);return e&&e.image}else return t}function df(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=hf.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!cl(e)&&a.pending.push(o)):(e=pn.loadImage(t,Op,Op),e.__zrImageSrc=t,hf.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function Op(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function cl(t){return t&&t.width&&t.height}var vf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function c8(t,e,r,n,i,a){if(!r){t.text="",t.isTruncated=!1;return}var o=(e+"").split(`
|
|
26
|
+
`);a=Ip(r,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)Bp(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;t.text=o.join(`
|
|
27
|
+
`),t.isTruncated=s}function Ip(t,e,r,n){n=n||{};var i=rt({},n);r=mt(r,"..."),i.maxIterations=mt(n.maxIterations,2);var a=i.minChar=mt(n.minChar,0),o=i.fontMeasureInfo=Ir(e),s=o.asciiCharWidth;i.placeholder=mt(n.placeholder,"");for(var l=t=Math.max(0,t-1),u=0;u<a&&l>=s;u++)l-=s;var c=Br(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function Bp(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=Br(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?f8(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=Br(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function f8(t,e,r){for(var n=0,i=0,a=t.length;i<a&&n<e;i++)n+=cp(r,t.charCodeAt(i));return i}function h8(t,e,r,n){var i=gf(t),a=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=a==="truncate",f=ao(u),d=mt(e.lineHeight,f),h=e.lineOverflow==="truncate",v=!1,p=e.width;p==null&&r!=null&&(p=r-s);var g=e.height;g==null&&n!=null&&(g=n-l);var m;p!=null&&(a==="break"||a==="breakAll")?m=i?$p(i,e.font,p,a==="breakAll",0).lines:[]:m=i?i.split(`
|
|
28
|
+
`):[];var y=m.length*d;if(g==null&&(g=y),y>g&&h){var _=Math.floor(g/d);v=v||m.length>_,m=m.slice(0,_),y=m.length*d}if(i&&c&&p!=null)for(var b=Ip(p,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),x={},S=0;S<m.length;S++)Bp(x,m[S],b),m[S]=x.textLine,v=v||x.isTruncated;for(var w=g,T=0,L=Ir(u),S=0;S<m.length;S++)T=Math.max(Br(L,m[S]),T);p==null&&(p=T);var C=p;return w+=l,C+=s,{lines:m,height:g,outerWidth:C,outerHeight:w,lineHeight:d,calculatedLineHeight:f,contentWidth:T,contentHeight:y,width:p,isTruncated:v}}var d8=function(){function t(){}return t}(),Rp=function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t}(),v8=function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return t}();function p8(t,e,r,n,i){var a=new v8,o=gf(t);if(!o)return a;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&r!=null&&(c=r-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=vf.lastIndex=0,p;(p=vf.exec(o))!=null;){var g=p.index;g>v&&pf(a,o.substring(v,g),e,h),pf(a,p[2],e,h,p[1]),v=vf.lastIndex}v<o.length&&pf(a,o.substring(v,o.length),e,h);var m=[],y=0,_=0,b=d==="truncate",x=e.lineOverflow==="truncate",S={};function w(ct,vt,U){ct.width=vt,ct.lineHeight=U,y+=U,_=Math.max(_,vt)}t:for(var T=0;T<a.lines.length;T++){for(var L=a.lines[T],C=0,M=0,A=0;A<L.tokens.length;A++){var E=L.tokens[A],P=E.styleName&&e.rich[E.styleName]||{},B=E.textPadding=P.padding,k=B?B[1]+B[3]:0,N=E.font=P.font||e.font;E.contentHeight=ao(N);var z=mt(P.height,E.contentHeight);if(E.innerHeight=z,B&&(z+=B[0]+B[2]),E.height=z,E.lineHeight=qr(P.lineHeight,e.lineHeight,z),E.align=P&&P.align||i,E.verticalAlign=P&&P.verticalAlign||"middle",x&&f!=null&&y+E.lineHeight>f){var R=a.lines.length;A>0?(L.tokens=L.tokens.slice(0,A),w(L,M,C),a.lines=a.lines.slice(0,T+1)):a.lines=a.lines.slice(0,T),a.isTruncated=a.isTruncated||a.lines.length<R;break t}var V=P.width,I=V==null||V==="auto";if(typeof V=="string"&&V.charAt(V.length-1)==="%")E.percentWidth=V,m.push(E),E.contentWidth=Br(Ir(N),E.text);else{if(I){var H=P.backgroundColor,G=H&&H.image;G&&(G=u8(G),cl(G)&&(E.width=Math.max(E.width,G.width*z/G.height)))}var X=b&&c!=null?c-M:null;X!=null&&X<E.width?!I||X<k?(E.text="",E.width=E.contentWidth=0):(c8(S,E.text,X-k,N,e.ellipsis,{minChar:e.truncateMinChar}),E.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,E.width=E.contentWidth=Br(Ir(N),E.text)):E.contentWidth=Br(Ir(N),E.text)}E.width+=k,M+=E.width,P&&(C=Math.max(C,E.lineHeight))}w(L,M,C)}a.outerWidth=a.width=mt(c,_),a.outerHeight=a.height=mt(f,y),a.contentHeight=y,a.contentWidth=_,a.outerWidth+=l,a.outerHeight+=u;for(var T=0;T<m.length;T++){var E=m[T],J=E.percentWidth;E.width=parseInt(J,10)/100*a.width}return a}function pf(t,e,r,n,i){var a=e==="",o=i&&r.rich[i]||{},s=t.lines,l=o.font||r.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=wn(o.width,n.width)+h;s.length>0&&v+n.accumWidth>n.width&&(c=e.split(`
|
|
29
|
+
`),u=!0),n.accumWidth=v}else{var p=$p(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+h,f=p.linesWidths,c=p.lines}}c||(c=e.split(`
|
|
30
|
+
`));for(var g=Ir(l),m=0;m<c.length;m++){var y=c[m],_=new d8;if(_.styleName=i,_.text=y,_.isLineHolder=!y&&!a,typeof o.width=="number"?_.width=o.width:_.width=f?f[m]:Br(g,y),!m&&!u){var b=(s[s.length-1]||(s[0]=new Rp)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=_:(y||!x||a)&&b.push(_)}else s.push(new Rp([_]))}}function g8(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var m8=gn(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function y8(t){return g8(t)?!!m8[t]:!0}function $p(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=Ir(e),d=0;d<t.length;d++){var h=t.charAt(d);if(h===`
|
|
31
|
+
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=cp(f,h.charCodeAt(0)),p=n?!1:!y8(h);if(a.length?c+v>r:i+c+v>r){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=v)):p?(a.push(l),o.push(u),l=h,u=v):(a.push(h),o.push(v));continue}c+=v,p?(l+=h,u+=v):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function Vp(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Nt.set(zp,ia(r,o,i),ai(n,s,a),o,s),Nt.intersect(e,zp,null,Fp);var l=Fp.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=ia(l.x,l.width,i,!0),t.baseY=ai(l.y,l.height,a,!0)}}var zp=new Nt(0,0,0,0),Fp={outIntersectRect:{},clamp:!0};function gf(t){return t!=null?t+="":t=""}function _8(t){var e=gf(t.text),r=t.font,n=Br(Ir(r),e),i=ao(r);return mf(t,n,i,null)}function mf(t,e,r,n){var i=new Nt(ia(t.x||0,e,t.textAlign),ai(t.y||0,r,t.textBaseline),e,r),a=n??(Hp(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Hp(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var yf="__zr_style_"+Math.round(Math.random()*10),si={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},fl={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};si[yf]=!0;var Gp=["z","z2","invisible"],b8=["invisible"],S8=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Bt(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):t.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&x8(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Nt(0,0,0,0)),n?Nt.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Nt(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:rt(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Ka,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Ka)},e.prototype.styleUpdated=function(){this.__dirty&=~Ka},e.prototype.createStyle=function(r){return Ns(si,r)},e.prototype.useStyle=function(r){r[yf]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[yf]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,Gp)},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=Bt(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=Bt(u),d=0;d<v.length;d++){var h=v[d];this.style[h]=this.style[h]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?b8:Gp,d=0;d<p.length;d++){var h=p[d];n&&n[h]!=null?this[h]=n[h]:l&&i[h]!=null&&(this[h]=i[h])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(r,n){return rt(r,n),r},e.prototype.getAnimationStyleProps=function(){return fl},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=kr|Ka}(),e}(il),_f=new Nt(0,0,0,0),bf=new Nt(0,0,0,0);function x8(t,e,r){return _f.copy(t.getBoundingRect()),t.transform&&_f.applyTransform(t.transform),bf.width=e,bf.height=r,!_f.intersect(bf)}const ho=S8;var lr=Math.min,ur=Math.max,Sf=Math.sin,xf=Math.cos,li=Math.PI*2,hl=Yi(),dl=Yi(),vl=Yi();function Wp(t,e,r,n,i,a){i[0]=lr(t,r),i[1]=lr(e,n),a[0]=ur(t,r),a[1]=ur(e,n)}var Xp=[],Yp=[];function w8(t,e,r,n,i,a,o,s,l,u){var c=Bv,f=_e,d=c(t,r,i,o,Xp);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(t,r,i,o,Xp[h]);l[0]=lr(v,l[0]),u[0]=ur(v,u[0])}d=c(e,n,a,s,Yp);for(var h=0;h<d;h++){var p=f(e,n,a,s,Yp[h]);l[1]=lr(p,l[1]),u[1]=ur(p,u[1])}l[0]=lr(t,l[0]),u[0]=ur(t,u[0]),l[0]=lr(o,l[0]),u[0]=ur(o,u[0]),l[1]=lr(e,l[1]),u[1]=ur(e,u[1]),l[1]=lr(s,l[1]),u[1]=ur(s,u[1])}function T8(t,e,r,n,i,a,o,s){var l=$v,u=Fe,c=ur(lr(l(t,r,i),1),0),f=ur(lr(l(e,n,a),1),0),d=u(t,r,i,c),h=u(e,n,a,f);o[0]=lr(t,i,d),o[1]=lr(e,a,h),s[0]=ur(t,i,d),s[1]=ur(e,a,h)}function L8(t,e,r,n,i,a,o,s,l){var u=Zi,c=qi,f=Math.abs(i-a);if(f%li<1e-4&&f>1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(hl[0]=xf(i)*r+t,hl[1]=Sf(i)*n+e,dl[0]=xf(a)*r+t,dl[1]=Sf(a)*n+e,u(s,hl,dl),c(l,hl,dl),i=i%li,i<0&&(i=i+li),a=a%li,a<0&&(a=a+li),i>a&&!o?a+=li:i<a&&o&&(i+=li),o){var d=a;a=i,i=d}for(var h=0;h<a;h+=Math.PI/2)h>i&&(vl[0]=xf(h)*r+t,vl[1]=Sf(h)*n+e,u(s,vl,s),c(l,vl,l))}var Gt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ui=[],ci=[],zr=[],Tn=[],Fr=[],Hr=[],wf=Math.min,Tf=Math.max,fi=Math.cos,hi=Math.sin,tn=Math.abs,Lf=Math.PI,Ln=Lf*2,Mf=typeof Float32Array<"u",vo=[];function Cf(t){var e=Math.round(t/Lf*1e8)/1e8;return e%2*Lf}function Up(t,e){var r=Cf(t[0]);r<0&&(r+=Ln);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Ln?i=r+Ln:e&&r-i>=Ln?i=r-Ln:!e&&r>i?i=r+(Ln-Cf(r-i)):e&&r<i&&(i=r-(Ln-Cf(i-r))),t[0]=r,t[1]=i}var Mn=function(){function t(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 t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=tn(n/op/e)||0,this._uy=tn(n/op/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(Gt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=tn(e-this._xi),i=tn(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Gt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(Gt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(Gt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),vo[0]=i,vo[1]=a,Up(vo,o),i=vo[0],a=vo[1];var s=a-i;return this.addData(Gt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=fi(a)*n+e,this._yi=hi(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(Gt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Gt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&Mf&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var r=e.length,n=0,i=this._len,a=0;a<r;a++)n+=e[a].len();var o=this.data;if(Mf&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<r;a++)for(var l=e[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},t.prototype.addData=function(e,r,n,i,a,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]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Mf&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){zr[0]=zr[1]=Fr[0]=Fr[1]=Number.MAX_VALUE,Tn[0]=Tn[1]=Hr[0]=Hr[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(r=e[o],n=e[o+1],i=r,a=n),s){case Gt.M:r=i=e[o++],n=a=e[o++],Fr[0]=i,Fr[1]=a,Hr[0]=i,Hr[1]=a;break;case Gt.L:Wp(r,n,e[o],e[o+1],Fr,Hr),r=e[o++],n=e[o++];break;case Gt.C:w8(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],Fr,Hr),r=e[o++],n=e[o++];break;case Gt.Q:T8(r,n,e[o++],e[o++],e[o],e[o+1],Fr,Hr),r=e[o++],n=e[o++];break;case Gt.A:var u=e[o++],c=e[o++],f=e[o++],d=e[o++],h=e[o++],v=e[o++]+h;o+=1;var p=!e[o++];l&&(i=fi(h)*f+u,a=hi(h)*d+c),L8(u,c,f,d,h,v,p,Fr,Hr),r=fi(v)*f+u,n=hi(v)*d+c;break;case Gt.R:i=r=e[o++],a=n=e[o++];var g=e[o++],m=e[o++];Wp(i,a,i+g,a+m,Fr,Hr);break;case Gt.Z:r=i,n=a;break}Zi(zr,zr,Fr),qi(Tn,Tn,Hr)}return o===0&&(zr[0]=zr[1]=Tn[0]=Tn[1]=0),new Nt(zr[0],zr[1],Tn[0]-zr[0],Tn[1]-zr[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,d=0;d<r;){var h=e[d++],v=d===1;v&&(a=e[d],o=e[d+1],s=a,l=o);var p=-1;switch(h){case Gt.M:a=s=e[d++],o=l=e[d++];break;case Gt.L:{var g=e[d++],m=e[d++],y=g-a,_=m-o;(tn(y)>n||tn(_)>i||d===r-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case Gt.C:{var b=e[d++],x=e[d++],g=e[d++],m=e[d++],S=e[d++],w=e[d++];p=B7(a,o,b,x,g,m,S,w,10),a=S,o=w;break}case Gt.Q:{var b=e[d++],x=e[d++],g=e[d++],m=e[d++];p=V7(a,o,b,x,g,m,10),a=g,o=m;break}case Gt.A:var T=e[d++],L=e[d++],C=e[d++],M=e[d++],A=e[d++],E=e[d++],P=E+A;d+=1,v&&(s=fi(A)*C+T,l=hi(A)*M+L),p=Tf(C,M)*wf(Ln,Math.abs(E)),a=fi(P)*C+T,o=hi(P)*M+L;break;case Gt.R:{s=a=e[d++],l=o=e[d++];var B=e[d++],k=e[d++];p=B*2+k*2;break}case Gt.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,d,h=r<1,v,p,g=0,m=0,y,_=0,b,x;if(!(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,p=this._pathLen,y=r*p,!y)))t:for(var S=0;S<o;){var w=n[S++],T=S===1;switch(T&&(u=n[S],c=n[S+1],s=u,l=c),w!==Gt.L&&_>0&&(e.lineTo(b,x),_=0),w){case Gt.M:s=u=n[S++],l=c=n[S++],e.moveTo(u,c);break;case Gt.L:{f=n[S++],d=n[S++];var L=tn(f-u),C=tn(d-c);if(L>i||C>a){if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;e.lineTo(u*(1-A)+f*A,c*(1-A)+d*A);break t}g+=M}e.lineTo(f,d),u=f,c=d,_=0}else{var E=L*L+C*C;E>_&&(b=f,x=d,_=E)}break}case Gt.C:{var P=n[S++],B=n[S++],k=n[S++],N=n[S++],z=n[S++],R=n[S++];if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;Vs(u,P,k,z,A,ui),Vs(c,B,N,R,A,ci),e.bezierCurveTo(ui[1],ci[1],ui[2],ci[2],ui[3],ci[3]);break t}g+=M}e.bezierCurveTo(P,B,k,N,z,R),u=z,c=R;break}case Gt.Q:{var P=n[S++],B=n[S++],k=n[S++],N=n[S++];if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;zs(u,P,k,A,ui),zs(c,B,N,A,ci),e.quadraticCurveTo(ui[1],ci[1],ui[2],ci[2]);break t}g+=M}e.quadraticCurveTo(P,B,k,N),u=k,c=N;break}case Gt.A:var V=n[S++],I=n[S++],H=n[S++],G=n[S++],X=n[S++],J=n[S++],ct=n[S++],vt=!n[S++],U=H>G?H:G,Y=tn(H-G)>.001,tt=X+J,j=!1;if(h){var M=v[m++];g+M>y&&(tt=X+J*(y-g)/M,j=!0),g+=M}if(Y&&e.ellipse?e.ellipse(V,I,H,G,ct,X,tt,vt):e.arc(V,I,U,X,tt,vt),j)break t;T&&(s=fi(X)*H+V,l=hi(X)*G+I),u=fi(tt)*H+V,c=hi(tt)*G+I;break;case Gt.R:s=u=n[S],l=c=n[S+1],f=n[S++],d=n[S++];var nt=n[S++],it=n[S++];if(h){var M=v[m++];if(g+M>y){var at=y-g;e.moveTo(f,d),e.lineTo(f+wf(at,nt),d),at-=nt,at>0&&e.lineTo(f+nt,d+wf(at,it)),at-=it,at>0&&e.lineTo(f+Tf(nt-at,0),d+it),at-=nt,at>0&&e.lineTo(f,d+Tf(it-at,0));break t}g+=M}e.rect(f,d,nt,it);break;case Gt.Z:if(h){var M=v[m++];if(g+M>y){var A=(y-g)/M;e.lineTo(u*(1-A)+s*A,c*(1-A)+l*A);break t}g+=M}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=Gt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function la(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>r+s||a<t-s&&a<r-s)return!1;if(t!==r)l=(e-n)/(t-r),u=(t*n-r*e)/(t-r);else return Math.abs(a-t)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function M8(t,e,r,n,i,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>a+f&&c>s+f||c<e-f&&c<n-f&&c<a-f&&c<s-f||u>t+f&&u>r+f&&u>i+f&&u>o+f||u<t-f&&u<r-f&&u<i-f&&u<o-f)return!1;var d=I7(t,e,r,n,i,a,o,s,u,c);return d<=f/2}function C8(t,e,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>r+u&&s>i+u||s<t-u&&s<r-u&&s<i-u)return!1;var c=$7(t,e,r,n,i,a,s,l);return c<=u/2}var Zp=Math.PI*2;function pl(t){return t%=Zp,t<0&&(t+=Zp),t}var po=Math.PI*2;function E8(t,e,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(n-i)%po<1e-4)return!0;if(a){var f=n;n=pl(i),i=pl(f)}else n=pl(n),i=pl(i);n>i&&(i+=po);var d=Math.atan2(l,s);return d<0&&(d+=po),d>=n&&d<=i||d+po>=n&&d+po<=i}function di(t,e,r,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(r-t)+t;return l===i?1/0:l>i?s:0}var Cn=Mn.CMD,vi=Math.PI*2,D8=1e-4;function A8(t,e){return Math.abs(t-e)<D8}var Re=[-1,-1,-1],cr=[-1,-1];function P8(){var t=cr[0];cr[0]=cr[1],cr[1]=t}function N8(t,e,r,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var c=$s(e,n,a,s,u,Re);if(c===0)return 0;for(var f=0,d=-1,h=void 0,v=void 0,p=0;p<c;p++){var g=Re[p],m=g===0||g===1?.5:1,y=_e(t,r,i,o,g);y<l||(d<0&&(d=Bv(e,n,a,s,cr),cr[1]<cr[0]&&d>1&&P8(),h=_e(e,n,a,s,cr[0]),d>1&&(v=_e(e,n,a,s,cr[1]))),d===2?g<cr[0]?f+=h<e?m:-m:g<cr[1]?f+=v<h?m:-m:f+=s<v?m:-m:g<cr[0]?f+=h<e?m:-m:f+=s<h?m:-m)}return f}function k8(t,e,r,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=R7(e,n,a,s,Re);if(l===0)return 0;var u=$v(e,n,a);if(u>=0&&u<=1){for(var c=0,f=Fe(e,n,a,u),d=0;d<l;d++){var h=Re[d]===0||Re[d]===1?.5:1,v=Fe(t,r,i,Re[d]);v<o||(Re[d]<u?c+=f<e?h:-h:c+=a<f?h:-h)}return c}else{var h=Re[0]===0||Re[0]===1?.5:1,v=Fe(t,r,i,Re[0]);return v<o?0:a<e?h:-h}}function O8(t,e,r,n,i,a,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Re[0]=-l,Re[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=vi-1e-4){n=0,i=vi;var c=a?1:-1;return o>=Re[0]+t&&o<=Re[1]+t?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=vi,i+=vi);for(var d=0,h=0;h<2;h++){var v=Re[h];if(v+t>o){var p=Math.atan2(s,v),c=a?1:-1;p<0&&(p=vi+p),(p>=n&&p<=i||p+vi>=n&&p+vi<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(c=-c),d+=c)}}return d}function qp(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,l=0,u=0,c=0,f=0,d,h,v=0;v<o;){var p=a[v++],g=v===1;switch(p===Cn.M&&v>1&&(r||(s+=di(l,u,c,f,n,i))),g&&(l=a[v],u=a[v+1],c=l,f=u),p){case Cn.M:c=a[v++],f=a[v++],l=c,u=f;break;case Cn.L:if(r){if(la(l,u,a[v],a[v+1],e,n,i))return!0}else s+=di(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Cn.C:if(r){if(M8(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=N8(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Cn.Q:if(r){if(C8(l,u,a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=k8(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Cn.A:var m=a[v++],y=a[v++],_=a[v++],b=a[v++],x=a[v++],S=a[v++];v+=1;var w=!!(1-a[v++]);d=Math.cos(x)*_+m,h=Math.sin(x)*b+y,g?(c=d,f=h):s+=di(l,u,d,h,n,i);var T=(n-m)*b/_+m;if(r){if(E8(m,y,b,x,x+S,w,e,T,i))return!0}else s+=O8(m,y,b,x,x+S,w,T,i);l=Math.cos(x+S)*_+m,u=Math.sin(x+S)*b+y;break;case Cn.R:c=l=a[v++],f=u=a[v++];var L=a[v++],C=a[v++];if(d=c+L,h=f+C,r){if(la(c,f,d,f,e,n,i)||la(d,f,d,h,e,n,i)||la(d,h,c,h,e,n,i)||la(c,h,c,f,e,n,i))return!0}else s+=di(d,f,d,h,n,i),s+=di(c,h,c,f,n,i);break;case Cn.Z:if(r){if(la(l,u,c,f,e,n,i))return!0}else s+=di(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!A8(u,f)&&(s+=di(l,u,c,f,n,i)||0),s!==0}function I8(t,e,r){return qp(t,0,!1,e,r)}function B8(t,e,r,n){return qp(t,e,!0,r,n)}var gl=It({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},si),R8={style:It({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},fl.style)},Ef=io.concat(["invisible","culling","z","z2","zlevel","parent"]),Vt=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<Ef.length;++s)i[Ef[s]]=this[Ef[s]];i.__dirty|=kr}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Bt(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?rt(this.style,s):this.useStyle(s):o==="shape"?rt(this.shape,s):t.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 r=this.style.fill;if(r!=="none"){if(xt(r)){var n=Gs(r,0);return n>.5?Yc:n>.2?f6:Uc}else if(r)return Uc}return Yc},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(xt(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Gs(r,0)<Xc;if(a===o)return n}},e.prototype.buildPath=function(r,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~Ki},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new Mn(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ki)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);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 r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,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)),B8(s,l/u,r,n)))return!0}if(this.hasFill())return I8(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ki,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:rt(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ki)},e.prototype.createStyle=function(r){return Ns(gl,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=rt({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=rt({},i.shape),rt(u,n.shape)):(u=rt({},a?this.shape:i.shape),rt(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=rt({},this.shape);for(var c={},f=Bt(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(r,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return R8},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(a){st(o,a);function o(s){var l=a.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Ot(r.style)},o.prototype.getDefaultShape=function(){return Ot(r.shape)},o}(e);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=kr|Ka|Ki}(),e}(ho),$8=It({strokeFirst:!0,font:Zr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},gl),go=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return Hp(this.style)},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Ns($8,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=_8(this.style)),this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(ho);go.prototype.type="tspan";var V8=It({x:0,y:0},si),z8={style:It({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},fl.style)};function F8(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var Tr=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Ns(V8,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=F8(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return z8},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Nt(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ho);Tr.prototype.type="image";function H8(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),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>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var ua=Math.round;function jp(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(ua(n*2)===ua(i*2)&&(t.x1=t.x2=pi(n,s,!0)),ua(a*2)===ua(o*2)&&(t.y1=t.y2=pi(a,s,!0))),t}}function Qp(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=pi(n,s,!0),t.y=pi(i,s,!0),t.width=Math.max(pi(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(pi(i+o,s,!1)-t.y,o===0?0:1)),t}}function pi(t,e,r){if(!e)return t;var n=ua(t*2);return(n+ua(e))%2===0?n/2:(n+(r?1:-1))/2}var G8=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),W8={},ue=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new G8},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=Qp(W8,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?H8(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Vt);ue.prototype.type="rect";var Kp={fill:"#000"},Jp=2,Gr={},X8={style:It({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},fl.style)},Ke=function(t){st(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Kp,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];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 r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Z8(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);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 r=new Nt(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(r.copy(l),r.applyTransform(u),a=a||r.clone(),a.union(r)):(a=a||l.clone(),a.union(l))}this._rect=a||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||Kp},e.prototype.setTextContent=function(r){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return rt(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},e.prototype._mergeRich=function(r,n){for(var i=Bt(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},rt(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return X8},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||Zr,i=r.padding,a=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||a.align||"left",u=r.verticalAlign||a.verticalAlign||"top";Vp(Gr,a.overflowRect,o,s,l,u),o=Gr.baseX,s=Gr.baseY;var c=l1(r),f=h8(c,r,Gr.outerWidth,Gr.outerHeight),d=Df(r),h=!!r.backgroundColor,v=f.outerHeight,p=f.outerWidth,g=f.lines,m=f.lineHeight;this.isTruncated=!!f.isTruncated;var y=o,_=ai(s,f.contentHeight,u);if(d||i){var b=ia(o,p,l),x=ai(s,v,u);d&&this._renderBackground(r,r,b,x,p,v)}_+=m/2,i&&(y=s1(o,l,i),u==="top"?_+=i[0]:u==="bottom"&&(_-=i[2]));for(var S=0,w=!1,T=!1,L=o1("fill"in r?r.fill:(T=!0,a.fill)),C=a1("stroke"in r?r.stroke:!h&&(!a.autoStroke||T)?(S=Jp,w=!0,a.stroke):null),M=r.textShadowBlur>0,A=0;A<g.length;A++){var E=this._getOrCreateChild(go),P=E.createStyle();E.useStyle(P),P.text=g[A],P.x=y,P.y=_,l&&(P.textAlign=l),P.textBaseline="middle",P.opacity=r.opacity,P.strokeFirst=!0,M&&(P.shadowBlur=r.textShadowBlur||0,P.shadowColor=r.textShadowColor||"transparent",P.shadowOffsetX=r.textShadowOffsetX||0,P.shadowOffsetY=r.textShadowOffsetY||0),P.stroke=C,P.fill=L,C&&(P.lineWidth=r.lineWidth||S,P.lineDash=r.lineDash,P.lineDashOffset=r.lineDashOffset||0),P.font=n,r1(P,r),_+=m,E.setBoundingRect(mf(P,f.contentWidth,f.calculatedLineHeight,w?0:null))}},e.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,i=r.align||n.align,a=r.verticalAlign||n.verticalAlign,o=r.x||0,s=r.y||0;Vp(Gr,n.overflowRect,o,s,i,a),o=Gr.baseX,s=Gr.baseY;var l=l1(r),u=p8(l,r,Gr.outerWidth,Gr.outerHeight,i),c=u.width,f=u.outerWidth,d=u.outerHeight,h=r.padding;this.isTruncated=!!u.isTruncated;var v=ia(o,f,i),p=ai(s,d,a),g=v,m=p;h&&(g+=h[3],m+=h[0]);var y=g+c;Df(r)&&this._renderBackground(r,r,v,p,f,d);for(var _=!!r.backgroundColor,b=0;b<u.lines.length;b++){for(var x=u.lines[b],S=x.tokens,w=S.length,T=x.lineHeight,L=x.width,C=0,M=g,A=y,E=w-1,P=void 0;C<w&&(P=S[C],!P.align||P.align==="left");)this._placeToken(P,r,T,m,M,"left",_),L-=P.width,M+=P.width,C++;for(;E>=0&&(P=S[E],P.align==="right");)this._placeToken(P,r,T,m,A,"right",_),L-=P.width,A-=P.width,E--;for(M+=(c-(M-g)-(y-A)-L)/2;C<=E;)P=S[C],this._placeToken(P,r,T,m,M+P.width/2,"center",_),M+=P.width,C++;m+=T}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var d=!r.isLineHolder&&Df(u);d&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var h=!!u.backgroundColor,v=r.textPadding;v&&(o=s1(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var p=this._getOrCreateChild(go),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,b=!1,x=o1("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),S=a1("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!m.autoStroke||y)?(_=Jp,b=!0,m.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=r.text,g.x=o,g.y=f,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=r.font||Zr,g.opacity=qr(u.opacity,n.opacity,1),r1(g,u),S&&(g.lineWidth=qr(u.lineWidth,n.lineWidth,_),g.lineDash=mt(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=S),x&&(g.fill=x),p.setBoundingRect(mf(g,r.contentWidth,r.contentHeight,b?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,d=l&&!f,h=r.borderRadius,v=this,p,g;if(d||r.lineHeight||u&&c){p=this._getOrCreateChild(ue),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=h,p.dirtyShape()}if(d){var y=p.style;y.fill=l||null,y.fillOpacity=mt(r.fillOpacity,1)}else if(f){g=this._getOrCreateChild(Tr),g.onload=function(){v.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&c){var y=p.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=mt(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var b=(p||g).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=qr(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return n1(r)&&(n=[r.fontStyle,r.fontWeight,e1(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&mn(n)||r.textFont||r.font},e}(ho),Y8={left:!0,right:1,center:1},U8={top:1,bottom:1,middle:1},t1=["fontStyle","fontWeight","fontSize","fontFamily"];function e1(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?tc+"px":t+"px"}function r1(t,e){for(var r=0;r<t1.length;r++){var n=t1[r],i=e[n];i!=null&&(t[n]=i)}}function n1(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function Z8(t){return i1(t),$(t.rich,i1),t}function i1(t){if(t){t.font=Ke.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||Y8[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||U8[r]?r:"top";var n=t.padding;n&&(t.padding=ac(t.padding))}}function a1(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function o1(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function s1(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function l1(t){var e=t.text;return e!=null&&(e+=""),e}function Df(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var Jt=ae(),q8=function(t,e,r,n){if(n){var i=Jt(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=Jt(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},u1=1,c1={},f1=ae(),Af=ae(),Pf=0,ml=1,yl=2,fr=["emphasis","blur","select"],_l=["normal","emphasis","blur","select"],j8=10,Q8=9,gi="highlight",bl="downplay",Sl="select",Nf="unselect",xl="toggleSelect",kf="selectchanged";function ca(t){return t!=null&&t!=="none"}function wl(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function h1(t){wl(t,"emphasis",yl)}function d1(t){t.hoverState===yl&&wl(t,"normal",Pf)}function Of(t){wl(t,"blur",ml)}function v1(t){t.hoverState===ml&&wl(t,"normal",Pf)}function K8(t){t.selected=!0}function J8(t){t.selected=!1}function p1(t,e,r){e(t,r)}function en(t,e,r){p1(t,e,r),t.isGroup&&t.traverse(function(n){p1(n,e,r)})}function g1(t,e){switch(e){case"emphasis":t.hoverState=yl;break;case"normal":t.hoverState=Pf;break;case"blur":t.hoverState=ml;break;case"select":t.selected=!0}}function t9(t,e,r,n){for(var i=t.style,a={},o=0;o<e.length;o++){var s=e[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<t.animators.length;o++){var u=t.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function e9(t,e,r,n){var i=r&&qt(r,"select")>=0,a=!1;if(t instanceof Vt){var o=f1(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(ca(s)||ca(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=rt({},n),u=rt({},u),u.fill=s):!ca(u.fill)&&ca(s)?(a=!0,n=rt({},n),u=rt({},u),u.fill=Pc(s)):!ca(u.stroke)&&ca(l)&&(a||(n=rt({},n),u=rt({},u)),u.stroke=Pc(l)),n.style=u}}if(n&&n.z2==null){a||(n=rt({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??j8)}return n}function r9(t,e,r){if(r&&r.z2==null){r=rt({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Q8)}return r}function n9(t,e,r){var n=qt(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:t9(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=rt({},r),o=rt({opacity:n?i:a.opacity*.1},o),r.style=o),r}function If(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return e9(this,t,e,r);if(t==="blur")return n9(this,t,r);if(t==="select")return r9(this,t,r)}return r}function i9(t){t.stateProxy=If;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=If),r&&(r.stateProxy=If)}function m1(t,e){!x1(t,e)&&!t.__highByOuter&&en(t,h1)}function y1(t,e){!x1(t,e)&&!t.__highByOuter&&en(t,d1)}function Tl(t,e){t.__highByOuter|=1<<(e||0),en(t,h1)}function Ll(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&en(t,d1)}function a9(t){en(t,Of)}function _1(t){en(t,v1)}function b1(t){en(t,K8)}function S1(t){en(t,J8)}function x1(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function w1(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=Af(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){v1(u)}),s&&r.push(a)),o.isBlured=!1}),$(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function Bf(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var d=u.getItemGraphicEl(c[f]);d&&_1(d)}}if(t!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var d=f&&s?f===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!d||e==="series"&&c)){var h=n.getViewOfSeriesModel(u);if(h.group.traverse(function(g){g.__highByOuter&&c&&e==="self"||Of(g)}),ze(e))a(u.getData(),e);else if(wt(e))for(var v=Bt(e),p=0;p<v.length;p++)a(u.getData(v[p]),e[v[p]]);l.push(u),Af(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function Rf(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(n){Af(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){Of(a)})}}}function o9(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(!i){process.env.NODE_ENV!=="production"&&Wt("Unknown dataType "+e.dataType);return}var a=sa(i,e);a=(gt(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=Jt(o);Bf(n,u.focus,u.blurScope,r)}else{var c=t.get(["emphasis","focus"]),f=t.get(["emphasis","blurScope"]);c!=null&&Bf(n,c,f,r)}}function $f(t,e,r,n){var i={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return i;var a=n.getModel().getComponent(t,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(process.env.NODE_ENV!=="production"&&!da(s[u])&&Wt("param should be highDownDispatcher"),Jt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function s9(t,e,r){process.env.NODE_ENV!=="production"&&!da(t)&&Wt("param should be highDownDispatcher");var n=Jt(t),i=$f(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&Rf(n.componentMainType,n.componentIndex,r),$(a,function(s){return m1(s,e)})):(Bf(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&Rf(n.componentMainType,n.componentIndex,r),m1(t,e))}function l9(t,e,r){process.env.NODE_ENV!=="production"&&!da(t)&&Wt("param should be highDownDispatcher"),w1(r);var n=Jt(t),i=$f(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?$(i,function(a){return y1(a,e)}):y1(t,e)}function u9(t,e,r){if(zf(e)){var n=e.dataType,i=t.getData(n),a=sa(i,e);gt(a)||(a=[a]),t[e.type===xl?"toggleSelect":e.type===Sl?"select":"unselect"](a,n)}}function T1(t){var e=t.getAllData();$(e,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){t.isSelected(o,i)?b1(a):S1(a)})})}function c9(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();$(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Vf(t,e,r){M1(t,!0),en(t,i9),h9(t,e,r)}function f9(t){M1(t,!1)}function fa(t,e,r,n){n?f9(t):Vf(t,e,r)}function h9(t,e,r){var n=Jt(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var L1=["emphasis","blur","select"],d9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ha(t,e,r,n){r=r||"itemStyle";for(var i=0;i<L1.length;i++){var a=L1[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=o[d9[r]]()}}function M1(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function da(t){return!!(t&&t.__highDownDispatcher)}function v9(t){var e=c1[t];return e==null&&u1<=32&&(e=c1[t]=u1++),e}function zf(t){var e=t.type;return e===Sl||e===Nf||e===xl}function C1(t){var e=t.type;return e===gi||e===bl}function p9(t){var e=f1(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var va=Mn.CMD,g9=[[],[],[]],E1=Math.sqrt,m9=Math.atan2;function y9(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,l,u,c=va.M,f=va.C,d=va.L,h=va.R,v=va.A,p=va.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case c:a=1;break;case d:a=1;break;case f:a=3;break;case p:a=2;break;case v:var g=e[4],m=e[5],y=E1(e[0]*e[0]+e[1]*e[1]),_=E1(e[2]*e[2]+e[3]*e[3]),b=m9(-e[1]/_,e[0]/y);r[o]*=y,r[o++]+=g,r[o]*=_,r[o++]+=m,r[o++]*=y,r[o++]*=_,r[o++]+=b,r[o++]+=b,o+=2,s=o;break;case h:u[0]=r[o++],u[1]=r[o++],ir(u,u,e),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],ir(u,u,e),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<a;l++){var x=g9[l];x[0]=r[o++],x[1]=r[o++],ir(x,x,e),r[s++]=x[0],r[s++]=x[1]}}t.increaseVersion()}}var Ff=Math.sqrt,Ml=Math.sin,Cl=Math.cos,mo=Math.PI;function D1(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Hf(t,e){return(t[0]*e[0]+t[1]*e[1])/(D1(t)*D1(e))}function A1(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Hf(t,e))}function P1(t,e,r,n,i,a,o,s,l,u,c){var f=l*(mo/180),d=Cl(f)*(t-r)/2+Ml(f)*(e-n)/2,h=-1*Ml(f)*(t-r)/2+Cl(f)*(e-n)/2,v=d*d/(o*o)+h*h/(s*s);v>1&&(o*=Ff(v),s*=Ff(v));var p=(i===a?-1:1)*Ff((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=p*o*h/s,m=p*-s*d/o,y=(t+r)/2+Cl(f)*g-Ml(f)*m,_=(e+n)/2+Ml(f)*g+Cl(f)*m,b=A1([1,0],[(d-g)/o,(h-m)/s]),x=[(d-g)/o,(h-m)/s],S=[(-1*d-g)/o,(-1*h-m)/s],w=A1(x,S);if(Hf(x,S)<=-1&&(w=mo),Hf(x,S)>=1&&(w=0),w<0){var T=Math.round(w/mo*1e6)/1e6;w=mo*2+T%2*mo}c.addData(u,y,_,o,s,b,w,f,a)}var _9=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,b9=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function S9(t){var e=new Mn;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=Mn.CMD,l=t.match(_9);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(b9)||[],v=h.length,p=0;p<v;p++)h[p]=parseFloat(h[p]);for(var g=0;g<v;){var m=void 0,y=void 0,_=void 0,b=void 0,x=void 0,S=void 0,w=void 0,T=r,L=n,C=void 0,M=void 0;switch(f){case"l":r+=h[g++],n+=h[g++],d=s.L,e.addData(d,r,n);break;case"L":r=h[g++],n=h[g++],d=s.L,e.addData(d,r,n);break;case"m":r+=h[g++],n+=h[g++],d=s.M,e.addData(d,r,n),i=r,a=n,f="l";break;case"M":r=h[g++],n=h[g++],d=s.M,e.addData(d,r,n),i=r,a=n,f="L";break;case"h":r+=h[g++],d=s.L,e.addData(d,r,n);break;case"H":r=h[g++],d=s.L,e.addData(d,r,n);break;case"v":n+=h[g++],d=s.L,e.addData(d,r,n);break;case"V":n=h[g++],d=s.L,e.addData(d,r,n);break;case"C":d=s.C,e.addData(d,h[g++],h[g++],h[g++],h[g++],h[g++],h[g++]),r=h[g-2],n=h[g-1];break;case"c":d=s.C,e.addData(d,h[g++]+r,h[g++]+n,h[g++]+r,h[g++]+n,h[g++]+r,h[g++]+n),r+=h[g-2],n+=h[g-1];break;case"S":m=r,y=n,C=e.len(),M=e.data,o===s.C&&(m+=r-M[C-4],y+=n-M[C-3]),d=s.C,T=h[g++],L=h[g++],r=h[g++],n=h[g++],e.addData(d,m,y,T,L,r,n);break;case"s":m=r,y=n,C=e.len(),M=e.data,o===s.C&&(m+=r-M[C-4],y+=n-M[C-3]),d=s.C,T=r+h[g++],L=n+h[g++],r+=h[g++],n+=h[g++],e.addData(d,m,y,T,L,r,n);break;case"Q":T=h[g++],L=h[g++],r=h[g++],n=h[g++],d=s.Q,e.addData(d,T,L,r,n);break;case"q":T=h[g++]+r,L=h[g++]+n,r+=h[g++],n+=h[g++],d=s.Q,e.addData(d,T,L,r,n);break;case"T":m=r,y=n,C=e.len(),M=e.data,o===s.Q&&(m+=r-M[C-4],y+=n-M[C-3]),r=h[g++],n=h[g++],d=s.Q,e.addData(d,m,y,r,n);break;case"t":m=r,y=n,C=e.len(),M=e.data,o===s.Q&&(m+=r-M[C-4],y+=n-M[C-3]),r+=h[g++],n+=h[g++],d=s.Q,e.addData(d,m,y,r,n);break;case"A":_=h[g++],b=h[g++],x=h[g++],S=h[g++],w=h[g++],T=r,L=n,r=h[g++],n=h[g++],d=s.A,P1(T,L,r,n,S,w,_,b,x,d,e);break;case"a":_=h[g++],b=h[g++],x=h[g++],S=h[g++],w=h[g++],T=r,L=n,r+=h[g++],n+=h[g++],d=s.A,P1(T,L,r,n,S,w,_,b,x,d,e);break}}(f==="z"||f==="Z")&&(d=s.Z,e.addData(d),r=i,n=a),o=d}return e.toStatic(),e}var N1=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(Vt);function k1(t){return t.setData!=null}function O1(t,e){var r=S9(t),n=rt({},e);return n.buildPath=function(i){var a=k1(i);if(a&&i.canSave()){i.appendPath(r);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&r.rebuildPath(o,1)}},n.applyTransform=function(i){y9(r,i),this.dirtyShape()},n}function x9(t,e){return new N1(O1(t,e))}function w9(t,e){var r=O1(t,e),n=function(i){st(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(N1);return n}function T9(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var a=t[i];r.push(a.getUpdatedPathProxy(!0))}var o=new Vt(e);return o.createPathProxy(),o.buildPath=function(s){if(k1(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var L9=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),yo=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new L9},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(Vt);yo.prototype.type="circle";var M9=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),Gf=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new M9},e.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),r.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),r.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),r.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),r.closePath()},e}(Vt);Gf.prototype.type="ellipse";var I1=Math.PI,Wf=I1*2,mi=Math.sin,pa=Math.cos,C9=Math.acos,Ee=Math.atan2,B1=Math.abs,_o=Math.sqrt,bo=Math.max,Wr=Math.min,Lr=1e-4;function E9(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,f=s-a,d=f*l-c*u;if(!(d*d<Lr))return d=(c*(e-a)-f*(t-i))/d,[t+d*l,e+d*u]}function El(t,e,r,n,i,a,o){var s=t-r,l=e-n,u=(o?a:-a)/_o(s*s+l*l),c=u*l,f=-u*s,d=t+c,h=e+f,v=r+c,p=n+f,g=(d+v)/2,m=(h+p)/2,y=v-d,_=p-h,b=y*y+_*_,x=i-a,S=d*p-v*h,w=(_<0?-1:1)*_o(bo(0,x*x*b-S*S)),T=(S*_-y*w)/b,L=(-S*y-_*w)/b,C=(S*_+y*w)/b,M=(-S*y+_*w)/b,A=T-g,E=L-m,P=C-g,B=M-m;return A*A+E*E>P*P+B*B&&(T=C,L=M),{cx:T,cy:L,x0:-c,y0:-f,x1:T*(i/x-1),y1:L*(i/x-1)}}function D9(t){var e;if(gt(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function A9(t,e){var r,n=bo(e.r,0),i=bo(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,d=!!e.clockwise,h=B1(u-l),v=h>Wf&&h%Wf;if(v>Lr&&(h=v),!(n>Lr))t.moveTo(c,f);else if(h>Wf-Lr)t.moveTo(c+n*pa(l),f+n*mi(l)),t.arc(c,f,n,l,u,!d),i>Lr&&(t.moveTo(c+i*pa(u),f+i*mi(u)),t.arc(c,f,i,u,l,d));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,x=void 0,S=void 0,w=void 0,T=void 0,L=void 0,C=void 0,M=void 0,A=void 0,E=void 0,P=void 0,B=n*pa(l),k=n*mi(l),N=i*pa(u),z=i*mi(u),R=h>Lr;if(R){var V=e.cornerRadius;V&&(r=D9(V),p=r[0],g=r[1],m=r[2],y=r[3]);var I=B1(n-i)/2;if(_=Wr(I,m),b=Wr(I,y),x=Wr(I,p),S=Wr(I,g),L=w=bo(_,b),C=T=bo(x,S),(w>Lr||T>Lr)&&(M=n*pa(u),A=n*mi(u),E=i*pa(l),P=i*mi(l),h<I1)){var H=E9(B,k,E,P,M,A,N,z);if(H){var G=B-H[0],X=k-H[1],J=M-H[0],ct=A-H[1],vt=1/mi(C9((G*J+X*ct)/(_o(G*G+X*X)*_o(J*J+ct*ct)))/2),U=_o(H[0]*H[0]+H[1]*H[1]);L=Wr(w,(n-U)/(vt+1)),C=Wr(T,(i-U)/(vt-1))}}}if(!R)t.moveTo(c+B,f+k);else if(L>Lr){var Y=Wr(m,L),tt=Wr(y,L),j=El(E,P,B,k,n,Y,d),nt=El(M,A,N,z,n,tt,d);t.moveTo(c+j.cx+j.x0,f+j.cy+j.y0),L<w&&Y===tt?t.arc(c+j.cx,f+j.cy,L,Ee(j.y0,j.x0),Ee(nt.y0,nt.x0),!d):(Y>0&&t.arc(c+j.cx,f+j.cy,Y,Ee(j.y0,j.x0),Ee(j.y1,j.x1),!d),t.arc(c,f,n,Ee(j.cy+j.y1,j.cx+j.x1),Ee(nt.cy+nt.y1,nt.cx+nt.x1),!d),tt>0&&t.arc(c+nt.cx,f+nt.cy,tt,Ee(nt.y1,nt.x1),Ee(nt.y0,nt.x0),!d))}else t.moveTo(c+B,f+k),t.arc(c,f,n,l,u,!d);if(!(i>Lr)||!R)t.lineTo(c+N,f+z);else if(C>Lr){var Y=Wr(p,C),tt=Wr(g,C),j=El(N,z,M,A,i,-tt,d),nt=El(B,k,E,P,i,-Y,d);t.lineTo(c+j.cx+j.x0,f+j.cy+j.y0),C<T&&Y===tt?t.arc(c+j.cx,f+j.cy,C,Ee(j.y0,j.x0),Ee(nt.y0,nt.x0),!d):(tt>0&&t.arc(c+j.cx,f+j.cy,tt,Ee(j.y0,j.x0),Ee(j.y1,j.x1),!d),t.arc(c,f,i,Ee(j.cy+j.y1,j.cx+j.x1),Ee(nt.cy+nt.y1,nt.cx+nt.x1),d),Y>0&&t.arc(c+nt.cx,f+nt.cy,Y,Ee(nt.y1,nt.x1),Ee(nt.y0,nt.x0),!d))}else t.lineTo(c+N,f+z),t.arc(c,f,i,u,l,d)}t.closePath()}}}var P9=function(){function t(){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 t}(),En=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new P9},e.prototype.buildPath=function(r,n){A9(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Vt);En.prototype.type="sector";var N9=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Dl=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new N9},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Vt);Dl.prototype.type="ring";function k9(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=t.length;d<h;d++)Zi(c,c,t[d]),qi(f,f,t[d]);Zi(c,c,n[0]),qi(f,f,n[1])}for(var d=0,h=t.length;d<h;d++){var v=t[d];if(r)l=t[d?d-1:h-1],u=t[(d+1)%h];else if(d===0||d===h-1){i.push(J3(t[d]));continue}else l=t[d-1],u=t[d+1];t7(a,u,l),sc(a,a,e);var p=lc(v,l),g=lc(v,u),m=p+g;m!==0&&(p/=m,g/=m),sc(o,a,-p),sc(s,a,g);var y=hv([],v,o),_=hv([],v,s);n&&(qi(y,y,c),Zi(y,y,f),qi(_,_,c),Zi(_,_,f)),i.push(y),i.push(_)}return r&&i.push(i.shift()),i}function R1(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=k9(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)t.lineTo(i[s][0],i[s][1])}r&&t.closePath()}}var O9=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),So=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new O9},e.prototype.buildPath=function(r,n){R1(r,n,!0)},e}(Vt);So.prototype.type="polygon";var I9=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),yi=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new I9},e.prototype.buildPath=function(r,n){R1(r,n,!1)},e}(Vt);yi.prototype.type="polyline";var B9={},R9=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Dn=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new R9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=jp(B9,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(r.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),r.lineTo(o,s))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(Vt);Dn.prototype.type="line";var He=[],$9=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function $1(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?Iv:_e)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?Iv:_e)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?Rv:Fe)(t.x1,t.cpx1,t.x2,e),(r?Rv:Fe)(t.y1,t.cpy1,t.y2,e)]}var Xf=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $9},e.prototype.buildPath=function(r,n){var i=n.x1,a=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&&(r.moveTo(i,a),c==null||f==null?(d<1&&(zs(i,l,o,d,He),l=He[1],o=He[2],zs(a,u,s,d,He),u=He[1],s=He[2]),r.quadraticCurveTo(l,u,o,s)):(d<1&&(Vs(i,l,c,o,d,He),l=He[1],c=He[2],o=He[3],Vs(a,u,f,s,d,He),u=He[1],f=He[2],s=He[3]),r.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(r){return $1(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=$1(this.shape,r,!0);return n7(n,n)},e}(Vt);Xf.prototype.type="bezier-curve";var V9=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Al=function(t){st(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new V9},e.prototype.buildPath=function(r,n){var i=n.cx,a=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);r.moveTo(c*o+i,f*o+a),r.arc(i,a,o,s,l,!u)},e}(Vt);Al.prototype.type="arc";var z9=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Vt.prototype.getBoundingRect.call(this)},e}(Vt);const V1=z9;var z1=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),F1=function(t){st(e,t);function e(r,n,i,a,o,s){var l=t.call(this,o)||this;return l.x=r??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return e}(z1),F9=function(t){st(e,t);function e(r,n,i,a,o){var s=t.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(z1);const H9=F9;var Yf=Math.min,G9=Math.max,Pl=Math.abs,_i=[0,0],bi=[0,0],ge=xv(),Nl=ge.minTv,kl=ge.maxTv,W9=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Mt;for(var n=0;n<2;n++)this._axes[n]=new Mt;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),r)for(var u=0;u<4;u++)n[u].transform(r);Mt.sub(i[0],n[1],n[0]),Mt.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},t.prototype.intersect=function(e,r,n){var i=!0,a=!r;return r&&Mt.set(r,0,0),ge.reset(n,!a),!this._intersectCheckOneSide(this,e,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(e,this,a,-1)&&(i=!1,a)||!a&&!ge.negativeSize&&Mt.copy(r,i?ge.useDir?ge.dirMinTv:Nl:kl),i},t.prototype._intersectCheckOneSide=function(e,r,n,i){for(var a=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,_i),e._getProjMinMaxOnAxis(o,r._corners,bi),ge.negativeSize||_i[1]<bi[0]||_i[0]>bi[1]){if(a=!1,ge.negativeSize||n)return a;var l=Pl(bi[0]-_i[1]),u=Pl(_i[0]-bi[1]);Yf(l,u)>kl.len()&&(l<u?Mt.scale(kl,s,-l*i):Mt.scale(kl,s,u*i))}else if(!n){var l=Pl(bi[0]-_i[1]),u=Pl(_i[0]-bi[1]);(ge.useDir||Yf(l,u)<Nl.len())&&((l<u||!ge.bidirectional)&&(Mt.scale(Nl,s,l*i),ge.useDir&&ge.calcDirMTV()),(l>=u||!ge.bidirectional)&&(Mt.scale(Nl,s,-u*i),ge.useDir&&ge.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u<r.length;u++){var c=r[u].dot(i)+a[e];s=Yf(c,s),l=G9(c,l)}n[0]=s+ge.touchThreshold,n[1]=l-ge.touchThreshold,ge.negativeSize=n[1]<n[0]},t}();const H1=W9;var X9=[],Y9=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.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(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Nt(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(X9)),r.union(a)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},e}(ho);const U9=Y9;var Z9=ae();function q9(t,e,r,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=t==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=mt(n.duration,200),c=mt(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),Lt(f)&&(f=f(r,i)),Lt(u)&&(u=u(r));var d={duration:u||0,delay:f,easing:c};return d}else return null}function Uf(t,e,r,n,i,a,o){var s=!1,l;Lt(i)?(o=a,a=i,i=null):wt(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=t==="leave";u||e.stopAnimation("leave");var c=q9(t,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):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:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,v):e.animateTo(r,v)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function De(t,e,r,n,i,a){Uf("update",t,e,r,n,i,a)}function Ge(t,e,r,n,i,a){Uf("enter",t,e,r,n,i,a)}function xo(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function Ol(t,e,r,n,i,a){xo(t)||Uf("leave",t,e,r,n,i,a)}function G1(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),Ol(t,{style:{opacity:0}},e,r,n)}function wo(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||G1(i,e,r,n)}):G1(t,e,r,n)}function To(t){Z9(t).oldStyle=t.style}var Zf={},An=["x","y"],ga=["width","height"];function j9(t){return Vt.extend(t)}var Q9=w9;function K9(t,e){return Q9(t,e)}function Mr(t,e){Zf[t]=e}function J9(t){if(Zf.hasOwnProperty(t))return Zf[t]}function qf(t,e,r,n){var i=x9(t,e);return r&&(n==="center"&&(r=X1(r,i.getBoundingRect())),Y1(i,r)),i}function W1(t,e,r){var n=new Tr({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(X1(e,a))}}});return n}function X1(t,e){var r=e.width/e.height,n=t.height*r,i;n<=t.width?i=t.height:(n=t.width,i=n/r);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var jf=T9;function Y1(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function Lo(t,e){return jp(t,t,{lineWidth:e}),t}function tb(t,e){return Qp(t,t,e),t}var eb=pi;function rb(t,e){for(var r=gc([]);t&&t!==e;)Ya(r,t.getLocalTransform(),r),t=t.parent;return r}function U1(t,e,r){return e&&!ze(e)&&(e=jc.getLocalTransform(e)),r&&(e=Ua([],e)),ir([],t,e)}function nb(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:Rr(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Rr(2*e[4]/e[2]),a=[t==="left"?-n:t==="right"?n:0,t==="top"?-i:t==="bottom"?i:0];return a=U1(a,e,r),Rr(a[0])>Rr(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Z1(t){return!t.isGroup}function ib(t){return t.shape!=null}function q1(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){Z1(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return ib(o)&&(s.shape=Ot(o.shape)),s}var a=n(t);e.traverse(function(o){if(Z1(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),De(o,l,r,Jt(o).dataIndex)}}})}function ab(t,e){return dt(t,function(r){var n=r[0];n=je(n,e.x),n=so(n,e.x+e.width);var i=r[1];return i=je(i,e.y),i=so(i,e.y+e.height),[n,i]})}function ob(t,e){var r=je(t.x,e.x),n=so(t.x+t.width,e.x+e.width),i=je(t.y,e.y),a=so(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function j1(t,e,r){var n=rt({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),It(i,r),new Tr(n)):qf(t.replace("path://",""),n,r,"center")}function sb(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Q1(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Q1(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,f=s-a,d=Qf(c,f,l,u);if(lb(d))return!1;var h=t-i,v=e-a,p=Qf(h,v,l,u)/d;if(p<0||p>1)return!1;var g=Qf(h,v,c,f)/d;return!(g<0||g>1)}function Qf(t,e,r,n){return t*n-r*e}function lb(t){return t<=1e-6&&t>=-1e-6}function Il(t,e,r,n,i){return e==null||(jt(e)?te[0]=te[1]=te[2]=te[3]=e:(process.env.NODE_ENV!=="production"&&bt(e.length===4),te[0]=e[0],te[1]=e[1],te[2]=e[2],te[3]=e[3]),n&&(te[0]=je(0,te[0]),te[1]=je(0,te[1]),te[2]=je(0,te[2]),te[3]=je(0,te[3])),r&&(te[0]=-te[0],te[1]=-te[1],te[2]=-te[2],te[3]=-te[3]),K1(t,te,"x","width",3,1,i&&i[0]||0),K1(t,te,"y","height",0,2,i&&i[1]||0)),t}var te=[0,0,0,0];function K1(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=je(0,so(o,l)),t[n]<o?(t[n]=o,t[r]+=e[i]>=0?-e[i]:e[a]>=0?l+e[a]:Rr(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function Bl(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=xt(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&$(Bt(l),function(c){Nr(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Jt(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:It({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Kf(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Rl(t,e){if(t)if(gt(t))for(var r=0;r<t.length;r++)Kf(t[r],e);else Kf(t,e)}function Jf(t){return!t||Rr(t[1])<$l&&Rr(t[2])<$l||Rr(t[0])<$l&&Rr(t[3])<$l}var $l=1e-5;function Mo(t,e){return t?Nt.copy(t,e):e.clone()}function th(t,e){return e?mv(t||yn(),e):void 0}function J1(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function ub(t){var e=-1/0,r=1/0;Kf(t,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>e&&(e=o),o<r&&(r=o)}}return r>e&&(r=e=0),{min:r,max:e}}function tg(t,e,r){eg(t,e,r,-1/0)}function eg(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l<s.length;l++)n=je(eg(s[l],e,r,n),n);else t.z=e,t.zlevel=r,n=je(t.z2||0,n);if(i&&(i.z=e,i.zlevel=r,isFinite(n)&&(i.z2=n+2)),a){var u=t.textGuideLineConfig;a.z=e,a.zlevel=r,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}Mr("circle",yo),Mr("ellipse",Gf),Mr("sector",En),Mr("ring",Dl),Mr("polygon",So),Mr("polyline",yi),Mr("rect",ue),Mr("line",Dn),Mr("bezierCurve",Xf),Mr("arc",Al);const cb=Object.freeze(Object.defineProperty({__proto__:null,Arc:Al,BezierCurve:Xf,BoundingRect:Nt,Circle:yo,CompoundPath:V1,Ellipse:Gf,Group:le,Image:Tr,IncrementalDisplayable:U9,Line:Dn,LinearGradient:F1,OrientedBoundingRect:H1,Path:Vt,Point:Mt,Polygon:So,Polyline:yi,RadialGradient:H9,Rect:ue,Ring:Dl,Sector:En,Text:Ke,WH:ga,XY:An,applyTransform:U1,calcZ2Range:ub,clipPointsByRect:ab,clipRectByRect:ob,createIcon:j1,ensureCopyRect:Mo,ensureCopyTransform:th,expandOrShrinkRect:Il,extendPath:K9,extendShape:j9,getShapeClass:J9,getTransform:rb,groupTransition:q1,initProps:Ge,isBoundingRectAxisAligned:Jf,isElementRemoved:xo,lineLineIntersect:Q1,linePolygonIntersect:sb,makeImage:W1,makePath:qf,mergePath:jf,registerShape:Mr,removeElement:Ol,removeElementWithFadeOut:wo,resizePath:Y1,retrieveZInfo:J1,setTooltipConfig:Bl,subPixelOptimize:eb,subPixelOptimizeLine:Lo,subPixelOptimizeRect:tb,transformDirection:nb,traverseElements:Rl,traverseUpdateZ:tg,updateProps:De},Symbol.toStringTag,{value:"Module"}));var Vl={};function fb(t,e){for(var r=0;r<fr.length;r++){var n=fr[r],i=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=i}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function rg(t,e,r){var n=t.labelFetcher,i=t.labelDataIndex,a=t.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=Lt(t.defaultText)?t.defaultText(i,t,r):t.defaultText);for(var l={normal:s},u=0;u<fr.length;u++){var c=fr[u],f=e[c];l[c]=mt(n?n.getFormattedLabel(i,c,null,a,f&&f.get("formatter")):null,s)}return l}function ma(t,e,r,n){r=r||Vl;for(var i=t instanceof Ke,a=!1,o=0;o<_l.length;o++){var s=e[_l[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?t:t.getTextContent();if(a){i||(l||(l=new Ke,t.setTextContent(l)),t.stateProxy&&(l.stateProxy=t.stateProxy));var u=rg(r,e),c=e.normal,f=!!c.getShallow("show"),d=Co(c,n&&n.normal,r,!1,!i);d.text=u.normal,i||t.setTextConfig(ng(c,r,!1));for(var o=0;o<fr.length;o++){var h=fr[o],s=e[h];if(s){var v=l.ensureState(h),p=!!mt(s.getShallow("show"),f);if(p!==f&&(v.ignore=!p),v.style=Co(s,n&&n[h],r,!0,!i),v.style.text=u[h],!i){var g=t.ensureState(h);g.textConfig=ng(s,r,!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(),r.enableTextSetter&&(zl(l).setLabelText=function(m){var y=rg(r,e,m);fb(l,y)})}else l&&(l.ignore=!0);t.dirty()}function ya(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<fr.length;n++){var i=fr[n];r[i]=t.getModel([i,e])}return r}function Co(t,e,r,n,i){var a={};return hb(a,t,r,n,i),e&&rt(a,e),a}function ng(t,e,r){e=e||{};var n={},i,a=t.getShallow("rotate"),o=mt(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return i=t.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function hb(t,e,r,n,i){r=r||Vl;var a=e.ecModel,o=a&&a.option.textStyle,s=db(e),l;if(s){l={};var u="richInheritPlainLabel",c=mt(e.get(u),a?a.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var d=e.getModel(["rich",f]);sg(l[f]={},d,o,e,c,r,n,i,!1,!0)}}l&&(t.rich=l);var h=e.get("overflow");h&&(t.overflow=h);var v=e.get("lineOverflow");v&&(t.lineOverflow=v);var p=t,g=e.get("minMargin");if(g!=null)g=jt(g)?g/2:0,p.margin=[g,g,g,g],p.__marginType=_a.minMargin;else{var m=e.get("textMargin");m!=null&&(p.margin=ac(m),p.__marginType=_a.textMargin)}sg(t,e,o,null,null,r,n,i,!0,!1)}function db(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Vl).rich;if(r){e=e||{};for(var n=Bt(r),i=0;i<n.length;i++){var a=n[i];e[a]=1}}t=t.parentModel}return e}var ig=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ag=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],og=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function sg(t,e,r,n,i,a,o,s,l,u){r=!o&&r||Vl;var c=a&&a.inheritColor,f=e.getShallow("color"),d=e.getShallow("textBorderColor"),h=mt(e.getShallow("opacity"),r.opacity);(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&he("color: 'auto'","color: 'inherit'"),c?f=c:f=null),(d==="inherit"||d==="auto")&&(process.env.NODE_ENV!=="production"&&d==="auto"&&he("color: 'auto'","color: 'inherit'"),c?d=c:d=null),s||(f=f||r.color,d=d||r.textBorderColor),f!=null&&(t.fill=f),d!=null&&(t.stroke=d);var v=mt(e.getShallow("textBorderWidth"),r.textBorderWidth);v!=null&&(t.lineWidth=v);var p=mt(e.getShallow("textBorderType"),r.textBorderType);p!=null&&(t.lineDash=p);var g=mt(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);g!=null&&(t.lineDashOffset=g),!o&&h==null&&!u&&(h=a&&a.defaultOpacity),h!=null&&(t.opacity=h),!o&&!s&&t.fill==null&&a.inheritColor&&(t.fill=a.inheritColor);for(var m=0;m<ig.length;m++){var y=ig[m],_=i!==!1&&n?qr(e.getShallow(y),n.getShallow(y),r[y]):mt(e.getShallow(y),r[y]);_!=null&&(t[y]=_)}for(var m=0;m<ag.length;m++){var y=ag[m],_=e.getShallow(y);_!=null&&(t[y]=_)}if(t.verticalAlign==null){var b=e.getShallow("baseline");b!=null&&(t.verticalAlign=b)}if(!l||!a.disableBox){for(var m=0;m<og.length;m++){var y=og[m],_=e.getShallow(y);_!=null&&(t[y]=_)}var x=e.getShallow("borderType");x!=null&&(t.borderDash=x),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&c&&(process.env.NODE_ENV!=="production"&&t.backgroundColor==="auto"&&he("backgroundColor: 'auto'","backgroundColor: 'inherit'"),t.backgroundColor=c),(t.borderColor==="auto"||t.borderColor==="inherit")&&c&&(process.env.NODE_ENV!=="production"&&t.borderColor==="auto"&&he("borderColor: 'auto'","borderColor: 'inherit'"),t.borderColor=c)}}function vb(t,e){var r=e&&e.getModel("textStyle");return mn([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var zl=ae();function pb(t,e,r,n){if(t){var i=zl(t);i.prevValue=i.value,i.value=r;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}var _a={minMargin:1,textMargin:2},gb=["textStyle","color"],eh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],rh=new Ke,mb=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(gb):null)},t.prototype.getFont=function(){return vb({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<eh.length;n++)r[eh[n]]=this.getShallow(eh[n]);return rh.useStyle(r),rh.update(),rh.getBoundingRect()},t}(),lg=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],yb=fo(lg),_b=function(){function t(){}return t.prototype.getLineStyle=function(e){return yb(this,e)},t}(),ug=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],bb=fo(ug),Sb=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return bb(this,e,r)},t}(),de=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){},t.prototype.mergeOption=function(e,r){Zt(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,i=n==null?n:n[e];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},t.prototype.getModel=function(e,r){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new t(a,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(Ot(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Ht.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();ff(de),n8(de),br(de,_b),br(de,Sb),br(de,l8),br(de,mb);var xb=Math.round(Math.random()*10);function Fl(t){return[t||"",xb++].join("_")}function wb(t){var e={};t.registerSubTypeDefaulter=function(r,n){var i=Vr(r);e[i.main]=n},t.determineSubType=function(r,n){var i=n.type;if(!i){var a=Vr(r).main;t.hasSubTypes(r)&&e[a]&&(i=e[a](n))}return i}}function Tb(t,e){t.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),c=u.graph,f=u.noEntryList,d={};for($(a,function(y){d[y]=!0});f.length;){var h=f.pop(),v=c[h],p=!!d[h];p&&(s.call(l,h,v.originalDeps.slice()),delete d[h]),$(v.successor,p?m:g)}$(d,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=sf("Circular dependency may exists: ",d,a,o)),new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function m(y){d[y]=!0,g(y)}};function r(a){var o={},s=[];return $(a,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=i(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),$(f,function(d){qt(u.predecessor,d)<0&&u.predecessor.push(d);var h=n(o,d);qt(h.successor,d)<0&&h.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return $(a,function(l){qt(o,l)>=0&&s.push(l)}),s}}function cg(t,e){return Zt(Zt({},t,!0),e,!0)}const Lb={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:". "}}}},Mb={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 Hl="ZH",nh="EN",ba=nh,Gl={},ih={},fg=Ht.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ba).toUpperCase();return t.indexOf(Hl)>-1?Hl:ba}():ba;function hg(t,e){t=t.toUpperCase(),ih[t]=new de(e),Gl[t]=e}function Cb(t){if(xt(t)){var e=Gl[t.toUpperCase()]||{};return t===Hl||t===nh?Ot(e):Zt(Ot(e),Ot(Gl[ba]),!1)}else return Zt(Ot(t),Ot(Gl[ba]),!1)}function Eb(t){return ih[t]}function Db(){return ih[ba]}hg(nh,Lb),hg(Hl,Mb);var Ab=null;function Wl(){return Ab}var ah=1e3,oh=ah*60,Eo=oh*60,hr=Eo*24,dg=hr*365,Pb={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})/},Xl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Nb="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Yl="{yyyy}-{MM}-{dd}",vg={year:"{yyyy}",month:"{yyyy}-{MM}",day:Yl,hour:Yl+" "+Xl.hour,minute:Yl+" "+Xl.minute,second:Yl+" "+Xl.second,millisecond:Nb},Si=["year","month","day","hour","minute","second","millisecond"],kb=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ob(t){return!xt(t)&&!Lt(t)?Ib(t):t}function Ib(t){t=t||{};var e={},r=!0;return $(Si,function(n){r&&(r=t[n]==null)}),$(Si,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Si[s],u=wt(a)&&!gt(a)?a[l]:a,c=void 0;gt(u)?(c=u.slice(),o=c[0]||""):xt(u)?(o=u,c=[o]):(o==null?o=Xl[n]:Pb[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Pn(t,e){return t+="","0000".substr(0,e-t.length)+t}function Do(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Bb(t){return t===Do(t)}function Rb(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function pg(t,e,r,n){var i=lo(t),a=i[gg(r)](),o=i[lh(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[uh(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[ch(r)](),f=(c-1)%12+1,d=i[fh(r)](),h=i[hh(r)](),v=i[dh(r)](),p=c>=12?"pm":"am",g=p.toUpperCase(),m=n instanceof de?n:Eb(n||fg)||Db(),y=m.getModel("time"),_=y.get("month"),b=y.get("monthAbbr"),x=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Pn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Pn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Pn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Pn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Pn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Pn(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,Pn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Pn(v,3)).replace(/{S}/g,v+"")}function $b(t,e,r,n,i){var a=null;if(xt(r))a=r;else if(Lt(r)){var o={time:t.time,level:t.time.level},s=Wl();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Ul(t.value,i);a=r[c][c][0]}}return pg(new Date(t.value),a,i,n)}function Ul(t,e){var r=lo(t),n=r[lh(e)]()+1,i=r[uh(e)](),a=r[ch(e)](),o=r[fh(e)](),s=r[hh(e)](),l=r[dh(e)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&a===0,h=d&&i===1,v=h&&n===1;return v?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function sh(t,e,r){switch(e){case"year":t[mg(r)](0);case"month":t[yg(r)](1);case"day":t[_g(r)](0);case"hour":t[bg(r)](0);case"minute":t[Sg(r)](0);case"second":t[xg(r)](0)}return t}function gg(t){return t?"getUTCFullYear":"getFullYear"}function lh(t){return t?"getUTCMonth":"getMonth"}function uh(t){return t?"getUTCDate":"getDate"}function ch(t){return t?"getUTCHours":"getHours"}function fh(t){return t?"getUTCMinutes":"getMinutes"}function hh(t){return t?"getUTCSeconds":"getSeconds"}function dh(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Vb(t){return t?"setUTCFullYear":"setFullYear"}function mg(t){return t?"setUTCMonth":"setMonth"}function yg(t){return t?"setUTCDate":"setDate"}function _g(t){return t?"setUTCHours":"setHours"}function bg(t){return t?"setUTCMinutes":"setMinutes"}function Sg(t){return t?"setUTCSeconds":"setSeconds"}function xg(t){return t?"setUTCMilliseconds":"setMilliseconds"}function zb(t){if(!_p(t))return xt(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}var wg=ac,Tg=["a","b","c","d","e","f","g"],vh=function(t,e){return"{"+t+(e??"")+"}"};function Fb(t,e,r){gt(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=Tg[a];t=t.replace(vh(o),vh(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(vh(Tg[l],s),u)}return t}function ph(t,e){return e=e||"transparent",xt(t)?t:wt(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}var Zl={},gh={},mh=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(Zl,!0),this._normalMasterList=n(gh,!1);function n(i,a){var o=[];return $(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[]),process.env.NODE_ENV!=="production"&&a&&$(u,function(c){return bt(!c.update)})}),o}},t.prototype.update=function(e,r){$(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){Zl[e]=r;return}gh[e]=r},t.get=function(e){return gh[e]||Zl[e]},t}();function Hb(t){return!!Zl[t]}var yh={coord:1,coord2:2};function Gb(t){process.env.NODE_ENV!=="production"&&bt(!_h.get(t.fullType)),_h.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var _h=Pt();function Wb(t){var e=t.getShallow("coord",!0),r=yh.coord;if(e==null){var n=_h.get(t.type);n&&n.getCoord2&&(r=yh.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var rn={none:0,dataCoordSys:1,boxCoordSys:2};function Xb(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=n!=null,a=rn.none;if(r){var o=t.mainType==="series";n==null&&(n=o?"data":"box"),n==="data"?(a=rn.dataCoordSys,o||(process.env.NODE_ENV!=="production"&&i&&e&&Wt('coordinateSystemUsage "data" is not supported in non-series components.'),a=rn.none)):n==="box"&&(a=rn.boxCoordSys,!o&&!Hb(r)&&(process.env.NODE_ENV!=="production"&&i&&e&&Wt('coordinateSystem "'+r+'" cannot be used'+(' as coordinateSystemUsage "box" for "'+t.type+'" yet.')),a=rn.none))}return{coordSysType:r,kind:a}}function Yb(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys,a=t.allowNotFound;process.env.NODE_ENV!=="production"&&bt(!!r);var o=Xb(e,!0),s=o.kind,l=o.coordSysType;if(i&&s!==rn.dataCoordSys&&(s=rn.dataCoordSys,l=r),s===rn.none||l!==r)return!1;var u=n(r,e);return u?(s===rn.dataCoordSys?(process.env.NODE_ENV!=="production"&&bt(e.mainType==="series"),e.coordinateSystem=u):e.boxCoordinateSystem=u,!0):(process.env.NODE_ENV!=="production"&&(a||Wt(r+" cannot be found for"+(" "+e.type+" (index: "+e.componentIndex+")."))),!1)}var ql=$,Ub=["left","right","top","bottom","width","height"],jl=[["width","left","right"],["height","top","bottom"]];function bh(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=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(t==="horizontal"){var p=c.width+(d?-d.x+c.x:0);h=a+p,h>n||l.newline?(a=0,h=p,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(d?-d.y+c.y:0);v=o+g,v>i||l.newline?(a+=s+r,o=0,v=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=h+r:o=v+r)})}var Ao=bh;Ue(bh,"vertical"),Ue(bh,"horizontal");function Zb(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function qb(t,e){var r=Ql(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Po.point)a=r.refPoint,i=Sa(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=gt(o)?o:[o,o];i=Sa(n,r.refContainer),a=r.boxCoordFrom===yh.coord2?r.refPoint:[Kt(s[0],i.width)+i.x,Kt(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function jb(t,e){var r=qb(t,e),n=r.viewRect,i=r.center,a=t.get("radius");gt(a)||(a=[0,a]);var o=Kt(n.width,e.getWidth()),s=Kt(n.height,e.getHeight()),l=Math.min(o,s),u=Kt(a[0],l/2),c=Kt(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function Sa(t,e,r){r=wg(r||0);var n=e.width,i=e.height,a=Kt(t.left,n),o=Kt(t.top,i),s=Kt(t.right,n),l=Kt(t.bottom,i),u=Kt(t.width,n),c=Kt(t.height,i),f=r[2]+r[0],d=r[1]+r[3],h=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(c)&&(c=i-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-d;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new Nt((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return v.margin=r,v}var Po={rect:1,point:2};function Ql(t,e,r){var n,i,a,o=t.boxCoordinateSystem,s;if(o){var l=Wb(t),u=l.coord,c=l.from;if(o.dataToLayout){a=Po.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint?(a=Po.point,s=c,i=o.dataToPoint(u)):process.env.NODE_ENV!=="production"&&Wt(t.type+"["+t.componentIndex+"]"+(" layout based on "+o.type+" is not supported."))}return a==null&&(a=Po.rect),a===Po.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function No(t){var e=t.layoutMode||t.constructor.layoutMode;return wt(e)?e:e?{type:e}:null}function Nn(t,e,r){var n=r&&r.ignoreSize;!gt(n)&&(n=[n,n]);var i=o(jl[0],0),a=o(jl[1],1);l(jl[0],t,i),l(jl[1],t,a);function o(u,c){var f={},d=0,h={},v=0,p=2;if(ql(u,function(y){h[y]=t[y]}),ql(u,function(y){Nr(e,y)&&(f[y]=h[y]=e[y]),s(f,y)&&d++,s(h,y)&&v++}),n[c])return s(e,u[1])?h[u[2]]=null:s(e,u[2])&&(h[u[1]]=null),h;if(v===p||!d)return h;if(d>=p)return f;for(var g=0;g<u.length;g++){var m=u[g];if(!Nr(f,m)&&Nr(t,m)){f[m]=t[m];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){ql(u,function(d){c[d]=f[d]})}}function ko(t){return Qb({},t)}function Qb(t,e){return e&&t&&ql(Ub,function(r){Nr(e,r)&&(t[r]=e[r])}),t}var Kb=ae(),Xt=function(t){st(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.uid=Fl("ec_cpt_model"),a}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=No(this),a=i?ko(r):{},o=n.getTheme();Zt(r,o.get(this.mainType)),Zt(r,this.getDefaultOption()),i&&Nn(r,a,i)},e.prototype.mergeOption=function(r,n){Zt(this.option,r,!0);var i=No(this);i&&Nn(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!t8(r))return r.defaultOption;var n=Kb(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=Zt(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ll(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return Zb(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(de);kp(Xt,de),ul(Xt),wb(Xt),Tb(Xt,Jb);function Jb(t){var e=[];return $(Xt.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=dt(e,function(r){return Vr(r).main}),t!=="dataset"&&qt(e,"dataset")<=0&&e.unshift("dataset"),e}var Ct={color:{},darkColor:{},size:{}},ne=Ct.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)"};rt(ne,{primary:ne.neutral80,secondary:ne.neutral70,tertiary:ne.neutral60,quaternary:ne.neutral50,disabled:ne.neutral20,border:ne.neutral30,borderTint:ne.neutral20,borderShade:ne.neutral40,background:ne.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:ne.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:ne.neutral70,axisLineTint:ne.neutral40,axisTick:ne.neutral70,axisTickMinor:ne.neutral60,axisLabel:ne.neutral70,axisSplitLine:ne.neutral15,axisMinorSplitLine:ne.neutral05});for(var xi in ne)if(ne.hasOwnProperty(xi)){var Lg=ne[xi];xi==="theme"?Ct.darkColor.theme=ne.theme.slice():xi==="highlight"?Ct.darkColor.highlight="rgba(255,231,130,0.4)":xi.indexOf("accent")===0?Ct.darkColor[xi]=Ac(Lg,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):Ct.darkColor[xi]=Ac(Lg,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}Ct.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Mg="";typeof navigator<"u"&&(Mg=navigator.platform||"");var xa="rgba(0, 0, 0, 0.2)",Cg=Ct.color.theme[0],tS=Ac(Cg,null,null,.9);const eS={darkMode:"auto",colorBy:"series",color:Ct.color.theme,gradientColor:[tS,Cg],aria:{decal:{decals:[{color:xa,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:xa,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:xa,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:xa,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:xa,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:xa,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Mg.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 Sh=Pt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Je="original",Ae="arrayRows",dr="objectRows",Cr="keyedColumns",nn="typedArray",Eg="unknown",Xr="column",wi="row",Se={Must:1,Might:2,Not:3},Dg=ae();function rS(t){Dg(t).datasetMap=Pt()}function nS(t,e,r){var n={},i=xh(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=Dg(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),$(t,function(p,g){var m=wt(p)?p:t[g]={name:p};m.type==="ordinal"&&c==null&&(c=g,f=v(m)),n[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});$(t,function(p,g){var m=p.name,y=v(p);if(c==null){var _=d.valueWayDim;h(n[m],_,y),h(o,_,y),d.valueWayDim+=y}else if(c===g)h(n[m],0,y),h(a,0,y);else{var _=d.categoryWayDim;h(n[m],_,y),h(o,_,y),d.categoryWayDim+=y}});function h(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function v(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function iS(t,e,r){var n={},i=xh(t);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===dr||a===Cr)&&$(o,function(c,f){(wt(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},d=[],h=0,v=Math.min(5,r);h<v;h++){var p=Pg(e.data,a,e.seriesLayoutBy,o,e.startIndex,h);d.push(p);var g=p===Se.Not;if(g&&c.v==null&&h!==s&&(c.v=h),(c.n==null||c.n===c.v||!g&&d[c.n]===Se.Not)&&(c.n=h),m(c)&&d[c.n]!==Se.Not)return c;g||(p===Se.Might&&f.v==null&&h!==s&&(f.v=h),(f.n==null||f.n===f.v)&&(f.n=h))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function xh(t){var e=t.get("data",!0);if(!e)return ll(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},sr).models[0]}function aS(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:ll(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},sr).models}function Ag(t,e){return Pg(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Pg(t,e,r,n,i,a){var o,s=5;if(Ie(t))return Se.Not;var l,u;if(n){var c=n[a];wt(c)?(l=c.name,u=c.type):xt(c)&&(l=c)}if(u!=null)return u==="ordinal"?Se.Must:Se.Not;if(e===Ae){var f=t;if(r===wi){for(var d=f[a],h=0;h<(d||[]).length&&h<s;h++)if((o=b(d[i+h]))!=null)return o}else for(var h=0;h<f.length&&h<s;h++){var v=f[i+h];if(v&&(o=b(v[a]))!=null)return o}}else if(e===dr){var p=t;if(!l)return Se.Not;for(var h=0;h<p.length&&h<s;h++){var g=p[h];if(g&&(o=b(g[l]))!=null)return o}}else if(e===Cr){var m=t;if(!l)return Se.Not;var d=m[l];if(!d||Ie(d))return Se.Not;for(var h=0;h<d.length&&h<s;h++)if((o=b(d[h]))!=null)return o}else if(e===Je)for(var y=t,h=0;h<y.length&&h<s;h++){var g=y[h],_=uo(g);if(!gt(_))return Se.Not;if((o=b(_[a]))!=null)return o}function b(x){var S=xt(x);if(x!=null&&Number.isFinite(Number(x))&&x!=="")return S?Se.Might:Se.Not;if(S&&x!=="-")return Se.Must}return Se.Not}var oS=Pt();function sS(t,e,r){var n=oS.get(e);if(!n)return r;var i=n(t);if(!i)return r;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)bt(oa(i[a]));return r.concat(i)}var Ng=ae();ae();var wh=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=Be(this.get("color",!0)),a=this.get("colorLayer",!0);return uS(this,Ng,i,a,e,r,n)},t.prototype.clearColorPalette=function(){cS(this,Ng)},t}();function lS(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function uS(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:lS(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function cS(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Kl,Oo,kg,Th="\0_ec_inner",Og=1,fS={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",matrix:"MatrixComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},hS={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",chord:"ChordChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Jl={};function dS(t){$(t,function(e,r){if(!Xt.hasClass(r)){var n=fS[r];n&&!Jl[n]&&(Wt("Component "+r+` is used but not imported.
|
|
61
32
|
import { `+n+` } from 'echarts/components';
|
|
62
|
-
echarts.use([`+n+"]);"),
|
|
33
|
+
echarts.use([`+n+"]);"),Jl[n]=!0)}})}var Lh=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new de(a),this._locale=new de(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){process.env.NODE_ENV!=="production"&&(bt(r!=null,"option is null/undefined"),bt(r[Th]!==Og,"please use chart.getOption()"));var a=Rg(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,Rg(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");process.env.NODE_ENV!=="production"&&dS(o),!this.option||r==="recreate"?kg(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&$(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Pt(),u=n&&n.replaceMergeMainTypeMap;rS(this),$(r,function(f,d){f!=null&&(Xt.hasClass(d)?d&&(s.push(d),l.set(d,!0)):i[d]=i[d]==null?Ot(f):Zt(i[d],f,!0))}),u&&u.each(function(f,d){Xt.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),Xt.topologicalTravel(s,Xt.getAllClassMainTypes(),c,this);function c(f){var d=sS(this,f,Be(r[f])),h=a.get(f),v=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=z6(h,d,v);U6(p,f,Xt),i[f]=null,a.set(f,null),o.set(f,0);var g=[],m=[],y=0,_,b;$(p,function(x,S){var w=x.existing,T=x.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var L=f==="series",C=Xt.getClass(f,x.keyInfo.subType,!L);if(!C){if(process.env.NODE_ENV!=="production"){var M=x.keyInfo.subType,A=hS[M];Jl[M]||(Jl[M]=!0,Wt(A?"Series "+M+` is used but not imported.
|
|
63
34
|
import { `+A+` } from 'echarts/charts';
|
|
64
|
-
echarts.use([`+A+"]);":"Unknown series "+M))}return}if(f==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(x||(Ve("Currently only one tooltip component is allowed."),x=!0));return}_=!0}if(w&&w.constructor===C)w.name=S.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var E=ot({componentIndex:b},S.keyInfo);w=new C(T,this,this,E),ot(w,E),S.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),m.push(w),y++):(g.push(void 0),m.push(void 0))},this),i[f]=g,a.set(f,m),o.set(f,y),f==="series"&&mu(this)}this._seriesIndices||mu(this)},e.prototype.getOption=function(){var r=zt(this.option);return z(r,function(n,i){if(te.hasClass(i)){for(var a=Ye(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!xa(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Xh],r},e.prototype.setTheme=function(r){this._theme=new Te(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],z(Ye(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=s2("id",a,s):o!=null?l=s2("name",o,s):l=Se(s,function(u){return!!u}),l2(l,r)},e.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):Se(this._componentsMap.get(i),function(u){return!!u});return l(l2(o,r));function s(u){var c=i+"Index",f=i+"Id",d=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[d]!=null)?{mainType:i,index:u[c],id:u[f],name:u[d]}:null}function l(u){return r.filter?Se(u,r.filter):u}},e.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(Dt(r)){var o=n,s=r;a.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=Lt(r)?a.get(r):Mt(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=Jr(r,null);return Se(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return Se(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return Se(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){Jo(this),z(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},e.prototype.eachRawSeries=function(r,n){z(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,i){Jo(this),z(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(r,n,i){return z(this.getSeriesByType(r),n,i)},e.prototype.isSeriesFiltered=function(r){return Jo(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){Jo(this);var i=[];z(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Ot(i)},e.prototype.restoreData=function(r){mu(this);var n=this._componentsMap,i=[];n.each(function(a,o){te.hasClass(o)&&i.push(o)}),te.topologicalTravel(i,te.getAllClassMainTypes(),function(a){z(n.get(a),function(o){o&&(a!=="series"||!Zb(o,r))&&o.restoreData()})})},e.internalField=function(){mu=function(r){var n=r._seriesIndices=[];z(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ot(n)},Jo=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},a2=function(r,n){r.option={},r.option[Xh]=o2,r._componentsMap=Ot({series:[]}),r._componentsCount=Ot();var i=n.aria;Mt(i)&&i.enabled==null&&(i.enabled=!0),Kb(n,r._theme.option),re(n,Ib,!1),r._mergeOption(n,null)}}(),e}(Te);function Zb(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||i!=null&&t.name!==i}}function Kb(t,e){var r=t.color&&!t.colorLayer;z(e,function(n,i){i==="colorLayer"&&r||i==="color"&&t.color||te.hasClass(i)||(typeof n=="object"?t[i]=t[i]?re(t[i],n,!1):zt(n):t[i]==null&&(t[i]=n))})}function s2(t,e,r){if(bt(e)){var n=Ot();return z(e,function(a){if(a!=null){var o=Jr(a,null);o!=null&&n.set(a,!0)}}),Se(r,function(a){return a&&n.get(a[t])})}else{var i=Jr(e,null);return Se(r,function(a){return a&&i!=null&&a[t]===i})}}function l2(t,e){return e.hasOwnProperty("subType")?Se(t,function(r){return r&&r.subType===e.subType}):t}function u2(t){var e=Ot();return t&&z(Ye(t.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&wt(te.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),e.set(r,!0)}),{replaceMergeMainTypeMap:e}}kr(Yh,jh);var Qb=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],c2=function(){function t(e){z(Qb,function(r){this[r]=ce(e[r],e)},this)}return t}(),Jb=/^(min|max)?(.+)$/,qb=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(z(Ye(e.series),function(o){o&&o.data&&Xe(o.data)&&Cc(o.data)}),z(Ye(e.dataset),function(o){o&&o.source&&Xe(o.source)&&Cc(o.source)})),e=zt(e);var i=this._optionBackup,a=tS(e,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],zt(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(r=zt(n[i.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)eS(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!nS(o,this._currentMediaIndices)&&(s=yt(o,function(c){return zt(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},t}();function tS(t,e,r){var n=[],i,a,o=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(t.options=t.media=null),a=t),c&&(bt(u)?z(u,function(h){process.env.NODE_ENV!=="production"&&h&&!h.option&&Mt(h.query)&&Mt(h.query.option)&&qt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),h&&h.option&&(h.query?n.push(h):i||(i=h))}):process.env.NODE_ENV!=="production"&&qt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),d(a),z(l,function(h){return d(h)}),z(n,function(h){return d(h.option)});function d(h){z(e,function(v){v(h,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function eS(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return z(t,function(a,o){var s=o.match(Jb);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();rS(n[u],a,l)||(i=!1)}}),i}function rS(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function nS(t,e){return t.join(",")===e.join(",")}var Mr=z,qo=Mt,f2=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Uh(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=f2.length;r<n;r++){var i=f2[r],a=e.normal,o=e.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&we("itemStyle.normal."+i,i),t[i]=t[i]||{},t[i].normal?re(t[i].normal,a[i]):t[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&we("itemStyle.emphasis."+i,"emphasis."+i),t[i]=t[i]||{},t[i].emphasis?re(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function We(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,i=t[e].emphasis;n&&(process.env.NODE_ENV!=="production"&&vn("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),r?(t[e].normal=t[e].emphasis=null,Ft(t[e],n)):t[e]=n),i&&(process.env.NODE_ENV!=="production"&&vn(e+".emphasis has been changed to emphasis."+e+" since 4.0"),t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function ts(t){We(t,"itemStyle"),We(t,"lineStyle"),We(t,"areaStyle"),We(t,"label"),We(t,"labelLine"),We(t,"upperLabel"),We(t,"edgeLabel")}function ve(t,e){var r=qo(t)&&t[e],n=qo(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&vn("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var i=0,a=Jp.length;i<a;i++){var o=Jp[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function Cr(t){t&&(ts(t),ve(t,"label"),t.emphasis&&ve(t.emphasis,"label"))}function iS(t){if(qo(t)){Uh(t),ts(t),ve(t,"label"),ve(t,"upperLabel"),ve(t,"edgeLabel"),t.emphasis&&(ve(t.emphasis,"label"),ve(t.emphasis,"upperLabel"),ve(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Uh(e),Cr(e));var r=t.markLine;r&&(Uh(r),Cr(r));var n=t.markArea;n&&Cr(n);var i=t.data;if(t.type==="graph"){i=i||t.nodes;var a=t.links||t.edges;if(a&&!Xe(a))for(var o=0;o<a.length;o++)Cr(a[o]);z(t.categories,function(u){ts(u)})}if(i&&!Xe(i))for(var o=0;o<i.length;o++)Cr(i[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Cr(s[o]);if(r=t.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)bt(l[o])?(Cr(l[o][0]),Cr(l[o][1])):Cr(l[o]);t.type==="gauge"?(ve(t,"axisLabel"),ve(t,"title"),ve(t,"detail")):t.type==="treemap"?(We(t.breadcrumb,"itemStyle"),z(t.levels,function(u){ts(u)})):t.type==="tree"&&ts(t.leaves)}}function _n(t){return bt(t)?t:t?[t]:[]}function h2(t){return(bt(t)?t[0]:t)||{}}function aS(t,e){Mr(_n(t.series),function(n){qo(n)&&iS(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Mr(r,function(n){Mr(_n(t[n]),function(i){i&&(ve(i,"axisLabel"),ve(i.axisPointer,"label"))})}),Mr(_n(t.parallel),function(n){var i=n&&n.parallelAxisDefault;ve(i,"axisLabel"),ve(i&&i.axisPointer,"label")}),Mr(_n(t.calendar),function(n){We(n,"itemStyle"),ve(n,"dayLabel"),ve(n,"monthLabel"),ve(n,"yearLabel")}),Mr(_n(t.radar),function(n){ve(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&vn("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&vn("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Mr(n.indicator,function(i){i.text&&we("text","name","radar.indicator")})}),Mr(_n(t.geo),function(n){qo(n)&&(Cr(n),Mr(_n(n.regions),function(i){Cr(i)}))}),Mr(_n(t.timeline),function(n){Cr(n),We(n,"label"),We(n,"itemStyle"),We(n,"controlStyle",!0);var i=n.data;bt(i)&&z(i,function(a){Mt(a)&&(We(a,"label"),We(a,"itemStyle"))})}),Mr(_n(t.toolbox),function(n){We(n,"iconStyle"),Mr(n.feature,function(i){We(i,"iconStyle")})}),ve(h2(t.axisPointer),"label"),ve(h2(t.tooltip).axisPointer,"label")}function oS(t,e){for(var r=e.split(","),n=t,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function sS(t,e,r,n){for(var i=e.split(","),a=t,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function d2(t){t&&z(lS,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var lS=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],uS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],$h=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function es(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<$h.length;r++){var n=$h[r][1],i=$h[r][0];e[n]!=null&&(e[i]=e[n],process.env.NODE_ENV!=="production"&&we(n,i))}}function v2(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&we("label.margin","label.edgeDistance","pie"),t.edgeDistance=t.margin)}function p2(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,process.env.NODE_ENV!=="production"&&we("downplay","blur","sunburst"))}function cS(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&we("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),t.emphasis.focus="adjacency"))}function g2(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&g2(t[r].children,e)}function m2(t,e){aS(t,e),t.series=Ye(t.series),z(t.series,function(r){if(Mt(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow,process.env.NODE_ENV!=="production"&&we("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise,process.env.NODE_ENV!=="production"&&we("clockWise","clockwise")),v2(r.label);var i=r.data;if(i&&!Xe(i))for(var a=0;a<i.length;a++)v2(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&we("hoverOffset","emphasis.scaleSize"),r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=oS(r,"pointer.color");o!=null&&sS(r,"itemStyle.color",o)}else if(n==="bar"){es(r),es(r.backgroundStyle),es(r.emphasis);var i=r.data;if(i&&!Xe(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(es(i[a]),es(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s,process.env.NODE_ENV!=="production"&&we("highlightPolicy","emphasis.focus","sunburst"))),p2(r),g2(r.data,p2)}else n==="graph"||n==="sankey"?cS(r):n==="map"&&(r.mapType&&!r.map&&(process.env.NODE_ENV!=="production"&&we("mapType","map","map"),r.map=r.mapType),r.mapLocation&&(process.env.NODE_ENV!=="production"&&vn("`mapLocation` is not used anymore."),Ft(r,r.mapLocation)));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&we("hoverAnimation","emphasis.scale"),r.emphasis.scale=r.hoverAnimation)),d2(r)}}),t.dataRange&&(t.visualMap=t.dataRange),z(uS,function(r){var n=t[r];n&&(bt(n)||(n=[n]),z(n,function(i){d2(i)}))})}function fS(t){var e=Ot();t.eachSeries(function(r){var n=r.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),z(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),hS(r)}})}function hS(t){z(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var d=o.get(e.stackedDimension,f);if(isNaN(d))return i;var h,v;s?v=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var p=NaN,g=r-1;g>=0;g--){var m=t[g];if(s||(v=m.data.rawIndexOf(m.stackedByDimension,h)),v>=0){var y=m.data.getByRawIndex(m.stackResultDimension,v);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=f8(d,y),p=y;break}}}return n[0]=d,n[1]=p,n})})}var _u=function(){function t(e){this.data=e.data||(e.sourceFormat===Fr?{}:[]),this.sourceFormat=e.sourceFormat||t2,this.seriesLayoutBy=e.seriesLayoutBy||on,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&r2(this,n)===Ne.Must&&(i.type="ordinal")}}return t}();function Zh(t){return t instanceof _u}function Kh(t,e,r){r=r||_2(t);var n=e.seriesLayoutBy,i=vS(t,r,n,e.sourceHeader,e.dimensions),a=new _u({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:zt(e)});return a}function y2(t){return new _u({data:t,sourceFormat:Xe(t)?yn:hr})}function dS(t){return new _u({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:zt(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function _2(t){var e=t2;if(Xe(t))e=yn;else if(bt(t)){t.length===0&&(e=He);for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i!=null){if(bt(i)||Xe(i)){e=He;break}else if(Mt(i)){e=Lr;break}}}}else if(Mt(t)){for(var a in t)if(Yr(t,a)&&Je(t[a])){e=Fr;break}}return e}function vS(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:x2(i),startIndex:o,dimensionsDetectedCount:a};if(e===He){var s=t;n==="auto"||n==null?b2(function(u){u!=null&&u!=="-"&&(Lt(u)?o==null&&(o=1):o=0)},r,s,10):o=ie(n)?n:n?1:0,!i&&o===1&&(i=[],b2(function(u,c){i[c]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===Ii?s.length:s[0]?s[0].length:null}else if(e===Lr)i||(i=pS(t));else if(e===Fr)i||(i=[],z(t,function(u,c){i.push(c)}));else if(e===hr){var l=Eo(t[0]);a=bt(l)&&l.length||1}else e===yn&&process.env.NODE_ENV!=="production"&&wt(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:x2(i),dimensionsDetectedCount:a}}function pS(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Ht(r)}function x2(t){if(t){var e=Ot();return yt(t,function(r,n){r=Mt(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function b2(t,e,r,n){if(e===Ii)for(var i=0;i<r.length&&i<n;i++)t(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)t(a[i],i)}function S2(t){var e=t.sourceFormat;return e===Lr||e===Fr}var Bi,Vi,zi,Fi,w2,T2,L2=function(){function t(e,r){var n=Zh(e)?e:y2(e);this._source=n;var i=this._data=n.data,a=n.sourceFormat,o=n.seriesLayoutBy;if(a===yn){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=r,this._data=i}if(process.env.NODE_ENV!=="production"){var s=gS[bu(a,o)];s&&s(i,n.dimensionsDefine)}T2(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;T2=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,d=l.dimensionsDefine,h=w2[bu(u,c)];if(process.env.NODE_ENV!=="production"&&wt(h,"Invalide sourceFormat: "+u),ot(o,h),u===yn)o.getItem=r,o.count=i,o.fillStorage=n;else{var v=C2(u,c);o.getItem=ce(v,null,s,f,d);var p=D2(u,c);o.count=ce(p,null,s,f,d)}};var r=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],p=h[1]==null?-1/0:h[1],g=s-o,m=l[d],y=0;y<g;y++){var _=c[y*f+d];m[o+y]=_,_<v&&(v=_),_>p&&(p=_)}h[0]=v,h[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};w2=(e={},e[He+"_"+on]={pure:!0,appendData:a},e[He+"_"+Ii]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Lr]={pure:!0,appendData:a},e[Fr]={pure:!0,appendData:function(o){var s=this._data;z(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[hr]={appendData:a},e[yn]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&wt(Xe(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),t}(),xu=function(t){bt(t)||qt("series.data or dataset.source must be an array.")},gS=(Bi={},Bi[He+"_"+on]=xu,Bi[He+"_"+Ii]=xu,Bi[Lr]=xu,Bi[Fr]=function(t,e){for(var r=0;r<e.length;r++){var n=e[r].name;n==null&&qt("dimension name must not be null/undefined.")}},Bi[hr]=xu,Bi),M2=function(t,e,r,n){return t[n]},mS=(Vi={},Vi[He+"_"+on]=function(t,e,r,n){return t[n+e]},Vi[He+"_"+Ii]=function(t,e,r,n,i){n+=e;for(var a=i||[],o=t,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Vi[Lr]=M2,Vi[Fr]=function(t,e,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?t[s]:null;a[o]=l?l[n]:null}return a},Vi[hr]=M2,Vi);function C2(t,e){var r=mS[bu(t,e)];return process.env.NODE_ENV!=="production"&&wt(r,'Do not support get item on "'+t+'", "'+e+'".'),r}var E2=function(t,e,r){return t.length},yS=(zi={},zi[He+"_"+on]=function(t,e,r){return Math.max(0,t.length-e)},zi[He+"_"+Ii]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},zi[Lr]=E2,zi[Fr]=function(t,e,r){var n=r[0].name,i=n!=null?t[n]:null;return i?i.length:0},zi[hr]=E2,zi);function D2(t,e){var r=yS[bu(t,e)];return process.env.NODE_ENV!=="production"&&wt(r,'Do not support count on "'+t+'", "'+e+'".'),r}var Qh=function(t,e,r){return t[e]},_S=(Fi={},Fi[He]=Qh,Fi[Lr]=function(t,e,r){return t[r]},Fi[Fr]=Qh,Fi[hr]=function(t,e,r){var n=Eo(t);return n instanceof Array?n[e]:n},Fi[yn]=Qh,Fi);function A2(t){var e=_S[t];return process.env.NODE_ENV!=="production"&&wt(e,'Do not support get value on "'+t+'".'),e}function bu(t,e){return t===He?t+"_"+e:t}function Ba(t,e,r){if(t){var n=t.getRawDataItem(e);if(n!=null){var i=t.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=i.getDimensionProperty(o);return A2(a)(n,o,s)}else{var l=n;return a===hr&&(l=Eo(n)),l}}}}var xS=/\{@(.+?)\}/g,bS=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),i=this.getRawValue(e,r),a=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:a,data:s,dataType:r,value:i,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),i!=null&&bt(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(e);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Dt(a))return l.status=r,l.dimensionIndex=i,a(l);if(Lt(a)){var c=Sb(a,l);return c.replace(xS,function(f,d){var h=d.length,v=d;v.charAt(0)==="["&&v.charAt(h-1)==="]"&&(v=+v.slice(1,h-1),process.env.NODE_ENV!=="production"&&isNaN(v)&&qt("Invalide label formatter: @"+d+", only support @[0], @[1], @[2], ..."));var p=Ba(s,e,v);if(o&&bt(o.interpolatedValue)){var g=s.getDimensionIndex(v);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},t.prototype.getRawValue=function(e,r){return Ba(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function rs(t){return new SS(t)}var SS=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=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)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(r?(process.env.NODE_ENV!=="production"&&wt(r._outputDueEnd!=null),this._dueEnd=r._outputDueEnd):(process.env.NODE_ENV!=="production"&&wt(!this._progress||this._count),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 p=this._progress;if(bt(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],h,v,l,u);else this._doProgress(p,h,v,l,u)}this._dueIndex=v;var m=this._settedOutputEnd!=null?this._settedOutputEnd:v;process.env.NODE_ENV!=="production"&&wt(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,i,a){P2.reset(r,n,i,a),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:P2.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),bt(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){process.env.NODE_ENV!=="production"&&wt(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),P2=function(){var t,e,r,n,i,a={reset:function(l,u,c,f){e=l,t=u,r=c,n=f,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var l=e%i*r+Math.ceil(e/i),u=e>=t?null:l<n?l:e;return e++,u}}();function Su(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!ie(t)&&t!=null&&t!=="-"&&(t=+Co(t)),t==null||t===""?NaN:Number(t))}Ot({number:function(t){return parseFloat(t)},time:function(t){return+Co(t)},trim:function(t){return Lt(t)?An(t):t}});var wS=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return Su(e,r)},t}();function TS(t,e){var r=new wS,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==on&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),cr(o));var s=[],l={},u=t.dimensionsDefine;if(u)z(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";Yr(l,m)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),cr(_)),l[m]=y}});else for(var c=0;c<t.dimensionsDetectedCount;c++)s.push({index:c});var f=C2(i,on);e.__isBuiltIn&&(r.getRawDataItem=function(p){return f(n,a,s,p)},r.getRawData=ce(LS,null,t)),r.cloneRawData=ce(MS,null,t);var d=D2(i,on);r.count=ce(d,null,n,a,s);var h=A2(i);r.retrieveValue=function(p,g){var m=f(n,a,s,p);return v(m,g)};var v=r.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return h(p,g,m.name)}};return r.getDimensionInfo=ce(CS,null,s,l),r.cloneAllDimensionInfo=ce(ES,null,s),r}function LS(t){var e=t.sourceFormat;if(!Jh(e)){var r="";process.env.NODE_ENV!=="production"&&(r="`getRawData` is not supported in source format "+e),cr(r)}return t.data}function MS(t){var e=t.sourceFormat,r=t.data;if(!Jh(e)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),cr(n)}if(e===He){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(e===Lr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(ot({},r[a]));return i}}function CS(t,e,r){if(r!=null){if(ie(r)||!isNaN(r)&&!Yr(e,r))return t[r];if(Yr(e,r))return e[r]}}function ES(t){return zt(t)}var R2=Ot();function DS(t){t=zt(t);var e=t.type,r="";e||(process.env.NODE_ENV!=="production"&&(r="Must have a `type` when `registerTransform`."),cr(r));var n=e.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(r='Name must include namespace like "ns:regression".'),cr(r));var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),t.__isBuiltIn=i,R2.set(e,t)}function AS(t,e,r){var n=Ye(t),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),cr(a));for(var o=0,s=i;o<s;o++){var l=n[o];e=PS(l,e,r,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function PS(t,e,r,n){var i="";e.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),cr(i)),Mt(t)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof t+"."),cr(i));var a=t.type,o=R2.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),cr(i));var s=yt(e,function(c){return TS(c,o)}),l=Ye(o.transform({upstream:s[0],upstreamList:s,config:zt(t.config)}));if(process.env.NODE_ENV!=="production"&&t.print){var u=yt(l,function(c){var f=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+r.datasetIndex+f+" ===","- transform result data:",Ef(c.data),"- transform result dimensions:",Ef(c.dimensions)].join(`
|
|
35
|
+
echarts.use([`+A+"]);":"Unknown series "+M))}return}if(f==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(b||(Ce("Currently only one tooltip component is allowed."),b=!0));return}_=!0}if(w&&w.constructor===C)w.name=x.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var E=rt({componentIndex:S},x.keyInfo);w=new C(T,this,this,E),rt(w,E),x.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),m.push(w),y++):(g.push(void 0),m.push(void 0))},this),i[f]=g,a.set(f,m),o.set(f,y),f==="series"&&Kl(this)}this._seriesIndices||Kl(this)},e.prototype.getOption=function(){var r=Ot(this.option);return $(r,function(n,i){if(Xt.hasClass(i)){for(var a=Be(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!oa(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Th],r},e.prototype.setTheme=function(r){this._theme=new de(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],$(Be(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=Ig("id",a,s):o!=null?l=Ig("name",o,s):l=fe(s,function(u){return!!u}),Bg(l,r)},e.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):fe(this._componentsMap.get(i),function(u){return!!u});return l(Bg(o,r));function s(u){var c=i+"Index",f=i+"Id",d=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[d]!=null)?{mainType:i,index:u[c],id:u[f],name:u[d]}:null}function l(u){return r.filter?fe(u,r.filter):u}},e.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(Lt(r)){var o=n,s=r;a.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=xt(r)?a.get(r):wt(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=$r(r,null);return fe(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return fe(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return fe(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){Oo(this),$(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},e.prototype.eachRawSeries=function(r,n){$(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,i){Oo(this),$(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(r,n,i){return $(this.getSeriesByType(r),n,i)},e.prototype.isSeriesFiltered=function(r){return Oo(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){Oo(this);var i=[];$(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Pt(i)},e.prototype.restoreData=function(r){Kl(this);var n=this._componentsMap,i=[];n.each(function(a,o){Xt.hasClass(o)&&i.push(o)}),Xt.topologicalTravel(i,Xt.getAllClassMainTypes(),function(a){$(n.get(a),function(o){o&&(a!=="series"||!vS(o,r))&&o.restoreData()})})},e.internalField=function(){Kl=function(r){var n=r._seriesIndices=[];$(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Pt(n)},Oo=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},kg=function(r,n){r.option={},r.option[Th]=Og,r._componentsMap=Pt({series:[]}),r._componentsCount=Pt();var i=n.aria;wt(i)&&i.enabled==null&&(i.enabled=!0),pS(n,r._theme.option),Zt(n,eS,!1),r._mergeOption(n,null)}}(),e}(de);function vS(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||i!=null&&t.name!==i}}function pS(t,e){var r=t.color&&!t.colorLayer;$(e,function(n,i){i==="colorLayer"&&r||i==="color"&&t.color||Xt.hasClass(i)||(typeof n=="object"?t[i]=t[i]?Zt(t[i],n,!1):Ot(n):t[i]==null&&(t[i]=n))})}function Ig(t,e,r){if(gt(e)){var n=Pt();return $(e,function(a){if(a!=null){var o=$r(a,null);o!=null&&n.set(a,!0)}}),fe(r,function(a){return a&&n.get(a[t])})}else{var i=$r(e,null);return fe(r,function(a){return a&&i!=null&&a[t]===i})}}function Bg(t,e){return e.hasOwnProperty("subType")?fe(t,function(r){return r&&r.subType===e.subType}):t}function Rg(t){var e=Pt();return t&&$(Be(t.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&bt(Xt.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),e.set(r,!0)}),{replaceMergeMainTypeMap:e}}br(Lh,wh);var gS=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],$g=function(){function t(e){$(gS,function(r){this[r]=re(e[r],e)},this)}return t}(),mS=/^(min|max)?(.+)$/,yS=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&($(Be(e.series),function(o){o&&o.data&&Ie(o.data)&&oc(o.data)}),$(Be(e.dataset),function(o){o&&o.source&&Ie(o.source)&&oc(o.source)})),e=Ot(e);var i=this._optionBackup,a=_S(e,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],Ot(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(r=Ot(n[i.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)bS(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!xS(o,this._currentMediaIndices)&&(s=dt(o,function(c){return Ot(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},t}();function _S(t,e,r){var n=[],i,a,o=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(t.options=t.media=null),a=t),c&&(gt(u)?$(u,function(h){process.env.NODE_ENV!=="production"&&h&&!h.option&&wt(h.query)&&wt(h.query.option)&&Wt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),h&&h.option&&(h.query?n.push(h):i||(i=h))}):process.env.NODE_ENV!=="production"&&Wt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),d(a),$(l,function(h){return d(h)}),$(n,function(h){return d(h.option)});function d(h){$(e,function(v){v(h,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function bS(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return $(t,function(a,o){var s=o.match(mS);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();SS(n[u],a,l)||(i=!1)}}),i}function SS(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function xS(t,e){return t.join(",")===e.join(",")}var vr=$,Io=wt,Vg=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Mh(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Vg.length;r<n;r++){var i=Vg[r],a=e.normal,o=e.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&he("itemStyle.normal."+i,i),t[i]=t[i]||{},t[i].normal?Zt(t[i].normal,a[i]):t[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&he("itemStyle.emphasis."+i,"emphasis."+i),t[i]=t[i]||{},t[i].emphasis?Zt(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Pe(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,i=t[e].emphasis;n&&(process.env.NODE_ENV!=="production"&&Jr("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),r?(t[e].normal=t[e].emphasis=null,It(t[e],n)):t[e]=n),i&&(process.env.NODE_ENV!=="production"&&Jr(e+".emphasis has been changed to emphasis."+e+" since 4.0"),t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function Bo(t){Pe(t,"itemStyle"),Pe(t,"lineStyle"),Pe(t,"areaStyle"),Pe(t,"label"),Pe(t,"labelLine"),Pe(t,"upperLabel"),Pe(t,"edgeLabel")}function oe(t,e){var r=Io(t)&&t[e],n=Io(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&Jr("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var i=0,a=Mp.length;i<a;i++){var o=Mp[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function pr(t){t&&(Bo(t),oe(t,"label"),t.emphasis&&oe(t.emphasis,"label"))}function wS(t){if(Io(t)){Mh(t),Bo(t),oe(t,"label"),oe(t,"upperLabel"),oe(t,"edgeLabel"),t.emphasis&&(oe(t.emphasis,"label"),oe(t.emphasis,"upperLabel"),oe(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Mh(e),pr(e));var r=t.markLine;r&&(Mh(r),pr(r));var n=t.markArea;n&&pr(n);var i=t.data;if(t.type==="graph"){i=i||t.nodes;var a=t.links||t.edges;if(a&&!Ie(a))for(var o=0;o<a.length;o++)pr(a[o]);$(t.categories,function(u){Bo(u)})}if(i&&!Ie(i))for(var o=0;o<i.length;o++)pr(i[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)pr(s[o]);if(r=t.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)gt(l[o])?(pr(l[o][0]),pr(l[o][1])):pr(l[o]);t.type==="gauge"?(oe(t,"axisLabel"),oe(t,"title"),oe(t,"detail")):t.type==="treemap"?(Pe(t.breadcrumb,"itemStyle"),$(t.levels,function(u){Bo(u)})):t.type==="tree"&&Bo(t.leaves)}}function an(t){return gt(t)?t:t?[t]:[]}function zg(t){return(gt(t)?t[0]:t)||{}}function TS(t,e){vr(an(t.series),function(n){Io(n)&&wS(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),vr(r,function(n){vr(an(t[n]),function(i){i&&(oe(i,"axisLabel"),oe(i.axisPointer,"label"))})}),vr(an(t.parallel),function(n){var i=n&&n.parallelAxisDefault;oe(i,"axisLabel"),oe(i&&i.axisPointer,"label")}),vr(an(t.calendar),function(n){Pe(n,"itemStyle"),oe(n,"dayLabel"),oe(n,"monthLabel"),oe(n,"yearLabel")}),vr(an(t.radar),function(n){oe(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&Jr("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&Jr("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&vr(n.indicator,function(i){i.text&&he("text","name","radar.indicator")})}),vr(an(t.geo),function(n){Io(n)&&(pr(n),vr(an(n.regions),function(i){pr(i)}))}),vr(an(t.timeline),function(n){pr(n),Pe(n,"label"),Pe(n,"itemStyle"),Pe(n,"controlStyle",!0);var i=n.data;gt(i)&&$(i,function(a){wt(a)&&(Pe(a,"label"),Pe(a,"itemStyle"))})}),vr(an(t.toolbox),function(n){Pe(n,"iconStyle"),vr(n.feature,function(i){Pe(i,"iconStyle")})}),oe(zg(t.axisPointer),"label"),oe(zg(t.tooltip).axisPointer,"label")}function LS(t,e){for(var r=e.split(","),n=t,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function MS(t,e,r,n){for(var i=e.split(","),a=t,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function Fg(t){t&&$(CS,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var CS=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],ES=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ch=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Ro(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<Ch.length;r++){var n=Ch[r][1],i=Ch[r][0];e[n]!=null&&(e[i]=e[n],process.env.NODE_ENV!=="production"&&he(n,i))}}function Hg(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&he("label.margin","label.edgeDistance","pie"),t.edgeDistance=t.margin)}function Gg(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,process.env.NODE_ENV!=="production"&&he("downplay","blur","sunburst"))}function DS(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&he("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),t.emphasis.focus="adjacency"))}function Wg(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&Wg(t[r].children,e)}function Xg(t,e){TS(t,e),t.series=Be(t.series),$(t.series,function(r){if(wt(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow,process.env.NODE_ENV!=="production"&&he("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise,process.env.NODE_ENV!=="production"&&he("clockWise","clockwise")),Hg(r.label);var i=r.data;if(i&&!Ie(i))for(var a=0;a<i.length;a++)Hg(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&he("hoverOffset","emphasis.scaleSize"),r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=LS(r,"pointer.color");o!=null&&MS(r,"itemStyle.color",o)}else if(n==="bar"){Ro(r),Ro(r.backgroundStyle),Ro(r.emphasis);var i=r.data;if(i&&!Ie(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Ro(i[a]),Ro(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s,process.env.NODE_ENV!=="production"&&he("highlightPolicy","emphasis.focus","sunburst"))),Gg(r),Wg(r.data,Gg)}else n==="graph"||n==="sankey"?DS(r):n==="map"&&(r.mapType&&!r.map&&(process.env.NODE_ENV!=="production"&&he("mapType","map","map"),r.map=r.mapType),r.mapLocation&&(process.env.NODE_ENV!=="production"&&Jr("`mapLocation` is not used anymore."),It(r,r.mapLocation)));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&he("hoverAnimation","emphasis.scale"),r.emphasis.scale=r.hoverAnimation)),Fg(r)}}),t.dataRange&&(t.visualMap=t.dataRange),$(ES,function(r){var n=t[r];n&&(gt(n)||(n=[n]),$(n,function(i){Fg(i)}))})}function AS(t){var e=Pt();t.eachSeries(function(r){var n=r.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),$(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),PS(r)}})}function PS(t){$(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var d=o.get(e.stackedDimension,f);if(isNaN(d))return i;var h,v;s?v=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var p=NaN,g=r-1;g>=0;g--){var m=t[g];if(s||(v=m.data.rawIndexOf(m.stackedByDimension,h)),v>=0){var y=m.data.getByRawIndex(m.stackResultDimension,v);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=P6(d,y),p=y;break}}}return n[0]=d,n[1]=p,n})})}var tu=function(){function t(e){this.data=e.data||(e.sourceFormat===Cr?{}:[]),this.sourceFormat=e.sourceFormat||Eg,this.seriesLayoutBy=e.seriesLayoutBy||Xr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&Ag(this,n)===Se.Must&&(i.type="ordinal")}}return t}();function Eh(t){return t instanceof tu}function Dh(t,e,r){r=r||Ug(t);var n=e.seriesLayoutBy,i=kS(t,r,n,e.sourceHeader,e.dimensions),a=new tu({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Ot(e)});return a}function Yg(t){return new tu({data:t,sourceFormat:Ie(t)?nn:Je})}function NS(t){return new tu({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:Ot(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function Ug(t){var e=Eg;if(Ie(t))e=nn;else if(gt(t)){t.length===0&&(e=Ae);for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i!=null){if(gt(i)||Ie(i)){e=Ae;break}else if(wt(i)){e=dr;break}}}}else if(wt(t)){for(var a in t)if(Nr(t,a)&&ze(t[a])){e=Cr;break}}return e}function kS(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:Zg(i),startIndex:o,dimensionsDetectedCount:a};if(e===Ae){var s=t;n==="auto"||n==null?qg(function(u){u!=null&&u!=="-"&&(xt(u)?o==null&&(o=1):o=0)},r,s,10):o=jt(n)?n:n?1:0,!i&&o===1&&(i=[],qg(function(u,c){i[c]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===wi?s.length:s[0]?s[0].length:null}else if(e===dr)i||(i=OS(t));else if(e===Cr)i||(i=[],$(t,function(u,c){i.push(c)}));else if(e===Je){var l=uo(t[0]);a=gt(l)&&l.length||1}else e===nn&&process.env.NODE_ENV!=="production"&&bt(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:Zg(i),dimensionsDetectedCount:a}}function OS(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Bt(r)}function Zg(t){if(t){var e=Pt();return dt(t,function(r,n){r=wt(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function qg(t,e,r,n){if(e===wi)for(var i=0;i<r.length&&i<n;i++)t(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)t(a[i],i)}function jg(t){var e=t.sourceFormat;return e===dr||e===Cr}var Ti,Li,Mi,Ci,Qg,Kg,Jg=function(){function t(e,r){var n=Eh(e)?e:Yg(e);this._source=n;var i=this._data=n.data,a=n.sourceFormat,o=n.seriesLayoutBy;if(a===nn){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=r,this._data=i}if(process.env.NODE_ENV!=="production"){var s=IS[ru(a,o)];s&&s(i,n.dimensionsDefine)}Kg(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;Kg=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,d=l.dimensionsDefine,h=Qg[ru(u,c)];if(process.env.NODE_ENV!=="production"&&bt(h,"Invalide sourceFormat: "+u),rt(o,h),u===nn)o.getItem=r,o.count=i,o.fillStorage=n;else{var v=e2(u,c);o.getItem=re(v,null,s,f,d);var p=n2(u,c);o.count=re(p,null,s,f,d)}};var r=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],p=h[1]==null?-1/0:h[1],g=s-o,m=l[d],y=0;y<g;y++){var _=c[y*f+d];m[o+y]=_,_<v&&(v=_),_>p&&(p=_)}h[0]=v,h[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};Qg=(e={},e[Ae+"_"+Xr]={pure:!0,appendData:a},e[Ae+"_"+wi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[dr]={pure:!0,appendData:a},e[Cr]={pure:!0,appendData:function(o){var s=this._data;$(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Je]={appendData:a},e[nn]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&bt(Ie(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),t}(),eu=function(t){gt(t)||Wt("series.data or dataset.source must be an array.")},IS=(Ti={},Ti[Ae+"_"+Xr]=eu,Ti[Ae+"_"+wi]=eu,Ti[dr]=eu,Ti[Cr]=function(t,e){for(var r=0;r<e.length;r++){var n=e[r].name;n==null&&Wt("dimension name must not be null/undefined.")}},Ti[Je]=eu,Ti),t2=function(t,e,r,n){return t[n]},BS=(Li={},Li[Ae+"_"+Xr]=function(t,e,r,n){return t[n+e]},Li[Ae+"_"+wi]=function(t,e,r,n,i){n+=e;for(var a=i||[],o=t,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Li[dr]=t2,Li[Cr]=function(t,e,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?t[s]:null;a[o]=l?l[n]:null}return a},Li[Je]=t2,Li);function e2(t,e){var r=BS[ru(t,e)];return process.env.NODE_ENV!=="production"&&bt(r,'Do not support get item on "'+t+'", "'+e+'".'),r}var r2=function(t,e,r){return t.length},RS=(Mi={},Mi[Ae+"_"+Xr]=function(t,e,r){return Math.max(0,t.length-e)},Mi[Ae+"_"+wi]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},Mi[dr]=r2,Mi[Cr]=function(t,e,r){var n=r[0].name,i=n!=null?t[n]:null;return i?i.length:0},Mi[Je]=r2,Mi);function n2(t,e){var r=RS[ru(t,e)];return process.env.NODE_ENV!=="production"&&bt(r,'Do not support count on "'+t+'", "'+e+'".'),r}var Ah=function(t,e,r){return t[e]},$S=(Ci={},Ci[Ae]=Ah,Ci[dr]=function(t,e,r){return t[r]},Ci[Cr]=Ah,Ci[Je]=function(t,e,r){var n=uo(t);return n instanceof Array?n[e]:n},Ci[nn]=Ah,Ci);function i2(t){var e=$S[t];return process.env.NODE_ENV!=="production"&&bt(e,'Do not support get value on "'+t+'".'),e}function ru(t,e){return t===Ae?t+"_"+e:t}function wa(t,e,r){if(t){var n=t.getRawDataItem(e);if(n!=null){var i=t.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=i.getDimensionProperty(o);return i2(a)(n,o,s)}else{var l=n;return a===Je&&(l=uo(n)),l}}}}var VS=/\{@(.+?)\}/g,zS=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),i=this.getRawValue(e,r),a=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:a,data:s,dataType:r,value:i,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),i!=null&>(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(e);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Lt(a))return l.status=r,l.dimensionIndex=i,a(l);if(xt(a)){var c=Fb(a,l);return c.replace(VS,function(f,d){var h=d.length,v=d;v.charAt(0)==="["&&v.charAt(h-1)==="]"&&(v=+v.slice(1,h-1),process.env.NODE_ENV!=="production"&&isNaN(v)&&Wt("Invalide label formatter: @"+d+", only support @[0], @[1], @[2], ..."));var p=wa(s,e,v);if(o&>(o.interpolatedValue)){var g=s.getDimensionIndex(v);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},t.prototype.getRawValue=function(e,r){return wa(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function $o(t){return new FS(t)}var FS=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=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)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(r?(process.env.NODE_ENV!=="production"&&bt(r._outputDueEnd!=null),this._dueEnd=r._outputDueEnd):(process.env.NODE_ENV!=="production"&&bt(!this._progress||this._count),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 p=this._progress;if(gt(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],h,v,l,u);else this._doProgress(p,h,v,l,u)}this._dueIndex=v;var m=this._settedOutputEnd!=null?this._settedOutputEnd:v;process.env.NODE_ENV!=="production"&&bt(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,i,a){a2.reset(r,n,i,a),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:a2.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),gt(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){process.env.NODE_ENV!=="production"&&bt(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),a2=function(){var t,e,r,n,i,a={reset:function(l,u,c,f){e=l,t=u,r=c,n=f,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var l=e%i*r+Math.ceil(e/i),u=e>=t?null:l<n?l:e;return e++,u}}();function nu(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!jt(t)&&t!=null&&t!=="-"&&(t=+lo(t)),t==null||t===""?NaN:Number(t))}Pt({number:function(t){return parseFloat(t)},time:function(t){return+lo(t)},trim:function(t){return xt(t)?mn(t):t}});var HS=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return nu(e,r)},t}();function GS(t,e){var r=new HS,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Xr&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Qe(o));var s=[],l={},u=t.dimensionsDefine;if(u)$(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";Nr(l,m)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),Qe(_)),l[m]=y}});else for(var c=0;c<t.dimensionsDetectedCount;c++)s.push({index:c});var f=e2(i,Xr);e.__isBuiltIn&&(r.getRawDataItem=function(p){return f(n,a,s,p)},r.getRawData=re(WS,null,t)),r.cloneRawData=re(XS,null,t);var d=n2(i,Xr);r.count=re(d,null,n,a,s);var h=i2(i);r.retrieveValue=function(p,g){var m=f(n,a,s,p);return v(m,g)};var v=r.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return h(p,g,m.name)}};return r.getDimensionInfo=re(YS,null,s,l),r.cloneAllDimensionInfo=re(US,null,s),r}function WS(t){var e=t.sourceFormat;if(!Ph(e)){var r="";process.env.NODE_ENV!=="production"&&(r="`getRawData` is not supported in source format "+e),Qe(r)}return t.data}function XS(t){var e=t.sourceFormat,r=t.data;if(!Ph(e)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),Qe(n)}if(e===Ae){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(e===dr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(rt({},r[a]));return i}}function YS(t,e,r){if(r!=null){if(jt(r)||!isNaN(r)&&!Nr(e,r))return t[r];if(Nr(e,r))return e[r]}}function US(t){return Ot(t)}var o2=Pt();function ZS(t){t=Ot(t);var e=t.type,r="";e||(process.env.NODE_ENV!=="production"&&(r="Must have a `type` when `registerTransform`."),Qe(r));var n=e.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(r='Name must include namespace like "ns:regression".'),Qe(r));var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),t.__isBuiltIn=i,o2.set(e,t)}function qS(t,e,r){var n=Be(t),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),Qe(a));for(var o=0,s=i;o<s;o++){var l=n[o];e=jS(l,e,r,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function jS(t,e,r,n){var i="";e.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),Qe(i)),wt(t)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof t+"."),Qe(i));var a=t.type,o=o2.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),Qe(i));var s=dt(e,function(c){return GS(c,o)}),l=Be(o.transform({upstream:s[0],upstreamList:s,config:Ot(t.config)}));if(process.env.NODE_ENV!=="production"&&t.print){var u=dt(l,function(c){var f=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+r.datasetIndex+f+" ===","- transform result data:",sf(c.data),"- transform result dimensions:",sf(c.dimensions)].join(`
|
|
65
36
|
`)}).join(`
|
|
66
|
-
`);Zp(u)}return yt(l,function(c,f){var d="";Mt(c)||(process.env.NODE_ENV!=="production"&&(d="A transform should not return some empty results."),cr(d)),c.data||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be not be null or undefined"),cr(d));var h=_2(c.data);Jh(h)||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be array rows or object rows."),cr(d));var v,p=e[0];if(p&&f===0&&!c.dimensions){var g=p.startIndex;g&&(c.data=p.data.slice(0,g).concat(c.data)),v={seriesLayoutBy:on,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else v={seriesLayoutBy:on,sourceHeader:0,dimensions:c.dimensions};return Kh(c.data,v,null)})}function Jh(t){return t===He||t===Lr}var wu="undefined",RS=typeof Uint32Array===wu?Array:Uint32Array,kS=typeof Uint16Array===wu?Array:Uint16Array,k2=typeof Int32Array===wu?Array:Int32Array,N2=typeof Float64Array===wu?Array:Float64Array,O2={float:N2,int:k2,ordinal:Array,number:Array,time:N2},qh;function Va(t){return t>65535?RS:kS}function za(){return[1/0,-1/0]}function NS(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function I2(t,e,r,n,i){var a=O2[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];t[e]=l}}else t[e]=new a(n)}var t0=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ot()}return t.prototype.initData=function(e,r,n){process.env.NODE_ENV!=="production"&&wt(Dt(e.getItem)&&Dt(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=qh[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=S2(i);this._dimensions=yt(r,function(s){return process.env.NODE_ENV!=="production"&&o&&wt(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(e,a),this._chunks[a]=new O2[r||"float"](this._rawCount),this._rawExtent[a]=za(),a},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=za());for(var l=a[e],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){process.env.NODE_ENV!=="production"&&wt(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(e);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,r||0),u=0;u<a;u++){var c=i[u];I2(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var h=d-s,v=0;v<a;v++){var c=i[v],p=qh.arrayRows.call(this,e[h]||f,c.property,h,v);n[v][d]=p;var g=o[v];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=yt(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=za()),I2(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,l);else for(var d=[],h=e;h<r;h++){d=i.getItem(h,d);for(var v=0;v<s;v++){var p=a[v],g=this._dimValueGetter(d,u[v],h,v);p[h]=g;var m=l[v];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],i=[];if(r==null){r=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<e)i=o+1;else if(r[o]>e)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=r[a]}else e=new n(r.buffer,0,i)}else{var n=Va(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Va(n._rawCount),o=new a(i),s=[],l=e.length,u=0,c=e[0],f=n._chunks,d=0;d<i;d++){var h=void 0,v=n.getRawIndex(d);if(l===0)h=r(d);else if(l===1){var p=f[c][v];h=r(p,d)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][v];s[g]=d,h=r.apply(null,s)}h&&(o[u++]=v)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var i=Ht(e),a=i.length;if(!a)return this;var o=r.count(),s=Va(r._rawCount),l=new s(o),u=0,c=i[0],f=e[c][0],d=e[c][1],h=r._chunks,v=!1;if(!r._indices){var p=0;if(a===1){for(var g=h[i[0]],m=0;m<n;m++){var y=g[m];(y>=f&&y<=d||isNaN(y))&&(l[u++]=p),p++}v=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],x=e[i[1]][0],S=e[i[1]][1],m=0;m<n;m++){var y=g[m],b=_[m];(y>=f&&y<=d||isNaN(y))&&(b>=x&&b<=S||isNaN(b))&&(l[u++]=p),p++}v=!0}}if(!v)if(a===1)for(var m=0;m<o;m++){var w=r.getRawIndex(m),y=h[i[0]][w];(y>=f&&y<=d||isNaN(y))&&(l[u++]=w)}else for(var m=0;m<o;m++){for(var T=!0,w=r.getRawIndex(m),L=0;L<a;L++){var C=i[L],y=h[C][w];(y<e[C][0]||y>e[C][1])&&(T=!1)}T&&(l[u++]=r.getRawIndex(m))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var i=e._chunks,a=[],o=r.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<r.length;c++)u[r[c]]=za();for(var f=0;f<s;f++){for(var d=e.getRawIndex(f),h=0;h<o;h++)l[h]=i[r[h]][d];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(a[0]=v,v=a);for(var c=0;c<v.length;c++){var p=r[c],g=v[c],m=u[p],y=i[p];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,d,h=new(Va(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 p=Math.min(v+l,o-1),g=Math.min(v+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var x=this.getRawIndex(_),S=a[x];isNaN(S)||(y+=S)}y/=g-p;var b=v,w=Math.min(v+l,o),T=v-1,L=a[u];c=-1,d=b;for(var C=-1,M=0,_=b;_<w;_++){var x=this.getRawIndex(_),S=a[x];if(isNaN(S)){M++,C<0&&(C=x);continue}f=Math.abs((T-m)*(S-L)-(T-_)*(y-L)),f>c&&(c=f,d=x)}M>0&&M<w-b&&(h[s++]=Math.min(C,d),d=Math.max(C,d)),h[s++]=d,u=d}return h[s++]=this.getRawIndex(o-1),n._count=s,n._indices=h,n.getRawIndex=this._getRawIdx,n},t.prototype.minmaxDownSample=function(e,r){for(var n=this.clone([e],!0),i=n._chunks,a=Math.floor(1/r),o=i[e],s=this.count(),l=new(Va(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,d=o[this.getRawIndex(f)],h=c,v=o[this.getRawIndex(h)],p=a;c+a>s&&(p=s-c);for(var g=0;g<p;g++){var m=this.getRawIndex(c+g),y=o[m];y<d&&(d=y,f=c+g),y>v&&(v=y,h=c+g)}var _=this.getRawIndex(f),x=this.getRawIndex(h);f<h?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},t.prototype.downSample=function(e,r,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[e],c=this.count(),f=a._rawExtent[e]=za(),d=new(Va(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 p=0;p<l;p++){var g=this.getRawIndex(v+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(v+i(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),d[h++]=y}return a._count=h,a._indices=d,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[e[0]][s],a);break;case 2:r(i[e[0]][s],i[e[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[e[l]][s];u[l]=a,r.apply(null,u)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=za();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)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<i;u++){var c=this.getRawIndex(u),f=r[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},t.prototype.clone=function(e,r){var n=new t,i=this._chunks,a=e&&Dn(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?NS(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=zt(this._extent),e._rawExtent=zt(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return Su(r[a],this._dimensions[a])}qh={arrayRows:e,objectRows:function(r,n,i,a){return Su(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Su(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),OS=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(ns(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Xe(s)?yn:hr,a=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=St(f.seriesLayoutBy,d.seriesLayoutBy)||null,v=St(f.sourceHeader,d.sourceHeader),p=St(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!v!=!!d.sourceHeader||p;i=g?[Kh(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:p},l)]:[]}else{var m=e;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[Kh(_,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&wt(i&&a),this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&wt(i!=null||n!=null),i!=null){var a="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),B2(a))}var o,s=[],l=[];return z(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&(process.env.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+i),B2(f)),s.push(c),l.push(u._getVersionSign())}),n?o=AS(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[dS(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!=="production"&&wt(ns(this._sourceHost),"Can only call getDataStore on series source manager.");var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];ns(this._sourceHost)&&l?s=l._innerGetDataStore(e,r,n):(s=new t0,s.initData(new L2(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(ns(e)){var r=Gh(e);return r?[r.getSourceManager()]:[]}else return yt(Fb(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(ns(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},t}();function ns(t){return t.mainType==="series"}function B2(t){throw new Error(t)}function is(t,e){return e.type=t,e}function V2(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ih(n)}function IS(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=bt(s),u=V2(e,r),c,f,d,h;if(o>1||l&&!o){var v=BS(s,e,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);h=c=Ba(i,r,a[0]),f=p.type}else h=c=l?s[0]:s;var g=Af(e),m=g&&e.name||"",y=i.getName(r),_=n?m:y;return is("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[is("nameValue",{markerType:"item",markerColor:u,name:_,noName:!An(_),value:c,valueType:f,dataIndex:r})].concat(d||[])})}function BS(t,e,r,n,i){var a=e.getData(),o=Dn(t,function(f,d,h){var v=a.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?z(n,function(f){c(Ba(a,r,f),f)}):z(t,c);function c(f,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(is("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Yn=de();function Tu(t,e){return t.getName(e)||t.getId(e)}var VS="__universalTransitionEnabled",dr=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=rs({count:FS,reset:HS}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Yn(this).sourceManager=new OS(this);a.prepareSource();var o=this.getInitialData(r,i);F2(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&wt(o,"getInitialData returned invalid data."),Yn(this).dataBeforeProcessed=o,z2(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Ko(this),a=i?Qo(r):{},o=this.subType;te.hasClass(o)&&(o+="Series"),re(r,n.getTheme().get(this.subType)),re(r,this.getDefaultOption()),Df(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Xn(r,a,i)},e.prototype.mergeOption=function(r,n){r=re(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Ko(this);i&&Xn(this.option,r,i);var a=Yn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);F2(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Yn(this).dataBeforeProcessed=o,z2(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!Xe(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&Df(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=e0(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Yn(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=e0(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Yn(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ot(r)},e.prototype.getSourceManager=function(){return Yn(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Yn(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],f=1/0,d=-1,h=0;return o.each(n,function(v,p){var g=l.dataToCoord(v),m=u-g,y=Math.abs(m);y<=a&&((y<f||y===f&&m>=0&&d<0)&&(f=y,d=m,h=0),m===d&&(c[h++]=p))}),c.length=h,c},e.prototype.formatTooltip=function(r,n,i){return IS({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Zt.node&&!(r&&r.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(r,n,i){var a=this.ecModel,o=jh.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=Tu(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ht(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Tu(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[VS])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Mt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=Tu(r,f);u[d]=!0,this._selectedDataIndicesMap[d]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],d=Tu(r,h);o.selectedMap=(i={},i[d]=!0,i),this._selectedDataIndicesMap=(a={},a[d]=r.getRawIndex(h),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return te.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(te);kr(dr,bS),kr(dr,jh),a1(dr,te);function z2(t){var e=t.name;Af(t)||(t.name=zS(t)||e)}function zS(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return z(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function FS(t){return t.model.getRawData().count()}function HS(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),WS}function WS(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function F2(t,e){z(R7(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,or(GS,e))})}function GS(t,e){var r=e0(t);return r&&r.setOutputEnd((e||this).count()),e}function e0(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var xn=function(){function t(){this.group=new ye,this.uid=ou("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();Rf(xn),El(xn);function r0(){var t=de();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var H2=de(),jS=r0(),rr=function(){function t(){this.group=new ye,this.uid=ou("viewChart"),this.renderTask=rs({plan:XS,reset:YS}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&qt("Unknown dataType "+i.dataType);return}G2(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&qt("Unknown dataType "+i.dataType);return}G2(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){ru(this.group,e)},t.markUpdateMethod=function(e,r){H2(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function W2(t,e,r){t&&Ca(t)&&(e==="emphasis"?Gl:jl)(t,r)}function G2(t,e,r){var n=ba(t,e),i=e&&e.highlightKey!=null?$9(e.highlightKey):null;n!=null?z(Ye(n),function(a){W2(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){W2(a,r,i)})}Rf(rr,["dispose"]),El(rr);function XS(t){return jS(t.model)}function YS(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&H2(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),US[l]}var US={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function j2(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.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 p=c||e,g=c||r;c=null,s=n-(g?i:a)-p,clearTimeout(o),g?o=setTimeout(f,p):s>=0?f():o=setTimeout(f,-s),i=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}var X2=de(),Y2={itemStyle:Ao(Og,!0),lineStyle:Ao(Ng,!0)},$S={lineStyle:"stroke",itemStyle:"fill"};function U2(t,e){var r=t.visualStyleMapper||Y2[e];return r||(console.warn("Unknown style type '"+e+"'."),Y2.itemStyle)}function $2(t,e){var r=t.visualDrawType||$S[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var ZS={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=U2(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=$2(t,n),u=o[l],c=Dt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Dt(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Dt(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var p=t.getDataParams(v),g=ot({},o);g[l]=c(p),h.setItemVisual(v,"style",g)}}}},as=new Te,KS={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=U2(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){as.option=l[n];var u=i(as),c=o.ensureUniqueItemVisual(s,"style");ot(c,u),as.option.decal&&(o.setItemVisual(s,"decal",as.option.decal),as.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},QS={performRawSeries:!0,overallReset:function(t){var e=Ot();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),X2(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=X2(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=$2(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var d=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",v=n.count();d[l]=r.getColorFromPalette(h,o,v)}})}})}},Lu=Math.PI;function JS(t,e){e=e||{},Ft(e,{text:"loading",textColor:Rt.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:Rt.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new ye,n=new _e({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new fr({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new _e({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Zl({shape:{startAngle:-Lu/2,endAngle:-Lu/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:Lu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Lu*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.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=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var Z2=function(){function t(e,r,n,i){this._stageTaskMap=Ot(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ot();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;z(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),wt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;z(e,function(l,u){if(!(i.visualType&&i.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(g){s(i,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var p=o.getPerformArgs(d,i.block);v.each(function(g){g.perform(p)}),d.perform(p)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ot(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||rs({plan:nw,reset:iw,count:ow}));h.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,h)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||rs({reset:qS});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ot(),u=e.seriesType,c=e.getTargetSeries,f=!0,d=!1,h="";process.env.NODE_ENV!=="production"&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),wt(!e.createOnAllSeries,h),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,z(n.getSeries(),v));function v(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(d=!0,rs({reset:tw,onDirty:rw})));m.context={model:p,overallProgress:f},m.agent=o,m.__block=f,a._pipe(p,m)}d&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return Dt(e)&&(e={overallReset:e,seriesType:sw(e)}),e.uid=ou("stageHandler"),r&&(e.visualType=r),e},t}();function qS(t){t.overallReset(t.ecModel,t.api,t.payload)}function tw(t){return t.overallProgress&&ew}function ew(){this.agent.dirty(),this.getDownstream().dirty()}function rw(){this.agent&&this.agent.dirty()}function nw(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function iw(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Ye(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?yt(e,function(r,n){return K2(n)}):aw}var aw=K2(0);function K2(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function ow(t){return t.data.count()}function sw(t){Mu=null;try{t(os,Q2)}catch{}return Mu}var os={},Q2={},Mu;J2(os,Yh),J2(Q2,c2),os.eachSeriesByType=os.eachRawSeriesByType=function(t){Mu=t},os.eachComponent=function(t){t.mainType==="series"&&t.subType&&(Mu=t.subType)};function J2(t,e){for(var r in e.prototype)t[r]=sr}var vt=Rt.darkColor,lw=vt.background,ss=function(){return{axisLine:{lineStyle:{color:vt.axisLine}},splitLine:{lineStyle:{color:vt.axisSplitLine}},splitArea:{areaStyle:{color:[vt.backgroundTint,vt.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:vt.axisMinorSplitLine}},axisLabel:{color:vt.axisLabel},axisName:{}}},q2={label:{color:vt.secondary},itemStyle:{borderColor:vt.borderTint},dividerLineStyle:{color:vt.border}},tm={darkMode:!0,color:vt.theme,backgroundColor:lw,axisPointer:{lineStyle:{color:vt.border},crossStyle:{color:vt.borderShade},label:{color:vt.tertiary}},legend:{textStyle:{color:vt.secondary},pageTextStyle:{color:vt.tertiary}},textStyle:{color:vt.secondary},title:{textStyle:{color:vt.primary},subtextStyle:{color:vt.quaternary}},toolbox:{iconStyle:{borderColor:vt.accent50}},tooltip:{backgroundColor:vt.neutral20,defaultBorderColor:vt.border,textStyle:{color:vt.tertiary}},dataZoom:{borderColor:vt.accent10,textStyle:{color:vt.tertiary},brushStyle:{color:vt.backgroundTint},handleStyle:{color:vt.neutral00,borderColor:vt.accent20},moveHandleStyle:{color:vt.accent40},emphasis:{handleStyle:{borderColor:vt.accent50}},dataBackground:{lineStyle:{color:vt.accent30},areaStyle:{color:vt.accent20}},selectedDataBackground:{lineStyle:{color:vt.accent50},areaStyle:{color:vt.accent30}}},visualMap:{textStyle:{color:vt.secondary},handleStyle:{borderColor:vt.neutral30}},timeline:{lineStyle:{color:vt.accent10},label:{color:vt.tertiary},controlStyle:{color:vt.accent30,borderColor:vt.accent30}},calendar:{itemStyle:{color:vt.neutral00,borderColor:vt.neutral20},dayLabel:{color:vt.tertiary},monthLabel:{color:vt.secondary},yearLabel:{color:vt.secondary}},matrix:{x:q2,y:q2,backgroundColor:{borderColor:vt.axisLine},body:{itemStyle:{borderColor:vt.borderTint}}},timeAxis:ss(),logAxis:ss(),valueAxis:ss(),categoryAxis:ss(),line:{symbol:"circle"},graph:{color:vt.theme},gauge:{title:{color:vt.secondary},axisLine:{lineStyle:{color:[[1,vt.neutral05]]}},axisLabel:{color:vt.axisLabel},detail:{color:vt.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:vt.background}},radar:function(){var t=ss();return t.axisName={color:vt.axisLabel},t.axisLine.lineStyle.color=vt.neutral20,t}(),treemap:{breadcrumb:{itemStyle:{color:vt.neutral20,textStyle:{color:vt.secondary}},emphasis:{itemStyle:{color:vt.neutral30}}}},sunburst:{itemStyle:{borderColor:vt.background}},map:{itemStyle:{borderColor:vt.border,areaColor:vt.neutral10},label:{color:vt.tertiary},emphasis:{label:{color:vt.primary},itemStyle:{areaColor:vt.highlight}},select:{label:{color:vt.primary},itemStyle:{areaColor:vt.highlight}}},geo:{itemStyle:{borderColor:vt.border,areaColor:vt.neutral10},emphasis:{label:{color:vt.primary},itemStyle:{areaColor:vt.highlight}},select:{label:{color:vt.primary},itemStyle:{color:vt.highlight}}}};tm.categoryAxis.splitLine.show=!1;var uw=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(Lt(e)){var a=qr(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};z(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"&&(r.mainType=v,r[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.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,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(f,d,h,v){return f[h]==null||d[v||h]===f[h]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),n0=["symbol","symbolSize","symbolRotate","symbolOffset"],em=n0.concat(["symbolKeepAspect"]),cw={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<n0.length;o++){var s=n0[o],l=t.get(s);Dt(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(ot({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var u=Ht(i);function c(f,d){for(var h=t.getRawValue(d),v=t.getDataParams(d),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(d,g,i[g](h,v))}}return{dataEach:a?c:null}}},fw={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<em.length;s++){var l=em[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function hw(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function dw(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function vw(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}z([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=ot({},i),process.env.NODE_ENV!=="production"&&we(i.type,n[1]),o.dispatchAction(ot(i,{type:n[1],seriesIndex:r(a,i)}))})})}function Fa(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&vn("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=ba(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:bt(d)?f.getName(d[0]):f.getName(d),selected:Lt(l)?l:ot({},l)})}}))}function pw(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(Fa("map","selectchanged",e,i,n),Fa("pie","selectchanged",e,i,n)):n.fromAction==="select"?(Fa("map","selected",e,i,n),Fa("pie","selected",e,i,n)):n.fromAction==="unselect"&&(Fa("map","unselected",e,i,n),Fa("pie","unselected",e,i,n))})}function Cu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var gw=Math.round(Math.random()*9),mw=typeof Object.defineProperty=="function",yw=function(){function t(){this._id="__ec_inner_"+gw++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return mw?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),_w=Yt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),xw=Yt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),bw=Yt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),l=n-a+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;t.moveTo(r-c,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+c-f*h,l+s+d*h,r,n-v,r,n),t.bezierCurveTo(r,n-v,r-c+f*h,l+s+d*h,r-c,l+s),t.closePath()}}),Sw=Yt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),ww={line:Wn,rect:_e,roundRect:_e,square:_e,circle:Io,diamond:xw,pin:bw,arrow:Sw,triangle:_w},Tw={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},i0={};z(ww,function(t,e){i0[e]=new t});var Lw=Yt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=bl(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=i0[n];i||(n="rect",i=i0[n]),Tw[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function Mw(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||Rt.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function Un(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=gg(t.slice(8),new It(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?l=gh(t.slice(7),{},new It(e,r,n,i),o?"center":"cover"):l=new Lw({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=Mw,a&&l.setColor(a),l}function rm(t){return bt(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function nm(t,e){if(t!=null)return bt(t)||(t=[t,t]),[oe(t[0],e[0])||0,oe(St(t[1],t[0]),e[1])||0]}function Hi(t){return isFinite(t)}function Cw(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Hi(n)?n:0,i=Hi(i)?i:1,a=Hi(a)?a:0,o=Hi(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Ew(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),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+r.x,s=s*i+r.y,l=l*a),o=Hi(o)?o:.5,s=Hi(s)?s:.5,l=l>=0&&Hi(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function im(t,e,r){for(var n=e.type==="radial"?Ew(t,e,r):Cw(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Dw(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function Eu(t){return parseInt(t,10)}function am(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||Eu(s[n])||Eu(t.style[n]))-(Eu(s[a])||0)-(Eu(s[o])||0)|0}function Aw(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:ie(t)?[t]:bt(t)?t:null}function a0(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Aw(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=yt(r,function(a){return a/i}),n/=i)}return[r,n]}var Pw=new zn(!0);function Du(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function om(t){return typeof t=="string"&&t!=="none"}function Au(t){var e=t.fill;return e!=null&&e!=="none"}function sm(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function lm(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function um(t,e,r){var n=Nf(e.image,e.__image,r);if(Dl(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Js),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function Rw(t,e,r,n){var i,a=Du(r),o=Au(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||Pw,f=e.__dirty;if(!n){var d=r.fill,h=r.stroke,v=o&&!!d.colorStops,p=a&&!!h.colorStops,g=o&&!!d.image,m=a&&!!h.image,y=void 0,_=void 0,x=void 0,S=void 0,b=void 0;(v||p)&&(b=e.getBoundingRect()),v&&(y=f?im(t,d,b):e.__canvasFillGradient,e.__canvasFillGradient=y),p&&(_=f?im(t,h,b):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(x=f||!e.__canvasFillPattern?um(t,d,e):e.__canvasFillPattern,e.__canvasFillPattern=x),m&&(S=f||!e.__canvasStrokePattern?um(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),v?t.fillStyle=y:g&&(x?t.fillStyle=x:o=!1),p?t.strokeStyle=_:m&&(S?t.strokeStyle=S:a=!1)}var w=e.getGlobalScale();c.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,L;t.setLineDash&&r.lineDash&&(i=a0(e),T=i[0],L=i[1]);var C=!0;(u||f&ha)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),C=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),C&&c.rebuildPath(t,l?s:1),T&&(t.setLineDash(T),t.lineDashOffset=L),n||(r.strokeFirst?(a&&lm(t,r),o&&sm(t,r)):(o&&sm(t,r),a&&lm(t,r))),T&&t.setLineDash([])}function kw(t,e,r){var n=e.__image=Nf(r.image,e.__image,e,e.onload);if(!(!n||!Dl(n))){var i=r.x||0,a=r.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),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,d=s-c;t.drawImage(n,u,c,f,d,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function Nw(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||un,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=a0(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Du(r)&&t.strokeText(i,r.x,r.y),Au(r)&&t.fillText(i,r.x,r.y)):(Au(r)&&t.fillText(i,r.x,r.y),Du(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var cm=["shadowBlur","shadowOffsetX","shadowOffsetY"],fm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function hm(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){nr(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?xi.opacity:o}(n||e.blend!==r.blend)&&(a||(nr(t,i),a=!0),t.globalCompositeOperation=e.blend||xi.blend);for(var s=0;s<cm.length;s++){var l=cm[s];(n||e[l]!==r[l])&&(a||(nr(t,i),a=!0),t[l]=t.dpr*(e[l]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(nr(t,i),a=!0),t.shadowColor=e.shadowColor||xi.shadowColor),a}function dm(t,e,r,n,i){var a=ls(e,i.inHover),o=n?null:r&&ls(r,i.inHover)||{};if(a===o)return!1;var s=hm(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(nr(t,i),s=!0),om(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(nr(t,i),s=!0),om(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(nr(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==u&&(s||(nr(t,i),s=!0),t.lineWidth=u)}for(var c=0;c<fm.length;c++){var f=fm[c],d=f[0];(n||a[d]!==o[d])&&(s||(nr(t,i),s=!0),t[d]=a[d]||f[1])}return s}function Ow(t,e,r,n,i){return hm(t,ls(e,i.inHover),r&&ls(r,i.inHover),n,i)}function vm(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function Iw(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),vm(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function Bw(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var pm=1,gm=2,mm=3,ym=4;function Vw(t){var e=Au(t),r=Du(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function nr(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function ls(t,e){return e&&t.__hoverStyle||t.style}function zw(t,e){o0(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function o0(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Ur,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||Dw(a,o))&&(o&&o.length&&(nr(t,r),t.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(nr(t,r),t.save(),Iw(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=e instanceof Yt&&e.autoBatch&&Vw(e.style);s||Bw(i,u.transform)?(nr(t,r),vm(t,e)):c||nr(t,r);var f=ls(e,r.inHover);e instanceof Yt?(r.lastDrawType!==pm&&(l=!0,r.lastDrawType=pm),dm(t,e,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&t.beginPath(),Rw(t,e,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):e instanceof No?(r.lastDrawType!==mm&&(l=!0,r.lastDrawType=mm),dm(t,e,u,l,r),Nw(t,e,f)):e instanceof Br?(r.lastDrawType!==gm&&(l=!0,r.lastDrawType=gm),Ow(t,e,u,l,r),kw(t,e,f)):e.getTemporalDisplayables&&(r.lastDrawType!==ym&&(l=!0,r.lastDrawType=ym),Fw(t,e,r)),c&&n&&nr(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function Fw(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),o0(t,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),o0(t,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var s0=new yw,_m=new va(100),xm=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function l0(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&s0.delete(t);var a=s0.get(t);if(a)return a;var o=Ft(t,{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=i?1:1/r,s0.set(t,s),t.dirty=!1,s;function l(u){for(var c=[r],f=!0,d=0;d<xm.length;++d){var h=o[xm[d]];if(h!=null&&!bt(h)&&!Lt(h)&&!ie(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var v;if(f){v=c.join(",")+(i?"-svg":"");var p=_m.get(v);p&&(i?u.svgElement=p:u.image=p)}var g=Sm(o.dashArrayX),m=Hw(o.dashArrayY),y=bm(o.symbol),_=Ww(g),x=wm(m),S=!i&&En.createCanvas(),b=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=L(),T;S&&(S.width=w.width*r,S.height=w.height*r,T=S.getContext("2d")),C(),f&&_m.put(v,S||b),u.image=S,u.svgElement=b,u.svgWidth=w.width,u.svgHeight=w.height;function L(){for(var M=1,A=0,E=_.length;A<E;++A)M=Up(M,_[A]);for(var P=1,A=0,E=y.length;A<E;++A)P=Up(P,y[A].length);M*=P;var I=x*_.length*y.length;if(process.env.NODE_ENV!=="production"){var k=function(R){console.warn("Calculated decal size is greater than "+R+" due to decal option settings so "+R+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+R+" to be larger to avoid incontinuity.")};M>o.maxTileWidth&&k("maxTileWidth"),I>o.maxTileHeight&&k("maxTileHeight")}return{width:Math.max(1,Math.min(M,o.maxTileWidth)),height:Math.max(1,Math.min(I,o.maxTileHeight))}}function C(){T&&(T.clearRect(0,0,S.width,S.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,S.width,S.height)));for(var M=0,A=0;A<m.length;++A)M+=m[A];if(M<=0)return;for(var E=-x,P=0,I=0,k=0;E<w.height;){if(P%2===0){for(var R=I/2%y.length,H=0,B=0,F=0;H<w.width*2;){for(var O=0,A=0;A<g[k].length;++A)O+=g[k][A];if(O<=0)break;if(B%2===0){var G=(1-o.symbolSize)*.5,j=H+g[k][B]*G,Y=E+m[P]*G,et=g[k][B]*o.symbolSize,ft=m[P]*o.symbolSize,gt=F/2%y[R].length;$(j,Y,et,ft,y[R][gt])}H+=g[k][B],++F,++B,B===g[k].length&&(B=0)}++k,k===g.length&&(k=0)}E+=m[P],++I,++P,P===m.length&&(P=0)}function $(U,q,tt,nt,at){var st=i?1:r,Et=Un(at,U*st,q*st,tt*st,nt*st,o.color,o.symbolKeepAspect);if(i){var K=n.painter.renderOneToVNode(Et);K&&b.children.push(K)}else zw(T,Et)}}}}function bm(t){if(!t||t.length===0)return[["rect"]];if(Lt(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!Lt(t[r])){e=!1;break}if(e)return bm([t]);for(var n=[],r=0;r<t.length;++r)Lt(t[r])?n.push([t[r]]):n.push(t[r]);return n}function Sm(t){if(!t||t.length===0)return[[0,0]];if(ie(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!ie(t[n])){r=!1;break}if(r)return Sm([t]);for(var i=[],n=0;n<t.length;++n)if(ie(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=yt(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function Hw(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(ie(t)){var e=Math.ceil(t);return[e,e]}var r=yt(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function Ww(t){return yt(t,function(e){return wm(e)})}function wm(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function Gw(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=l0(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=l0(i,e)}}})}var Hr=new fn,Pu={};function jw(t,e){process.env.NODE_ENV!=="production"&&Pu[t]&&qt("Already has an implementation of "+t+"."),Pu[t]=e}function Xw(t){return process.env.NODE_ENV!=="production"&&(Pu[t]||qt("Implementation of "+t+" doesn't exists.")),Pu[t]}var Yw=1,Uw=800,$w=900,Zw=1e3,Kw=2e3,Qw=5e3,Tm=1e3,Jw=1100,u0=2e3,Lm=3e3,qw=4e3,Ru=4500,tT=4600,eT=5e3,rT=6e3,Mm=7e3,nT={PROCESSOR:{FILTER:Zw,SERIES_FILTER:Uw,STATISTIC:Qw},VISUAL:{LAYOUT:Tm,PROGRESSIVE_LAYOUT:Jw,GLOBAL:u0,CHART:Lm,POST_CHART_LAYOUT:tT,COMPONENT:qw,BRUSH:eT,CHART_ITEM:Ru,ARIA:rT,DECAL:Mm}},xe="__flagInMainProcess",ku="__mainProcessVersion",De="__pendingUpdate",c0="__needsUpdateStatus",Cm=/^[a-zA-Z0-9_]+$/,f0="__connectUpdateStatus",Em=0,iT=1,aT=2;function Dm(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){ir(this.id);return}return Pm(this,t,e)}}function Am(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Pm(this,t,e)}}function Pm(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),fn.prototype[e].apply(t,r)}var Rm=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(fn),km=Rm.prototype;km.on=Am("on"),km.off=Am("off");var Wi,h0,Nu,bn,Ou,d0,v0,Ha,Wa,Nm,Om,p0,Im,Iu,Bm,Vm,Er,zm,Ga,Fm=function(t){ht(e,t);function e(r,n,i){var a=t.call(this,new uw)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;if(a[ku]=1,process.env.NODE_ENV!=="production"){var u=Zt.hasGlobalWindow?window:global;u&&(o=St(u.__ECHARTS__DEFAULT__RENDERER__,o),s=St(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=St(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr&&o8(function(h){var v=se(h),p=v.dataIndex;if(p!=null){var g=Ot();return g.set("series_index",v.seriesIndex),g.set("data_index",p),v.ssrType&&g.set("ssr_type",v.ssrType),g}});var c=a._zr=Fp(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:St(i.useDirtyRect,l),useCoarsePointer:St(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=j2(ce(c.flush,c),17),a._updateTheme(n),a._locale=lb(i.locale||Bg),a._coordSysMgr=new Vh;var f=a._api=Bm(a);function d(h,v){return h.__prio-v.__prio}return qs(zu,d),qs(y0,d),a._scheduler=new Z2(a,f,y0,zu),a._messageCenter=new Rm,a._initEvents(),a.resize=ce(a.resize,a),c.animation.on("frame",a._onframe,a),Nm(c,a),Om(c,a),Cc(a),a}return e.prototype._onframe=function(){if(!this._disposed){zm(this);var r=this._scheduler;if(this[De]){var n=this[De].silent;this[xe]=!0,Ga(this);try{Wi(this),bn.update.call(this,null,this[De].updateParams)}catch(l){throw this[xe]=!1,this[De]=null,l}this._zr.flush(),this[xe]=!1,this[De]=null,Ha.call(this,n),Wa.call(this,n)}else if(r.unfinished){var i=Yw,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),d0(this,a),r.performVisualTasks(a),Iu(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.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(r,n,i){if(this[xe]){process.env.NODE_ENV!=="production"&&qt("`setOption` should not be called during main process.");return}if(this._disposed){ir(this.id);return}var a,o,s;if(Mt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[xe]=!0,Ga(this),!this._model||n){var l=new qb(this._api),u=this._theme,c=this._model=new Yh;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},_0);var f={seriesTransition:s,optionChanged:!0};if(i)this[De]={silent:a,updateParams:f},this[xe]=!1,this.getZr().wakeUp();else{try{Wi(this),bn.update.call(this,null,f)}catch(d){throw this[De]=null,this[xe]=!1,d}this._ssr||this._zr.flush(),this[De]=null,this[xe]=!1,Ha.call(this,a),Wa.call(this,a)}},e.prototype.setTheme=function(r,n){if(this[xe]){process.env.NODE_ENV!=="production"&&qt("`setTheme` should not be called during main process.");return}if(this._disposed){ir(this.id);return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[De]&&(a==null&&(a=this[De].silent),o=this[De].updateParams,this[De]=null),this[xe]=!0,Ga(this);try{this._updateTheme(r),i.setTheme(this._theme),Wi(this),bn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[xe]=!1,s}this[xe]=!1,Ha.call(this,a),Wa.call(this,a)}},e.prototype._updateTheme=function(r){Lt(r)&&(r=Hm[r]),r&&(r=zt(r),r&&m2(r,!0),this._theme=r)},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||Zt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&we("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return z(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){ir(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;z(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return z(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){ir(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Wm[i]){var l=s,u=s,c=-s,f=-s,d=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();z(us,function(_,x){if(_.group===i){var S=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(zt(r)),b=_.getDom().getBoundingClientRect();l=a(b.left,l),u=a(b.top,u),c=o(b.right,c),f=o(b.bottom,f),d.push({dom:S,left:b.left,top:b.top})}}),l*=h,u*=h,c*=h,f*=h;var v=c-l,p=f-u,g=En.createCanvas(),m=Fp(g,{renderer:n?"svg":"canvas"});if(m.resize({width:v,height:p}),n){var y="";return z(d,function(_){var x=_.left-l,S=_.top-u;y+='<g transform="translate('+x+","+S+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new _e({shape:{x:0,y:0,width:v,height:p},style:{fill:r.connectedBackgroundColor}})),z(d,function(_){var x=new Br({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(x)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return Ou(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return Ou(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return Ou(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){ir(this.id);return}var i=this._model,a,o=Pf(i,r);return z(o,function(s,l){l.indexOf("Models")>=0&&z(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint?a=a||f.containPoint(n,u):process.env.NODE_ENV!=="production"&&Ve(l+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Ve(l+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Pf(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||Ve("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?hw(s,l,n):dw(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;z(oT,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Cu(l,function(p){var g=se(p);if(g&&g.dataIndex!=null){var m=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=m&&m.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=ot({},g.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&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(h&&v)&&Ve("model or view can not be found by params"),u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:v},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;z(m0,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),pw(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){ir(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){ir(this.id);return}this._disposed=!0;var r=this.getDom();r&&n1(this.getDom(),b0,"");var n=this,i=n._api,a=n._model;z(n._componentsViews,function(o){o.dispose(a,i)}),z(n._chartsViews,function(o){o.dispose(a,i)}),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 us[n.id]},e.prototype.resize=function(r){if(this[xe]){process.env.NODE_ENV!=="production"&&qt("`resize` should not be called during main process.");return}if(this._disposed){ir(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[De]&&(a==null&&(a=this[De].silent),i=!0,this[De]=null),this[xe]=!0,Ga(this);try{i&&Wi(this),bn.update.call(this,{type:"resize",animation:ot({duration:0},r&&r.animation)})}catch(o){throw this[xe]=!1,o}this[xe]=!1,Ha.call(this,a),Wa.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){ir(this.id);return}if(Mt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!x0[r]){process.env.NODE_ENV!=="production"&&Ve("Loading effects "+r+" not exists.");return}var i=x0[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){ir(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=ot({},r);return n.type=Vu[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){ir(this.id);return}if(Mt(n)||(n={silent:!!n}),!!Bu[r.type]&&this._model){if(this[xe]){this._pendingActions.push(r);return}var i=n.silent;v0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Zt.browser.weChat&&this._throttledZrFlush(),Ha.call(this,i),Wa.call(this,i)}},e.prototype.updateLabelLayout=function(){Hr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){ir(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&wt(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Wi=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),h0(f,!0),h0(f,!1),d.plan()},h0=function(f,d){for(var h=f._model,v=f._scheduler,p=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<p.length;_++)p[_].__alive=!1;d?h.eachComponent(function(b,w){b!=="series"&&x(w)}):h.eachSeries(x);function x(b){var w=b.__requireNewView;b.__requireNewView=!1;var T="_ec_"+b.id+"_"+b.type,L=!w&&g[T];if(!L){var C=qr(b.type),M=d?xn.getClass(C.main,C.sub):rr.getClass(C.sub);process.env.NODE_ENV!=="production"&&wt(M,C.sub+" does not exist."),L=new M,L.init(h,y),g[T]=L,p.push(L),m.add(L.group)}b.__viewId=L.__id=T,L.__alive=!0,L.__model=b,L.group.__ecComponentInfo={mainType:b.mainType,index:b.componentIndex},!d&&v.prepareView(L,b,h,y)}for(var _=0;_<p.length;){var S=p[_];S.__alive?_++:(!d&&S.renderTask.dispose(),m.remove(S.group),S.dispose(h,y),p.splice(_,1),g[S.__id]===S&&delete g[S.__id],S.__id=S.group.__ecComponentInfo=null)}},Nu=function(f,d,h,v,p){var g=f._model;if(g.setUpdatePayload(h),!v){z([].concat(f._componentsViews).concat(f._chartsViews),S);return}var m={};m[v+"Id"]=h[v+"Id"],m[v+"Index"]=h[v+"Index"],m[v+"Name"]=h[v+"Name"];var y={mainType:v,query:m};p&&(y.subType=p);var _=h.excludeSeriesId,x;_!=null&&(x=Ot(),z(Ye(_),function(b){var w=Jr(b,null);w!=null&&x.set(w,!0)})),g&&g.eachComponent(y,function(b){var w=x&&x.get(b.id)!=null;if(!w)if(q1(h))if(b instanceof dr)h.type===Di&&!h.notBlur&&!b.get(["emphasis","disabled"])&&F9(b,h,f._api);else{var T=ah(b.mainType,b.componentIndex,h.name,f._api),L=T.focusSelf,C=T.dispatchers;h.type===Di&&L&&!h.notBlur&&ih(b.mainType,b.componentIndex,f._api),C&&z(C,function(M){h.type===Di?Gl(M):jl(M)})}else sh(h)&&b instanceof dr&&(G9(b,h,f._api),K1(b),Er(f))},f),g&&g.eachComponent(y,function(b){var w=x&&x.get(b.id)!=null;w||S(f[v==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},f);function S(b){b&&b.__alive&&b[d]&&b[d](b.__model,g,f._api,h)}},bn={prepareAndUpdate:function(f){Wi(this),bn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var h=this._model,v=this._api,p=this._zr,g=this._coordSysMgr,m=this._scheduler;if(h){h.setUpdatePayload(f),m.restoreData(h,f),m.performSeriesTasks(h),g.create(h,v),m.performDataProcessorTasks(h,f),d0(this,h),g.update(h,v),n(h),m.performVisualTasks(h,f);var y=h.get("backgroundColor")||"transparent";p.setBackgroundColor(y);var _=h.get("darkMode");_!=null&&_!=="auto"&&p.setDarkMode(_),p0(this,h,v,f,d),Hr.trigger("afterupdate",h,v)}},updateTransform:function(f){var d=this,h=this._model,v=this._api;if(h){h.setUpdatePayload(f);var p=[];h.eachComponent(function(m,y){if(m!=="series"){var _=d.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,h,v,f);x&&x.update&&p.push(_)}else p.push(_)}});var g=Ot();h.eachSeries(function(m){var y=d._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,h,v,f);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:g}),Iu(this,h,v,f,{},g),Hr.trigger("afterupdate",h,v)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),rr.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),p0(this,d,this._api,f,{}),Hr.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()}),rr.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(v,p){if(v!=="series"){var g=d.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,h,d._api,f)}}),h.eachSeries(function(v){var p=d._chartsMap[v.__viewId];p.updateVisual(v,h,d._api,f)}),Hr.trigger("afterupdate",h,this._api))},updateLayout:function(f){bn.update.call(this,f)}};function r(f,d,h,v,p){if(f._disposed){ir(f.id);return}for(var g=f._model,m=f._coordSysMgr.getCoordinateSystems(),y,_=Pf(g,h),x=0;x<m.length;x++){var S=m[x];if(S[d]&&(y=S[d](g,_,v,p))!=null)return y}process.env.NODE_ENV!=="production"&&Ve("No coordinate system that supports "+d+" found by the given finder.")}Ou=r,d0=function(f,d){var h=f._chartsMap,v=f._scheduler;d.eachSeries(function(p){v.updateStreamModes(p,h[p.__viewId])})},v0=function(f,d){var h=this,v=this.getModel(),p=f.type,g=f.escapeConnect,m=Bu[p],y=(m.update||"update").split(":"),_=y.pop(),x=y[0]!=null&&qr(y[0]);this[xe]=!0,Ga(this);var S=[f],b=!1;f.batch&&(b=!0,S=yt(f.batch,function(k){return k=Ft(ot({},k),f),k.batch=null,k}));var w=[],T,L=[],C=m.nonRefinedEventType,M=sh(f),A=q1(f);if(A&&Z1(this._api),z(S,function(k){var R=m.action(k,v,h._api);if(m.refineEvent?L.push(R):T=R,T=T||ot({},k),T.type=C,w.push(T),A){var H=r1(f),B=H.queryOptionMap,F=H.mainTypeSpecified,O=F?B.keys()[0]:"series";Nu(h,_,k,O),Er(h)}else M?(Nu(h,_,k,"series"),Er(h)):x&&Nu(h,_,k,x.main,x.sub)}),_!=="none"&&!A&&!M&&!x)try{this[De]?(Wi(this),bn.update.call(this,f),this[De]=null):bn[_].call(this,f)}catch(k){throw this[xe]=!1,k}if(b?T={type:C,escapeConnect:g,batch:w}:T=w[0],this[xe]=!1,!d){var E=void 0;if(m.refineEvent){var P=m.refineEvent(L,f,v,this._api).eventContent;wt(Mt(P)),E=Ft({type:m.refinedEventType},P),E.fromAction=f.type,E.fromActionPayload=f,E.escapeConnect=!0}var I=this._messageCenter;I.trigger(T.type,T),E&&I.trigger(E.type,E)}},Ha=function(f){for(var d=this._pendingActions;d.length;){var h=d.shift();v0.call(this,h,f)}},Wa=function(f){!f&&this.trigger("updated")},Nm=function(f,d){f.on("rendered",function(h){d.trigger("rendered",h),f.animation.isFinished()&&!d[De]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},Om=function(f,d){f.on("mouseover",function(h){var v=h.target,p=Cu(v,Ca);p&&(H9(p,h,d._api),Er(d))}).on("mouseout",function(h){var v=h.target,p=Cu(v,Ca);p&&(W9(p,h,d._api),Er(d))}).on("click",function(h){var v=h.target,p=Cu(v,function(y){return se(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=se(p);d._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function i(f){var d=[],h=[],v=!1;if(f.eachComponent(function(y,_){var x=_.get("zlevel")||0,S=_.get("z")||0,b=_.getZLevelKey();v=v||!!b,(y==="series"?h:d).push({zlevel:x,z:S,idx:_.componentIndex,type:y,key:b})}),v){var p=d.concat(h),g,m;qs(p,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),z(p,function(y){var _=f.getComponent(y.type,y.idx),x=y.zlevel,S=y.key;g!=null&&(x=Math.max(g,x)),S?(x===g&&S!==m&&x++,m=S):m&&(x===g&&x++,m=""),g=x,_.setZLevel(x)})}}p0=function(f,d,h,v,p){i(d),Im(f,d,h,v,p),z(f._chartsViews,function(g){g.__alive=!1}),Iu(f,d,h,v,p),z(f._chartsViews,function(g){g.__alive||g.remove(d,h)})},Im=function(f,d,h,v,p,g){z(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,d,h,v),l(y,m),c(y,m)})},Iu=function(f,d,h,v,p,g){var m=f._scheduler;p=ot(p||{},{updatedSeries:d.getSeries()}),Hr.trigger("series:beforeupdate",d,h,p);var y=!1;d.eachSeries(function(_){var x=f._chartsMap[_.__viewId];x.__alive=!0;var S=x.renderTask;m.updatePayload(S,v),u(_,x),g&&g.get(_.uid)&&S.dirty(),S.perform(m.getPerformArgs(S))&&(y=!0),x.group.silent=!!_.get("silent"),s(_,x),K1(_)}),m.unfinished=y||m.unfinished,Hr.trigger("series:layoutlabels",d,h,p),Hr.trigger("series:transition",d,h,p),d.eachSeries(function(_){var x=f._chartsMap[_.__viewId];l(_,x),c(_,x)}),o(f,d),Hr.trigger("series:afterupdate",d,h,p)},Er=function(f){f[c0]=!0,f.getZr().wakeUp()},Ga=function(f){f[ku]=(f[ku]+1)%1e3},zm=function(f){f[c0]&&(f.getZr().storage.traverse(function(d){Fo(d)||a(d)}),f[c0]=!1)};function a(f){for(var d=[],h=f.currentStates,v=0;v<h.length;v++){var p=h[v];p==="emphasis"||p==="blur"||p==="select"||d.push(p)}f.selected&&f.states.select&&d.push("select"),f.hoverState===Bl&&f.states.emphasis?d.push("emphasis"):f.hoverState===Il&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var h=f._zr,v=h.storage,p=0;v.traverse(function(g){g.isGroup||p++}),p>d.get("hoverLayerThreshold")&&!Zt.node&&!Zt.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.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=Lg(f);d.eachRendered(function(v){return Mg(v,h.z,h.zlevel),!0})}}function u(f,d){d.eachRendered(function(h){if(!Fo(h)){var v=h.getTextContent(),p=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.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(),p=h.get("duration"),g=p>0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Fo(m))return;if(m instanceof Yt&&Z9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(v){m.stateTransition=g;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}m.__dirty&&a(m)}})}Bm=function(f){return new(function(d){ht(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 p=v.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);v=v.parent}},h.prototype.enterEmphasis=function(v,p){Gl(v,p),Er(f)},h.prototype.leaveEmphasis=function(v,p){jl(v,p),Er(f)},h.prototype.enterBlur=function(v){z9(v),Er(f)},h.prototype.leaveBlur=function(v){X1(v),Er(f)},h.prototype.enterSelect=function(v){Y1(v),Er(f)},h.prototype.leaveSelect=function(v){U1(v),Er(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[ku]},h}(c2))(f)},Vm=function(f){function d(h,v){for(var p=0;p<h.length;p++){var g=h[p];g[f0]=v}}z(Vu,function(h,v){f._messageCenter.on(v,function(p){if(Wm[f.group]&&f[f0]!==Em){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),m=[];z(us,function(y){y!==f&&y.group===f.group&&m.push(y)}),d(m,Em),z(m,function(y){y[f0]!==iT&&y.dispatchAction(g)}),d(m,aT)}})})}}(),e}(fn),g0=Fm.prototype;g0.on=Dm("on"),g0.off=Dm("off"),g0.one=function(t,e,r){var n=this;vn("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var oT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function ir(t){process.env.NODE_ENV!=="production"&&Ve("Instance "+t+" has been disposed")}var Bu={},Vu={},m0={},y0=[],_0=[],zu=[],Hm={},x0={},us={},Wm={},sT=+new Date-0,b0="_echarts_instance_";function lT(t,e,r){var n=!(r&&r.ssr);if(n){if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var i=uT(t);if(i)return process.env.NODE_ENV!=="production"&&Ve("There is a chart instance already initialized on the dom."),i;process.env.NODE_ENV!=="production"&&Ks(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&(!r||r.width==null)||!t.clientHeight&&(!r||r.height==null))&&Ve("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var a=new Fm(t,e,r);return a.id="ec_"+sT++,us[a.id]=a,n&&n1(t,b0,a.id),Vm(a),Hr.trigger("afterinit",a),a}function uT(t){return us[A8(t,b0)]}function Gm(t,e){Hm[t]=e}function jm(t){ne(_0,t)<0&&_0.push(t)}function Xm(t,e){w0(y0,t,e,Kw)}function cT(t){S0("afterinit",t)}function fT(t){S0("afterupdate",t)}function S0(t,e){Hr.on(t,e)}function ja(t,e,r){var n,i,a,o,s;Dt(e)&&(r=e,e=""),Mt(t)?(n=t.type,i=t.event,o=t.update,s=t.publishNonRefinedEvent,r||(r=t.action),a=t.refineEvent):(n=t,i=e);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;Bu[n]||(wt(Cm.test(n)&&Cm.test(i)),a&&wt(i!==n),Bu[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},m0[i]=1,a&&s&&(m0[u]=1),process.env.NODE_ENV!=="production"&&Vu[u]&&qt(u+' must not be shared; use "refineEvent" if you intend to share an event name.'),Vu[u]=n)}function hT(t,e){Vh.register(t,e)}function dT(t,e){w0(zu,t,e,Tm,"layout")}function Gi(t,e){w0(zu,t,e,Lm,"visual")}var Ym=[];function w0(t,e,r,n,i){if((Dt(e)||Mt(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");z(t,function(o){wt(o.__raw!==r)})}if(!(ne(Ym,r)>=0)){Ym.push(r);var a=Z2.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function Um(t,e){x0[t]=e}function vT(t,e,r){var n=Xw("registerMap");n&&n(t,e,r)}var pT=DS;Gi(u0,ZS),Gi(Ru,KS),Gi(Ru,QS),Gi(u0,cw),Gi(Ru,fw),Gi(Mm,Gw),jm(m2),Xm($w,fS),Um("default",JS),ja({type:Di,event:Di,update:Di},sr),ja({type:zl,event:zl,update:zl},sr),ja({type:Fl,event:th,update:Fl,action:sr,refineEvent:T0,publishNonRefinedEvent:!0}),ja({type:qf,event:th,update:qf,action:sr,refineEvent:T0,publishNonRefinedEvent:!0}),ja({type:Hl,event:th,update:Hl,action:sr,refineEvent:T0,publishNonRefinedEvent:!0});function T0(t,e,r,n){return{eventContent:{selected:j9(r),isFromClick:e.isFromClick||!1}}}Gm("default",{}),Gm("dark",tm);function cs(t){return t==null?0:t.length||1}function $m(t){return t}var gT=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||$m,this._newKeyGetter=i||$m,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=n[s],u=cs(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(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=cs(u),d=cs(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[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,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=cs(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=cs(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},t}(),mT=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function yT(t,e){var r={},n=r.encode={},i=Ot(),a=[],o=[],s={};z(t.dimensions,function(d){var h=t.getDimensionInfo(d),v=h.coordDim;if(v){process.env.NODE_ENV!=="production"&&wt(Wh.get(v)==null);var p=h.coordDimIndex;L0(n,v)[p]=d,h.isExtraCoord||(i.set(v,1),xT(h.type)&&(a[0]=d),L0(s,v)[p]=t.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(d)}Wh.each(function(g,m){var y=L0(n,m),_=h.otherDims[m];_!=null&&_!==!1&&(y[_]=h.name)})});var l=[],u={};i.each(function(d,h){var v=n[h];u[h]=v[0],l=l.concat(v)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=yt(l,function(d){return t.getDimensionInfo(d).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new mT(s,e),r}function L0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function _T(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function xT(t){return!(t==="ordinal"||t==="time")}var Fu=function(){function t(e){this.otherDims={},e!=null&&ot(this,e)}return t}(),bT=de(),ST={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Zm=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Jm(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return St(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=S2(this.source),n=!qm(e),i="",a=[],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=r?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=r?d.name:null,u=d.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=ST[u]||"f",c&&(i+=c.uid),i+="$"}var h=this.source,v=[h.seriesLayoutBy,h.startIndex,i].join("$$");return{dimensions:a,hash:v}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function Km(t){return t instanceof Zm}function Qm(t){for(var e=Ot(),r=0;r<(t||[]).length;r++){var n=t[r],i=Mt(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function Jm(t){var e=bT(t);return e.dimNameMap||(e.dimNameMap=Qm(t.dimensionsDefine))}function qm(t){return t>30}var fs=Mt,$n=yt,wT=typeof Int32Array>"u"?Array:Int32Array,TT="e\0\0",ty=-1,LT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],MT=["_approximateExtent"],ey,Hu,hs,Xa,M0,ds,C0,ry=function(){function t(e,r){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,i=!1;Km(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=Lt(f)?new Fu({name:f}):f instanceof Fu?f:new Fu(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),a[h]=d,u[h]!=null&&(l=!0),d.createInvertedIndices&&(s[h]=[]);var p=c;ie(d.storeDimIndex)&&(p=d.storeDimIndex),v.itemName===0&&(this._nameDimIdx=p),v.itemId===0&&(this._idDimIdx=p),process.env.NODE_ENV!=="production"&&wt(i||d.storeDimIndex>=0),i&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ot();z(o,function(m){g.set(a[m].storeDimIndex,m)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(ie(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof t0&&(a=e),!a){var o=this.dimensions,s=Zh(e)||Je(e)?new L2(e,o.length):e;a=new t0;var l=$n(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=yT(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&C0(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==yn&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===hr;if(l&&!i.pure)for(var u=[],c=e;c<r;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&_8(f)&&(this.hasItemOption=!0),f){var d=f.name;a[c]==null&&d!=null&&(a[c]=Jr(d,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=Jr(h,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<r;c++)C0(this,c);ey(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){fs(e)?ot(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=hs(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return Hu(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return bt(e)?i.getValues($n(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[r];return i==null||isNaN(i)?ty:i},t.prototype.each=function(e,r,n){Dt(e)&&(n=r,r=e,e=[]);var i=n||this,a=$n(Xa(e),this._getStoreDimIndex,this);this._store.each(a,i?ce(r,i):r)},t.prototype.filterSelf=function(e,r,n){Dt(e)&&(n=r,r=e,e=[]);var i=n||this,a=$n(Xa(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ce(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Ht(e);return z(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){Dt(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=$n(Xa(e),this._getStoreDimIndex,this),s=ds(this);return s._store=this._store.map(o,a?ce(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&z(Xa(e),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=$n(Xa(e),this._getStoreDimIndex,this);this._store.modify(s,o?ce(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=ds(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.minmaxDownSample=function(e,r){var n=ds(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),r),n},t.prototype.lttbDownSample=function(e,r){var n=ds(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new Te(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new gT(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Hu(e,n)},function(n){return Hu(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},fs(e)?ot(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),bt(a)?a=a.slice():fs(a)&&(a=ot({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,fs(r)?ot(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){fs(e)?ot(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?ot(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;D9(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){z(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:$n(this.dimensions,this._getDimInfo,this),this.hostModel)),M0(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];Dt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(Lc(arguments)))})},t.internalField=function(){ey=function(e){var r=e._invertedIndicesMap;z(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new wT(o.categories.length);for(var l=0;l<n.length;l++)n[l]=ty;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},hs=function(e,r,n){return Jr(e._getCategory(r,n),null)},Hu=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=hs(e,e._idDimIdx,r)),n==null&&(n=TT+r),n},Xa=function(e){return bt(e)||(e=e!=null?[e]:[]),e},ds=function(e){var r=new t(e._schema?e._schema:$n(e.dimensions,e._getDimInfo,e),e.hostModel);return M0(r,e),r},M0=function(e,r){z(LT.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,z(MT,function(n){e[n]=zt(r[n])}),e._calculationInfo=ot({},r._calculationInfo)},C0=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=hs(e,a,r)),l==null&&o!=null&&(i[r]=l=hs(e,o,r)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function ny(t,e){Zh(t)||(t=y2(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ot(),a=[],o=ET(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&qm(o),l=n===t.dimensionsDefine,u=l?Jm(t):Qm(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=Ot(c),d=new k2(o),h=0;h<d.length;h++)d[h]=-1;function v(L){var C=d[L];if(C<0){var M=n[L],A=Mt(M)?M:{name:M},E=new Fu,P=A.name;P!=null&&u.get(P)!=null&&(E.name=E.displayName=P),A.type!=null&&(E.type=A.type),A.displayName!=null&&(E.displayName=A.displayName);var I=a.length;return d[L]=I,E.storeDimIndex=L,a.push(E),E}return a[C]}if(!s)for(var h=0;h<o;h++)v(h);f.each(function(L,C){var M=Ye(L).slice();if(M.length===1&&!Lt(M[0])&&M[0]<0){f.set(C,!1);return}var A=f.set(C,[]);z(M,function(E,P){var I=Lt(E)?u.get(E):E;I!=null&&I<o&&(A[P]=I,g(v(I),C,P))})});var p=0;z(r,function(L){var C,M,A,E;if(Lt(L))C=L,E={};else{E=L,C=E.name;var P=E.ordinalMeta;E.ordinalMeta=null,E=ot({},E),E.ordinalMeta=P,M=E.dimsDef,A=E.otherDims,E.name=E.coordDim=E.coordDimIndex=E.dimsDef=E.otherDims=null}var I=f.get(C);if(I!==!1){if(I=Ye(I),!I.length)for(var k=0;k<(M&&M.length||1);k++){for(;p<o&&v(p).coordDim!=null;)p++;p<o&&I.push(p++)}z(I,function(R,H){var B=v(R);if(l&&E.type!=null&&(B.type=E.type),g(Ft(B,E),C,H),B.name==null&&M){var F=M[H];!Mt(F)&&(F={name:F}),B.name=B.displayName=F.name,B.defaultTooltip=F.defaultTooltip}A&&Ft(B.otherDims,A)})}});function g(L,C,M){Wh.get(C)!=null?L.otherDims[C]=M:(L.coordDim=C,L.coordDimIndex=M,i.set(C,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var x=m||"value";function S(L){L.name==null&&(L.name=L.coordDim)}if(s)z(a,function(L){S(L)}),a.sort(function(L,C){return L.storeDimIndex-C.storeDimIndex});else for(var b=0;b<o;b++){var w=v(b),T=w.coordDim;T==null&&(w.coordDim=DT(x,i,_),w.coordDimIndex=0,(!m||y<=0)&&(w.isExtraCoord=!0),y--),S(w),w.type==null&&(r2(t,b)===Ne.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return CT(a),new Zm({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function CT(t){for(var e=Ot(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function ET(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return z(e,function(a){var o;Mt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function DT(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var AT=function(){function t(e){this.coordSysDims=[],this.axisMap=Ot(),this.categoryAxisMap=Ot(),this.coordSysName=e}return t}();function PT(t){var e=t.get("coordinateSystem"),r=new AT(e),n=RT[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var RT={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",_r).models[0],a=t.getReferringComponents("yAxis",_r).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+aa(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+aa(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Ya(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Ya(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",_r).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),Ya(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",_r).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Ya(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Ya(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();z(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Ya(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",_r).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("matrix coordinate system should be specified.");e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Ya(t){return t.get("type")==="category"}function kT(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;NT(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,d;if(z(a,function(y,_){Lt(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+t.id,d="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,v=c.type,p=0;z(a,function(y){y.coordDim===h&&p++});var g={name:f,coordDim:h,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,v),m.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function NT(t){return!Km(t.schema)}function Ua(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function OT(t,e){return Ua(t,e)?t.getCalculationInfo("stackResultDimension"):e}function IT(t,e){var r=t.get("coordinateSystem"),n=Vh.get(r),i;return e&&e.coordSysDims&&(i=yt(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=_T(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function BT(t,e,r){var n,i;return r&&z(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Wu(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===hr;var o=PT(e),s=IT(e,o),l=r.useEncodeDefaulter,u=Dt(l)?l:l?or(Vb,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=ny(i,c),d=BT(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),v=kT(e,{schema:f,store:h}),p=new ry(f,e);p.setCalculationInfo(v);var g=d!=null&&VT(i)?function(m,y,_,x){return x===d?_:this.defaultDimValueGetter(m,y,_,x)}:null;return p.hasItemOption=!1,p.initData(a?i:h,null,g),p}function VT(t){if(t.sourceFormat===hr){var e=zT(t.data||[]);return!bt(Eo(e))}}function zT(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function FT(t){var e=Math.pow(10,Ll(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function E0(t){return t.type==="interval"||t.type==="log"}function HT(t,e,r,n,i){var a={},o=a.interval=jp(e/r);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=vs(o),l=a.niceTickExtent=[ke(Math.ceil(t[0]/o)*o,s),ke(Math.floor(t[1]/o)*o,s)];return WT(l,t),a}function D0(t){var e=Math.pow(10,Ll(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,ke(r*e)}function vs(t){return dn(t)+2}function iy(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function WT(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),iy(t,0,e),iy(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function A0(t,e){return t>=e[0]&&t<=e[1]}var GT=function(){function t(){this.normalize=ay,this.scale=oy}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ce(e.normalize,e),this.scale=ce(e.scale,e)):(this.normalize=ay,this.scale=oy)},t}();function ay(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function oy(t,e){return t*(e[1]-e[0])+e[0]}function P0(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Zn=function(){function t(e){this._calculator=new GT,this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]<r[0]?e[0]:r[0],e[1]>r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();El(Zn);var jT=0,R0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++jT,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&yt(n,XT);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!Lt(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ot(this.categories))},t}();function XT(t){return Mt(t)&&t.value!=null?t.value:t+""}var sy=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new R0({})),bt(i)&&(i=new R0({categories:yt(i,function(a){return Mt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:Lt(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return A0(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},e.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Zn);Zn.registerClass(sy);var Kn=ke,Qn=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return A0(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=vs(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=uu(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:Kn(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(v,p){return Math.round((p-v)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=Kn(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=Kn(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:a[1];return i[1]>h&&(r.expandToNicedExtent?l.push({value:Kn(h+n,o)}):l.push({value:i[1]})),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=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/r,h=vs(d);u<r-1;){var v=Kn(l.value+(u+1)*d,h);v>a[0]&&v<a[1]&&c.push(v),u++}var p=uu();p&&p.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(g){return g},this._interval,a),i.push(c)}}return i},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=dn(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Kn(r.value,i,!0);return bb(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=HT(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=Kn(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=Kn(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(Zn);Zn.registerClass(Qn);var ly=typeof Float32Array<"u",YT=ly?Float32Array:Array;function Sn(t){return bt(t)?ly?new Float32Array(t):t:new YT(t)}var UT="__ec_stack_";function k0(t){return t.get("stack")||UT+t.seriesIndex}function N0(t){return t.dim+t.index}function uy(t,e){var r=[];return e.eachSeriesByType(t,function(n){fy(n)&&r.push(n)}),r}function $T(t){var e={};z(t,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(),p=0,g=v.count();p<g;++p){var m=v.get(h,p);e[d]?e[d].push(m):e[d]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function cy(t){var e=$T(t),r=[];return z(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.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=oe(n.get("barWidth"),s),p=oe(n.get("barMaxWidth"),s),g=oe(n.get("barMinWidth")||(hy(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,defaultBarGap:_,axisKey:N0(a),stackId:k0(n)})}),ZT(r)}function ZT(t){var e={};z(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=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 r={};return z(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ht(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),z(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var x=m.width;y&&(x=Math.min(x,y)),_&&(x=Math.max(x,_)),m.width=x,f-=x+c*x,d--}else{var x=h;y&&y<x&&(x=Math.min(y,f)),_&&_>x&&(x=_),x!==h&&(m.width=x,f-=x+c*x,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var v=0,p;z(a,function(m,y){m.width||(m.width=h),p=m,v+=m.width*(1+c)}),p&&(v-=p.width*c);var g=-v/2;z(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function KT(t,e,r){if(t&&e){var n=t[N0(e)];return n!=null&&r!=null?n[k0(r)]:n}}function QT(t,e){var r=uy(t,e),n=cy(r);z(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=k0(i),u=n[N0(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function JT(t){return{seriesType:t,plan:r0(),reset:function(e){if(fy(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=Ua(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),h=qT(i,a),v=hy(e),p=e.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,x){for(var S=_.count,b=v&&Sn(S*3),w=v&&l&&Sn(S*3),T=v&&Sn(S),L=n.master.getRect(),C=d?L.width:L.height,M,A=x.getStore(),E=0;(M=_.next())!=null;){var P=A.get(f?g:o,M),I=A.get(s,M),k=h,R=void 0;f&&(R=+P-A.get(o,M));var H=void 0,B=void 0,F=void 0,O=void 0;if(d){var G=n.dataToPoint([P,I]);if(f){var j=n.dataToPoint([R,I]);k=j[0]}H=k,B=G[1]+y,F=G[0]-k,O=m,Math.abs(F)<p&&(F=(F<0?-1:1)*p)}else{var G=n.dataToPoint([I,P]);if(f){var j=n.dataToPoint([I,R]);k=j[1]}H=G[0]+y,B=k,F=m,O=G[1]-k,Math.abs(O)<p&&(O=(O<=0?-1:1)*p)}v?(b[E]=H,b[E+1]=B,b[E+2]=d?F:O,w&&(w[E]=d?L.x:H,w[E+1]=d?B:L.y,w[E+2]=C),T[M]=M):x.setItemLayout(M,{x:H,y:B,width:F,height:O}),E+=3}v&&x.setLayout({largePoints:b,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:d})}}}}}}function fy(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function hy(t){return t.pipelineContext&&t.pipelineContext.large}function qT(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var tL=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},dy=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Hg(r.value,Fg[yb(Uo(this._minLevelUnit))]||Fg.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return _b(r,n,i,o,a)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=[];if(!n)return a;var o=this.getSetting("useUTC"),s=hu(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=lL(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(l);var u=hu(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=Ni.length-1,f=0;return z(a,function(d){c=Math.min(c,ne(Ni,d.time.upperTimeUnit)),f=Math.max(f,d.time.level)}),a},e.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=Tr,n[1]+=Tr),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Tr}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=Gu.length,s=Math.min(tL(Gu,this._approxInterval,0,o),o-1);this._interval=Gu[s][1],this._intervalPrecision=vs(this._interval),this._minLevelUnit=Gu[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return ie(r)?r:+Co(r)},e.prototype.contain=function(r){return A0(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(Qn),Gu=[["second",Mh],["minute",Ch],["hour",Yo],["quarter-day",Yo*6],["half-day",Yo*12],["day",Tr*1.2],["half-week",Tr*3.5],["week",Tr*7],["month",Tr*31],["quarter",Tr*95],["half-year",zg/2],["year",zg]];function eL(t,e,r,n){return Eh(new Date(e),t,n).getTime()===Eh(new Date(r),t,n).getTime()}function rL(t,e){return t/=Tr,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function nL(t){var e=30*Tr;return t/=e,t>6?6:t>3?3:t>2?2:1}function iL(t){return t/=Yo,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function vy(t,e){return t/=e?Ch:Mh,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function aL(t){return jp(t)}function oL(t,e,r){var n=Math.max(0,ne(Ni,e)-1);return Eh(new Date(t),Ni[n],r).getTime()}function sL(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function lL(t,e,r,n,i,a){var o=1e4,s=vb,l=0;function u(E,P,I,k,R,H,B){for(var F=sL(R,E),O=P,G=new Date(O);O<I&&O<=n[1];){if(B.push({value:O}),l++>o){process.env.NODE_ENV!=="production"&&Ve("Exceed safe limit in time scale.");break}if(G[R](G[k]()+E),O=G.getTime(),a){var j=a.calcNiceTickMultiple(O,F);j>0&&(G[R](G[k]()+j*E),O=G.getTime())}}B.push({value:O,notAdd:!0})}function c(E,P,I){var k=[],R=!P.length;if(!eL(Uo(E),n[0],n[1],r)){R&&(P=[{value:oL(n[0],E,r)},{value:n[1]}]);for(var H=0;H<P.length-1;H++){var B=P[H].value,F=P[H+1].value;if(B!==F){var O=void 0,G=void 0,j=void 0,Y=!1;switch(E){case"year":O=Math.max(1,Math.round(e/Tr/365)),G=Wg(r),j=xb(r);break;case"half-year":case"quarter":case"month":O=nL(e),G=Dh(r),j=Gg(r);break;case"week":case"half-week":case"day":O=rL(e),G=Ah(r),j=jg(r),Y=!0;break;case"half-day":case"quarter-day":case"hour":O=iL(e),G=Ph(r),j=Xg(r);break;case"minute":O=vy(e,!0),G=Rh(r),j=Yg(r);break;case"second":O=vy(e,!1),G=kh(r),j=Ug(r);break;case"millisecond":O=aL(e),G=Nh(r),j=$g(r);break}F>=n[0]&&B<=n[1]&&u(O,B,F,G,j,Y,k),E==="year"&&I.length>1&&H===0&&I.unshift({value:I[0].value-O})}}for(var H=0;H<k.length;H++)I.push(k[H])}}for(var f=[],d=[],h=0,v=0,p=0;p<s.length;++p){var g=Uo(s[p]);if(mb(s[p])){c(s[p],f[f.length-1]||[],d);var m=s[p+1]?Uo(s[p+1]):null;if(g!==m){if(d.length){v=h,d.sort(function(E,P){return E.value-P.value});for(var y=[],_=0;_<d.length;++_){var x=d[_].value;(_===0||d[_-1].value!==x)&&(y.push(d[_]),x>=n[0]&&x<=n[1]&&h++)}var S=i/e;if(h>S*1.5&&v>S/1.5||(f.push(y),h>S||t===s[p]))break}d=[]}}}for(var b=Se(yt(f,function(E){return Se(E,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(E){return E.length>0}),w=[],T=b.length-1,p=0;p<b.length;++p)for(var L=b[p],C=0;C<L.length;++C){var M=hu(L[C].value,r);w.push({value:L[C].value,time:{level:T-p,upperTimeUnit:M,lowerTimeUnit:M}})}w.sort(function(E,P){return E.value-P.value});for(var A=[],p=0;p<w.length;++p)(p===0||w[p].value!==w[p-1].value)&&A.push(w[p]);return A}Zn.registerClass(dy);var O0=ke,uL=Math.floor,cL=Math.ceil,ju=Math.pow,Xu=Math.log,py=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new Qn,r}return e.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=t.prototype.getTicks.call(this,r),o=this.base;return this._originalScale._innerGetBreaks(),yt(a,function(s){var l=s.value,u=null,c=ju(o,l);l===n[0]&&this._fixMin?u=i[0]:l===n[1]&&this._fixMax&&(u=i[1]);var f;return u!=null&&(c=I0(c,u)),{value:c,break:f}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=P0(this.base,[r,n]);t.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var r=this.base,n=t.prototype.getExtent.call(this);n[0]=ju(r,n[0]),n[1]=ju(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=I0(n[0],i[0])),this._fixMax&&(n[1]=I0(n[1],i[1])),n},e.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=P0(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=d8(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[O0(cL(n[0]/a)*a),O0(uL(n[1]/a)*a)];this._interval=a,this._intervalPrecision=vs(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=Xu(r)/Xu(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=Xu(r)/Xu(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),ju(this.base,r)},e.prototype.setBreaksFromOption=function(r){},e.type="log",e}(Qn);function I0(t,e){return O0(t,dn(e))}Zn.registerClass(py);var fL=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;Dt(o)?this._modelMinNum=Yu(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Yu(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(Dt(s)?this._modelMaxNum=Yu(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Yu(e,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=bt(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[In(u[0],1),In(u[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),l==null&&(l=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=ia(s)||ia(l)||e&&!i;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}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&wt(!this.frozen),this[dL[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=hL[e];process.env.NODE_ENV!=="production"&&wt(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),hL={min:"_determinedMin",max:"_determinedMax"},dL={min:"_dataMin",max:"_dataMax"};function vL(t,e,r){var n=t.rawExtentInfo;return n||(n=new fL(t,e,r),t.rawExtentInfo=n,n)}function Yu(t,e){return e==null?null:ia(e)?NaN:t.parse(e)}function gy(t,e){var r=t.type,n=vL(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=uy("bar",o),l=!1;if(z(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=cy(s),c=pL(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function pL(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=KT(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;z(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;z(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-t,f=1-(s+l)/a,d=c/f-c;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function my(t,e){var r=e,n=gy(t,r),i=n.extent,a=r.get("splitNumber");t instanceof py&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(xy(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function gL(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new sy({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new dy({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Zn.getClass(e)||Qn)}}function mL(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function ps(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=pb(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(Lt(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(Dt(e)){if(t.type==="category")return function(i,a){return e(yy(t,i),i.value-t.scale.getExtent()[0],null)};var n=uu();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(yy(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function yy(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function B0(t){var e=t.get("interval");return e??"auto"}function _y(t){return t.type==="category"&&B0(t.getLabelModel())===0}function yL(t,e){var r={};return z(t.mapDimensionsAll(e),function(n){r[OT(t,n)]=!0}),Ht(r)}function $a(t){return t==="middle"||t==="center"}function gs(t){return t.getShallow("show")}function xy(t){var e=t.get("breaks",!0);if(e!=null){process.env.NODE_ENV!=="production"&&qt('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var by=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),Sy=[],_L={registerPreprocessor:jm,registerProcessor:Xm,registerPostInit:cT,registerPostUpdate:fT,registerUpdateLifecycle:S0,registerAction:ja,registerCoordinateSystem:hT,registerLayout:dT,registerVisual:Gi,registerTransform:pT,registerLoading:Um,registerMap:vT,registerImpl:jw,PRIORITY:nT,ComponentModel:te,ComponentView:xn,SeriesModel:dr,ChartView:rr,registerComponentModel:function(t){te.registerClass(t)},registerComponentView:function(t){xn.registerClass(t)},registerSeriesModel:function(t){dr.registerClass(t)},registerChartView:function(t){rr.registerClass(t)},registerCustomSeries:function(t,e){},registerSubTypeDefaulter:function(t,e){te.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){i8(t,e)}};function ji(t){if(bt(t)){z(t,function(e){ji(e)});return}ne(Sy,t)>=0||(Sy.push(t),Dt(t)&&(t={install:t}),t.install(_L))}var xL=de(),ms=de(),Wr={estimate:1,determine:2};function Uu(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function wy(t,e){var r=yt(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function bL(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=ps(t),i=t.scale.getExtent(),a=wy(t,r),o=Se(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:yt(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?wL(t,e):LL(t)}function SL(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=wy(t,n);return{ticks:Se(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?TL(t,e):{ticks:yt(t.scale.getTicks(r),function(o){return o.value})}}function wL(t,e){var r=t.getLabelModel(),n=Ty(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function Ty(t,e,r){var n=CL(t),i=B0(e),a=r.kind===Wr.estimate;if(!a){var o=My(n,i);if(o)return o}var s,l;Dt(i)?s=Dy(t,i):(l=i==="auto"?EL(t,r):i,s=Ey(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return V0(n,i,u),!0}):V0(n,i,u),u}function TL(t,e){var r=ML(t),n=B0(e),i=My(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),Dt(n))a=Dy(t,n,!0);else if(n==="auto"){var s=Ty(t,t.getLabelModel(),Uu(Wr.determine));o=s.labelCategoryInterval,a=yt(s.labels,function(l){return l.tickValue})}else o=n,a=Ey(t,o,!0);return V0(r,n,{ticks:a,tickCategoryInterval:o})}function LL(t){var e=t.scale.getTicks(),r=ps(t);return{labels:yt(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var ML=Ly("axisTick"),CL=Ly("axisLabel");function Ly(t){return function(r){return ms(r)[t]||(ms(r)[t]={list:[]})}}function My(t,e){for(var r=0;r<t.list.length;r++)if(t.list[r].key===e)return t.list[r].value}function V0(t,e,r){return t.list.push({key:e,value:r}),r}function EL(t,e){if(e.kind===Wr.estimate){var r=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return ms(t).autoInterval=r,!0}),r}var n=ms(t).autoInterval;return n??(ms(t).autoInterval=t.calculateCategoryInterval(e))}function DL(t,e){var r=e.kind,n=PL(t),i=ps(t),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=t.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=t.dataToCoord(f+1)-t.dataToCoord(f),h=Math.abs(d*Math.cos(a)),v=Math.abs(d*Math.sin(a)),p=0,g=0;f<=s[1];f+=u){var m=0,y=0,_=$6(i({value:f}),n.font,"center","top");m=_.width*1.3,y=_.height*1.3,p=Math.max(p,m,7),g=Math.max(g,y,7)}var x=p/h,S=g/v;isNaN(x)&&(x=1/0),isNaN(S)&&(S=1/0);var b=Math.max(0,Math.floor(Math.min(x,S)));if(r===Wr.estimate)return e.out.noPxChangeTryDetermine.push(ce(AL,null,t,b,l)),b;var w=Cy(t,b,l);return w??b}function AL(t,e,r){return Cy(t,e,r)==null}function Cy(t,e,r){var n=xL(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function PL(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Ey(t,e,r){var n=ps(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=_y(t),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==a[0]&&p(a[0]);for(var v=u;v<=a[1];v+=l)p(v);h&&v-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g,time:void 0,break:void 0})}return s}function Dy(t,e,r){var n=t.scale,i=ps(t),a=[];return z(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var Ay=[0,1],Py=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return u8(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),Ry(n,i.count())),Lf(e,Ay,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Ry(n,i.count()));var a=Lf(e,n,Ay,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=SL(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=yt(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return RL(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=yt(n,function(a){return yt(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Uu(Wr.determine),bL(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Uu(Wr.determine),DL(this,e)},t}();function Ry(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function RL(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;z(e,function(h){h.coord-=u/2,h.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=a[0]>a[1];d(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&d(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),d(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&d(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function d(h,v){return h=ke(h),v=ke(v),f?h>v:h<v}}function ky(t,e,r,n,i,a,o,s){var l=i-t,u=a-e,c=r-t,f=n-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,v=h/d;v*=d;var p=o[0]=t+v*c,g=o[1]=e+v*f;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}var Jn=new Pt,he=new Pt,Oe=new Pt,qn=new Pt,sn=new Pt,$u=[],$e=new Pt;function kL(t,e){if(e<=180&&e>0){e=e/180*Math.PI,Jn.fromArray(t[0]),he.fromArray(t[1]),Oe.fromArray(t[2]),Pt.sub(qn,Jn,he),Pt.sub(sn,Oe,he);var r=qn.len(),n=sn.len();if(!(r<.001||n<.001)){qn.scale(1/r),sn.scale(1/n);var i=qn.dot(sn),a=Math.cos(e);if(a<i){var o=ky(he.x,he.y,Oe.x,Oe.y,Jn.x,Jn.y,$u);$e.fromArray($u),$e.scaleAndAdd(sn,o/Math.tan(Math.PI-e));var s=Oe.x!==he.x?($e.x-he.x)/(Oe.x-he.x):($e.y-he.y)/(Oe.y-he.y);if(isNaN(s))return;s<0?Pt.copy($e,he):s>1&&Pt.copy($e,Oe),$e.toArray(t[1])}}}}function NL(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Jn.fromArray(t[0]),he.fromArray(t[1]),Oe.fromArray(t[2]),Pt.sub(qn,he,Jn),Pt.sub(sn,Oe,he);var n=qn.len(),i=sn.len();if(!(n<.001||i<.001)){qn.scale(1/n),sn.scale(1/i);var a=qn.dot(e),o=Math.cos(r);if(a<o){var s=ky(he.x,he.y,Oe.x,Oe.y,Jn.x,Jn.y,$u);$e.fromArray($u);var l=Math.PI/2,u=Math.acos(sn.dot(e)),c=l+u-r;if(c>=l)Pt.copy($e,Oe);else{$e.scaleAndAdd(sn,s/Math.tan(Math.PI/2-c));var f=Oe.x!==he.x?($e.x-he.x)/(Oe.x-he.x):($e.y-he.y)/(Oe.y-he.y);if(isNaN(f))return;f<0?Pt.copy($e,he):f>1&&Pt.copy($e,Oe)}$e.toArray(t[1])}}}}function z0(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function OL(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Ac(n[0],n[1]),a=Ac(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Pc([],n[1],n[0],o/i),l=Pc([],n[1],n[2],o/a),u=Pc([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)t.lineTo(n[c][0],n[c][1])}function IL(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,l=0;l<Vl.length;l++){var u=Vl[l],c=e[u],f=u==="normal";if(c){var d=c.get("show"),h=f?s:St(i.states[u]&&i.states[u].ignore,s);if(h||!St(d,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0),n&&z0(n,!0,u,c);continue}n||(n=new Pi,t.setTextGuideLine(n),!f&&(s||!o)&&z0(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),z0(n,!1,u,c)}}if(n){Ft(n.style,r),n.style.fill=null;var p=a.get("showAbove"),g=t.textGuideLineConfig=t.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=OL}}function BL(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<wr.length;n++){var i=wr[n];r[i]=t.getModel([i,e])}return r}var Ny=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],VL=1,Zu=2,Oy=VL|Zu;function Ku(t,e,r){r=r||Oy,e?t.dirty|=r:t.dirty&=~r}function Iy(t,e){return e=e||Oy,t.dirty==null||!!(t.dirty&e)}function ti(t){if(t)return Iy(t)&&By(t,t.label,t),t}function By(t,e,r){var n=e.getComputedTransform();t.transform=bh(t.transform,n);var i=t.localRect=jo(t.localRect,e.getBoundingRect()),a=e.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=ka.textMargin);for(var f=0;f<4;f++)F0[f]=c===ka.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===ka.textMargin&&tu(i,F0,!1,!1);var d=t.rect=jo(t.rect,i);return n&&d.applyTransform(n),c===ka.minMargin&&tu(d,F0,!1,!1),t.axisAligned=xh(n),(t.label=t.label||{}).ignore=e.ignore,Ku(t,!1),Ku(t,!0,Zu),t}var F0=[0,0,0,0];function zL(t,e,r){return t.transform=bh(t.transform,r),t.localRect=jo(t.localRect,e),t.rect=jo(t.rect,e),r&&t.rect.applyTransform(r),t.axisAligned=xh(r),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}function FL(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var r=t.transform;r&&(r[4]+=e.x,r[5]+=e.y);var n=t.rect;n&&(n.x+=e.x,n.y+=e.y);var i=t.obb;i&&i.fromBoundingRect(t.localRect,r)}}function Vy(t,e){for(var r=0;r<Ny.length;r++){var n=Ny[r];t[n]==null&&(t[n]=e[n])}return ti(t)}function zy(t){var e=t.obb;return(!e||Iy(t,Zu))&&(t.obb=e=e||new vg,e.fromBoundingRect(t.localRect,t.transform),Ku(t,!1,Zu)),e}function HL(t,e,r,n,i){var a=t.length,o=Gn[e],s=Aa[e];if(a<2)return!1;t.sort(function(L,C){return L.rect[o]-C.rect[o]});for(var l=0,u,c=!1,f=0,d=0;d<a;d++){var h=t[d],v=h.rect;u=v[o]-l,u<0&&(v[o]-=u,h.label[o]-=u,c=!0);var p=Math.max(-u,0);f+=p,l=v[o]+v[s]}f>0&&i&&b(-f/a,0,a);var g=t[0],m=t[a-1],y,_;x(),y<0&&w(-y,.8),_<0&&w(_,.8),x(),S(y,_,1),S(_,y,-1),x(),y<0&&T(-y),_<0&&T(_);function x(){y=g.rect[o]-r,_=n-m.rect[o]-m.rect[s]}function S(L,C,M){if(L<0){var A=Math.min(C,-L);if(A>0){b(A*M,0,a);var E=A+L;E<0&&w(-E*M,1)}else w(-L*M,1)}}function b(L,C,M){L!==0&&(c=!0);for(var A=C;A<M;A++){var E=t[A],P=E.rect;P[o]+=L,E.label[o]+=L}}function w(L,C){for(var M=[],A=0,E=1;E<a;E++){var P=t[E-1].rect,I=Math.max(t[E].rect[o]-P[o]-P[s],0);M.push(I),A+=I}if(A){var k=Math.min(Math.abs(L)/A,C);if(L>0)for(var E=0;E<a-1;E++){var R=M[E]*k;b(R,0,E+1)}else for(var E=a-1;E>0;E--){var R=M[E-1]*k;b(-R,E,a)}}}function T(L){var C=L<0?-1:1;L=Math.abs(L);for(var M=Math.ceil(L/(a-1)),A=0;A<a-1;A++)if(C>0?b(M,0,A+1):b(-M,a-A-1,a),L-=M,L<=0)return}return c}function WL(t){var e=[];t.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<t.length;n++){var i=ti(t[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<e.length;l++)if(H0(i,e[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):e.push(i)}}}function H0(t,e,r,n){return!t||!e||t.label&&t.label.ignore||e.label&&e.label.ignore||!t.rect.intersect(e.rect,r,n)?!1:t.axisAligned&&e.axisAligned?!0:zy(t).intersect(zy(e),r,n)}var GL=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new ye,i=Un("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=Un(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Rt.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}(dr);function W0(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Ba(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(Ba(t,e,r[o]));return a.join(" ")}}function Fy(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!bt(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var G0=function(t){ht(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Un(r,-1,-1,2,2,null,s);l.attr({z2:St(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=jL,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Gl(this.childAt(0))},e.prototype.downplay=function(){jl(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var d=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,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):Fe(h,v,s,n),Wo(h)}if(this._updateCommon(r,n,l,i,a),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,er(h,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,d,h,v,p,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,d=a.focus,h=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),d=_.get("focus"),h=_.get("blurScope"),v=_.get("disabled"),p=Ra(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var x=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var S=nm(r.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),m&&s.attr("cursor",m);var b=r.getItemVisual(n,"style"),w=b.fill;if(s instanceof Br){var T=s.style;s.useStyle(ot({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(ot({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var L=r.getItemVisual(n,"liftZ"),C=this._z2;L!=null?C==null&&(this._z2=s.z2,s.z2+=L):C!=null&&(s.z2=C,this._z2=null);var M=o&&o.useNameLabel;Pa(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:A,inheritColor:w,defaultOpacity:b.opacity});function A(I){return M?r.getName(I):W0(r,I)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var E=s.ensureState("emphasis");E.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;E.scaleX=this._sizeX*P,E.scaleY=this._sizeY*P,this.setSymbolScale(1),La(this,d,h,v)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=se(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ql(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ql(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return rm(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(ye);function jL(t,e){this.parent.drift(t,e)}function j0(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function Hy(t){return t!=null&&!Mt(t)&&(t={isIgnore:t}),t||{}}function Wy(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Ra(e),cursorStyle:e.get("cursor")}}var Gy=function(){function t(e){this.group=new ye,this._SymbolCtor=e||G0}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=Hy(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=Wy(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var d=c(f);if(j0(e,d,f,r)){var h=new o(e,f,l,u);h.setPosition(d),e.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,d){var h=a.getItemGraphicEl(d),v=c(f);if(!j0(e,v,f,r)){n.remove(h);return}var p=e.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==p)n.remove(h),h=new o(e,f,l,u),h.setPosition(v);else{h.updateData(e,f,l,u);var m={x:v[0],y:v[1]};s?h.attr(m):Fe(h,m,i)}n.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var d=a.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Wy(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=Hy(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(j0(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){ru(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function jy(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=XL(i,r),o=n.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=yt(t.dimensions,function(v){return e.mapDimension(v)}),d=!1,h=e.getCalculationInfo("stackResultDimension");return Ua(e,f[0])&&(d=!0,f[0]=h),Ua(e,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function XL(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:ie(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function Xy(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function YL(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function UL(t,e,r,n,i,a,o,s){for(var l=YL(t,e),u=[],c=[],f=[],d=[],h=[],v=[],p=[],g=jy(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],S=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=x.idx*2,w=x.idx1*2;var T=m[b],L=m[b+1],C=y[w],M=y[w+1];(isNaN(T)||isNaN(L))&&(T=C,L=M),u.push(T,L),c.push(C,M),f.push(r[b],r[b+1]),d.push(n[w],n[w+1]),p.push(e.getRawIndex(x.idx1));break;case"+":var A=x.idx,E=g.dataDimsForPoint,P=i.dataToPoint([e.get(E[0],A),e.get(E[1],A)]);w=A*2,u.push(P[0],P[1]),c.push(y[w],y[w+1]);var I=Xy(g,i,e,A);f.push(I[0],I[1]),d.push(n[w],n[w+1]),p.push(e.getRawIndex(A));break;case"-":S=!1}S&&(h.push(x),v.push(v.length))}v.sort(function(et,ft){return p[et]-p[ft]});for(var k=u.length,R=Sn(k),H=Sn(k),B=Sn(k),F=Sn(k),O=[],_=0;_<v.length;_++){var G=v[_],j=_*2,Y=G*2;R[j]=u[Y],R[j+1]=u[Y+1],H[j]=c[Y],H[j+1]=c[Y+1],B[j]=f[Y],B[j+1]=f[Y+1],F[j]=d[Y],F[j+1]=d[Y+1],O[_]=h[G]}return{current:R,next:H,stackedOnCurrent:B,stackedOnNext:F,status:O}}var ei=Math.min,ri=Math.max;function Xi(t,e){return isNaN(t)||isNaN(e)}function X0(t,e,r,n,i,a,o,s,l){for(var u,c,f,d,h,v,p=r,g=0;g<n;g++){var m=e[p*2],y=e[p*2+1];if(p>=i||p<0)break;if(Xi(m,y)){if(l){p+=a;continue}break}if(p===r)t[a>0?"moveTo":"lineTo"](m,y),f=m,d=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){p+=a;continue}if(o>0){for(var S=p+a,b=e[S*2],w=e[S*2+1];b===m&&w===y&&g<n;)g++,S+=a,p+=a,b=e[S*2],w=e[S*2+1],m=e[p*2],y=e[p*2+1],_=m-u,x=y-c;var T=g+1;if(l)for(;Xi(b,w)&&T<n;)T++,S+=a,b=e[S*2],w=e[S*2+1];var L=.5,C=0,M=0,A=void 0,E=void 0;if(T>=n||Xi(b,w))h=m,v=y;else{C=b-u,M=w-c;var P=m-u,I=b-m,k=y-c,R=w-y,H=void 0,B=void 0;if(s==="x"){H=Math.abs(P),B=Math.abs(I);var F=C>0?1:-1;h=m-F*H*o,v=y,A=m+F*B*o,E=y}else if(s==="y"){H=Math.abs(k),B=Math.abs(R);var O=M>0?1:-1;h=m,v=y-O*H*o,A=m,E=y+O*B*o}else H=Math.sqrt(P*P+k*k),B=Math.sqrt(I*I+R*R),L=B/(B+H),h=m-C*o*(1-L),v=y-M*o*(1-L),A=m+C*o*L,E=y+M*o*L,A=ei(A,ri(b,m)),E=ei(E,ri(w,y)),A=ri(A,ei(b,m)),E=ri(E,ei(w,y)),C=A-m,M=E-y,h=m-C*H/B,v=y-M*H/B,h=ei(h,ri(u,m)),v=ei(v,ri(c,y)),h=ri(h,ei(u,m)),v=ri(v,ei(c,y)),C=m-h,M=y-v,A=m+C*B/H,E=y+M*B/H}t.bezierCurveTo(f,d,h,v,m,y),f=A,d=E}else t.lineTo(m,y)}u=m,c=y,p+=a}return g}var Yy=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),$L=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:Rt.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Yy},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Xi(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Xi(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=X0(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=zn.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var d=a[f++],h=void 0,v=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(d){case o.M:s=a[f++],l=a[f++];break;case o.L:if(h=a[f++],v=a[f++],_=u?(r-s)/(h-s):(r-l)/(v-l),_<=1&&_>=0){var x=u?(v-l)*_+l:(h-s)*_+s;return u?[r,x]:[x,r]}s=h,l=v;break;case o.C:h=a[f++],v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++];var S=u?nl(s,h,p,m,r,c):nl(l,v,g,y,r,c);if(S>0)for(var b=0;b<S;b++){var w=c[b];if(w<=1&&w>=0){var x=u?Re(l,v,g,y,w):Re(s,h,p,m,w);return u?[r,x]:[x,r]}}s=m,l=y;break}}},e}(Yt),ZL=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Yy),KL=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new ZL},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Xi(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Xi(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=X0(r,i,o,s,s,1,n.smooth,l,n.connectNulls);X0(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},e}(Yt);function Uy(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.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 _e({shape:{x:o,y:s,width:l,height:u}});if(e){var d=t.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 p=Dt(i)?function(g){i(g,f)}:null;er(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,p)}return f}function $y(t,e,r){var n=t.getArea(),i=ke(n.r0,1),a=ke(n.r,1),o=new Hn({shape:{cx:ke(t.cx,1),cy:ke(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,er(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function QL(t,e,r,n,i){if(t){if(t.type==="polar")return $y(t,e,r);if(t.type==="cartesian2d")return Uy(t,e,r,n,i)}else return null;return null}function Y0(t,e){return t.type===e}function Zy(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function Ky(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function Qy(t,e){var r=Ky(t),n=r[0],i=r[1],a=Ky(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Jy(t){return ie(t)?t:t?.5:0}function JL(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=Sn(n*2),a=0;a<n;a++){var o=Xy(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function ni(t,e,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(i){for(l=0;l<t.length;l+=2){var h=e||t;!isNaN(h[l])&&!isNaN(h[l+1])&&d.push(t[l],t[l+1])}t=d}for(l=0;l<t.length-2;l+=2)switch(f[0]=t[l+2],f[1]=t[l+3],c[0]=t[l],c[1]=t[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,p=[];u[o]=p[o]=v,u[1-o]=c[1-o],p[1-o]=f[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(t[l++],t[l++]),s}function qL(t,e){var r=[],n=t.length,i,a;function o(c,f,d){var h=c.coord,v=(d-h)/(f.coord-h),p=T6(v,[c.color,f.color]);return{coord:d,color:p}}for(var s=0;s<n;s++){var l=t[s],u=l.coord;if(u<0)i=l;else if(u>e){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function tM(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=e.getAxis(i),u=yt(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=qL(u,i==="x"?r.getWidth():r.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,p=d[0].coord-v,g=d[h-1].coord+v,m=g-p;if(m<.001)return"transparent";z(d,function(_){_.offset=(_.coord-p)/m}),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 y=new dg(0,0,0,0,d,!0);return y[i]=p,y[i+"2"]=g,y}}function eM(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&rM(a,e))){var o=e.mapDimension(a.dim),s={};return z(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function rM(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(G0.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function nM(t,e){return isNaN(t)||isNaN(e)}function iM(t){for(var e=t.length/2;e>0&&nM(t[e*2-2],t[e*2-1]);e--);return e-1}function qy(t,e){return[t[e*2],t[e*2+1]]}function aM(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=t[u*2+i],!(isNaN(o)||isNaN(t[u*2+1-i]))){if(u===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function t5(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<wr.length;e++)if(t.get([wr[e],"endLabel","show"]))return!0;return!1}function U0(t,e,r,n){if(Y0(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=t5(n)?function(h,v){t._endLabelOnDuring(h,v,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=Uy(e,r,n,function(){var h=t._endLabel;h&&r&&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 process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),$y(e,r,n)}function oM(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var sM=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new ye,n=new Gy;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ce(this._changePolyState,this)},e.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",d=this._coordSys,h=this._symbolDraw,v=this._polyline,p=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=jy(a,s,_),S=y&&JL(a,s,x),b=r.get("showSymbol"),w=r.get("connectNulls"),T=b&&!f&&eM(r,s,a),L=this._data;L&&L.eachItemGraphicEl(function(et,ft){et.__temp&&(o.remove(et),L.setItemGraphicEl(ft,null))}),b||h.remove(),o.add(g);var C=f?!1:r.get("step"),M;a&&a.getArea&&r.get("clip",!0)&&(M=a.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var A=tM(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(v&&d.type===a.type&&C===this._step))b&&h.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(et){return[c[et*2],c[et*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,M),C&&(S&&(S=ni(S,c,a,C,w)),c=ni(c,null,a,C,w)),v=this._newPolyline(c),y?p=this._newPolygon(c,S):p&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,Ih(A)),g.setClipPath(U0(this,a,!0,r));else{y&&!p?p=this._newPolygon(c,S):p&&!y&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,Ih(A));var E=g.getClipPath();if(E){var P=U0(this,a,!1,r);er(E,{shape:P.shape},r)}else g.setClipPath(U0(this,a,!0,r));b&&h.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(et){return[c[et*2],c[et*2+1]]}}),(!Zy(this._stackedOnPoints,S)||!Zy(this._points,c))&&(m?this._doUpdateAnimation(s,S,a,i,C,_,w):(C&&(S&&(S=ni(S,c,a,C,w)),c=ni(c,null,a,C,w)),v.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:S})))}var I=r.getModel("emphasis"),k=I.get("focus"),R=I.get("blurScope"),H=I.get("disabled");if(v.useStyle(Ft(l.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Ma(v,r,"lineStyle"),v.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var B=v.getState("emphasis").style;B.lineWidth=+v.style.lineWidth+1}se(v).seriesIndex=r.seriesIndex,La(v,k,R,H);var F=Jy(r.get("smooth")),O=r.get("smoothMonotone");if(v.setShape({smooth:F,smoothMonotone:O,connectNulls:w}),p){var G=s.getCalculationInfo("stackedOnSeries"),j=0;p.useStyle(Ft(u.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),G&&(j=Jy(G.get("smooth"))),p.setShape({smooth:F,stackedOnSmooth:j,smoothMonotone:O,connectNulls:w}),Ma(p,r,"areaStyle"),se(p).seriesIndex=r.seriesIndex,La(p,k,R,H)}var Y=this._changePolyState;s.eachItemGraphicEl(function(et){et&&(et.onHoverStateChange=Y)}),this._polyline.onHoverStateChange=Y,this._data=s,this._coordSys=a,this._stackedOnPoints=S,this._points=c,this._step=C,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,v),p&&this.packEventData(r,p))},e.prototype.packEventData=function(r,n){se(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=ba(o,a);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=r.get("zlevel")||0,h=r.get("z")||0;u=new G0(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 rr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=ba(o,a);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 rr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;W1(this._polyline,r),n&&W1(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new $L({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new KL({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Dt(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Dt(f)?f(null):f;r.eachItemGraphicEl(function(h,v){var p=h;if(p){var g=[h.x,h.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var x=i,S=n.pointToCoord(g);a?(m=x.startAngle,y=x.endAngle,_=-S[1]/180*Math.PI):(m=x.r0,y=x.r,_=S[0])}else{var b=i;a?(m=b.x,y=b.x+b.width,_=h.x):(m=b.y+b.height,y=b.y,_=h.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var T=Dt(f)?f(v):c*w+d,L=p.getSymbolPath(),C=L.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),L.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(t5(r)){var o=r.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 fr({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=iM(l);c>=0&&(Pa(s,Ra(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?Fy(o,h):W0(o,f)},enableTextSetter:!0},oM(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),d=i.hostModel,h=d.get("connectNulls"),v=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,x=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,S=(m?p:0)*(y?-1:1),b=(m?0:-p)*(y?-1:1),w=m?"x":"y",T=aM(f,x,w),L=T.range,C=L[1]-L[0],M=void 0;if(C>=1){if(C>1&&!h){var A=qy(f,L[0]);u.attr({x:A[0]+S,y:A[1]+b}),o&&(M=d.getRawValue(L[0]))}else{var A=c.getPointOn(x,w);A&&u.attr({x:A[0]+S,y:A[1]+b});var E=d.getRawValue(L[0]),P=d.getRawValue(L[1]);o&&(M=P8(i,v,E,P,T.t))}a.lastFrameIndex=L[0]}else{var I=r===1||a.lastFrameIndex>0?L[0]:0,A=qy(f,I);o&&(M=d.getRawValue(I)),u.attr({x:A[0]+S,y:A[1]+b})}if(o){var k=au(u);typeof k.setLabelText=="function"&&k.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,d=UL(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),h=d.current,v=d.stackedOnCurrent,p=d.next,g=d.stackedOnNext;if(o&&(v=ni(d.stackedOnCurrent,d.current,i,o,l),h=ni(d.current,null,i,o,l),g=ni(d.stackedOnNext,d.next,i,o,l),p=ni(d.next,null,i,o,l)),Qy(h,p)>3e3||c&&Qy(v,g)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=h;var m={shape:{points:p}};d.current!==h&&(m.shape.__points=d.next),u.stopAnimation(),Fe(u,m,f),c&&(c.setShape({points:h,stackedOnPoints:v}),c.stopAnimation(),Fe(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=d.status,x=0;x<_.length;x++){var S=_[x].cmd;if(S==="="){var b=r.getItemGraphicEl(_[x].idx1);b&&y.push({el:b,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,T=0;T<y.length;T++){var L=y[T].el,C=y[T].ptIdx*2;L.x=w[C],L.y=w[C+1],L.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(rr);function $0(t,e){return{seriesType:t,plan:r0(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=e||a.large;if(i){var s=yt(i.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Ua(n,s[0])&&(s[0]=u),Ua(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 p=h.end-h.start,g=o&&Sn(p*l),m=[],y=[],_=h.start,x=0;_<h.end;_++){var S=void 0;if(l===1){var b=c.get(f,_);S=i.dataToPoint(b,null,y)}else m[0]=c.get(f,_),m[1]=c.get(d,_),S=i.dataToPoint(m,null,y);o?(g[x++]=S[0],g[x++]=S[1]):v.setItemLayout(_,S.slice())}o&&v.setLayout("points",g)}}}}}}var lM={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},uM=function(t){return Math.round(t.length/2)};function e5(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){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){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/h));var v=void 0;Lt(a)?v=lM[a]:Dt(a)&&(v=a),v&&e.setData(i.downSample(i.mapDimension(u.dim),1/h,v,uM))}}}}}function cM(t){t.registerChartView(sM),t.registerSeriesModel(GL),t.registerLayout($0("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,e5("line"))}var Z0=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)z(a.getAxes(),function(d,h){if(d.type==="category"&&n!=null){var v=d.getTicksCoords(),p=d.getTickModel().get("alignWithLabel"),g=o[h],m=n[h]==="x1"||n[h]==="y1";if(m&&!p&&(g+=1),v.length<2)return;if(v.length===2){s[h]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,S=0;S<v.length;S++){var b=v[S].coord,w=S===v.length-1?v[S-1].tickValue+x:v[S].tickValue;if(w===g){_=b;break}else if(w<g)y=b;else if(y!=null&&w>g){_=(b+y)/2;break}S===1&&(x=w-v[0].tickValue)}_==null&&(y?y&&(_=v[v.length-1].coord):_=v[0].coord),s[h]=d.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.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}(dr);dr.registerClass(Z0);var fM=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Wu(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 r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ig(Z0.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:Rt.color.primary,borderWidth:2}},realtimeSort:!1}),e}(Z0),hM=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),r5=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new hM},e.prototype.buildPath=function(r,n){var i=n.cx,a=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 p=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);v?(r.moveTo(p*o+i,g*o+a),r.arc(p*u+i,g*u+a,l,-Math.PI+c,c,!d)):r.moveTo(p*s+i,g*s+a),r.arc(i,a,s,c,f,!d),r.arc(m*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&r.arc(i,a,o,f,c,d)},e}(Yt);function dM(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return bl(n,i,a);var s=t(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,h=u.r0,v=(d+h)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=r?Math.abs(d-h)/2:0,_=Math.cos,x=Math.sin,S=c+d*_(p),b=f+d*x(p),w="left",T="top";switch(s){case"startArc":S=c+(h-l)*_(m),b=f+(h-l)*x(m),w="center",T="top";break;case"insideStartArc":S=c+(h+l)*_(m),b=f+(h+l)*x(m),w="center",T="bottom";break;case"startAngle":S=c+v*_(p)+Qu(p,l+y,!1),b=f+v*x(p)+Ju(p,l+y,!1),w="right",T="middle";break;case"insideStartAngle":S=c+v*_(p)+Qu(p,-l+y,!1),b=f+v*x(p)+Ju(p,-l+y,!1),w="left",T="middle";break;case"middle":S=c+v*_(m),b=f+v*x(m),w="center",T="middle";break;case"endArc":S=c+(d+l)*_(m),b=f+(d+l)*x(m),w="center",T="bottom";break;case"insideEndArc":S=c+(d-l)*_(m),b=f+(d-l)*x(m),w="center",T="top";break;case"endAngle":S=c+v*_(g)+Qu(g,l+y,!0),b=f+v*x(g)+Ju(g,l+y,!0),w="left",T="middle";break;case"insideEndAngle":S=c+v*_(g)+Qu(g,-l+y,!0),b=f+v*x(g)+Ju(g,-l+y,!0),w="right",T="middle";break;default:return bl(n,i,a)}return n=n||{},n.x=S,n.y=b,n.align=w,n.verticalAlign=T,n}}function vM(t,e,r,n){if(ie(n)){t.setTextConfig({rotation:n});return}else if(bt(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:t.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),t.setTextConfig({rotation:c})}function Qu(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Ju(t,e,r){return e*Math.cos(t)*(r?1:-1)}function ys(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;bt(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:yt(n,function(a){return In(a,i)})}}var K0=Math.max,Q0=Math.min;function pM(t,e){var r=t.getArea&&t.getArea();if(Y0(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var gM=function(t){ht(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&Ve("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){ru(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=r.isAnimationEnabled()?r:null,h=mM(r,u);h&&this._enableRealtimeSort(h,s,i);var v=r.get("clip",!0)||h,p=pM(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],S=this._backgroundEls,b=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function T(M){var A=qu[u.type](s,M);if(!A)return null;var E=TM(u,f,A);return E.useStyle(y.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",_):E.setShape("cornerRadius",_),x[M]=E,E}s.diff(l).add(function(M){var A=s.getItemModel(M),E=qu[u.type](s,M,A);if(E&&(m&&T(M),!(!s.hasValue(M)||!s5[u.type](E)))){var P=!1;v&&(P=n5[u.type](p,E));var I=i5[u.type](r,s,M,E,f,d,c.model,!1,g);h&&(I.forceLabelAnimation=!0),u5(I,s,M,A,E,r,f,u.type==="polar"),b?I.attr({shape:E}):h?a5(h,d,I,E,M,f,!1,!1):er(I,{shape:E},r,M),s.setItemGraphicEl(M,I),o.add(I),I.ignore=P}}).update(function(M,A){var E=s.getItemModel(M),P=qu[u.type](s,M,E);if(P){if(m){var I=void 0;S.length===0?I=T(A):(I=S[A],I.useStyle(y.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),x[M]=I);var k=qu[u.type](s,M),R=d5(f,k,u);Fe(I,{shape:R},d,M)}var H=l.getItemGraphicEl(A);if(!s.hasValue(M)||!s5[u.type](P)){o.remove(H);return}var B=!1;v&&(B=n5[u.type](p,P),B&&o.remove(H));var F=H&&(H.type==="sector"&&g||H.type==="sausage"&&!g);if(F&&(H&&Ho(H,r,A),H=null),H?Wo(H):H=i5[u.type](r,s,M,P,f,d,c.model,!0,g),h&&(H.forceLabelAnimation=!0),w){var O=H.getTextContent();if(O){var G=au(O);G.prevValue!=null&&(G.prevValue=G.value)}}else u5(H,s,M,E,P,r,f,u.type==="polar");b?H.attr({shape:P}):h?a5(h,d,H,P,M,f,!0,w):Fe(H,{shape:P},r,M,null),s.setItemGraphicEl(M,H),H.ignore=B,o.add(H)}}).remove(function(M){var A=l.getItemGraphicEl(M);A&&Ho(A,r,M)}).execute();var L=this._backgroundGroup||(this._backgroundGroup=new ye);L.removeAll();for(var C=0;C<x.length;++C)L.add(x[C]);o.add(L),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),f5(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),f5(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&QL(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),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(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:yt(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Ho(a,r,se(a).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}(rr),n5={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=K0(e.x,t.x),s=Q0(e.x+e.width,i),l=K0(e.y,t.y),u=Q0(e.y+e.height,a),c=s<o,f=u<l;return e.x=c&&o>i?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=Q0(e.r,t.r),a=K0(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},i5={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new _e({shape:ot({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?r5:Hn,c=new u({shape:n,z2:1});c.name="item";var f=l5(i);if(c.calculateTextPosition=dM(f,{isRoundCap:u===r5}),a){var d=c.shape,h=i?"r":"endAngle",v={};d[h]=i?n.r0:n.startAngle,v[h]=n[h],(s?Fe:er)(c,{shape:v},a)}return c}};function mM(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&Ve("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&Ve("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function a5(t,e,r,n,i,a,o,s){var l,u;a?(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?Fe:er)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Fe:er)(r,{shape:u},c,i)}function o5(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var yM=["x","y","width","height"],_M=["cx","cy","r","startAngle","endAngle"],s5={cartesian2d:function(t){return!o5(t,yM)},polar:function(t){return!o5(t,_M)}},qu={cartesian2d:function(t,e,r){var n=t.getItemLayout(e);if(!n)return null;var i=r?bM(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.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 xM(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function l5(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function u5(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ys(n.getModel("itemStyle"),c,!0);ot(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var d=n.getShallow("cursor");d&&t.attr("cursor",d);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=Ra(n);Pa(t,v,{labelFetcher:a,labelDataIndex:r,defaultText:W0(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=t.getTextContent();if(s&&p){var g=n.get(["label","position"]);t.textConfig.inside=g==="middle"?!0:null,vM(t,g==="outside"?h:g,l5(o),n.get(["label","rotate"]))}Kx(p,v,a.getRawValue(r),function(y){return Fy(e,y)});var m=n.getModel(["emphasis"]);La(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ma(t,n),xM(i)&&(t.style.fill="none",t.style.stroke="none",z(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function bM(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var SM=function(){function t(){}return t}(),c5=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new SM},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},e}(Yt);function f5(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=t.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new c5({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),r&&r.push(c)}var f=new c5({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,se(f).seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",h5),f.on("mousemove",h5)),r&&r.push(f)}var h5=j2(function(t){var e=this,r=wM(e,t.offsetX,t.offsetY);se(e).dataIndex=r>=0?r:null},30,!1);function wM(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,f=a.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[i]=a[d+2],s[n]=a[d+n],s[i]=a[d+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function d5(t,e,r){if(Y0(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function TM(t,e,r){var n=t.type==="polar"?Hn:_e;return new n({shape:d5(e,r,t),silent:!0,z2:0})}function LM(t){t.registerChartView(gM),t.registerSeriesModel(fM),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,or(QT,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,JT("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,e5("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var v5=Math.PI*2,tc=Math.PI/180;function MM(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=Pb(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*tc,h=n.get("endAngle"),v=n.get("padAngle")*tc;h=h==="auto"?d-v5:-h*tc;var p=n.get("minAngle")*tc,g=p+v,m=0;i.each(a,function(R){!isNaN(R)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,x=n.get("clockwise"),S=n.get("roseType"),b=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var T=x?1:-1,L=[d,h],C=T*v/2;_1(L,!x),d=L[0],h=L[1];var M=p5(n);M.startAngle=d,M.endAngle=h,M.clockwise=x,M.cx=s,M.cy=l,M.r=u,M.r0=c;var A=Math.abs(h-d),E=A,P=0,I=d;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(R,H){var B;if(isNaN(R)){i.setItemLayout(H,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:c,r:S?NaN:u});return}S!=="area"?B=y===0&&b?_:R*_:B=A/m,B<g?(B=g,E-=g):P+=R;var F=I+T*B,O=0,G=0;v>B?(O=I+T*B/2,G=O):(O=I+C,G=F-C),i.setItemLayout(H,{angle:B,startAngle:O,endAngle:G,clockwise:x,cx:s,cy:l,r0:c,r:S?Lf(R,w,[c,u]):u}),I=F}),E<v5&&m)if(E<=.001){var k=A/m;i.each(a,function(R,H){if(!isNaN(R)){var B=i.getItemLayout(H);B.angle=k;var F=0,O=0;k<v?(F=d+T*(H+1/2)*k,O=F):(F=d+T*H*k+C,O=d+T*(H+1)*k-C),B.startAngle=F,B.endAngle=O}})}else _=E/P,I=d,i.each(a,function(R,H){if(!isNaN(R)){var B=i.getItemLayout(H),F=B.angle===g?g:R*_,O=0,G=0;F<v?(O=I+T*F/2,G=O):(O=I+C,G=I+T*F-C),B.startAngle=O,B.endAngle=G,I+=T*F}})})}var p5=de();function g5(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var CM=Math.PI/180;function m5(t,e,r,n,i,a,o,s,l,u){if(t.length<2)return;function c(p){for(var g=p.rB,m=g*g,y=0;y<p.list.length;y++){var _=p.list[y],x=Math.abs(_.label.y-r),S=n+_.len,b=S*S,w=Math.sqrt(Math.abs((1-x*x/m)*b)),T=e+(w+_.len2)*i,L=T-_.label.x,C=_.targetTextWidth-L*i;y5(_,C,!0),_.label.x=T}}function f(p){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<p.length;y++)if(p[y].labelAlignTo==="none"){var _=p[y],x=_.label.y>r?m:g,S=Math.abs(_.label.y-r);if(S>=x.maxY){var b=_.label.x-e-_.len2*i,w=n+_.len,T=Math.abs(b)<w?Math.sqrt(S*S/(1-b*b/w/w)):w;x.rB=T,x.maxY=S}x.list.push(_)}c(g),c(m)}for(var d=t.length,h=0;h<d;h++)if(t[h].position==="outer"&&t[h].labelAlignTo==="labelLine"){var v=t[h].label.x-u;t[h].linePoints[1][0]+=v,t[h].label.x=u}HL(t,1,l,l+o)&&f(t)}function EM(t,e,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<t.length;d++){var h=t[d].label;J0(t[d])||(h.x<e?(c=Math.min(c,h.x),l.push(t[d])):(f=Math.max(f,h.x),u.push(t[d])))}for(var d=0;d<t.length;d++){var v=t[d];if(!J0(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var h=v.label,p=v.linePoints,g=void 0;v.labelAlignTo==="edge"?h.x<e?g=p[2][0]-v.labelDistance-o-v.edgeDistance:g=o+i-v.edgeDistance-p[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?h.x<e?g=c-o-v.bleedMargin:g=o+i-f-v.bleedMargin:h.x<e?g=h.x-o-v.bleedMargin:g=o+i-h.x-v.bleedMargin,v.targetTextWidth=g,y5(v,g,!1)}}m5(u,e,r,n,1,i,a,o,s,f),m5(l,e,r,n,-1,i,a,o,s,c);for(var d=0;d<t.length;d++){var v=t[d];if(!J0(v)&&v.linePoints){var h=v.label,p=v.linePoints,m=v.labelAlignTo==="edge",y=h.style.padding,_=y?y[1]+y[3]:0,x=h.style.backgroundColor?0:_,S=v.rect.width+x,b=p[1][0]-p[2][0];m?h.x<e?p[2][0]=o+v.edgeDistance+S+v.labelDistance:p[2][0]=o+i-v.edgeDistance-S-v.labelDistance:(h.x<e?p[2][0]=h.x+v.labelDistance:p[2][0]=h.x-v.labelDistance,p[1][0]=p[2][0]+b),p[1][1]=p[2][1]=h.y}}}function y5(t,e,r){if(t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(e<c||r){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:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",h)}_5(a,n)}}}function _5(t,e){x5.rect=t,By(x5,e,DM)}var DM={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},x5={};function J0(t){return t.position==="center"}function AM(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*CM,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(b){b.ignore=!0}function v(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}e.each(function(b){var w=e.getItemGraphicEl(b),T=w.shape,L=w.getTextContent(),C=w.getTextGuideLine(),M=e.getItemModel(b),A=M.getModel("label"),E=A.get("position")||M.get(["emphasis","label","position"]),P=A.get("distanceToLabelLine"),I=A.get("alignTo"),k=oe(A.get("edgeDistance"),u),R=A.get("bleedMargin");R==null&&(R=Math.min(u,d)>200?10:2);var H=M.getModel("labelLine"),B=H.get("length");B=oe(B,u);var F=H.get("length2");if(F=oe(F,u),Math.abs(T.endAngle-T.startAngle)<o){z(L.states,h),L.ignore=!0,C&&(z(C.states,h),C.ignore=!0);return}if(v(L)){var O=(T.startAngle+T.endAngle)/2,G=Math.cos(O),j=Math.sin(O),Y,et,ft,gt;n=T.cx,i=T.cy;var $=E==="inside"||E==="inner";if(E==="center")Y=T.cx,et=T.cy,gt="center";else{var U=($?(T.r+T.r0)/2*G:T.r*G)+n,q=($?(T.r+T.r0)/2*j:T.r*j)+i;if(Y=U+G*3,et=q+j*3,!$){var tt=U+G*(B+l-T.r),nt=q+j*(B+l-T.r),at=tt+(G<0?-1:1)*F,st=nt;I==="edge"?Y=G<0?c+k:c+u-k:Y=at+(G<0?-P:P),et=st,ft=[[U,q],[tt,nt],[at,st]]}gt=$?"center":I==="edge"?G>0?"right":"left":G>0?"left":"right"}var Et=Math.PI,K=0,J=A.get("rotate");if(ie(J))K=J*(Et/180);else if(E==="center")K=0;else if(J==="radial"||J===!0){var _t=G<0?-O+Et:-O;K=_t}else if(J==="tangential"&&E!=="outside"&&E!=="outer"){var mt=Math.atan2(G,j);mt<0&&(mt=Et*2+mt);var xt=j>0;xt&&(mt=Et+mt),K=mt-Et}if(a=!!K,L.x=Y,L.y=et,L.rotation=K,L.setStyle({verticalAlign:"middle"}),$){L.setStyle({align:gt});var W=L.states.select;W&&(W.x+=L.x,W.y+=L.y)}else{var X=new It(0,0,0,0);_5(X,L),r.push({label:L,labelLine:C,position:E,len:B,len2:F,minTurnAngle:H.get("minTurnAngle"),maxSurfaceAngle:H.get("maxSurfaceAngle"),surfaceNormal:new Pt(G,j),linePoints:ft,textAlign:gt,labelDistance:P,labelAlignTo:I,edgeDistance:k,bleedMargin:R,rect:X,unconstrainedWidth:X.width,labelStyleWidth:L.style.width})}w.setTextConfig({inside:$})}}),!a&&t.get("avoidLabelOverlap")&&EM(r,n,i,l,u,d,c,f);for(var p=0;p<r.length;p++){var g=r[p],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(z(m.states,h),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(y){var S=g.linePoints;_||!S?(z(y.states,h),y.ignore=!0):(kL(S,g.minTurnAngle),NL(S,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:S}),m.__hostTarget.textGuideLineConfig={anchor:new Pt(S[0][0],S[0][1])})}}}var PM=function(t){ht(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new fr;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),f=ot(ys(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(er(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,er(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),er(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,Fe(o,{shape:{endAngle:c.endAngle}},s,n))}else Wo(o),Fe(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),Ma(o,l);var h=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),p=Math.cos(h)*v,g=Math.sin(h)*v,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=ot({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},ys(u.getModel("itemStyle"),c)),ot(o.ensureState("select"),{x:p,y:g,shape:ys(l.getModel(["select","itemStyle"]),c)}),ot(o.ensureState("blur"),{shape:ys(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&ot(y.ensureState("select"),{x:p,y:g}),ot(_.ensureState("select"),{x:p,y:g}),La(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;Pa(a,Ra(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")a.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new Pi,this.setTextGuideLine(h)),IL(this,BL(o),{stroke:u,opacity:cn(s.get(["lineStyle","opacity"]),c,1)})}},e}(Hn),RM=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.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&&r.get("showEmptyCircle")){var d=p5(r),h=new Hn({shape:zt(d)});h.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(v){var p=new PM(o,v,u);o.setItemGraphicEl(v,p),l.add(p)}).update(function(v,p){var g=s.getItemGraphicEl(p);g.updateData(o,v,u),g.off("click"),l.add(g),o.setItemGraphicEl(v,g)}).remove(function(v){var p=s.getItemGraphicEl(v);Ho(p,r,v)}).execute(),AM(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="pie",e}(rr);function b5(t,e,r){e=bt(e)&&{coordDimensions:e}||ot({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=ny(n,e).dimensions,a=new ry(i,t);return a.initData(n,r),a}var S5=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),kM=de(),w5=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new S5(ce(this.getData,this),ce(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return b5(this,{coordDimensions:["value"],encodeDefaulter:or(zb,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=kM(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=c8(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Df(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.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}(dr);Tb({fullType:w5.type,getCoord2:function(t){return t.getShallow("center")}});function NM(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(ie(o)&&!isNaN(o)&&o<0)})}}}function OM(t){t.registerChartView(RM),t.registerSeriesModel(w5),vw("pie",t.registerAction),t.registerLayout(or(MM,"pie")),t.registerProcessor(g5("pie")),t.registerProcessor(NM("pie"))}var IM=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return Wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},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:Rt.color.primary}},universalTransition:{divideShape:"clone"}},e}(dr),T5=4,BM=function(){function t(){}return t}(),VM=function(t){ht(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new BM},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<T5,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var d=i[f++],h=i[f++];isNaN(d)||isNaN(h)||c&&!c.contain(d,h)||(s.x=d-a[0]/2,s.y=h-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,d=a[c+1]-l/2;if(r>=f&&n>=d&&r<=f+s&&n<=d+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<i.length;){var h=i[d++],v=i[d++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(v,u),f=Math.max(v,f)}r=this._rect=new It(l-o/2,u-s/2,c-l+o,f-u+s)}return r},e}(Yt),zM=function(){function t(){this.group=new ye}return t.prototype.updateData=function(e,r){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,r)},t.prototype.updateLayout=function(e){var r=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},t.prototype.incrementalPrepareUpdate=function(e){this._clear()},t.prototype.incrementalUpdate=function(e,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},t.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},t.prototype._create=function(){var e=new VM({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},t.prototype._setCommon=function(e,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=n.clipShape||null,e.symbolProxy=Un(r.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<T5;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=se(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),FM=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=$0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new zM:new Gy,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(rr),L5={left:0,right:0,top:0,bottom:0},ec=["25%","25%"],HM=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=Qo(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Xn(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Xn(this.option.outerBounds,r.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:L5,outerBoundsContain:"all",outerBoundsClampWidth:ec[0],outerBoundsClampHeight:ec[1],backgroundColor:Rt.color.transparent,borderWidth:1,borderColor:Rt.color.neutral30},e}(te),q0=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",_r).models[0]},e.type="cartesian2dAxis",e}(te);kr(q0,by);var M5={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:Rt.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:Rt.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Rt.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Rt.color.backgroundTint,Rt.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Rt.color.neutral00,borderColor:Rt.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},WM=re({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},M5),td=re({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Rt.color.axisMinorSplitLine,width:1}}},M5),GM=re({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},td),jM=Ft({logBase:10},td);const C5={category:WM,value:td,time:GM,log:jM};var XM={value:1,category:1,time:1,log:1},YM=null;function E5(){return YM}function D5(t,e,r,n){z(XM,function(i,a){var o=re(re({},C5[a],!0),n,!0),s=function(l){ht(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=Ko(this),h=d?Qo(c):{},v=f.getTheme();re(c,v.get(a+"Axis")),re(c,this.getDefaultOption()),c.type=A5(c),d&&Xn(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=R0.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=E5();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",A5)}function A5(t){return t.type||(t.data?"category":"value")}var UM=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return yt(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Se(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),ed=["x","y"];function P5(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var $M=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=ed,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!P5(r)||!P5(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-i[0]*c,h=o[1]-a[0]*f,v=this._transform=[c,0,0,f,d,h];this._invTransform=fo([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new It(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return gr(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[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(r,n,i){if(i=i||[],this._invTransform)return gr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new It(a,o,s,l)},e}(UM),ZM=function(t){ht(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(Py),KM="expandAxisBreak",ii=Math.PI,QM=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],JM=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],_s=de(),R5=de(),k5=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function qM(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=nd(t.axisName)&&$a(t.nameLocation);z(n,function(v){var p=ti(v);if(!(!p||p.label.ignore)){o.push(p);var g=a.transGroup;l&&(g.transform?fo(xs,g.transform):Bc(xs),p.transform&&co(xs,xs,p.transform),It.copy(rc,p.localRect),rc.applyTransform(xs),s?s.union(rc):It.copy(s=new It(0,0,0,0),rc))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(v,p){return Math.abs(v.label[u]-c)-Math.abs(p.label[u]-c)}),l&&s){var f=i.getExtent(),d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-d;s.union(new It(d,0,h,1))}a.stOccupiedRect=s,a.labelInfoList=o}var xs=Pn(),rc=new It(0,0,0,0),N5=function(t,e,r,n,i,a){if($a(t.nameLocation)){var o=a.stOccupiedRect;o&&O5(zL({},o,a.transGroup.transform),n,i)}else I5(a.labelInfoList,a.dirVec,n,i)};function O5(t,e,r){var n=new Pt;H0(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&FL(e,n)}function I5(t,e,r,n){for(var i=Pt.dot(n,e)>=0,a=0,o=t.length;a<o;a++){var s=t[i?a:o-1-a];s.label.ignore||O5(s,r,n)}}var Yi=function(){function t(e,r,n,i){this.group=new ye,this._axisModel=e,this._api=r,this._local={},this._shared=i||new k5(N5),this._resetCfgDetermined(n)}return t.prototype.updateCfg=function(e){if(process.env.NODE_ENV!=="production"){var r=this._shared.ensureRecord(this._axisModel).ready;wt(!r.axisLine&&!r.axisTickLabelDetermine),r.axisName=r.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=e.position,n.labelOffset=e.labelOffset,this._resetCfgDetermined(n)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(e){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=St(e.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=St(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:St(e.nameDirection,1),tickDirection:St(e.tickDirection,1),labelDirection:St(e.labelDirection,1),labelOffset:St(e.labelOffset,0),silent:St(e.silent,!0),axisName:i,nameLocation:cn(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:nd(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(wt(o.position!=null),wt(o.rotation!=null)),this._cfg=o;var s=new ye({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Pt(Math.cos(-o.rotation),Math.sin(-o.rotation))},t.prototype.build=function(e,r){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),z(tC,function(i){e[i]&&eC[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},t.innerTextLayout=function(e,r,n){var i=Gp(r-e),a,o;return Tl(i)?(o=n>0?"top":"bottom",a="center"):Tl(i-ii)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<ii?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),tC=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],eC={axisLine:function(t,e,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=r.ensureRecord(n).ready;wt(!s.axisLine),s.axisLine=!0}var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,t.raw.axisLineAutoShow!=null&&(l=!!t.raw.axisLineAutoShow)),!!l){var u=n.axis.getExtent(),c=a.transform,f=[u[0],0],d=[u[1],0],h=f[0]>d[0];c&&(gr(f,f,c),gr(d,d,c));var v=ot({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())E5().buildAxisBreakLine(n,i,a,p);else{var g=new Wn(ot({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]}},p));Go(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);Lt(m)&&(m=[m,m]),(Lt(y)||ie(y))&&(y=[y,y]);var _=nm(n.get(["axisLine","symbolOffset"])||0,y),x=y[0],S=y[1];z([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-d[0])*(f[0]-d[0])+(f[1]-d[1])*(f[1]-d[1]))}],function(b,w){if(m[w]!=="none"&&m[w]!=null){var T=Un(m[w],-x/2,-S/2,x,S,v.stroke,!0),L=b.r+b.offset,C=h?d:f;T.attr({rotation:b.rotate,x:C[0]+L*Math.cos(t.rotation),y:C[1]-L*Math.sin(t.rotation),silent:!0,z2:11}),i.add(T)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;wt(!l.axisTickLabelDetermine),l.axisTickLabelEstimate=!0}var u=z5(e,i,s);u&&B5(t,e,r,n,i,a,o,Wr.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;l.axisTickLabelDetermine=!0}var u=z5(e,i,s);u&&B5(t,e,r,n,i,a,o,Wr.determine);var c=aC(t,i,a,n);iC(t,e.labelLayoutList,c),oC(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);if(process.env.NODE_ENV!=="production"){var u=l.ready;wt(u.axisTickLabelEstimate||u.axisTickLabelDetermine),u.axisName=!0}e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var c=t.axisName;if(nd(c)){var f=t.nameLocation,d=t.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Pt(0,0),y=new Pt(0,0);f==="start"?(m.x=p[0]-g*v,y.x=-g):f==="end"?(m.x=p[1]+g*v,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+d*v,y.y=d);var _=Pn();y.transform(Xv(_,_,t.rotation));var x=n.get("nameRotate");x!=null&&(x=x*ii/180);var S,b;$a(f)?S=Yi.innerTextLayout(t.rotation,x??t.rotation,d):(S=rC(t.rotation,f,x||0,p),b=t.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var w=h.getFont(),T=n.get("nameTruncate",!0)||{},L=T.ellipsis,C=aa(t.raw.nameTruncateMaxWidth,T.maxWidth,b),M=s.nameMarginLevel||0,A=new fr({x:m.x,y:m.y,rotation:S.rotation,silent:Yi.isLabelSilent(n),style:Xo(h,{text:c,font:w,overflow:"truncate",width:C,ellipsis:L,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(eu({el:A,componentModel:n,itemName:c}),A.__fullText=c,A.anid="name",n.get("triggerEvent")){var E=Yi.makeAxisEventDataBase(n);E.targetType="axisName",E.name=c,se(A).eventData=E}a.add(A),A.updateTransform(),e.nameEl=A;var P=l.nameLayout=ti({label:A,priority:A.z2,defaultAttr:{ignore:A.ignore},marginDefault:$a(f)?QM[M]:JM[M]});if(l.nameLocation=f,i.add(A),A.decomposeTransform(),t.shouldNameMoveOverlap&&P){var I=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&wt(I.labelInfoList),r.resolveAxisNameOverlap(t,r,n,P,y,I)}}}};function B5(t,e,r,n,i,a,o,s){F5(e)||sC(t,e,i,s,n,o);var l=e.labelLayoutList;lC(t,n,l,a),t.rotation;var u=t.optionHideOverlap;nC(n,l,u),u&&WL(Se(l,function(c){return c&&!c.label.ignore})),qM(t,r,n,l)}function rC(t,e,r,n){var i=Gp(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Tl(i-ii/2)?(o=l?"bottom":"top",a="center"):Tl(i-ii*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<ii*1.5&&i>ii/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function nC(t,e,r){if(_y(t.axis))return;function n(s,l,u){var c=ti(e[l]),f=ti(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){bs(c.label);return}if(f.suggestIgnore){bs(f.label);return}var d=.1;if(!r){var h=[0,0,0,0];c=Vy({marginForce:h},c),f=Vy({marginForce:h},f)}H0(c,f,null,{touchThreshold:d})&&bs(s?f.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function iC(t,e,r){t.showMinorTicks||z(e,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=R5(a),s=_s(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){bs(a);return}}})}function bs(t){t&&(t.ignore=!0)}function V5(t,e,r,n,i){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(gr(o,o,e),gr(s,s,e));var c=new Wn({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Go(c.shape,c.style.lineWidth),c.anid=i+"_"+t[l].tickValue,a.push(c);var f=R5(c);f.onBand=!!t[l].onBand,f.tickValue=t[l].tickValue}return a}function aC(t,e,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,t.raw.axisTickAutoShow!=null&&(o=!!t.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=t.tickDirection*a.get("length"),u=i.getTicksCoords(),c=V5(u,r.transform,l,Ft(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)e.add(c[f]);return c}function oC(t,e,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!t.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Ft(l.getLineStyle(),Ft(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=V5(s[f],r.transform,u,c,"minorticks_"+f),h=0;h<d.length;h++)e.add(d[h])}}function z5(t,e,r){if(F5(t)){var n=t.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&wt(t.labelGroup&&n);var i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(e.remove(t.labelGroup),rd(t,null,null,null))}return!0}function sC(t,e,r,n,i,a){var o=i.axis,s=aa(t.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new ye;r.add(l);var u=Uu(n);if(!s||o.scale.isBlank()){rd(e,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),d=(aa(t.raw.labelRotate,c.get("rotate"))||0)*ii/180,h=Yi.innerTextLayout(t.rotation,d,t.labelDirection),v=i.getCategories&&i.getCategories(!0),p=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;z(f,function(x,S){var b,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(x.tickValue):x.tickValue,T=x.formattedLabel,L=x.rawLabel,C=c;if(v&&v[w]){var M=v[w];Mt(M)&&M.textStyle&&(C=new Te(M.textStyle,c,i.ecModel))}var A=C.getTextColor()||i.get(["axisLine","lineStyle","color"]),E=C.getShallow("align",!0)||h.textAlign,P=St(C.getShallow("alignMinLabel",!0),E),I=St(C.getShallow("alignMaxLabel",!0),E),k=C.getShallow("verticalAlign",!0)||C.getShallow("baseline",!0)||h.textVerticalAlign,R=St(C.getShallow("verticalAlignMinLabel",!0),k),H=St(C.getShallow("verticalAlignMaxLabel",!0),k),B=10+(((b=x.time)===null||b===void 0?void 0:b.level)||0);m=Math.min(m,B),y=Math.max(y,B);var F=new fr({x:0,y:0,rotation:0,silent:Yi.isLabelSilent(i),z2:B,style:Xo(C,{text:T,align:S===0?P:S===f.length-1?I:E,verticalAlign:S===0?R:S===f.length-1?H:k,fill:Dt(A)?A(o.type==="category"?L:o.type==="value"?w+"":w,S):A})});F.anid="label_"+w;var O=_s(F);if(O.break=x.break,O.tickValue=w,O.layoutRotation=h.rotation,eu({el:F,componentModel:i,itemName:T,formatterParamsExtra:{isTruncated:function(){return F.isTruncated},value:L,tickIndex:S}}),g){var G=Yi.makeAxisEventDataBase(i);G.targetType="axisLabel",G.value=L,G.tickIndex=S,x.break&&(G.break={start:x.break.parsedBreak.vmin,end:x.break.parsedBreak.vmax}),o.type==="category"&&(G.dataIndex=w),se(F).eventData=G,x.break&&cC(i,a,F,x.break)}p.push(F),l.add(F)});var _=yt(p,function(x){return{label:x,priority:_s(x).break?x.z2+(y-m+1):x.z2,defaultAttr:{ignore:x.ignore}}});rd(e,_,l,u)}function F5(t){return!!t.labelLayoutList}function rd(t,e,r,n){t.labelLayoutList=e,t.labelGroup=r,t.axisLabelsCreationContext=n}function lC(t,e,r,n){var i=e.get(["axisLabel","margin"]);z(r,function(a,o){var s=ti(a);if(s){var l=s.label,u=_s(l);s.suggestIgnore=l.ignore,l.ignore=!1,_l(wn,uC),wn.x=e.axis.dataToCoord(u.tickValue),wn.y=t.labelOffset+t.labelDirection*i,wn.rotation=u.layoutRotation,n.add(wn),wn.updateTransform(),n.remove(wn),wn.decomposeTransform(),_l(l,wn),l.markRedraw(),Ku(s,!0),ti(s)}})}var wn=new _e,uC=new _e;function nd(t){return!!t}function cC(t,e,r,n){r.on("click",function(i){var a={type:KM,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(a)})}function lP(t,e,r){}const H5=Yi;function W5(t,e,r){r=r||{};var n=e.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[t.x,t.x+t.width,t.y,t.y+t.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(a){var h=a.toGlobalCoord(a.dataToCoord(0));d[c.onZero]=Math.max(Math.min(h,d[1]),d[0])}i.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=v[o],i.labelOffset=a?d[c[o]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),aa(r.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var p=e.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-p:p,i.z2=1,i}function fC(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function G5(t){var e={xAxisModel:null,yAxisModel:null};return z(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,_r).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+cn(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}function hC(t,e,r,n,i,a){for(var o=W5(t,r),s=!1,l=!1,u=0;u<e.length;u++)E0(e[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new H5(r,n,o,i)}function dC(t,e,r){var n=W5(e,r);if(process.env.NODE_ENV!=="production"){var i=t.__getRawCfg();z(Ht(n),function(a){a!=="position"&&a!=="labelOffset"&&wt(n[a]===i[a])})}t.updateCfg(n)}function j5(t,e,r){var n,i=Qn.prototype,a=i.getTicks.call(r),o=i.getTicks.call(r,{expandToNicedExtent:!0}),s=a.length-1,l=i.getInterval.call(r),u=gy(t,e),c=u.extent,f=u.fixMin,d=u.fixMax;t.type==="log"&&(c=P0(t.base,c,!0)),t.setBreaksFromOption(xy(e)),t.setExtent(c[0],c[1]),t.calcNiceExtent({splitNumber:s,fixMin:f,fixMax:d});var h=i.getExtent.call(t);f&&(c[0]=h[0]),d&&(c[1]=h[1]);var v=i.getInterval.call(t),p=c[0],g=c[1];if(f&&d)v=(g-p)/s;else if(f)for(g=c[0]+v*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)v=D0(v),g=c[0]+v*s;else if(d)for(p=c[1]-v*s;p>c[0]&&isFinite(p)&&isFinite(c[0]);)v=D0(v),p=c[1]-v*s;else{var m=t.getTicks().length-1;m>s&&(v=D0(v));var y=v*s;g=Math.ceil(c[1]/v)*v,p=ke(g-y),p<0&&c[0]>=0?(p=0,g=ke(y)):g>0&&c[1]<=0&&(g=0,p=-ke(y))}var _=(a[0].value-o[0].value)/l,x=(a[s].value-o[s].value)/l;if(i.setExtent.call(t,p+v*_,g+v*x),i.setInterval.call(t,v),(_||x)&&i.setNiceExtent.call(t,p+v,g-v),process.env.NODE_ENV!=="production"){var S=i.getTicks.call(t);S[1]&&(!FT(v)||Cf(S[1].value)>Cf(v))&&Ve("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+(" and alignTicks: true. ("+((n=e.axis)===null||n===void 0?void 0:n.dim)+"AxisIndex: "+e.componentIndex+")"),!0)}}var X5=[[3,1],[0,2]],vC=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ed,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Ht(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,p=h.scale;E0(p)&&v.get("alignTicks")&&v.get("interval")==null?c.push(h):(my(p,v),E0(p)&&(s=h))}c.length&&(s||(s=c.pop(),my(s.scale,s.model)),z(c,function(g){j5(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};z(n.x,function(o){Y5(n,"y",o,a)}),z(n.y,function(o){Y5(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=gu(e,r),a=this._rect=Oa(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(ad(o,a),!n){var u=gC(a,s,o,l,r),c=void 0;if(l)Z5?(Z5(this._axesList,a),ad(o,a)):(process.env.NODE_ENV!=="production"&&Zp("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=K5(a.clone(),"axisLabel",null,a,o,u,i));else{var f=mC(e,a,i),d=f.outerBoundsRect,h=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;d&&(c=K5(d,h,v,a,o,u,i))}Q5(a,o,Wr.determine,null,c,i)}z(this._coordsList,function(p){p.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}Mt(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",_r).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",_r).models[0],a=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,ne(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,z(s.x,function(c,f){z(s.y,function(d,h){var v="x"+f+"y"+h,p=new $M(v);p.master=i,p.model=e,i._coordsMap[v]=p,i._coordsList.push(p),p.addAxis(c),p.addAxis(d)})});function u(c){return function(f,d){if(id(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 ZM(c,gL(f),[0,0],f.get("type"),h),p=v.type==="category";v.onBand=p&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=a,v.index=d,a._axesList.push(v),s[c][d]=v,l[c]++}}}},t.prototype._updateScale=function(e,r){z(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(fC(i)){var a=G5(i),o=a.xAxisModel,s=a.yAxisModel;if(!id(o,r)||!id(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){z(yL(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return z(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);ne(r,a)<0&&r.push(a),ne(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){Cb({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=G5(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+cn(s.get("gridIndex"),s.get("gridId"),0)+'" not found');if(s.getCoordSysModel()!==l.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},t.dimensions=ed,t}();function id(t,e){return t.getCoordSysModel()===e}function Y5(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)U5(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&U5(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function U5(t){return t&&t.type!=="category"&&t.type!=="time"&&mL(t)}function pC(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}function ad(t,e){z(t.x,function(r){return $5(r,e.x,e.width)}),z(t.y,function(r){return $5(r,e.y,e.height)})}function $5(t,e,r){var n=[0,r],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),pC(t,e)}var Z5;function K5(t,e,r,n,i,a,o){process.env.NODE_ENV!=="production"&&wt(e==="all"||e==="axisLabel"),Q5(n,i,Wr.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=kv(s,function(d){return d>0})==null;return tu(n,s,!0,!0,r),ad(i,n),l;function u(d){z(i[Gn[d]],function(h){if(gs(h.model)){var v=a.ensureRecord(h.model),p=v.labelInfoList;if(p)for(var g=0;g<p.length;g++){var m=p[g],y=h.scale.normalize(_s(m.label).tickValue);y=d===1?1-y:y,c(m.rect,d,y),c(m.rect,1-d,NaN)}var _=v.nameLayout;if(_){var y=$a(v.nameLocation)?.5:NaN;c(_.rect,d,y),c(_.rect,1-d,NaN)}}})}function c(d,h,v){var p=t[Gn[h]]-d[Gn[h]],g=d[Aa[h]]+d[Gn[h]]-(t[Aa[h]]+t[Gn[h]]);p=f(p,1-v),g=f(g,v);var m=X5[h][0],y=X5[h][1];s[m]=ur(s[m],p),s[y]=ur(s[y],g)}function f(d,h){return d>0&&!ia(h)&&h>1e-4&&(d/=h),d}}function gC(t,e,r,n,i){var a=new k5(yC);return z(r,function(o){return z(o,function(s){if(gs(s.model)){var l=!n;s.axisBuilder=hC(t,e,s.model,i,a,l)}})}),a}function Q5(t,e,r,n,i,a){var o=r===Wr.determine;z(e,function(u){return z(u,function(c){gs(c.model)&&(dC(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Gn[1-u]]=t[Aa[u]]<=a.refContainer[Aa[u]]*.5?0:1-u===1?2:1}z(e,function(u,c){return z(u,function(f){gs(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function mC(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():i==null||i==="auto"?n=Oa(t.get("outerBounds",!0)||L5,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&qt("Invalid grid["+t.componentIndex+"].outerBoundsMode.");var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":ne(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&qt("Invalid grid["+t.componentIndex+"].outerBoundsContain."),o="all"):o=a;var s=[Mf(St(t.get("outerBoundsClampWidth",!0),ec[0]),e.width),Mf(St(t.get("outerBoundsClampHeight",!0),ec[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var yC=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";N5(t,e,r,n,i,a),$a(t.nameLocation)||z(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&I5(s.labelInfoList,s.dirVec,n,i)})};function _C(t){var e=J5(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=bC(r);a==null&&(i.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]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function J5(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[SC(t)]}function xC(t){var e=J5(t);return e&&e.axisPointerModel}function bC(t){return!!t.get(["handle","show"])}function SC(t){return t.type+"||"+t.id}var od={},wC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&_C(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=xC(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&od[r])throw new Error("axisPointer "+r+" exists");od[r]=n},e.getAxisPointerClass=function(r){return r&&od[r]},e.type="axis",e}(xn),sd=de();function TC(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=sd(t).splitAreaColors,d=Ot(),h=0;if(f)for(var v=0;v<u.length;v++){var p=f.get(u[v].tickValue);if(p!=null){h=(p+(c-1)*v)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=bt(s)?s:[s];for(var v=1;v<u.length;v++){var y=i.toGlobalCoord(u[v].coord),_=void 0,x=void 0,S=void 0,b=void 0;i.isHorizontal()?(_=g,x=l.y,S=y-_,b=l.height,g=_+S):(_=l.x,x=g,S=l.width,b=y-x,g=x+b);var w=u[v-1].tickValue;w!=null&&d.set(w,h),e.add(new _e({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:S,height:b},style:Ft({fill:s[h]},m),autoBatch:!0,silent:!0})),h=(h+1)%c}sd(t).splitAreaColors=d}}}function LC(t){sd(t).splitAreaColors=null}var MC=["splitArea","splitLine","minorSplitLine","breakArea"],q5=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ye,this.group.add(this._axisGroup),!!gs(r)){this._axisGroup.add(r.axis.axisBuilder.group),z(MC,function(l){r.get([l,"show"])&&CC[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||bg(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){LC(this)},e.type="cartesianAxis",e}(wC),CC={splitLine:function(t,e,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=bt(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=a.isHorizontal(),h=0,v=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],m=s.getLineStyle(),y=0;y<v.length;y++){var _=a.toGlobalCoord(v[y].coord);if(!(y===0&&!u||y===v.length-1&&!c)){var x=v[y].tickValue;d?(p[0]=_,p[1]=f.y,g[0]=_,g[1]=f.y+f.height):(p[0]=f.x,p[1]=_,g[0]=f.x+f.width,g[1]=_);var S=h++%l.length,b=new Wn({anid:x!=null?"line_"+x:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:Ft({stroke:l[S]},m),silent:!0});Go(b.shape,m.lineWidth),e.add(b)}}}},minorSplitLine:function(t,e,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],d=[],h=s.getLineStyle(),v=0;v<c.length;v++)for(var p=0;p<c[v].length;p++){var g=a.toGlobalCoord(c[v][p].coord);u?(f[0]=g,f[1]=l.y,d[0]=g,d[1]=l.y+l.height):(f[0]=l.x,f[1]=g,d[0]=l.x+l.width,d[1]=g);var m=new Wn({anid:"minor_line_"+c[v][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0});Go(m.shape,h.lineWidth),e.add(m)}},splitArea:function(t,e,r,n,i){TC(t,e,r,n)},breakArea:function(t,e,r,n,i){r.axis.scale}},t4=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(q5),EC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=t4.type,r}return e.type="yAxis",e}(q5),DC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new _e({shape:r.coordinateSystem.getRect(),style:Ft({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(xn),e4={offset:0};function AC(t){t.registerComponentView(DC),t.registerComponentModel(HM),t.registerCoordinateSystem("cartesian2d",vC),D5(t,"x",q0,e4),D5(t,"y",q0,e4),t.registerComponentView(t4),t.registerComponentView(EC),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function PC(t){ji(AC),t.registerSeriesModel(IM),t.registerChartView(FM),t.registerLayout($0("scatter"))}function RC(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();z(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=r4(c)?c:n4(i)})}),r.each(function(o){var s=kv(n[o],function(l){return r4(l)})||n4(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function r4(t){return!isNaN(t[0])&&!isNaN(t[1])}function n4(t){return[t.cx,t.cy]}function kC(t){var e=t.polar;if(e){bt(e)||(e=[e]);var r=[];z(e,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),t.radar=t.radar||[],bt(t.radar)||(t.radar=[t.radar]),t.radar.push(n)):r.push(n)}),t.polar=r}z(t.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var NC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(d,h){var v=d.getItemVisual(h,"symbol")||"circle";if(v!=="none"){var p=rm(d.getItemVisual(h,"symbolSize")),g=Un(v,-1,-1,2,2),m=d.getItemVisual(h,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:m*Math.PI/180||0}),g}}function c(d,h,v,p,g,m){v.removeAll();for(var y=0;y<h.length-1;y++){var _=u(p,g);_&&(_.__dimIdx=y,d[y]?(_.setPosition(d[y]),Xx[m?"initProps":"updateProps"](_,{x:h[y][0],y:h[y][1]},r,g)):_.setPosition(h[y]),v.add(_))}}function f(d){return yt(d,function(h){return[a.cx,a.cy]})}s.diff(l).add(function(d){var h=s.getItemLayout(d);if(h){var v=new zo,p=new Pi,g={shape:{points:h}};v.shape.points=f(h),p.shape.points=f(h),er(v,g,r,d),er(p,g,r,d);var m=new ye,y=new ye;m.add(p),m.add(v),m.add(y),c(p.shape.points,h,y,s,d,!0),s.setItemGraphicEl(d,m)}}).update(function(d,h){var v=l.getItemGraphicEl(h),p=v.childAt(0),g=v.childAt(1),m=v.childAt(2),y={shape:{points:s.getItemLayout(d)}};y.shape.points&&(c(p.shape.points,y.shape.points,m,s,d,!1),Wo(g),Wo(p),Fe(p,y,r),Fe(g,y,r),s.setItemGraphicEl(d,v))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,h){var v=s.getItemModel(h),p=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y=s.getItemVisual(h,"style"),_=y.fill;o.add(d),p.useStyle(Ft(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Ma(p,v,"lineStyle"),Ma(g,v,"areaStyle");var x=v.getModel("areaStyle"),S=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=S,z(["emphasis","select","blur"],function(w){var T=v.getModel([w,"areaStyle"]),L=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(w).ignore=L&&S;var C=v.getModel([w,"lineStyle"]).getLineStyle();p.ensureState(w).style=C;var M=T.getAreaStyle();g.ensureState(w).style=M;var A=v.getModel([w,"itemStyle"]).getItemStyle();m.eachChild(function(E){E.ensureState(w).style=zt(A)})}),g.useStyle(Ft(v.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var b=v.getModel("emphasis");m.eachChild(function(w){if(w instanceof Br){var T=w.style;w.useStyle(ot({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},y))}else w.useStyle(y),w.setColor(_),w.style.strokeNoScale=!0;var L=s.getStore().get(s.getDimensionIndex(w.__dimIdx),h);(L==null||isNaN(L))&&(L=""),Pa(w,Ra(v),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:w.__dimIdx,defaultText:L,inheritColor:_,defaultOpacity:y.opacity})}),La(d,b.get("focus"),b.get("blurScope"),b.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(rr),OC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new S5(ce(this.getData,this),ce(this.getRawData,this))},e.prototype.getInitialData=function(r,n){return b5(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=V2(this,r);return is("section",{header:u,sortBlocks:!0,blocks:yt(s,function(f){var d=a.get(a.mapDimension(f.dim),r);return is("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(yt(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[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}(dr),Ss=C5.value;function nc(t,e){return Ft({show:e},t)}var IC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=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=yt(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 p=l;v.color!=null&&(p=Ft({color:v.color},l));var g=re(zt(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:d},!1);if(Lt(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else Dt(c)&&(g.name=c(g.name,g));var y=new Te(g,null,this.ecModel);return kr(y,by.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},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:Rt.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:re({lineStyle:{color:Rt.color.neutral20}},Ss.axisLine),axisLabel:nc(Ss.axisLabel,!1),axisTick:nc(Ss.axisTick,!1),splitLine:nc(Ss.splitLine,!0),splitArea:nc(Ss.splitArea,!0),indicator:[]},e}(te),BC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=yt(a,function(s){var l=s.model.get("showName")?s.name:"",u=new H5(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});z(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.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=bt(d)?d:[d],p=bt(h)?h:[h],g=[],m=[];function y(I,k,R){var H=R%k.length;return I[H]=I[H]||[],H}if(a==="circle")for(var _=i[0].getTicksCoords(),x=n.cx,S=n.cy,b=0;b<_.length;b++){if(c){var w=y(g,v,b);g[w].push(new Io({shape:{cx:x,cy:S,r:_[b].coord}}))}if(f&&b<_.length-1){var w=y(m,p,b);m[w].push(new $l({shape:{cx:x,cy:S,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var T,L=yt(i,function(I,k){var R=I.getTicksCoords();return T=T==null?R.length-1:Math.min(R.length-1,T),yt(R,function(H){return n.coordToPoint(H.coord,k)})}),C=[],b=0;b<=T;b++){for(var M=[],A=0;A<i.length;A++)M.push(L[A][b]);if(M[0]?M.push(M[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+b),c){var w=y(g,v,b);g[w].push(new Pi({shape:{points:M}}))}if(f&&C){var w=y(m,p,b-1);m[w].push(new zo({shape:{points:M.concat(C)}}))}C=M.slice().reverse()}var E=l.getLineStyle(),P=u.getAreaStyle();z(m,function(I,k){this.group.add(mh(I,{style:Ft({stroke:"none",fill:p[k%p.length]},P),silent:!0}))},this),z(g,function(I,k){this.group.add(mh(I,{style:Ft({fill:"none",stroke:v[k%v.length]},E),silent:!0}))},this)},e.type="radar",e}(xn),VC=function(t){ht(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return e}(Py),zC=function(){function t(e,r,n){this.dimensions=[],this._model=e,this._indicatorAxes=yt(e.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new VC(o,new Qn);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(e,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(e),r)},t.prototype.coordToPoint=function(e,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[a,o]},t.prototype.pointToData=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},t.prototype.resize=function(e,r){var n=gu(e,r).refContainer,i=e.get("center"),a=Math.min(n.width,n.height)/2;this.cx=oe(i[0],n.width)+n.x,this.cy=oe(i[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(Lt(o)||ie(o))&&(o=[0,o]),this.r0=oe(o[0],a),this.r=oe(o[1],a),z(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)},t.prototype.update=function(e,r){var n=this._indicatorAxes,i=this._model;z(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"))!==i)){var u=s.getData();z(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Qn;o.setExtent(0,a),o.setInterval(1),z(n,function(s,l){j5(s.scale,s.model,o)})},t.prototype.convertToPixel=function(e,r,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(e,r,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},t.create=function(e,r){var n=[];return e.eachComponent("radar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},t.dimensions=[],t}();function FC(t){t.registerCoordinateSystem("radar",zC),t.registerComponentModel(IC),t.registerComponentView(BC),t.registerVisual({seriesType:"radar",reset:function(e){var r=e.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function HC(t){ji(FC),t.registerChartView(NC),t.registerSeriesModel(OC),t.registerLayout(RC),t.registerProcessor(g5("radar")),t.registerPreprocessor(kC)}function WC(t,e){var r=Zg(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new _e({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var GC=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},ld=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),bt(n)&&z(n,function(a,o){Lt(a)&&(a={type:a}),n[o]=re(a,GC(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&Af(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ot(),s=yt(a,function(l){return(Lt(l)||ie(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Te(l,this,this.ecModel))},this);this._data=Se(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;z(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;z(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;z(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&ne(this._availableNames,r)>=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:Rt.size.m,align:"auto",backgroundColor:Rt.color.transparent,borderColor:Rt.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:Rt.color.disabled,inactiveBorderColor:Rt.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:Rt.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:Rt.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:Rt.color.tertiary,borderWidth:1,borderColor:Rt.color.border},emphasis:{selectorLabel:{show:!0,color:Rt.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(te),Za=or,ud=z,ic=ye,i4=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new ic),this.group.add(this._selectorGroup=new ic),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=gu(r,i).refContainer,f=r.getBoxLayoutParams(),d=r.get("padding"),h=Oa(f,c,d),v=this.layoutInner(r,o,h,a,l,u),p=Oa(Ft({width:v.width,height:v.height},f),c,d);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=WC(v,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ot(),f=n.get("selectedMode"),d=n.get("triggerEvent"),h=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),ud(n.getData(),function(v,p){var g=this,m=v.get("name");if(!this.newlineDisabled&&(m===""||m===`
|
|
67
|
-
`)){var y=new
|
|
68
|
-
`||i==="")){var a=t.isSelected(i);
|
|
69
|
-
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return
|
|
70
|
-
`:"",i=" {"+n,a=n+"}",o=yt(Ht(t),function(l){return l+i+yt(Ht(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=yt(Ht(e),function(l){return"@keyframes "+l+i+yt(Ht(e[l]),function(u){return u+i+yt(Ht(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function _d(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function m4(t,e,r,n){return Le("svg","root",{width:t,height:e,xmlns:d4,"xmlns:xlink":v4,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var cE=0;function y4(){return cE++}var _4={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"},$i="transform-origin";function fE(t,e,r){var n=ot({},t.shape);ot(n,e),t.buildPath(r,n);var i=new h4;return i.reset(bp(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function hE(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[$i]=r+"px "+n+"px")}var dE={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function x4(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function vE(t,e,r){var n=t.shape.paths,i={},a,o;if(z(n,function(l){var u=_d(r.zrId);u.animation=!0,ac(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,d=Ht(c),h=d.length;if(h){o=d[h-1];var v=c[o];for(var p in v){var g=v[p];i[p]=i[p]||{d:""},i[p].d+=g.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=x4(i,r);return a.replace(o,s)}}function b4(t){return Lt(t)?_4[t]?"cubic-bezier("+_4[t]+")":Xc(t)?t:"":""}function ac(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof fg){var s=vE(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],d=b4(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 p(y){var _=y[1],x=_.length,S={},b={},w={},T="animation-timing-function";function L($,U,q){for(var tt=$.getTracks(),nt=$.getMaxTime(),at=0;at<tt.length;at++){var st=tt[at];if(st.needsAnimate()){var Et=st.keyframes,K=st.propName;if(q&&(K=q(K)),K)for(var J=0;J<Et.length;J++){var _t=Et[J],mt=Math.round(_t.time/nt*100)+"%",xt=b4(_t.easing),X=_t.rawValue;(Lt(X)||ie(X))&&(U[mt]=U[mt]||{},U[mt][K]=_t.rawValue,xt&&(U[mt][T]=xt))}}}}for(var C=0;C<x;C++){var M=_[C],A=M.targetName;A?A==="shape"&&L(M,b):!n&&L(M,S)}for(var E in S){var P={};_l(P,t),ot(P,S[E]);var I=Sp(P),k=S[E][T];w[E]=I?{transform:I}:{},hE(w[E],P),k&&(w[E][T]=k)}var R,H=!0;for(var E in b){w[E]=w[E]||{};var B=!R,k=b[E][T];B&&(R=new zn);var F=R.len();R.reset(),w[E].d=fE(t,b[E],R);var O=R.len();if(!B&&F!==O){H=!1;break}k&&(w[E][T]=k)}if(!H)for(var E in w)delete w[E].d;if(!n)for(var C=0;C<x;C++){var M=_[C],A=M.targetName;A==="style"&&L(M,w,function(tt){return dE[tt]})}for(var G=Ht(w),j=!0,Y,C=1;C<G.length;C++){var et=G[C-1],ft=G[C];if(w[et][$i]!==w[ft][$i]){j=!1;break}Y=w[et][$i]}if(j&&Y){for(var E in w)w[E][$i]&&delete w[E][$i];e[$i]=Y}if(Se(G,function($){return Ht(w[$]).length>0}).length){var gt=x4(w,r);return gt+" "+y[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var m=r.zrId+"-cls-"+y4();r.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function pE(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};S4(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=Jc(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),S4(n,e,r)}}function S4(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+y4(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var Ts=Math.round;function w4(t){return t&&Lt(t.src)}function T4(t){return t&&Dt(t.toDataURL)}function xd(t,e,r,n){iE(function(i,a){var o=i==="fill"||i==="stroke";o&&xp(a)?A4(e,t,i,n):o&&tf(a)?P4(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),SE(r,t,n)}function bd(t,e){var r=a8(e);r&&(r.each(function(n,i){n!=null&&(t[(p4+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[p4+"silent"]="true"))}function L4(t){return On(t[0]-1)&&On(t[1])&&On(t[2])&&On(t[3]-1)}function gE(t){return On(t[4])&&On(t[5])}function Sd(t,e,r){if(e&&!(gE(e)&&L4(e))){var n=1e4;t.transform=L4(e)?"translate("+Ts(e[4]*n)/n+" "+Ts(e[5]*n)/n+")":L6(e)}}function M4(t,e,r){for(var n=t.points,i=[],a=0;a<n.length;a++)i.push(Ts(n[a][0]*r)/r),i.push(Ts(n[a][1]*r)/r);e.points=i.join(" ")}function C4(t){return!t.smooth}function mE(t){var e=yt(t,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<e.length;a++){var o=e[a],s=r[o[0]];s!=null&&(n[o[1]]=Ts(s*i)/i)}}}var yE={circle:[mE(["cx","cy","r"])],polyline:[M4,C4],polygon:[M4,C4]};function _E(t){for(var e=t.animators,r=0;r<e.length;r++)if(e[r].targetName==="shape")return!0;return!1}function E4(t,e){var r=t.style,n=t.shape,i=yE[t.type],a={},o=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&bp(t)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&_E(t))&&!(l<1)){s=t.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!t.path||t.shapeChanged();t.path||t.createPathProxy();var d=t.path;f&&(d.beginPath(),t.buildPath(d,t.shape),t.pathUpdated());var h=d.getVersion(),v=t,p=v.__svgPathBuilder;(v.__svgPathVersion!==h||!p||l!==v.__svgPathStrokePercent)&&(p||(p=v.__svgPathBuilder=new h4),p.reset(u),d.rebuildPath(p,l),p.generateStr(),v.__svgPathVersion=h,v.__svgPathStrokePercent=l),a.d=p.getStr()}return Sd(a,t.transform),xd(a,r,t,e),bd(a,t),e.animation&&ac(t,a,e),e.emphasis&&pE(t,a,e),Le(s,t.id+"",a)}function xE(t,e){var r=t.style,n=r.image;if(n&&!Lt(n)&&(w4(n)?n=n.src:T4(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),Sd(l,t.transform),xd(l,r,t,e),bd(l,t),e.animation&&ac(t,l,e),Le("image",t.id+"",l)}}function bE(t,e){var r=t.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||un,a=r.x||0,o=C6(r.y||0,To(i),r.textBaseline),s=M6[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(D1(r)){var u="",c=r.fontStyle,f=C1(r.fontSize);if(!parseFloat(f))return;var d=r.fontFamily||Ev,h=r.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: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),Sd(l,t.transform),xd(l,r,t,e),bd(l,t),e.animation&&ac(t,l,e),Le("text",t.id+"",l,void 0,n)}}function D4(t,e){if(t instanceof Yt)return E4(t,e);if(t instanceof Br)return xE(t,e);if(t instanceof No)return bE(t,e)}function SE(t,e,r){var n=t.style;if(E6(n)){var i=D6(t),a=r.shadowCache,o=a[i];if(!o){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,h=xo(n.shadowColor),v=h.opacity,p=h.color,g=d/2/l,m=d/2/u,y=g+" "+m;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=Le("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Le("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":p,"flood-opacity":v})]),a[i]=o}e.filter=fl(o)}}function A4(t,e,r,n){var i=t[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(yp(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(_p(i))a="radialGradient",o.cx=St(i.x,.5),o.cy=St(i.y,.5),o.r=St(i.r,.5);else{process.env.NODE_ENV!=="production"&&na("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=qc(s[u].offset)*100+"%",d=s[u].color,h=xo(d),v=h.color,p=h.opacity,g={offset:f};g["stop-color"]=v,p<1&&(g["stop-opacity"]=p),l.push(Le("stop",u+"",g))}var m=Le(a,"",o,l),y=yd(m),_=n.gradientCache,x=_[y];x||(x=n.zrId+"-g"+n.gradientIdx++,_[y]=x,o.id=x,n.defs[x]=Le(a,x,o,l)),e[r]=fl(x)}function P4(t,e,r,n){var i=t.style[r],a=t.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(mp(i)){var d=i.imageWidth,h=i.imageHeight,v=void 0,p=i.image;if(Lt(p)?v=p:w4(p)?v=p.src:T4(p)&&(v=p.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";wt(d,g),wt(h,g)}else if(d==null||h==null){var m=function(C,M){if(C){var A=C.elm,E=d||M.width,P=h||M.height;C.tag==="pattern"&&(u?(P=1,E/=a.width):c&&(E=1,P/=a.height)),C.attrs.width=E,C.attrs.height=P,A&&(A.setAttribute("width",E),A.setAttribute("height",P))}},y=Nf(v,null,t,function(C){l||m(b,C),m(f,C)});y&&y.width&&y.height&&(d=d||y.width,h=h||y.height)}f=Le("image","img",{href:v,width:d,height:h}),o.width=d,o.height=h}else i.svgElement&&(f=zt(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):c?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var S=Sp(i);S&&(o.patternTransform=S);var b=Le("pattern","",o,[f]),w=yd(b),T=n.patternCache,L=T[w];L||(L=n.zrId+"-p"+n.patternIdx++,T[w]=L,o.id=L,b=n.defs[L]=Le("pattern",L,o,[f])),e[r]=fl(L)}}function wE(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=Le("clipPath",a,o,[E4(t,r)])}e["clip-path"]=fl(a)}function R4(t){return document.createTextNode(t)}function Zi(t,e,r){t.insertBefore(e,r)}function k4(t,e){t.removeChild(e)}function N4(t,e){t.appendChild(e)}function O4(t){return t.parentNode}function I4(t){return t.nextSibling}function wd(t,e){t.textContent=e}var B4=58,TE=120,LE=Le("","");function Td(t){return t===void 0}function ln(t){return t!==void 0}function ME(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(process.env.NODE_ENV!=="production"&&n[a]!=null&&console.error("Duplicate key "+a),n[a]=i)}return n}function Ls(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function Ms(t){var e,r=t.children,n=t.tag;if(ln(n)){var i=t.elm=g4(n);if(Ld(LE,t),bt(r))for(e=0;e<r.length;++e){var a=r[e];a!=null&&N4(i,Ms(a))}else ln(t.text)&&!Mt(t.text)&&N4(i,R4(t.text))}else t.elm=R4(t.text);return t.elm}function V4(t,e,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&Zi(t,Ms(a),e)}}function oc(t,e,r,n){for(;r<=n;++r){var i=e[r];if(i!=null)if(ln(i.tag)){var a=O4(i.elm);k4(a,i.elm)}else k4(t,i.elm)}}function Ld(t,e){var r,n=e.elm,i=t&&t.attrs||{},a=e.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==TE?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(aE,r,o):r.charCodeAt(3)===B4?n.setAttributeNS(oE,r,o):r.charCodeAt(5)===B4?n.setAttributeNS(v4,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function CE(t,e,r){for(var n=0,i=0,a=e.length-1,o=e[0],s=e[a],l=r.length-1,u=r[0],c=r[l],f,d,h,v;n<=a&&i<=l;)o==null?o=e[++n]:s==null?s=e[--a]:u==null?u=r[++i]:c==null?c=r[--l]:Ls(o,u)?(Ka(o,u),o=e[++n],u=r[++i]):Ls(s,c)?(Ka(s,c),s=e[--a],c=r[--l]):Ls(o,c)?(Ka(o,c),Zi(t,o.elm,I4(s.elm)),o=e[++n],c=r[--l]):Ls(s,u)?(Ka(s,u),Zi(t,s.elm,o.elm),s=e[--a],u=r[++i]):(Td(f)&&(f=ME(e,n,a)),d=f[u.key],Td(d)?Zi(t,Ms(u),o.elm):(h=e[d],h.tag!==u.tag?Zi(t,Ms(u),o.elm):(Ka(h,u),e[d]=void 0,Zi(t,h.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(v=r[l+1]==null?null:r[l+1].elm,V4(t,v,r,i,l)):oc(t,e,n,a))}function Ka(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(Ld(t,e),Td(e.text)?ln(n)&&ln(i)?n!==i&&CE(r,n,i):ln(i)?(ln(t.text)&&wd(r,""),V4(r,null,i,0,i.length-1)):ln(n)?oc(r,n,0,n.length-1):ln(t.text)&&wd(r,""):t.text!==e.text&&(ln(n)&&oc(r,n,0,n.length-1),wd(r,e.text)))}function EE(t,e){if(Ls(t,e))Ka(t,e);else{var r=t.elm,n=O4(r);Ms(e),n!==null&&(Zi(n,e.elm,I4(r)),oc(n,[t],0,0))}return e}var DE=0,AE=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=z4("refreshHover"),this.configLayer=z4("configLayer"),this.storage=r,this._opts=n=ot({},n),this.root=e,this._id="zr"+DE++,this._oldVNode=m4(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=g4("svg");Ld(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",EE(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return D4(e,_d(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=_d(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=PE(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=Le("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=yt(Ht(a.defs),function(d){return a.defs[d]});if(u.length&&o.push(Le("defs","defs",{},u)),e.animation){var c=uE(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Le("style","stl",{},[],c);o.push(f)}}return m4(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},yd(this.renderToVNode({animation:St(e.cssAnimation,!0),emphasis:St(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:St(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=e[c];if(!f.invisible){var d=f.__clipPaths,h=d&&d.length||0,v=l&&l.length||0,p=void 0;for(p=Math.max(h-1,v-1);p>=0&&!(d&&l&&d[p]===l[p]);p--);for(var g=v-1;g>p;g--)o--,s=a[o-1];for(var m=p+1;m<h;m++){var y={};wE(d[m],y,r);var _=Le("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=d;var x=D4(f,r);x&&(s?s.children:n).push(x)}}},t.prototype.resize=function(e,r){var n=this._opts,i=this.root,a=this._viewport;if(e!=null&&(n.width=e),r!=null&&(n.height=r),i&&a&&(a.style.display="none",e=am(i,0,n),r=am(i,1,n),a.style.display=""),this._width!==e||this._height!==r){if(this._width=e,this._height=r,a){var o=a.style;o.width=e+"px",o.height=r+"px"}if(tf(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",r))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(e){var r=this.renderToString(),n="data:image/svg+xml;";return e?(r=P6(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},t}();function z4(t){return function(){process.env.NODE_ENV!=="production"&&na('In SVG mode painter not support method "'+t+'"')}}function PE(t,e,r,n){var i;if(r&&r!=="none")if(i=Le("rect","bg",{width:t,height:e,x:"0",y:"0"}),xp(r))A4({fill:r},i.attrs,"fill",n);else if(tf(r))P4({style:{fill:r},dirty:sr,getBoundingRect:function(){return{width:t,height:e}}},i.attrs,"fill",n);else{var a=xo(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function RE(t){t.registerPainter("svg",AE)}const kE=({type:t,data:e,themeColors:r,textColor:n,lineColor:i,lineSmooth:a,stack:o})=>{const s=n?{color:n}:{},l=n?{lineStyle:{color:n}}:void 0,u=n?{color:n}:void 0,c=i?{lineStyle:{color:i}}:{},f=e.series.length>1?{top:"bottom",textStyle:s}:void 0;if(t==="bar")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",data:e.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[2,2,0,0]}};return o&&(v.stack="A"),v})};if(t==="column")return{color:r,textStyle:s,legend:f,yAxis:{type:"category",data:e.labels,axisLine:l,axisLabel:u},xAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[0,2,2,0]}};return o&&(v.stack="A"),v})};if(t==="line")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",data:e.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"line",smooth:a,label:{show:!0}};return o&&(v.stack="A"),v})};if(t==="pie")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:e.series[0].map((d,h)=>({value:d,name:e.labels[h]})),label:n?{color:n}:{},type:"pie",radius:"70%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(t==="ring")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:e.series[0].map((d,h)=>({value:d,name:e.labels[h]})),label:n?{color:n}:{},type:"pie",radius:["40%","70%"],padAngle:1,avoidLabelOverlap:!1,itemStyle:{borderRadius:4},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(t==="area")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",boundaryGap:!1,data:e.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"line",areaStyle:{},label:{show:!0}};return o&&(v.stack="A"),v})};if(t==="radar")return{color:r,textStyle:s,legend:f,radar:{indicator:e.labels.map(d=>({name:d})),splitLine:c,axisLine:i?{lineStyle:{color:i}}:void 0},series:[{data:e.series.map((d,h)=>({value:d,name:e.legends[h]})),type:"radar"}]};if(t==="scatter"){const d=[];for(let h=0;h<e.series[0].length;h++){const v=e.series[0][h],p=e.series[1]?e.series[1][h]:v;d.push([v,p])}return{color:r,textStyle:s,xAxis:{axisLine:l,axisLabel:u,splitLine:c},yAxis:{axisLine:l,axisLabel:u,splitLine:c},series:[{symbolSize:12,data:d,type:"scatter"}]}}return null},NE={chart:"_chart_1g0qq_1"};ji([LM,cM,OM,PC,HC,JC,RE]);const F4=({width:t,height:e,type:r,data:n,themeColors:i,textColor:a,lineColor:o,options:s})=>{const l=N.useRef(null),u=N.useRef(null),c=N.useMemo(()=>{let d=[];if(i.length>=10)d=i;else if(i.length===1)d=Is(i[0]).analogous(10).map(h=>h.toRgbString());else{const h=i.length,v=Is(i[h-1]).analogous(11-h).map(p=>p.toRgbString());d=[...i.slice(0,h-1),...v]}return d},[i]),f=N.useCallback(()=>{if(!u.current)return;const d=kE({type:r,data:n,themeColors:c,textColor:a,lineColor:o,lineSmooth:(s==null?void 0:s.lineSmooth)||!1,stack:(s==null?void 0:s.stack)||!1});d&&u.current.setOption(d,!0)},[r,n,c,a,o,s]);return N.useEffect(()=>{if(!l.current)return;u.current=lT(l.current,null,{renderer:"svg"}),f();const d=()=>{var v;return(v=u.current)==null?void 0:v.resize()},h=new ResizeObserver(d);return h.observe(l.current),()=>{var v;h.disconnect(),(v=u.current)==null||v.dispose(),u.current=null}},[]),N.useEffect(()=>{f()},[f]),D.jsx("div",{className:NE.chart,ref:l})},Md={editableElementChart:"_editableElementChart_1i7hz_1",rotateWrapper:"_rotateWrapper_1i7hz_5",elementContent:"_elementContent_1i7hz_10"},OE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=N.useRef(null),i=o=>{o.stopPropagation(),e==null||e(o.nativeEvent,t)},a=()=>{ea.emit(ui.OPEN_CHART_DATA_EDITOR)};return Xr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Md.editableElementChart,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Md.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{ref:n,className:Md.elementContent,style:{backgroundColor:t.fill},onMouseDown:i,onTouchStart:i,onDoubleClick:a,children:[D.jsx(Xs,{width:t.width,height:t.height,outline:t.outline}),D.jsx(F4,{width:t.width,height:t.height,type:t.chartType,data:t.data,themeColors:t.themeColors,textColor:t.textColor,lineColor:t.lineColor,options:t.options})]})})})},H4=t=>{if(!t)return{};const{bold:e,em:r,underline:n,strikethrough:i,color:a,backcolor:o,fontsize:s,fontname:l,align:u}=t;let c=`${n?"underline":""} ${i?"line-through":""}`;return c.trim()===""&&(c="none"),{fontWeight:e?"bold":"normal",fontStyle:r?"italic":"normal",textDecoration:c,color:a||"#000",backgroundColor:o||"",fontSize:s||"14px",fontFamily:l||"",textAlign:u||"left"}},W4=t=>t.replace(/\n/g,"</br>").replace(/ /g," "),G4=t=>({hideCells:N.useMemo(()=>{const r=[];for(let n=0;n<t.length;n++){const i=t[n];for(let a=0;a<i.length;a++){const o=i[a];if(o.colspan>1||o.rowspan>1)for(let s=n;s<n+o.rowspan;s++)for(let l=s===n?a+1:a;l<a+o.colspan;l++)r.push(`${s}_${l}`)}}return r},[t])}),j4=t=>({subThemeColor:N.useMemo(()=>t?E_(t.color):["",""],[t])}),IE={customTextarea:"_customTextarea_15hzl_1"},BE=({value:t,className:e,style:r,onUpdateValue:n,onInsertExcelData:i})=>{const a=N.useRef(null),o=N.useRef(!1);N.useEffect(()=>{o.current||!a.current||a.current.innerHTML!==t&&(a.current.innerHTML=t)},[t]);const s=()=>{if(!a.current)return;const f=a.current.innerHTML;n(f)},l=()=>{o.current=!0},u=f=>{if(f.preventDefault(),!f.clipboardData)return;const d=f.clipboardData.items[0];d&&d.kind==="string"&&(d.type==="text/plain"?d.getAsString(h=>{if(typeof Jd(h)=="object")return;const p=L_(h);if(p){i(p),a.current&&(a.current.innerHTML=p[0][0]);return}document.execCommand("insertText",!1,h)}):d.type==="text/html"&&d.getAsString(h=>{const v=M_(h);v&&(i(v),a.current&&(a.current.innerHTML=v[0][0]))}))},c=()=>{o.current=!1};return D.jsx("div",{className:kt(IE.customTextarea,e),style:r,ref:a,contentEditable:!0,onFocus:l,onBlur:c,onInput:s,onPaste:u,dangerouslySetInnerHTML:{__html:t}})},Ge={editableTable:"_editableTable_1ul9j_1",theme:"_theme_1ul9j_19",cell:"_cell_1ul9j_22",rowHeader:"_rowHeader_1ul9j_28",rowFooter:"_rowFooter_1ul9j_31",colHeader:"_colHeader_1ul9j_34",colFooter:"_colFooter_1ul9j_37",selected:"_selected_1ul9j_49",cellText:"_cellText_1ul9j_58",active:"_active_1ul9j_64",dragLine:"_dragLine_1ul9j_68"},VE=({data:t,width:e,cellMinHeight:r,colWidths:n,outline:i,theme:a,editable:o=!0,onChange:s,onChangeColWidths:l,onChangeSelectedCells:u,onMouseDown:c,contextmenus:f})=>{const{canvasScale:d,setSelectedTableCells:h}=Tt(),[v,p]=N.useState(!1),[g,m]=N.useState([]),[y,_]=N.useState([]),[x,S]=N.useState([]);N.useEffect(()=>{S(n.map(X=>X*e))},[n,e]);const b=N.useMemo(()=>x.reduce((X,W)=>X+W,0),[x]),{hideCells:w}=G4(t),{subThemeColor:T}=j4(a),L=N.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":T[0],"--subThemeColor2":T[1]}:{},[a,T]);N.useEffect(()=>{o||(m([]),_([]))},[o]);const C=N.useMemo(()=>{const X=[];for(let W=1;W<x.length+1;W++){const Q=x.slice(0,W).reduce((Z,ut)=>Z+ut,0);X.push(Q)}return X},[x]),M=N.useMemo(()=>{if(!g.length)return[];const[X,W]=g;if(!y.length)return[`${X}_${W}`];const[Q,Z]=y;if(X===Q&&W===Z)return[`${X}_${W}`];const ut=[],dt=Math.min(X,Q),ct=Math.min(W,Z),Ut=Math.max(X,Q),Qt=Math.max(W,Z);for(let Wt=0;Wt<t.length;Wt++){const pe=t[Wt];for(let Ae=0;Ae<pe.length;Ae++)Wt>=dt&&Wt<=Ut&&Ae>=ct&&Ae<=Qt&&ut.push(`${Wt}_${Ae}`)}return ut},[g,y,t]);N.useEffect(()=>{u(M),h(M)},[M,u,h]);const A=N.useMemo(()=>M.length>1?null:M[0]||null,[M]),E=N.useCallback(()=>p(!1),[]);N.useEffect(()=>(document.addEventListener("mouseup",E),()=>{document.removeEventListener("mouseup",E)}),[E]);const P=(X,W,Q)=>{X.button===0&&(_([]),p(!0),m([W,Q]))},I=(X,W)=>{v&&_([X,W])},k=(X,W)=>w.includes(`${X}_${W}`),R=X=>{const W=JSON.parse(JSON.stringify(t)),Q=[];for(let Z=0;Z<W[0].length;Z++)Q.push({colspan:1,rowspan:1,text:"",id:jt.nanoid(10)});W.splice(X,0,Q),s(W)},H=X=>{const W=t.map(Z=>{const ut={colspan:1,rowspan:1,text:"",id:jt.nanoid(10)},dt=[...Z];return dt.splice(X,0,ut),dt}),Q=[...x];Q.splice(X,0,100),s(W),l(Q)},B=X=>{const W=JSON.parse(JSON.stringify(t)),Q=t[X],Z=[];for(let ut=0;ut<Q.length;ut++)k(X,ut)&&Z.push(ut);for(const ut of Z)for(let dt=X;dt>=0;dt--)if(!k(dt,ut)){W[dt][ut].rowspan=W[dt][ut].rowspan-1;break}W.splice(X,1),s(W)},F=X=>{const W=JSON.parse(JSON.stringify(t)),Q=[];for(let dt=0;dt<t.length;dt++)k(dt,X)&&Q.push(dt);for(const dt of Q)for(let ct=X;ct>=0;ct--)if(!k(dt,ct)){W[dt][ct].colspan=W[dt][ct].colspan-1;break}const Z=W.map(dt=>(dt.splice(X,1),dt)),ut=[...x];ut.splice(X,1),s(Z),l(ut)},O=()=>{const[X,W]=g,[Q,Z]=y,ut=Math.min(X,Q),dt=Math.min(W,Z),ct=Math.max(X,Q),Ut=Math.max(W,Z),Qt=JSON.parse(JSON.stringify(t));Qt[ut][dt].rowspan=ct-ut+1,Qt[ut][dt].colspan=Ut-dt+1,s(Qt),m([]),_([])},G=(X,W)=>{const Q=JSON.parse(JSON.stringify(t));Q[X][W].rowspan=1,Q[X][W].colspan=1,s(Q),m([]),_([])},j=X=>{const W=t.length-1;m([0,X]),_([W,X])},Y=X=>{const W=t[X].length-1;m([X,0]),_([X,W])},et=()=>{const X=t.length-1,W=t[X].length-1;m([0,0]),_([X,W])},ft=()=>{const X=JSON.parse(JSON.stringify(t));for(let W=0;W<X.length;W++)for(let Q=0;Q<X[W].length;Q++)M.includes(`${W}_${Q}`)&&(X[W][Q].text="");s(X)},gt=()=>{requestAnimationFrame(()=>{const X=document.querySelector(`.${Ge.cellText}.${Ge.active}`);X&&X.focus()})},$=()=>{const X=(ut,dt)=>t[ut]?t[ut][dt]?k(ut,dt)?X(ut,dt+1):[ut,dt]:X(ut+1,0):null;_([]);const W=g[0],Q=g[1]+1,Z=X(W,Q);Z?m(Z):(R(W+1),m([W+1,0])),gt()},U=X=>{var Q;const W=window.getSelection();if(W&&W.rangeCount>0){const Z=W.getRangeAt(0),ut=Z.cloneRange();ut.selectNodeContents(X),ut.setEnd(Z.startContainer,Z.startOffset);const dt=ut.toString().length;ut.setEnd(Z.endContainer,Z.endOffset);const ct=ut.toString().length,Ut=((Q=X.textContent)==null?void 0:Q.length)||0;return{start:dt,end:ct,len:Ut}}return null},q=X=>{const W=+M[0].split("_")[0],Q=+M[0].split("_")[1],Z=t.length,ut=t[0].length,dt=ct=>{if(ct[0]<0||ct[1]<0||ct[0]>Z-1||ct[1]>ut-1)return[0,0];const Ut=`${ct[0]}_${ct[1]}`;return w.includes(Ut)?X==="UP"?dt([ct[0],ct[1]-1]):X==="DOWN"?dt([ct[0],ct[1]-1]):X==="LEFT"?dt([ct[0]-1,ct[1]]):X==="RIGHT"?dt([ct[0]-1,ct[1]]):[0,0]:ct};if(X==="UP"){const ct=W-1;if(ct<0)return;_([]),m(dt([ct,Q]))}else if(X==="DOWN"){const ct=W+1;if(ct>Z-1)return;_([]),m(dt([ct,Q]))}else if(X==="LEFT"){const ct=Q-1;if(ct<0)return;_([]),m(dt([W,ct]))}else if(X==="RIGHT"){const ct=Q+1;if(ct>ut-1)return;_([]),m(dt([W,ct]))}gt()},tt=()=>{const X=[];for(let W=0;W<t.length;W++){const Q=t[W],Z=[];for(let ut=0;ut<Q.length;ut++)k(W,ut)||Z.push(Q[ut]);Z.length&&X.push(Z)}return X},nt=()=>{const X=tt(),W=X.length>1,Q=X[0].length>1;return{canDeleteRow:W,canDeleteCol:Q}},at=(X,W)=>{const Q=M.length>1,Z=t[X][W],ut=Q,dt=!Q&&(Z.rowspan>1||Z.colspan>1);return{canMerge:ut,canSplit:dt}},st=(X,W,Q)=>{X.preventDefault(),X.stopPropagation();const Z=document.getElementById("global-contextmenu-container");Z&&document.body.removeChild(Z);const ut=document.createElement("div");ut.id="global-contextmenu-container",document.body.appendChild(ut);const dt=Ws(ut),ct=()=>{setTimeout(()=>{dt.unmount(),document.body.contains(ut)&&document.body.removeChild(ut),W.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",ct),window.removeEventListener("resize",ct)},0)};dt.render(D.jsx(vv,{axis:{x:X.clientX,y:X.clientY},el:W,menus:Q,removeContextmenu:ct})),W.classList.add("contextmenu-active"),document.body.addEventListener("scroll",ct),window.addEventListener("resize",ct)};N.useEffect(()=>{const X=W=>{if(!o||!M.length)return;const Q=W.key.toUpperCase();if(M.length<2){if(Q===me.TAB)W.preventDefault(),$();else if(W.ctrlKey&&Q===me.UP){W.preventDefault();const Z=+M[0].split("_")[0];R(Z)}else if(W.ctrlKey&&Q===me.DOWN){W.preventDefault();const Z=+M[0].split("_")[0];R(Z+1)}else if(W.ctrlKey&&Q===me.LEFT){W.preventDefault();const Z=+M[0].split("_")[1];H(Z)}else if(W.ctrlKey&&Q===me.RIGHT){W.preventDefault();const Z=+M[0].split("_")[1];H(Z+1)}else if(Q===me.UP){const Z=U(W.target);Z&&Z.start===Z.end&&Z.start===0&&q("UP")}else if(Q===me.DOWN){const Z=U(W.target);Z&&Z.start===Z.end&&Z.start===Z.len&&q("DOWN")}else if(Q===me.LEFT){const Z=U(W.target);Z&&Z.start===Z.end&&Z.start===0&&q("LEFT")}else if(Q===me.RIGHT){const Z=U(W.target);Z&&Z.start===Z.end&&Z.start===Z.len&&q("RIGHT")}}else Q===me.DELETE&&ft()};return document.addEventListener("keydown",X),()=>{document.removeEventListener("keydown",X)}},[o,M,t,s]);const Et=(X,W)=>{X.stopPropagation(),m([]),_([]);let Q=!0;const Z=x[W],ut=X.pageX,dt=50,ct=Qt=>{if(!Q)return;const Wt=(Qt.pageX-ut)/d,pe=Z+Wt<dt?dt:Math.round(Z+Wt),Ae=[...x];Ae[W]=pe,S(Ae)},Ut=()=>{Q=!1,document.removeEventListener("mousemove",ct),document.removeEventListener("mouseup",Ut),l(K.current)};document.addEventListener("mousemove",ct),document.addEventListener("mouseup",Ut)},K=N.useRef(x);N.useEffect(()=>{K.current=x},[x]);const J=(X,W,Q)=>{const Z=JSON.parse(JSON.stringify(t));Z[W][Q].text=X,s(Z)},_t=N.useMemo(()=>Ar.debounce(J,300,{trailing:!0}),[t,s]),mt=(X,W,Q)=>{const Z=X.length,ut=X[0].length;let dt=0,ct=0;if(W+Z>t.length&&(dt=W+Z-t.length),Q+ut>t[0].length&&(ct=Q+ut-t[0].length),dt||ct){let Ut=JSON.parse(JSON.stringify(t));const Qt={colspan:1,rowspan:1,text:""};if(dt){const Wt=[];for(let pe=0;pe<dt;pe++){const Ae=[];for(let lt=0;lt<Ut[0].length;lt++)Ae.push({...Qt,id:jt.nanoid(10)});Wt.push(Ae)}Ut=[...Ut,...Wt]}if(ct){Ut=Ut.map(pe=>{const Ae=[];for(let lt=0;lt<ct;lt++){const Ze={...Qt,id:jt.nanoid(10)};Ae.push(Ze)}return[...pe,...Ae]});const Wt=[...x,...new Array(ct).fill(100)];S(Wt),l(Wt)}s(Ut)}requestAnimationFrame(()=>{const Ut=JSON.parse(JSON.stringify(t));for(let Qt=0;Qt<Z;Qt++)for(let Wt=0;Wt<ut;Wt++)Ut[W+Qt]&&Ut[W+Qt][Q+Wt]&&(Ut[W+Qt][Q+Wt].text=X[Qt][Wt]);s(Ut)})},xt=(X,W,Q)=>{const Z=X.currentTarget;M.includes(`${W}_${Q}`)||(m([W,Q]),_([]));const{canMerge:ut,canSplit:dt}=at(W,Q),{canDeleteRow:ct,canDeleteCol:Ut}=nt(),Qt=[{text:"插入列",children:[{text:"到左侧",handler:()=>H(Q)},{text:"到右侧",handler:()=>H(Q+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>R(W)},{text:"到下方",handler:()=>R(W+1)}]},{text:"删除列",disable:!Ut,handler:()=>F(Q)},{text:"删除行",disable:!ct,handler:()=>B(W)},{divider:!0},{text:"合并单元格",disable:!ut,handler:O},{text:"取消合并单元格",disable:!dt,handler:()=>G(W,Q)},{divider:!0},{text:"选中当前列",handler:()=>j(Q)},{text:"选中当前行",handler:()=>Y(W)},{text:"选中全部单元格",handler:et}],Wt=f?f(Z)||[]:[],pe=[...Qt,...Wt||[]];pe.length&&st(X,Z,pe)};return D.jsxs("div",{className:Ge.editableTable,style:{width:b+"px"},onMouseDown:c,children:[o&&D.jsx("div",{className:Ge.handler,children:C.map((X,W)=>D.jsx("div",{className:Ge.dragLine,style:{left:X+"px"},onMouseDown:Q=>Et(Q,W)},W))}),D.jsxs("table",{className:kt({[Ge.theme]:a,[Ge.rowHeader]:a==null?void 0:a.rowHeader,[Ge.rowFooter]:a==null?void 0:a.rowFooter,[Ge.colHeader]:a==null?void 0:a.colHeader,[Ge.colFooter]:a==null?void 0:a.colFooter}),style:L,children:[D.jsx("colgroup",{children:x.map((X,W)=>D.jsx("col",{span:1,width:X},W))}),D.jsx("tbody",{children:t.map((X,W)=>D.jsx("tr",{style:{height:r+"px"},children:X.map((Q,Z)=>{if(w.includes(`${W}_${Z}`))return null;const ut=M.includes(`${W}_${Z}`)&&M.length>1,dt=A===`${W}_${Z}`;return D.jsx("td",{className:kt(Ge.cell,{[Ge.selected]:ut,[Ge.active]:dt}),style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...H4(Q.style)},rowSpan:Q.rowspan,colSpan:Q.colspan,"data-cell-index":`${W}_${Z}`,onMouseDown:ct=>P(ct,W,Z),onMouseEnter:()=>I(W,Z),onContextMenu:ct=>xt(ct,W,Z),children:dt?D.jsx(BE,{className:kt(Ge.cellText,{[Ge.active]:!0}),style:{minHeight:r-4+"px"},value:Q.text,onUpdateValue:ct=>_t(ct,W,Z),onInsertExcelData:ct=>mt(ct,W,Z)}):D.jsx("div",{className:Ge.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:W4(Q.text)}})},Q.id)})},W))})]})]})},Cs={editableElementTable:"_editableElementTable_gxw12_1",rotateWrapper:"_rotateWrapper_gxw12_5",elementContent:"_elementContent_gxw12_10",tableMask:"_tableMask_gxw12_17",maskTip:"_maskTip_gxw12_26"},zE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,{canvasScale:i,handleElementId:a,isScaling:o,setDisableHotkeysState:s,setSelectedTableCells:l}=Tt(),{updateElement:u}=Bt(),{addHistorySnapshot:c}=Be(),f=N.useRef(null),d=N.useRef(null),[h,v]=N.useState(!1),p=N.useRef(-1),g=(b,w=!0)=>{b.stopPropagation(),e==null||e(b.nativeEvent,n,w)};N.useEffect(()=>{a!==n.id&&v(!1)},[a,n.id]),N.useEffect(()=>{s(h)},[h,s]);const m=()=>{v(!0)};N.useEffect(()=>{a===n.id&&(o&&v(!1),!o&&p.current!==-1&&(u({id:n.id,props:{height:p.current}}),p.current=-1))},[o,a,n.id,u]);const y=N.useCallback(b=>{const w=b[0].contentRect;if(!f.current)return;const T=w.height;n.height!==T&&(o?p.current=T:u({id:n.id,props:{height:T}}))},[n.height,n.id,o,u]);N.useEffect(()=>{const b=new ResizeObserver(y);return f.current&&b.observe(f.current),()=>{f.current&&b.unobserve(f.current),b.disconnect()}},[y]);const _=b=>{u({id:n.id,props:{data:b}}),c()},x=b=>{const w=b.reduce((L,C)=>L+C),T=b.map(L=>L/w);u({id:n.id,props:{width:w,colWidths:T}}),c()},S=b=>{setTimeout(()=>l(b),0)};return Xr(d,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Cs.editableElementTable,ref:f,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px"},children:D.jsx("div",{className:Cs.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{ref:d,className:Cs.elementContent,children:[D.jsx(VE,{data:n.data,width:n.width,cellMinHeight:n.cellMinHeight,colWidths:n.colWidths,outline:n.outline,theme:n.theme,editable:h,onChange:_,onChangeColWidths:x,onChangeSelectedCells:S,onMouseDown:b=>b.stopPropagation()}),!h&&D.jsx("div",{className:Cs.tableMask,onDoubleClick:m,onMouseDown:g,onTouchStart:g,children:a===n.id&&D.jsx("div",{className:Cs.maskTip,style:{transform:`scale(${1/i})`},children:"双击编辑"})})]})})})},Cd={editableElementLatex:"_editableElementLatex_106e3_1",rotateWrapper:"_rotateWrapper_106e3_5",elementContent:"_elementContent_106e3_10"},FE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=N.useRef(null),i=o=>{o.stopPropagation(),e==null||e(o.nativeEvent,t)},a=()=>{ea.emit(ui.OPEN_LATEX_EDITOR)};return Xr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Cd.editableElementLatex,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Cd.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{ref:n,className:Cd.elementContent,onMouseDown:i,onTouchStart:i,onDoubleClick:a,children:D.jsx("svg",{overflow:"visible",width:t.width,height:t.height,stroke:t.color,strokeWidth:t.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:D.jsx("g",{transform:`scale(${t.width/t.viewBox[0]}, ${t.height/t.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{d:t.path})})})})})})},HE=(t,e)=>{N.useEffect(()=>{if(!e.current)return;let r="normal";if(/m3u8(#|\?|$)/i.exec(t)?r="hls":/.flv(#|\?|$)/i.exec(t)&&(r="flv"),e.current&&r==="hls"&&(e.current.canPlayType("application/x-mpegURL")||e.current.canPlayType("application/vnd.apple.mpegURL"))&&(r="normal"),r==="hls"){const n=window.Hls;if(n&&n.isSupported()){const i=new n;return i.loadSource(t),i.attachMedia(e.current),()=>{i.destroy()}}}else if(r==="flv"){const n=window.flvjs;if(n&&n.isSupported()){const i=n.createPlayer({type:"flv",url:t});return i.attachMediaElement(e.current),i.load(),()=>{i.destroy()}}}},[t,e])},Ct={videoPlayer:"_videoPlayer_17n95_1",hideController:"_hideController_17n95_8",controllerMask:"_controllerMask_17n95_11",controller:"_controller_17n95_11",videoWrap:"_videoWrap_17n95_20",bgCanvas:"_bgCanvas_17n95_27",video:"_video_17n95_1",loadError:"_loadError_17n95_43",barWrap:"_barWrap_17n95_79",bar:"_bar_17n95_79",played:"_played_17n95_87",thumb:"_thumb_17n95_87",barTime:"_barTime_17n95_90",barTimeHidden:"_barTimeHidden_17n95_107",loaded:"_loaded_17n95_117",icons:"_icons_17n95_150",time:"_time_17n95_157",icon:"_icon_17n95_150",playIcon:"_playIcon_17n95_174",iconContent:"_iconContent_17n95_177",loopIcon:"_loopIcon_17n95_182",speedIcon:"_speedIcon_17n95_188",speedMenu:"_speedMenu_17n95_192",speedMenuItem:"_speedMenuItem_17n95_201",volume:"_volume_17n95_212",volumeBarWrap:"_volumeBarWrap_17n95_219",volumeBar:"_volumeBar_17n95_219",volumeBarInner:"_volumeBarInner_17n95_222",volumeActive:"_volumeActive_17n95_225",loop:"_loop_17n95_182",iconsRight:"_iconsRight_17n95_272",speedMenuItemActive:"_speedMenuItemActive_17n95_275",iconActive:"_iconActive_17n95_279",bezel:"_bezel_17n95_283",bezelIcon:"_bezelIcon_17n95_294",bezelTransition:"_bezelTransition_17n95_311","bezel-hide":"_bezel-hide_17n95_1"},WE=({width:t,height:e,src:r,poster:n="",autoplay:i=!1,scale:a=1})=>{const o=N.useRef(null),s=N.useRef(null),l=N.useRef(null),u=N.useRef(null),[c,f]=N.useState(.5),[d,h]=N.useState(!0),[v,p]=N.useState(0),[g,m]=N.useState(0),[y,_]=N.useState(0),[x,S]=N.useState(!1),[b,w]=N.useState(!1),[T,L]=N.useState(1),[C,M]=N.useState(!1),[A,E]=N.useState(!1),[P,I]=N.useState("00:00"),[k,R]=N.useState("0"),[H,B]=N.useState(!1),[F,O]=N.useState(!1);HE(r,o);const G=(lt=0)=>{if(lt===0||isNaN(lt))return"00:00";const Ze=ks=>ks<10?"0"+ks:""+ks,Me=Math.floor(lt/3600),Gr=Math.floor((lt-Me*3600)/60),uc=Math.floor(lt-Me*3600-Gr*60);return(Me>0?[Me,Gr,uc]:[Gr,uc]).map(Ze).join(":")},j=N.useMemo(()=>G(v),[v]),Y=N.useMemo(()=>G(g),[g]),et=N.useMemo(()=>(g?v/g*100:0)+"%",[v,g]),ft=N.useMemo(()=>(g?y/g*100:0)+"%",[y,g]),gt=N.useMemo(()=>c*100+"%",[c]),$=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],U=N.useRef(null),q=N.useCallback(()=>{O(!1),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{o.current&&!o.current.paused&&O(!0)},3e3)},[]),tt=()=>{o.current&&(h(!1),o.current.play(),w(!0),q())},nt=()=>{o.current&&(h(!0),o.current.pause(),w(!0),q())},at=()=>{d?tt():nt()},st=lt=>{o.current&&(lt=Math.max(lt,0),lt=Math.min(lt,g),o.current.currentTime=lt,p(lt))},Et=lt=>{o.current&&(lt=Math.max(lt,0),lt=Math.min(lt,1),o.current.volume=lt,f(lt),o.current.muted&<!==0&&(o.current.muted=!1))},K=lt=>{o.current&&(o.current.playbackRate=lt),L(lt)},J=()=>{o.current&&(o.current.muted?(o.current.muted=!1,Et(.5)):(o.current.muted=!0,Et(0)))},_t=()=>{S(!x)},mt=()=>{var lt;return m(((lt=o.current)==null?void 0:lt.duration)||0)},xt=()=>{var lt;return p(((lt=o.current)==null?void 0:lt.currentTime)||0)},X=()=>{x?(st(0),tt()):nt()},W=()=>{o.current&&o.current.buffered.length&&_(o.current.buffered.end(o.current.buffered.length-1))},Q=()=>M(!0),Z=lt=>lt.getBoundingClientRect().left,ut=N.useCallback(lt=>{if(!o.current||!s.current)return;let Me=(("clientX"in lt?lt.clientX:lt.changedTouches[0].clientX)-Z(s.current))/s.current.clientWidth;Me=Math.max(Me,0),Me=Math.min(Me,1);const Gr=Me*g;o.current.currentTime=Gr,p(Gr)},[g]),dt=N.useCallback(lt=>{ut(lt),document.removeEventListener("mousemove",ut),document.removeEventListener("touchmove",ut),document.removeEventListener("mouseup",dt),document.removeEventListener("touchend",dt)},[ut]),ct=()=>{document.addEventListener("mousemove",ut),document.addEventListener("touchmove",ut),document.addEventListener("mouseup",dt),document.addEventListener("touchend",dt)},Ut=lt=>{if(g&&s.current){const Ze=s.current.getBoundingClientRect().left,Me=lt.clientX-Ze;if(Me<0||Me>s.current.offsetWidth)return;const Gr=g*(Me/s.current.offsetWidth);R(`${Me-(Gr>=3600?25:20)}px`),I(G(Gr)),E(!0)}},Qt=N.useCallback(lt=>{if(!l.current)return;const Me=(("clientX"in lt?lt.clientX:lt.changedTouches[0].clientX)-Z(l.current))/45;Et(Me)},[]),Wt=N.useCallback(()=>{document.removeEventListener("mousemove",Qt),document.removeEventListener("touchmove",Qt),document.removeEventListener("mouseup",Wt),document.removeEventListener("touchend",Wt)},[Qt]),pe=()=>{document.addEventListener("mousemove",Qt),document.addEventListener("touchmove",Qt),document.addEventListener("mouseup",Wt),document.addEventListener("touchend",Wt)},Ae=lt=>{if(!l.current)return;const Ze=(lt.clientX-Z(l.current))/45;Et(Ze)};return N.useEffect(()=>{if(!u.current||!o.current)return;const lt=u.current.getContext("2d");if(!lt)return;const Ze=()=>{o.current.requestVideoFrameCallback(()=>{o.current&&u.current&<.drawImage(o.current,0,0,u.current.width,u.current.height)})};o.current.addEventListener("loadedmetadata",Ze,{once:!0})},[]),D.jsxs("div",{className:kt(Ct.videoPlayer,{[Ct.hideController]:F}),style:{width:t*a+"px",height:e*a+"px",transform:`scale(${1/a})`},onMouseMove:q,onClick:q,children:[D.jsxs("div",{className:Ct.videoWrap,onClick:at,children:[C&&D.jsx("div",{className:Ct.loadError,children:"视频加载失败"}),D.jsx("canvas",{ref:u,className:Ct.bgCanvas}),D.jsx("video",{className:Ct.video,ref:o,src:r,autoPlay:i,poster:n,playsInline:!0,crossOrigin:"anonymous",onDurationChange:mt,onTimeUpdate:xt,onEnded:X,onProgress:W,onPlay:()=>{q(),h(!1)},onPause:()=>q(),onError:Q}),D.jsx("div",{className:Ct.bezel,children:D.jsx("span",{className:kt(Ct.bezelIcon,{[Ct.bezelTransition]:b}),onAnimationEnd:()=>w(!1),children:d?D.jsx(Ie.Pause,{}):D.jsx(Ie.PlayOne,{})})})]}),D.jsx("div",{className:Ct.controllerMask}),D.jsxs("div",{className:Ct.controller,children:[D.jsxs("div",{className:Ct.icons,children:[D.jsx("div",{className:kt(Ct.icon,Ct.playIcon),onClick:lt=>{lt.stopPropagation(),at()},children:D.jsx("span",{className:Ct.iconContent,children:d?D.jsx(Ie.PlayOne,{}):D.jsx(Ie.Pause,{})})}),D.jsxs("div",{className:Ct.volume,children:[D.jsx("div",{className:kt(Ct.icon,Ct.volumeIcon),onClick:lt=>{lt.stopPropagation(),J()},children:D.jsx("span",{className:Ct.iconContent,children:c===0?D.jsx(Ie.VolumeMute,{}):c===1?D.jsx(Ie.VolumeNotice,{}):D.jsx(Ie.VolumeSmall,{})})}),D.jsx("div",{className:Ct.volumeBarWrap,onMouseDown:lt=>{lt.stopPropagation(),pe()},onTouchStart:lt=>{lt.stopPropagation(),pe()},onClick:lt=>{lt.stopPropagation(),Ae(lt)},children:D.jsx("div",{className:Ct.volumeBar,ref:l,children:D.jsx("div",{className:Ct.volumeBarInner,style:{width:gt},children:D.jsx("span",{className:Ct.thumb})})})})]}),D.jsxs("span",{className:Ct.time,children:[D.jsx("span",{className:Ct.ptime,children:j})," /"," ",D.jsx("span",{className:Ct.dtime,children:Y})]})]}),D.jsxs("div",{className:kt(Ct.icons,Ct.iconsRight),children:[D.jsx("div",{className:Ct.speed,children:D.jsxs("div",{className:kt(Ct.icon,Ct.speedIcon),onMouseLeave:()=>B(!1),children:[D.jsx("span",{className:Ct.iconContent,onClick:lt=>{lt.stopPropagation(),B(!H)},children:T===1?"倍速":T+"x"}),H&&D.jsx("div",{className:Ct.speedMenu,children:$.map(lt=>D.jsx("div",{className:kt(Ct.speedMenuItem,{[Ct.speedMenuItemActive]:lt.value===T}),onClick:Ze=>{Ze.stopPropagation(),K(lt.value),B(!1)},children:lt.label},lt.label))})]})}),D.jsx("div",{className:Ct.loop,onClick:lt=>{lt.stopPropagation(),_t()},children:D.jsx("div",{className:kt(Ct.icon,Ct.loopIcon,{[Ct.iconActive]:x}),children:D.jsxs("span",{className:Ct.iconContent,children:["循环",x?"开":"关"]})})})]}),D.jsxs("div",{className:Ct.barWrap,ref:s,onMouseDown:lt=>{lt.stopPropagation(),ct()},onTouchStart:lt=>{lt.stopPropagation(),ct()},onMouseMove:Ut,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onClick:lt=>lt.stopPropagation(),children:[D.jsx("div",{className:kt(Ct.barTime,{[Ct.barTimeHidden]:!A}),style:{left:k},children:P}),D.jsxs("div",{className:Ct.bar,children:[D.jsx("div",{className:Ct.loaded,style:{width:ft}}),D.jsx("div",{className:Ct.played,style:{width:et},children:D.jsx("span",{className:Ct.thumb})})]})]})]})]})},Es={editableElementVideo:"_editableElementVideo_92vvh_1",rotateWrapper:"_rotateWrapper_92vvh_5",elementContent:"_elementContent_92vvh_10",handlerBorder:"_handlerBorder_92vvh_16",t:"_t_92vvh_21",b:"_b_92vvh_28",l:"_l_92vvh_35",r:"_r_92vvh_5"},GE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,{canvasScale:i}=Tt(),a=N.useRef(null),o=(s,l=!0)=>{s.stopPropagation(),e==null||e(s.nativeEvent,n,l)};return Xr(a,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Es.editableElementVideo,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:D.jsx("div",{className:Es.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{className:Es.elementContent,ref:a,onMouseDown:s=>o(s,!1),onTouchStart:s=>o(s,!1),children:[D.jsx(WE,{width:n.width,height:n.height,src:n.src,poster:n.poster,scale:i}),["t","b","l","r"].map(s=>D.jsx("div",{className:`${Es.handlerBorder} ${Es[s]}`,onMouseDown:l=>o(l),onTouchStart:l=>o(l)},s))]})})})},ue={audioPlayer:"_audioPlayer_1156v_1",controller:"_controller_1156v_11",barWrap:"_barWrap_1156v_21",bar:"_bar_1156v_21",played:"_played_1156v_29",thumb:"_thumb_1156v_29",barTime:"_barTime_1156v_32",barTimeHidden:"_barTimeHidden_1156v_49",loaded:"_loaded_1156v_59",icons:"_icons_1156v_92",icon:"_icon_1156v_92",playIcon:"_playIcon_1156v_109",iconContent:"_iconContent_1156v_112",iconActive:"_iconActive_1156v_120",volume:"_volume_1156v_123",volumeBarWrap:"_volumeBarWrap_1156v_130",volumeBar:"_volumeBar_1156v_130",volumeBarInner:"_volumeBarInner_1156v_133",volumeActive:"_volumeActive_1156v_136",time:"_time_1156v_179",ptime:"_ptime_1156v_193",dtime:"_dtime_1156v_196"},jE=N.forwardRef(({src:t,loop:e=!1,autoplay:r=!1,scale:n=1,className:i,style:a,onMouseDown:o},s)=>{const l=N.useRef(null),u=N.useRef(null),c=N.useRef(null),[f,d]=N.useState(.5),[h,v]=N.useState(!0),[p,g]=N.useState(0),[m,y]=N.useState(0),[_,x]=N.useState(0),[S,b]=N.useState(!1),[w,T]=N.useState("00:00"),[L,C]=N.useState("0"),M=(J=0)=>{if(J===0||isNaN(J))return"00:00";const _t=W=>W<10?"0"+W:""+W,mt=Math.floor(J/3600),xt=Math.floor((J-mt*3600)/60),X=Math.floor(J-mt*3600-xt*60);return(mt>0?[mt,xt,X]:[xt,X]).map(_t).join(":")},A=N.useMemo(()=>M(p),[p]),E=N.useMemo(()=>M(m),[m]),P=N.useMemo(()=>(m?p/m*100:0)+"%",[p,m]),I=N.useMemo(()=>(m?_/m*100:0)+"%",[_,m]),k=N.useMemo(()=>f*100+"%",[f]),R=()=>{l.current&&(v(!1),l.current.play())},H=()=>{l.current&&(v(!0),l.current.pause())},B=()=>{h?R():H()};N.useImperativeHandle(s,()=>({toggle:B}));const F=J=>{l.current&&(J=Math.max(J,0),J=Math.min(J,m),l.current.currentTime=J,g(J))},O=J=>{l.current&&(J=Math.max(J,0),J=Math.min(J,1),l.current.volume=J,d(J),l.current.muted&&J!==0&&(l.current.muted=!1))},G=()=>{l.current&&(l.current.muted?(l.current.muted=!1,O(.5)):(l.current.muted=!0,O(0)))},j=()=>{var J;return y(((J=l.current)==null?void 0:J.duration)||0)},Y=()=>{var J;return g(((J=l.current)==null?void 0:J.currentTime)||0)},et=()=>{e?(F(0),R()):H()},ft=()=>{l.current&&l.current.buffered.length&&x(l.current.buffered.end(l.current.buffered.length-1))},gt=()=>console.error("音频加载失败"),$=J=>J.getBoundingClientRect().left,U=N.useCallback(J=>{if(!l.current||!u.current)return;let mt=(("clientX"in J?J.clientX:J.changedTouches[0].clientX)-$(u.current))/u.current.clientWidth;mt=Math.max(mt,0),mt=Math.min(mt,1);const xt=mt*m;l.current.currentTime=xt,g(xt)},[m]),q=N.useCallback(J=>{U(J),document.removeEventListener("mousemove",U),document.removeEventListener("touchmove",U),document.removeEventListener("mouseup",q),document.removeEventListener("touchend",q)},[U]),tt=()=>{document.addEventListener("mousemove",U),document.addEventListener("touchmove",U),document.addEventListener("mouseup",q),document.addEventListener("touchend",q)},nt=J=>{if(m&&u.current){const _t=u.current.getBoundingClientRect().left,mt=J.clientX-_t;if(mt<0||mt>u.current.offsetWidth)return;const xt=m*(mt/u.current.offsetWidth);C(`${mt-(xt>=3600?25:20)}px`),T(M(xt)),b(!0)}},at=N.useCallback(J=>{if(!c.current)return;const mt=(("clientX"in J?J.clientX:J.changedTouches[0].clientX)-$(c.current))/45;O(mt)},[]),st=N.useCallback(()=>{document.removeEventListener("mousemove",at),document.removeEventListener("touchmove",at),document.removeEventListener("mouseup",st),document.removeEventListener("touchend",st)},[at]),Et=()=>{document.addEventListener("mousemove",at),document.addEventListener("touchmove",at),document.addEventListener("mouseup",st),document.addEventListener("touchend",st)},K=J=>{if(!c.current)return;const _t=(J.clientX-$(c.current))/45;O(_t)};return D.jsxs("div",{className:kt(ue.audioPlayer,i),style:{transform:`scale(${1/n})`,...a},onMouseDown:o,children:[D.jsx("audio",{className:ue.audio,ref:l,src:t,autoPlay:r,onDurationChange:j,onTimeUpdate:Y,onPlay:()=>v(!1),onEnded:et,onProgress:ft,onError:gt}),D.jsxs("div",{className:ue.controller,children:[D.jsxs("div",{className:ue.icons,children:[D.jsx("div",{className:kt(ue.icon,ue.playIcon),onClick:B,children:D.jsx("span",{className:ue.iconContent,children:h?D.jsx(Ie.PlayOne,{}):D.jsx(Ie.Pause,{})})}),D.jsxs("div",{className:ue.volume,children:[D.jsx("div",{className:kt(ue.icon,ue.volumeIcon),onClick:G,children:D.jsx("span",{className:ue.iconContent,children:f===0?D.jsx(Ie.VolumeMute,{}):f===1?D.jsx(Ie.VolumeNotice,{}):D.jsx(Ie.VolumeSmall,{})})}),D.jsx("div",{className:ue.volumeBarWrap,onMouseDown:Et,onTouchStart:Et,onClick:K,children:D.jsx("div",{className:ue.volumeBar,ref:c,children:D.jsx("div",{className:ue.volumeBarInner,style:{width:k},children:D.jsx("span",{className:ue.thumb})})})})]})]}),D.jsxs("span",{className:ue.time,children:[D.jsx("span",{className:ue.ptime,children:A})," /"," ",D.jsx("span",{className:ue.dtime,children:E})]}),D.jsxs("div",{className:ue.barWrap,ref:u,onMouseDown:tt,onTouchStart:tt,onMouseMove:nt,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[D.jsx("div",{className:kt(ue.barTime,{[ue.barTimeHidden]:!S}),style:{left:L},children:w}),D.jsxs("div",{className:ue.bar,children:[D.jsx("div",{className:ue.loaded,style:{width:I}}),D.jsx("div",{className:ue.played,style:{width:P},children:D.jsx("span",{className:ue.thumb})})]})]})]})]})}),Ds={editableElementAudio:"_editableElementAudio_nmvrn_1",rotateWrapper:"_rotateWrapper_nmvrn_5",elementContent:"_elementContent_nmvrn_10",audioIcon:"_audioIcon_nmvrn_18",audioPlayer:"_audioPlayer_nmvrn_22"},XE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const{canvasScale:n,handleElementId:i}=Tt(),{viewportRatio:a,viewportSize:o}=Bt(),s=N.useRef(null),l=N.useMemo(()=>Math.min(t.width,t.height)+"px",[t.width,t.height]),u=N.useMemo(()=>{const f=o,d=o*a,h=280/n,v=50/n,p=t.width,g=t.height,m=t.left,y=t.top;let _=0,x=g;return m+h>=f&&(_=p-h),y+g+v>=d&&(x=-v),{left:_+"px",top:x+"px"}},[o,a,n,t.width,t.height,t.left,t.top]),c=f=>{f.stopPropagation(),e==null||e(f.nativeEvent,t)};return Xr(s,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:Ds.editableElementAudio,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Ds.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{ref:s,className:Ds.elementContent,onMouseDown:f=>c(f),onTouchStart:f=>c(f),children:[D.jsx(Ie.VolumeNotice,{className:Ds.audioIcon,style:{fontSize:l,color:t.color}}),i===t.id&&D.jsx(jE,{className:Ds.audioPlayer,style:{...u},src:t.src,loop:t.loop,scale:n,onMouseDown:f=>f.stopPropagation()})]})})})},YE=({elementInfo:t,elementIndex:e,isMultiSelect:r,selectElement:n})=>{const{orderElement:i}=d3(),{alignElementToCanvas:a}=v3(),{deleteElement:o}=fv(),{copyElement:s,pasteElement:l,cutElement:u}=p3(),c=N.useRef(null),f=N.useMemo(()=>({[$t.IMAGE]:T3,[$t.TEXT]:f7,[$t.SHAPE]:h7,[$t.LINE]:d7,[$t.CHART]:OE,[$t.TABLE]:zE,[$t.LATEX]:FE,[$t.VIDEO]:GE,[$t.AUDIO]:XE})[t.type]||null,[t.type]),d=()=>[{text:"剪切",subText:"Ctrl + X",handler:u},{text:"复制",subText:"Ctrl + C",handler:s},{text:"粘贴",subText:"Ctrl + V",handler:l},{divider:!0},{text:"水平居中",handler:()=>a(Ce.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>a(Ce.CENTER)},{text:"水平居中",handler:()=>a(Ce.HORIZONTAL)},{text:"左对齐",handler:()=>a(Ce.LEFT)},{text:"右对齐",handler:()=>a(Ce.RIGHT)}]},{text:"垂直居中",handler:()=>a(Ce.VERTICAL),children:[{text:"水平垂直居中",handler:()=>a(Ce.CENTER)},{text:"垂直居中",handler:()=>a(Ce.VERTICAL)},{text:"顶部对齐",handler:()=>a(Ce.TOP)},{text:"底部对齐",handler:()=>a(Ce.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:r&&!t.groupId,handler:()=>i(t,Rr.TOP),children:[{text:"置于顶层",handler:()=>i(t,Rr.TOP)},{text:"上移一层",handler:()=>i(t,Rr.UP)}]},{text:"置于底层",disable:r&&!t.groupId,handler:()=>i(t,Rr.BOTTOM),children:[{text:"置于底层",handler:()=>i(t,Rr.BOTTOM)},{text:"下移一层",handler:()=>i(t,Rr.DOWN)}]},{divider:!0},{text:"删除",subText:"Delete",handler:o}];return Xr(c,d),f?D.jsx("div",{ref:c,className:"editable-element",id:`editable-element-${t.id}`,style:{zIndex:e},children:D.jsx(f,{elementInfo:t,selectElement:n,contextmenus:d})}):null},UE=()=>{const{updateElement:t,removeElementProps:e}=Bt(),{addHistorySnapshot:r}=Be();return{setLink:(a,o)=>{const s=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(o.type==="web"&&!s.test(o.target))return console.error("不是正确的网页链接地址"),!1;if(o.type==="slide"&&!o.target)return console.error("请先选择链接目标"),!1;const l={link:o};return t({id:a.id,props:l}),r(),!0},removeLink:a=>{e({id:a.id,propName:"link"}),r()}}},As={baseElementImage:"_baseElementImage_1yw1u_1",rotateWrapper:"_rotateWrapper_1yw1u_5",elementContent:"_elementContent_1yw1u_10",imageContent:"_imageContent_1yw1u_15",colorMask:"_colorMask_1yw1u_24"},$E=({elementInfo:t})=>{const{shadowStyle:e}=Ln(t.shadow),{flipStyle:r}=js(t.flipH,t.flipV),{clipShape:n,imgPosition:i}=_c(t),{filter:a}=mv(t.filters);return D.jsx("div",{className:As.baseElementImage,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:As.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:As.elementContent,style:{filter:e?`drop-shadow(${e})`:"",transform:r},children:[D.jsx(yv,{elementInfo:t}),D.jsxs("div",{className:As.imageContent,style:{clipPath:n.style},children:[D.jsx("img",{src:t.src,draggable:!1,style:{top:i.top,left:i.left,width:i.width,height:i.height,filter:a},alt:""}),t.colorMask&&D.jsx("div",{className:As.colorMask,style:{backgroundColor:t.colorMask}})]})]})})})},Ps={baseElementText:"_baseElementText_emqg1_1",rotateWrapper:"_rotateWrapper_emqg1_5",elementContent:"_elementContent_emqg1_10",text:"_text_emqg1_16",thumbnail:"_thumbnail_emqg1_19"},ZE=({elementInfo:t,target:e})=>{const{shadowStyle:r}=Ln(t.shadow);return D.jsx("div",{className:Ps.baseElementText,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Ps.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:Ps.elementContent,style:{width:t.vertical?"auto":t.width+"px",height:t.vertical?t.height+"px":"auto",backgroundColor:t.fill,opacity:t.opacity,textShadow:r,lineHeight:t.lineHeight,letterSpacing:(t.wordSpace||0)+"px",color:t.defaultColor,fontFamily:t.defaultFontName,writingMode:t.vertical?"vertical-rl":"horizontal-tb"},children:[D.jsx(Xs,{width:t.width,height:t.height,outline:t.outline}),D.jsx("div",{className:kt(Ps.text,"ProseMirror-static",{[Ps.thumbnail]:e==="thumbnail"}),style:{"--paragraphSpace":`${t.paragraphSpace===void 0?5:t.paragraphSpace}px`},dangerouslySetInnerHTML:{__html:t.content}})]})})})},Rs={baseElementShape:"_baseElementShape_16w80_1",rotateWrapper:"_rotateWrapper_16w80_5",elementContent:"_elementContent_16w80_10",shapeText:"_shapeText_16w80_21",top:"_top_16w80_34",middle:"_middle_16w80_38",bottom:"_bottom_16w80_42"},KE=({elementInfo:t})=>{const{theme:e}=Bt(),{fill:r}=Lv(t,"base"),{outlineWidth:n,outlineColor:i,strokeDashArray:a}=ta(t.outline),{shadowStyle:o}=Ln(t.shadow),{flipStyle:s}=js(t.flipH,t.flipV),l=N.useMemo(()=>{const u={content:"",align:"middle",defaultFontName:e.fontName,defaultColor:e.fontColor};return t.text?t.text:u},[t.text,e]);return D.jsx("div",{className:Rs.baseElementShape,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Rs.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:Rs.elementContent,style:{opacity:t.opacity,filter:o?`drop-shadow(${o})`:"",transform:s,color:l.defaultColor,fontFamily:l.defaultFontName},children:[D.jsxs("svg",{overflow:"visible",width:t.width,height:t.height,children:[D.jsx("defs",{children:t.pattern?D.jsx(Cv,{id:`base-pattern-${t.id}`,src:t.pattern}):t.gradient?D.jsx(Mv,{id:`base-gradient-${t.id}`,type:t.gradient.type,colors:t.gradient.colors,rotate:t.gradient.rotate}):null}),D.jsx("g",{transform:`scale(${t.width/t.viewBox[0]}, ${t.height/t.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:t.path,fill:r,stroke:i,strokeWidth:n,strokeDasharray:a})})]}),D.jsx("div",{className:kt(Rs.shapeText,Rs[l.align]),children:D.jsx("div",{className:"ProseMirror-static",dangerouslySetInnerHTML:{__html:l.content}})})]})})})},X4={baseElementLine:"_baseElementLine_135s9_1",elementContent:"_elementContent_135s9_5"},QE=({elementInfo:t})=>{const{shadowStyle:e}=Ln(t.shadow),r=N.useMemo(()=>{const l=Math.abs(t.start[0]-t.end[0]);return l<24?24:l},[t.start,t.end]),n=N.useMemo(()=>{const l=Math.abs(t.start[1]-t.end[1]);return l<24?24:l},[t.start,t.end]),i=N.useMemo(()=>{const l=t.width;return t.style==="dashed"?l<=8?`${l*5} ${l*2.5}`:`${l*5} ${l*1.5}`:t.style==="dotted"?l<=8?`${l*1.8} ${l*1.6}`:`${l*1.5} ${l*1.2}`:"0 0"},[t.width,t.style]),a=N.useMemo(()=>tv(t),[t]),o=t.points[0],s=t.points[1];return D.jsx("div",{className:X4.baseElementLine,style:{top:t.top+"px",left:t.left+"px"},children:D.jsx("div",{className:X4.elementContent,style:{filter:e?`drop-shadow(${e})`:""},children:D.jsxs("svg",{overflow:"visible",width:r,height:n,children:[D.jsxs("defs",{children:[o&&D.jsx(Ys,{id:t.id,position:"start",type:o,color:t.color,baseSize:t.width}),s&&D.jsx(Ys,{id:t.id,position:"end",type:s,color:t.color,baseSize:t.width})]}),D.jsx("path",{d:a,stroke:t.color,strokeWidth:t.width,strokeDasharray:i,fill:"none",markerStart:o?`url(#${t.id}-${o}-start)`:"",markerEnd:s?`url(#${t.id}-${s}-end)`:""})]})})})},Ed={baseElementChart:"_baseElementChart_1cqxu_1",isThumbnail:"_isThumbnail_1cqxu_4",rotateWrapper:"_rotateWrapper_1cqxu_8",elementContent:"_elementContent_1cqxu_13"},JE=({elementInfo:t})=>D.jsx("div",{className:Ed.baseElementChart,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Ed.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:Ed.elementContent,style:{backgroundColor:t.fill},children:[D.jsx(Xs,{width:t.width,height:t.height,outline:t.outline}),D.jsx(F4,{width:t.width,height:t.height,type:t.chartType,data:t.data,themeColors:t.themeColors,textColor:t.textColor,lineColor:t.lineColor,options:t.options})]})})}),ai={staticTable:"_staticTable_1ew9n_1",theme:"_theme_1ew9n_19",cell:"_cell_1ew9n_22",rowHeader:"_rowHeader_1ew9n_28",rowFooter:"_rowFooter_1ew9n_31",colHeader:"_colHeader_1ew9n_34",colFooter:"_colFooter_1ew9n_37",cellText:"_cellText_1ew9n_47"},qE=({data:t,width:e,cellMinHeight:r,colWidths:n,outline:i,theme:a,editable:o=!0})=>{const[s,l]=N.useState([]);N.useEffect(()=>{l(n.map(h=>h*e))},[n,e]);const u=N.useMemo(()=>s.reduce((h,v)=>h+v,0),[s]),{hideCells:c}=G4(t),{subThemeColor:f}=j4(a),d=N.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":f[0],"--subThemeColor2":f[1]}:{},[a,f]);return D.jsx("div",{className:ai.staticTable,style:{width:u+"px"},children:D.jsxs("table",{className:kt({[ai.theme]:a,[ai.rowHeader]:a==null?void 0:a.rowHeader,[ai.rowFooter]:a==null?void 0:a.rowFooter,[ai.colHeader]:a==null?void 0:a.colHeader,[ai.colFooter]:a==null?void 0:a.colFooter}),style:d,children:[D.jsx("colgroup",{children:s.map((h,v)=>D.jsx("col",{span:1,width:h},v))}),D.jsx("tbody",{children:t.map((h,v)=>D.jsx("tr",{style:{height:r+"px"},children:h.map((p,g)=>c.includes(`${v}_${g}`)?null:D.jsx("td",{className:ai.cell,style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...H4(p.style)},rowSpan:p.rowspan,colSpan:p.colspan,children:D.jsx("div",{className:ai.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:W4(p.text)}})},p.id))},v))})]})})},Dd={baseElementTable:"_baseElementTable_uo3vw_1",rotateWrapper:"_rotateWrapper_uo3vw_5",elementContent:"_elementContent_uo3vw_10"},tD=({elementInfo:t})=>D.jsx("div",{className:Dd.baseElementTable,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px"},children:D.jsx("div",{className:Dd.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:Dd.elementContent,children:D.jsx(qE,{data:t.data,width:t.width,cellMinHeight:t.cellMinHeight,colWidths:t.colWidths,outline:t.outline,theme:t.theme})})})}),Ad={baseElementLatex:"_baseElementLatex_ybsi7_1",rotateWrapper:"_rotateWrapper_ybsi7_5",elementContent:"_elementContent_ybsi7_10"},eD=({elementInfo:t})=>D.jsx("div",{className:Ad.baseElementLatex,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Ad.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:Ad.elementContent,children:D.jsx("svg",{overflow:"visible",width:t.width,height:t.height,stroke:t.color,strokeWidth:t.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:D.jsx("g",{transform:`scale(${t.width/t.viewBox[0]}, ${t.height/t.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{d:t.path})})})})})}),sc={baseElementVideo:"_baseElementVideo_vw6yo_1",rotateWrapper:"_rotateWrapper_vw6yo_5",elementContent:"_elementContent_vw6yo_10",icon:"_icon_vw6yo_22"},rD=({elementInfo:t})=>D.jsx("div",{className:sc.baseElementVideo,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:sc.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:sc.elementContent,style:{backgroundImage:t.poster?`url(${t.poster})`:""},children:D.jsx("div",{className:sc.icon,children:D.jsx(Ie.PlayOne,{})})})})}),lc={baseElementAudio:"_baseElementAudio_1jxzq_1",rotateWrapper:"_rotateWrapper_1jxzq_5",elementContent:"_elementContent_1jxzq_10",audioIcon:"_audioIcon_1jxzq_18"},nD=({elementInfo:t})=>{const e=N.useMemo(()=>Math.min(t.width,t.height)+"px",[t.width,t.height]);return D.jsx("div",{className:lc.baseElementAudio,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:lc.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:lc.elementContent,style:{color:t.color},children:D.jsx(Ie.VolumeNotice,{className:lc.audioIcon,style:{fontSize:e,color:t.color}})})})})},iD=({elementInfo:t,elementIndex:e})=>{const r=N.useMemo(()=>({[$t.IMAGE]:$E,[$t.TEXT]:ZE,[$t.SHAPE]:KE,[$t.LINE]:QE,[$t.CHART]:JE,[$t.TABLE]:tD,[$t.LATEX]:eD,[$t.VIDEO]:rD,[$t.AUDIO]:nD})[t.type]||null,[t.type]);return D.jsx("div",{className:kt("thumbnail-element",`base-element-${t.id}`),style:{zIndex:e},children:D.jsx(r,{elementInfo:t})})},aD=({slide:t,size:e,visible:r=!0,className:n})=>{const{viewportRatio:i,viewportSize:a}=Bt(),{backgroundStyle:o}=ov(t.background),s=N.useMemo(()=>e/a,[e,a]);return D.jsx("div",{className:kt("thumbnail-slide",n),style:{width:e,height:e*i},children:r?D.jsxs("div",{className:"elements",style:{width:a,height:a*i,transform:`scale(${s})`},children:[D.jsx("div",{className:"background",style:o}),t.elements.map((l,u)=>D.jsx(iD,{elementInfo:l,elementIndex:u+1},l.id))]}):D.jsx("div",{className:"placeholder",children:"加载中 ..."})})},je={linkDialogMask:"_linkDialogMask_p3ytk_1",linkDialog:"_linkDialog_p3ytk_1",tabs:"_tabs_p3ytk_26",tab:"_tab_p3ytk_26",active:"_active_p3ytk_38",content:"_content_p3ytk_44",input:"_input_p3ytk_50",preview:"_preview_p3ytk_60",thumbnail:"_thumbnail_p3ytk_64",btns:"_btns_p3ytk_75",btn:"_btn_p3ytk_75",primary:"_primary_p3ytk_91"},oD=({onClose:t})=>{const{handleElementId:e,setDisableHotkeysState:r}=Tt(),{slides:n,currentSlide:i}=Bt(),[a,o]=N.useState("web"),[s,l]=N.useState(""),[u,c]=N.useState(""),{setLink:f}=UE(),d=N.useRef(null),h=N.useMemo(()=>n.map((g,m)=>({label:`幻灯片 ${m+1}`,value:g.id,disabled:(i==null?void 0:i.id)===g.id})),[n,i]),v=N.useMemo(()=>u&&n.find(g=>g.id===u)||null,[u,n]);N.useEffect(()=>{r(!0);const g=n.find(y=>y.id!==(i==null?void 0:i.id));g&&c(g.id);const m=(i==null?void 0:i.elements.find(y=>y.id===e))||null;return m!=null&&m.link&&(o(m.link.type),m.link.type==="web"?l(m.link.target):m.link.type==="slide"&&c(m.link.target)),a==="web"&&setTimeout(()=>{var y;return(y=d.current)==null?void 0:y.focus()},0),()=>{r(!1)}},[]);const p=()=>{const g={type:a,target:a==="web"?s:u},m=(i==null?void 0:i.elements.find(y=>y.id===e))||null;m&&(f(m,g)?t():l(""))};return D.jsx("div",{className:je.linkDialogMask,onClick:t,children:D.jsxs("div",{className:je.linkDialog,onClick:g=>g.stopPropagation(),children:[D.jsxs("div",{className:je.tabs,children:[D.jsx("div",{className:kt(je.tab,{[je.active]:a==="web"}),onClick:()=>o("web"),children:"网页链接"}),D.jsx("div",{className:kt(je.tab,{[je.active]:a==="slide"}),onClick:()=>o("slide"),children:"幻灯片页面"})]}),D.jsx("div",{className:je.content,children:a==="web"?D.jsx("input",{ref:d,className:je.input,type:"text",value:s,onChange:g=>l(g.target.value),onKeyDown:g=>g.key==="Enter"&&p(),placeholder:"请输入网页链接地址"}):D.jsxs(D.Fragment,{children:[D.jsx("select",{className:je.input,value:u,onChange:g=>c(g.target.value),children:h.map(g=>D.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))}),v&&D.jsxs("div",{className:je.preview,children:[D.jsx("div",{children:"预览:"}),D.jsx(aD,{className:je.thumbnail,slide:v,size:500})]})]})}),D.jsxs("div",{className:je.btns,children:[D.jsx("button",{className:je.btn,onClick:t,children:"取消"}),D.jsx("button",{className:kt(je.btn,je.primary),onClick:p,children:"确认"})]})]})})},Pd={canvas:"_canvas_r5284_1",dragMask:"_dragMask_r5284_9",viewportWrapper:"_viewportWrapper_r5284_18",viewport:"_viewport_r5284_18"},sD=()=>{const{canvasScale:t,activeElementIdList:e,handleElementId:r,activeGroupElementId:n,hiddenElementIdList:i,creatingElement:a,creatingCustomShape:o,setActiveElementIdList:s,setActiveGroupElementId:l,editorAreaFocus:u,textFormatPainter:c,setEditorareaFocus:f,setTextFormatPainter:d}=Tt(),{currentSlide:h}=Bt(),{spaceKeyState:v}=pr(),{createCustomShapeElement:p,createTextElement:g}=ro(),{updateSlideIndex:m}=P_(),y=N.useRef(null),_=N.useRef(null),[x,S]=N.useState(!1),b=(h==null?void 0:h.elements)||[],[w,T]=N.useState([]),L=K=>{const J=Bt.getState().currentSlide;if(!J)return;const _t=typeof K=="function"?K(J.elements):K;Bt.getState().updateSlide({elements:_t})},{dragElement:C}=z_(b,L,T),{scaleElement:M,scaleMultiElement:A}=j_(b,L,T),{rotateElement:E}=W_(b,L,_),{dragLineElement:P}=X_(b,L),{moveShapeKeypoint:I}=Y_(b,L),{viewportStyles:k,dragViewport:R}=N_(y),{selectionState:H,mouseSelectionVisible:B,updateMouseSelection:F}=O_(b,_);B_(y);const{insertElementFromCreateSelection:O}=V_(_),{selectElement:G}=F_(b,C);R_(y,()=>{const K=Tt.getState();K.editorAreaFocus&&K.setEditorareaFocus(!1)}),N.useEffect(()=>{l("")},[r,l]);const Y=(K,J,_t=!0)=>{K.stopPropagation();const mt=K.nativeEvent||K;G(mt,J,_t)},et=K=>{e.length&&s([]),v?R(K.nativeEvent):F(K),u||f(!0),c&&d(null),k_()},ft=K=>{if(e.length||a||o||!_.current)return;const{pageX:J,pageY:_t}=K,{x:mt,y:xt}=_.current.getBoundingClientRect(),X=(J-mt)/t,W=(_t-xt)/t;g({left:X,top:W,width:200/t,height:0})};N.useEffect(()=>{e.length&&s([])},[]),N.useEffect(()=>()=>{const{textFormatPainter:K}=Tt.getState();K&&d(null)},[d]);const gt=N.useRef(m);N.useEffect(()=>{gt.current=m},[m]);const $=N.useMemo(()=>Ar.throttle(K=>{gt.current(K)},300,{leading:!0,trailing:!1}),[]),U=K=>{K.preventDefault(),K.deltaY>0?$(me.DOWN):K.deltaY<0&&$(me.UP)};N.useEffect(()=>{const K=y.current;if(K)return K.addEventListener("wheel",U,{passive:!1}),()=>K.removeEventListener("wheel",U)},[$]);const q=()=>S(!0),tt=(K,J)=>{E(K.nativeEvent,J)},nt=(K,J,_t)=>{M(K.nativeEvent,J,_t)},at=(K,J,_t)=>{P(K.nativeEvent,J,_t)},st=(K,J,_t)=>{I(K.nativeEvent,J,_t)},Et=(K,J,_t)=>{A(K.nativeEvent,J,_t)};return D.jsxs("div",{className:Pd.canvas,ref:y,onMouseDown:et,onDoubleClick:ft,onDragOver:K=>K.preventDefault(),children:[x&&D.jsx(oD,{onClose:()=>S(!1)}),a&&D.jsx(s3,{onCreated:O}),o&&D.jsx(u3,{onClose:()=>Tt.getState().setCreatingCustomShapeState(!1),onCreated:p}),D.jsxs("div",{className:Pd.viewportWrapper,style:{width:k.width*t,height:k.height*t,left:k.left,top:k.top},children:[D.jsxs("div",{className:"operates",children:[w.map((K,J)=>D.jsx(o3,{type:K.type,axis:K.axis,length:K.length,canvasScale:t},J)),e.length>1&&D.jsx(h3,{elementList:(h==null?void 0:h.elements)||[],scaleMultiElement:Et}),h==null?void 0:h.elements.filter(K=>!i.includes(K.id)).map(K=>D.jsx(a3,{elementInfo:K,isSelected:e.includes(K.id),isActive:r===K.id,isActiveGroupElement:n===K.id,isMultiSelect:e.length>1,rotateElement:tt,scaleElement:nt,dragLineElement:at,moveShapeKeypoint:st,openLinkDialog:q},K.id)),D.jsx(K_,{})]}),D.jsxs("div",{className:Pd.viewport,ref:_,style:{transform:`scale(${t})`},children:[B&&H&&D.jsx(c3,{top:H.top,left:H.left,width:H.width,height:H.height,quadrant:H.quadrant}),h==null?void 0:h.elements.filter(K=>!i.includes(K.id)).map((K,J)=>D.jsx(YE,{elementInfo:K,elementIndex:J+1,isMultiSelect:e.length>1,selectElement:Y,openLinkDialog:q},K.id))]})]})]})},Y4=t=>{try{const e=new o_.SVGPathData(t),r=[],n=[];for(const i of e.commands){const a="x"in i?i.x:0,o="y"in i?i.y:0;r.push(a),n.push(o)}return{minX:Math.min(...r),minY:Math.min(...n),maxX:Math.max(...r),maxY:Math.max(...n)}}catch{return{minX:0,minY:0,maxX:0,maxY:0}}},Rd=(t,e)=>t.replace(/font-size:\s*([\d.]+)pt/g,(r,n)=>`font-size: ${(parseFloat(n)*e).toFixed(1)}px`),lD=(t,e)=>{const{start:r,end:n}=t,i=e*Math.PI/180,a=(r[0]+n[0])/2,o=(r[1]+n[1])/2,s=r[0]-a,l=r[1]-o,u=n[0]-a,c=n[1]-o,f=Math.cos(i),d=Math.sin(i),h=s*f-l*d,v=s*d+l*f,p=u*f-c*d,g=u*d+c*f,m=h+a,y=v+o,_=p+a,x=g+o,S=Math.min(r[0],n[0]),b=Math.min(r[1],n[1]),w=Math.min(m,_),T=Math.min(y,x),L=m-w,C=y-T,M=_-w,A=x-T,E=[L,C],P=[M,A],I=[w-S,T-b];return{start:E,end:P,offset:I}},uD=(t,e)=>{let r=[0,0],n=[0,0];!t.isFlipV&&!t.isFlipH?(r=[0,0],n=[t.width,t.height]):t.isFlipV&&t.isFlipH?(r=[t.width,t.height],n=[0,0]):t.isFlipV&&!t.isFlipH?(r=[0,t.height],n=[t.width,0]):(r=[t.width,0],n=[0,t.height]);const i={type:"line",id:jt.nanoid(10),width:+((t.borderWidth||1)*e).toFixed(2),left:t.left,top:t.top,start:r,end:n,style:t.borderType||"solid",color:t.borderColor||"#000",points:["",/straightConnector/.test(t.shapType||"")?"arrow":""]};if(t.rotate){const{start:a,end:o,offset:s}=lD(i,t.rotate);i.start=a,i.end=o,i.left=i.left+s[0],i.top=i.top+s[1]}if(/bentConnector/.test(t.shapType||"")&&(i.broken2=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2]),/curvedConnector/.test(t.shapType||"")){const a=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2];i.cubic=[a,a]}return i},cD=t=>{var l;const e=[];for(const u of S_)e.push(...u.children);const r=96/72,i=t.size.width*r,a=t.size.height/t.size.width,o={themeColors:t.themeColors,fontColor:"#333",fontName:"微软雅黑",backgroundColor:"#fff"},s=[];for(const u of t.slides){let c;const f=u.fill;let d="solid",h="#fff";typeof f=="string"?h=f:f&&(d=f.type,h=f.value),d==="image"?c={type:"image",image:{src:h.picBase64,size:"cover"}}:d==="gradient"?c={type:"gradient",gradient:{type:h.path==="line"?"linear":"radial",colors:h.colors.map(g=>({...g,pos:parseInt(g.pos)})),rotate:h.rot+90}}:d==="pattern"?c={type:"solid",color:"#fff"}:c={type:"solid",color:h||"#fff"};const v={id:jt.nanoid(10),elements:[],background:c,remark:u.note||""},p=u.elements.sort((g,m)=>g.order-m.order);for(const g of p){const m=g.width||1,y=g.height||1,_={...g};if(_.width=_.width*r,_.height=_.height*r,_.left=_.left*r,_.top=_.top*r,_.type==="text"||_.type==="shape"&&_.shapType==="rect"&&_.content,_.type==="text"){const x={type:"text",id:jt.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,rotate:_.rotate||0,defaultFontName:o.fontName,defaultColor:o.fontColor,content:Rd(_.content||"",r),lineHeight:1,outline:{color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"},fill:((l=_.fill)==null?void 0:l.type)==="color"?_.fill.value:"",vertical:_.isVertical};_.shadow&&(x.shadow={h:_.shadow.h*r,v:_.shadow.v*r,blur:_.shadow.blur*r,color:_.shadow.color}),v.elements.push(x)}else if(_.type==="image"){const x={type:"image",id:jt.nanoid(10),src:_.src||"",width:_.width,height:_.height,left:_.left,top:_.top,fixedRatio:!0,rotate:_.rotate||0,flipH:_.isFlipH,flipV:_.isFlipV};_.borderWidth&&(x.outline={color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"});const S=["roundRect","ellipse","triangle","rhombus","pentagon","hexagon","heptagon","octagon","parallelogram","trapezoid"];_.rect?x.clip={shape:_.geom&&S.includes(_.geom)?_.geom:"rect",range:[[_.rect.l||0,_.rect.t||0],[100-(_.rect.r||0),100-(_.rect.b||0)]]}:_.geom&&S.includes(_.geom)&&(x.clip={shape:_.geom,range:[[0,0],[100,100]]}),v.elements.push(x)}else if(_.type==="math")v.elements.push({type:"image",id:jt.nanoid(10),src:_.picBase64||"",width:_.width,height:_.height,left:_.left,top:_.top,fixedRatio:!0,rotate:0});else if(_.type==="audio")v.elements.push({type:"audio",id:jt.nanoid(10),src:_.blob||"",width:_.width,height:_.height,left:_.left,top:_.top,rotate:0,fixedRatio:!1,color:o.themeColors[0],loop:!1,autoplay:!1});else if(_.type==="video")v.elements.push({type:"video",id:jt.nanoid(10),src:_.blob||_.src,width:_.width,height:_.height,left:_.left,top:_.top,rotate:0,autoplay:!1});else if(_.type==="shape")if(_.shapType==="line"||/Connector/.test(_.shapType||"")){const x=uD(_,r);v.elements.push(x)}else{const x=e.find(M=>M.pptxShapeType===_.shapType),S={mid:"middle",down:"bottom",up:"top"},b=_.fill,w=(b==null?void 0:b.type)==="gradient"?{type:b.value.path==="line"?"linear":"radial",colors:b.value.colors.map(M=>({...M,pos:parseInt(M.pos)})),rotate:b.value.rot}:void 0,T=(b==null?void 0:b.type)==="image"?b.value.picBase64:void 0,L=(b==null?void 0:b.type)==="color"?b.value:"",C={type:"shape",id:jt.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:L,gradient:w,pattern:T,fixedRatio:!1,rotate:_.rotate||0,outline:{color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"},text:{content:Rd(_.content||"",r),defaultFontName:o.fontName,defaultColor:o.fontColor,align:S[_.vAlign||"mid"]||"middle"},flipH:_.isFlipH,flipV:_.isFlipV};if(_.shadow&&(C.shadow={h:_.shadow.h*r,v:_.shadow.v*r,blur:_.shadow.blur*r,color:_.shadow.color}),x){if(C.path=x.path,C.viewBox=x.viewBox,x.pathFormula){C.pathFormula=x.pathFormula,C.viewBox=[_.width,_.height];const M=eo[x.pathFormula];"editable"in M&&M.editable?(C.path=M.formula(_.width,_.height,M.defaultValue),C.keypoints=M.defaultValue):C.path=M.formula(_.width,_.height)}}else if(_.path&&_.path.indexOf("NaN")===-1){const{maxX:M,maxY:A}=Y4(_.path);C.path=_.path,M/A>m/y?C.viewBox=[M,M*y/m]:C.viewBox=[A*m/y,A]}if(_.shapType==="custom"){_.path.indexOf("NaN")!==-1?(C.width===0&&(C.width=.1),C.height===0&&(C.height=.1),C.path=_.path.replace(/NaN/g,"0")):(C.special=!0,C.path=_.path);const{maxX:M,maxY:A}=Y4(C.path);M/A>m/y?C.viewBox=[M,M*y/m]:C.viewBox=[A*m/y,A]}C.path&&v.elements.push(C)}else if(_.type==="table"){const x=_.data.length,S=_.data[0].length,b={fontname:o.fontName,color:o.fontColor},w=[];for(let T=0;T<x;T++){const L=[];for(let C=0;C<S;C++){const M=_.data[T][C];let A=null;typeof document<"u"&&(A=document.createElement("div"),A.innerHTML=M.text);let E="left",P="14px";if(A){const I=A.querySelector("p");E=(I==null?void 0:I.style.textAlign)||"left";const k=A.querySelector("span");P=(k==null?void 0:k.style.fontSize)||"14px"}L.push({id:jt.nanoid(10),colspan:1,rowspan:1,text:Rd(M.text,r),style:{...b,align:E,fontsize:P}})}w.push(L)}v.elements.push({type:"table",id:jt.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,colWidths:new Array(S).fill(1/S),data:w,theme:{color:o.themeColors[0],rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},outline:{width:2,style:"solid",color:"#eeece1"},cellMinHeight:36,rotate:0})}}s.push(v)}return{slides:s,theme:{themeColors:o.themeColors,fontColor:o.fontColor,fontName:o.fontName,backgroundColor:o.backgroundColor},viewportRatio:a,viewportSize:i}},fD=({initialSlidesData:t,onDataUpdate:e})=>{const{setSlides:r,setTheme:n,setViewportRatio:i,setViewportSize:a}=Bt.getState();return N.useEffect(()=>{if(t){const{slides:o,theme:s,viewportRatio:l,viewportSize:u}=cD(t);console.log("initialSlidesData",o,s,l,u),r(o),n(s),i(l),a(u)}},[]),N.useEffect(()=>{const o=Bt.subscribe(s=>{const l={slides:s.slides,title:s.title,theme:s.theme,viewportRatio:s.viewportRatio};e(l)});return()=>o()},[e]),D.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:D.jsx(sD,{})})};Xt.ElementTypes=$t,Xt.PPTCanvas=fD,Xt.ShapePathFormulasKeys=Nt,Object.defineProperty(Xt,Symbol.toStringTag,{value:"Module"})});
|
|
37
|
+
`);wp(u)}return dt(l,function(c,f){var d="";wt(c)||(process.env.NODE_ENV!=="production"&&(d="A transform should not return some empty results."),Qe(d)),c.data||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be not be null or undefined"),Qe(d));var h=Ug(c.data);Ph(h)||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be array rows or object rows."),Qe(d));var v,p=e[0];if(p&&f===0&&!c.dimensions){var g=p.startIndex;g&&(c.data=p.data.slice(0,g).concat(c.data)),v={seriesLayoutBy:Xr,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else v={seriesLayoutBy:Xr,sourceHeader:0,dimensions:c.dimensions};return Dh(c.data,v,null)})}function Ph(t){return t===Ae||t===dr}var iu="undefined",QS=typeof Uint32Array===iu?Array:Uint32Array,KS=typeof Uint16Array===iu?Array:Uint16Array,s2=typeof Int32Array===iu?Array:Int32Array,l2=typeof Float64Array===iu?Array:Float64Array,u2={float:l2,int:s2,ordinal:Array,number:Array,time:l2},Nh;function Ta(t){return t>65535?QS:KS}function La(){return[1/0,-1/0]}function JS(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function c2(t,e,r,n,i){var a=u2[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];t[e]=l}}else t[e]=new a(n)}var kh=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Pt()}return t.prototype.initData=function(e,r,n){process.env.NODE_ENV!=="production"&&bt(Lt(e.getItem)&&Lt(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=Nh[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=jg(i);this._dimensions=dt(r,function(s){return process.env.NODE_ENV!=="production"&&o&&bt(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(e,a),this._chunks[a]=new u2[r||"float"](this._rawCount),this._rawExtent[a]=La(),a},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=La());for(var l=a[e],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){process.env.NODE_ENV!=="production"&&bt(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(e);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,r||0),u=0;u<a;u++){var c=i[u];c2(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var h=d-s,v=0;v<a;v++){var c=i[v],p=Nh.arrayRows.call(this,e[h]||f,c.property,h,v);n[v][d]=p;var g=o[v];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=dt(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=La()),c2(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,l);else for(var d=[],h=e;h<r;h++){d=i.getItem(h,d);for(var v=0;v<s;v++){var p=a[v],g=this._dimValueGetter(d,u[v],h,v);p[h]=g;var m=l[v];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],i=[];if(r==null){r=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<e)i=o+1;else if(r[o]>e)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=r[a]}else e=new n(r.buffer,0,i)}else{var n=Ta(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Ta(n._rawCount),o=new a(i),s=[],l=e.length,u=0,c=e[0],f=n._chunks,d=0;d<i;d++){var h=void 0,v=n.getRawIndex(d);if(l===0)h=r(d);else if(l===1){var p=f[c][v];h=r(p,d)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][v];s[g]=d,h=r.apply(null,s)}h&&(o[u++]=v)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var i=Bt(e),a=i.length;if(!a)return this;var o=r.count(),s=Ta(r._rawCount),l=new s(o),u=0,c=i[0],f=e[c][0],d=e[c][1],h=r._chunks,v=!1;if(!r._indices){var p=0;if(a===1){for(var g=h[i[0]],m=0;m<n;m++){var y=g[m];(y>=f&&y<=d||isNaN(y))&&(l[u++]=p),p++}v=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],b=e[i[1]][0],x=e[i[1]][1],m=0;m<n;m++){var y=g[m],S=_[m];(y>=f&&y<=d||isNaN(y))&&(S>=b&&S<=x||isNaN(S))&&(l[u++]=p),p++}v=!0}}if(!v)if(a===1)for(var m=0;m<o;m++){var w=r.getRawIndex(m),y=h[i[0]][w];(y>=f&&y<=d||isNaN(y))&&(l[u++]=w)}else for(var m=0;m<o;m++){for(var T=!0,w=r.getRawIndex(m),L=0;L<a;L++){var C=i[L],y=h[C][w];(y<e[C][0]||y>e[C][1])&&(T=!1)}T&&(l[u++]=r.getRawIndex(m))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var i=e._chunks,a=[],o=r.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<r.length;c++)u[r[c]]=La();for(var f=0;f<s;f++){for(var d=e.getRawIndex(f),h=0;h<o;h++)l[h]=i[r[h]][d];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(a[0]=v,v=a);for(var c=0;c<v.length;c++){var p=r[c],g=v[c],m=u[p],y=i[p];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,d,h=new(Ta(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 p=Math.min(v+l,o-1),g=Math.min(v+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var b=this.getRawIndex(_),x=a[b];isNaN(x)||(y+=x)}y/=g-p;var S=v,w=Math.min(v+l,o),T=v-1,L=a[u];c=-1,d=S;for(var C=-1,M=0,_=S;_<w;_++){var b=this.getRawIndex(_),x=a[b];if(isNaN(x)){M++,C<0&&(C=b);continue}f=Math.abs((T-m)*(x-L)-(T-_)*(y-L)),f>c&&(c=f,d=b)}M>0&&M<w-S&&(h[s++]=Math.min(C,d),d=Math.max(C,d)),h[s++]=d,u=d}return h[s++]=this.getRawIndex(o-1),n._count=s,n._indices=h,n.getRawIndex=this._getRawIdx,n},t.prototype.minmaxDownSample=function(e,r){for(var n=this.clone([e],!0),i=n._chunks,a=Math.floor(1/r),o=i[e],s=this.count(),l=new(Ta(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,d=o[this.getRawIndex(f)],h=c,v=o[this.getRawIndex(h)],p=a;c+a>s&&(p=s-c);for(var g=0;g<p;g++){var m=this.getRawIndex(c+g),y=o[m];y<d&&(d=y,f=c+g),y>v&&(v=y,h=c+g)}var _=this.getRawIndex(f),b=this.getRawIndex(h);f<h?(l[u++]=_,l[u++]=b):(l[u++]=b,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},t.prototype.downSample=function(e,r,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[e],c=this.count(),f=a._rawExtent[e]=La(),d=new(Ta(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 p=0;p<l;p++){var g=this.getRawIndex(v+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(v+i(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),d[h++]=y}return a._count=h,a._indices=d,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[e[0]][s],a);break;case 2:r(i[e[0]][s],i[e[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[e[l]][s];u[l]=a,r.apply(null,u)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=La();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)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<i;u++){var c=this.getRawIndex(u),f=r[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},t.prototype.clone=function(e,r){var n=new t,i=this._chunks,a=e&&gn(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?JS(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Ot(this._extent),e._rawExtent=Ot(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return nu(r[a],this._dimensions[a])}Nh={arrayRows:e,objectRows:function(r,n,i,a){return nu(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return nu(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),tx=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Vo(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Ie(s)?nn:Je,a=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=mt(f.seriesLayoutBy,d.seriesLayoutBy)||null,v=mt(f.sourceHeader,d.sourceHeader),p=mt(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!v!=!!d.sourceHeader||p;i=g?[Dh(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:p},l)]:[]}else{var m=e;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[Dh(_,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&bt(i&&a),this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&bt(i!=null||n!=null),i!=null){var a="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),f2(a))}var o,s=[],l=[];return $(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&(process.env.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+i),f2(f)),s.push(c),l.push(u._getVersionSign())}),n?o=qS(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[NS(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!=="production"&&bt(Vo(this._sourceHost),"Can only call getDataStore on series source manager.");var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Vo(this._sourceHost)&&l?s=l._innerGetDataStore(e,r,n):(s=new kh,s.initData(new Jg(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Vo(e)){var r=xh(e);return r?[r.getSourceManager()]:[]}else return dt(aS(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(Vo(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},t}();function Vo(t){return t.mainType==="series"}function f2(t){throw new Error(t)}function zo(t,e){return e.type=t,e}function h2(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return ph(n)}function ex(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=gt(s),u=h2(e,r),c,f,d,h;if(o>1||l&&!o){var v=rx(s,e,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);h=c=wa(i,r,a[0]),f=p.type}else h=c=l?s[0]:s;var g=uf(e),m=g&&e.name||"",y=i.getName(r),_=n?m:y;return zo("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[zo("nameValue",{markerType:"item",markerColor:u,name:_,noName:!mn(_),value:c,valueType:f,dataIndex:r})].concat(d||[])})}function rx(t,e,r,n,i){var a=e.getData(),o=gn(t,function(f,d,h){var v=a.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?$(n,function(f){c(wa(a,r,f),f)}):$(t,c);function c(f,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(zo("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var kn=ae();function au(t,e){return t.getName(e)||t.getId(e)}var nx="__universalTransitionEnabled",tr=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=$o({count:ax,reset:ox}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=kn(this).sourceManager=new tx(this);a.prepareSource();var o=this.getInitialData(r,i);v2(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&bt(o,"getInitialData returned invalid data."),kn(this).dataBeforeProcessed=o,d2(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=No(this),a=i?ko(r):{},o=this.subType;Xt.hasClass(o)&&(o+="Series"),Zt(r,n.getTheme().get(this.subType)),Zt(r,this.getDefaultOption()),lf(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Nn(r,a,i)},e.prototype.mergeOption=function(r,n){r=Zt(this.option,r,!0),this.fillDataTextStyle(r.data);var i=No(this);i&&Nn(this.option,r,i);var a=kn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);v2(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,kn(this).dataBeforeProcessed=o,d2(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!Ie(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&lf(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=Oh(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return kn(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=Oh(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}kn(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Pt(r)},e.prototype.getSourceManager=function(){return kn(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return kn(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],f=1/0,d=-1,h=0;return o.each(n,function(v,p){var g=l.dataToCoord(v),m=u-g,y=Math.abs(m);y<=a&&((y<f||y===f&&m>=0&&d<0)&&(f=y,d=m,h=0),m===d&&(c[h++]=p))}),c.length=h,c},e.prototype.formatTooltip=function(r,n,i){return ex({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ht.node&&!(r&&r.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(r,n,i){var a=this.ecModel,o=wh.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=au(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Bt(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[au(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[nx])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){wt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=au(r,f);u[d]=!0,this._selectedDataIndicesMap[d]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],d=au(r,h);o.selectedMap=(i={},i[d]=!0,i),this._selectedDataIndicesMap=(a={},a[d]=r.getRawIndex(h),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Xt.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Xt);br(tr,zS),br(tr,wh),kp(tr,Xt);function d2(t){var e=t.name;uf(t)||(t.name=ix(t)||e)}function ix(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return $(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function ax(t){return t.model.getRawData().count()}function ox(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),sx}function sx(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function v2(t,e){$(K3(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ue(lx,e))})}function lx(t,e){var r=Oh(t);return r&&r.setOutputEnd((e||this).count()),e}function Oh(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var on=function(){function t(){this.group=new le,this.uid=Fl("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();ff(on),ul(on);function Ih(){var t=ae();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var p2=ae(),ux=Ih(),We=function(){function t(){this.group=new le,this.uid=Fl("viewChart"),this.renderTask=$o({plan:cx,reset:fx}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Wt("Unknown dataType "+i.dataType);return}m2(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Wt("Unknown dataType "+i.dataType);return}m2(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Rl(this.group,e)},t.markUpdateMethod=function(e,r){p2(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function g2(t,e,r){t&&da(t)&&(e==="emphasis"?Tl:Ll)(t,r)}function m2(t,e,r){var n=sa(t,e),i=e&&e.highlightKey!=null?v9(e.highlightKey):null;n!=null?$(Be(n),function(a){g2(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){g2(a,r,i)})}ff(We,["dispose"]),ul(We);function cx(t){return ux(t.model)}function fx(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&p2(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),hx[l]}var hx={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function y2(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.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 p=c||e,g=c||r;c=null,s=n-(g?i:a)-p,clearTimeout(o),g?o=setTimeout(f,p):s>=0?f():o=setTimeout(f,-s),i=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}var _2=ae(),b2={itemStyle:fo(ug,!0),lineStyle:fo(lg,!0)},dx={lineStyle:"stroke",itemStyle:"fill"};function S2(t,e){var r=t.visualStyleMapper||b2[e];return r||(console.warn("Unknown style type '"+e+"'."),b2.itemStyle)}function x2(t,e){var r=t.visualDrawType||dx[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var vx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=S2(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=x2(t,n),u=o[l],c=Lt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Lt(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Lt(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var p=t.getDataParams(v),g=rt({},o);g[l]=c(p),h.setItemVisual(v,"style",g)}}}},Fo=new de,px={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=S2(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Fo.option=l[n];var u=i(Fo),c=o.ensureUniqueItemVisual(s,"style");rt(c,u),Fo.option.decal&&(o.setItemVisual(s,"decal",Fo.option.decal),Fo.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},gx={performRawSeries:!0,overallReset:function(t){var e=Pt();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),_2(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=_2(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=x2(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var d=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",v=n.count();d[l]=r.getColorFromPalette(h,o,v)}})}})}},ou=Math.PI;function mx(t,e){e=e||{},It(e,{text:"loading",textColor:Ct.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:Ct.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new le,n=new ue({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Ke({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ue({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Al({shape:{startAngle:-ou/2,endAngle:-ou/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:ou*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ou*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.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=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var w2=function(){function t(e,r,n,i){this._stageTaskMap=Pt(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Pt();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;$(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),bt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;$(e,function(l,u){if(!(i.visualType&&i.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(g){s(i,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var p=o.getPerformArgs(d,i.block);v.each(function(g){g.perform(p)}),d.perform(p)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Pt(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||$o({plan:xx,reset:Tx,count:Mx}));h.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,h)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||$o({reset:yx});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Pt(),u=e.seriesType,c=e.getTargetSeries,f=!0,d=!1,h="";process.env.NODE_ENV!=="production"&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),bt(!e.createOnAllSeries,h),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,$(n.getSeries(),v));function v(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(d=!0,$o({reset:_x,onDirty:Sx})));m.context={model:p,overallProgress:f},m.agent=o,m.__block=f,a._pipe(p,m)}d&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return Lt(e)&&(e={overallReset:e,seriesType:Cx(e)}),e.uid=Fl("stageHandler"),r&&(e.visualType=r),e},t}();function yx(t){t.overallReset(t.ecModel,t.api,t.payload)}function _x(t){return t.overallProgress&&bx}function bx(){this.agent.dirty(),this.getDownstream().dirty()}function Sx(){this.agent&&this.agent.dirty()}function xx(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Tx(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Be(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?dt(e,function(r,n){return T2(n)}):Lx}var Lx=T2(0);function T2(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Mx(t){return t.data.count()}function Cx(t){su=null;try{t(Ho,L2)}catch{}return su}var Ho={},L2={},su;M2(Ho,Lh),M2(L2,$g),Ho.eachSeriesByType=Ho.eachRawSeriesByType=function(t){su=t},Ho.eachComponent=function(t){t.mainType==="series"&&t.subType&&(su=t.subType)};function M2(t,e){for(var r in e.prototype)t[r]=Ze}var ut=Ct.darkColor,Ex=ut.background,Go=function(){return{axisLine:{lineStyle:{color:ut.axisLine}},splitLine:{lineStyle:{color:ut.axisSplitLine}},splitArea:{areaStyle:{color:[ut.backgroundTint,ut.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:ut.axisMinorSplitLine}},axisLabel:{color:ut.axisLabel},axisName:{}}},C2={label:{color:ut.secondary},itemStyle:{borderColor:ut.borderTint},dividerLineStyle:{color:ut.border}},E2={darkMode:!0,color:ut.theme,backgroundColor:Ex,axisPointer:{lineStyle:{color:ut.border},crossStyle:{color:ut.borderShade},label:{color:ut.tertiary}},legend:{textStyle:{color:ut.secondary},pageTextStyle:{color:ut.tertiary}},textStyle:{color:ut.secondary},title:{textStyle:{color:ut.primary},subtextStyle:{color:ut.quaternary}},toolbox:{iconStyle:{borderColor:ut.accent50}},tooltip:{backgroundColor:ut.neutral20,defaultBorderColor:ut.border,textStyle:{color:ut.tertiary}},dataZoom:{borderColor:ut.accent10,textStyle:{color:ut.tertiary},brushStyle:{color:ut.backgroundTint},handleStyle:{color:ut.neutral00,borderColor:ut.accent20},moveHandleStyle:{color:ut.accent40},emphasis:{handleStyle:{borderColor:ut.accent50}},dataBackground:{lineStyle:{color:ut.accent30},areaStyle:{color:ut.accent20}},selectedDataBackground:{lineStyle:{color:ut.accent50},areaStyle:{color:ut.accent30}}},visualMap:{textStyle:{color:ut.secondary},handleStyle:{borderColor:ut.neutral30}},timeline:{lineStyle:{color:ut.accent10},label:{color:ut.tertiary},controlStyle:{color:ut.accent30,borderColor:ut.accent30}},calendar:{itemStyle:{color:ut.neutral00,borderColor:ut.neutral20},dayLabel:{color:ut.tertiary},monthLabel:{color:ut.secondary},yearLabel:{color:ut.secondary}},matrix:{x:C2,y:C2,backgroundColor:{borderColor:ut.axisLine},body:{itemStyle:{borderColor:ut.borderTint}}},timeAxis:Go(),logAxis:Go(),valueAxis:Go(),categoryAxis:Go(),line:{symbol:"circle"},graph:{color:ut.theme},gauge:{title:{color:ut.secondary},axisLine:{lineStyle:{color:[[1,ut.neutral05]]}},axisLabel:{color:ut.axisLabel},detail:{color:ut.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:ut.background}},radar:function(){var t=Go();return t.axisName={color:ut.axisLabel},t.axisLine.lineStyle.color=ut.neutral20,t}(),treemap:{breadcrumb:{itemStyle:{color:ut.neutral20,textStyle:{color:ut.secondary}},emphasis:{itemStyle:{color:ut.neutral30}}}},sunburst:{itemStyle:{borderColor:ut.background}},map:{itemStyle:{borderColor:ut.border,areaColor:ut.neutral10},label:{color:ut.tertiary},emphasis:{label:{color:ut.primary},itemStyle:{areaColor:ut.highlight}},select:{label:{color:ut.primary},itemStyle:{areaColor:ut.highlight}}},geo:{itemStyle:{borderColor:ut.border,areaColor:ut.neutral10},emphasis:{label:{color:ut.primary},itemStyle:{areaColor:ut.highlight}},select:{label:{color:ut.primary},itemStyle:{color:ut.highlight}}}};E2.categoryAxis.splitLine.show=!1;var Dx=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(xt(e)){var a=Vr(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};$(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"&&(r.mainType=v,r[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.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,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(f,d,h,v){return f[h]==null||d[v||h]===f[h]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Bh=["symbol","symbolSize","symbolRotate","symbolOffset"],D2=Bh.concat(["symbolKeepAspect"]),Ax={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<Bh.length;o++){var s=Bh[o],l=t.get(s);Lt(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(rt({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var u=Bt(i);function c(f,d){for(var h=t.getRawValue(d),v=t.getDataParams(d),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(d,g,i[g](h,v))}}return{dataEach:a?c:null}}},Px={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<D2.length;s++){var l=D2[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function Nx(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function kx(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Ox(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}$([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=rt({},i),process.env.NODE_ENV!=="production"&&he(i.type,n[1]),o.dispatchAction(rt(i,{type:n[1],seriesIndex:r(a,i)}))})})}function Ma(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&Jr("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=sa(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:gt(d)?f.getName(d[0]):f.getName(d),selected:xt(l)?l:rt({},l)})}}))}function Ix(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(Ma("map","selectchanged",e,i,n),Ma("pie","selectchanged",e,i,n)):n.fromAction==="select"?(Ma("map","selected",e,i,n),Ma("pie","selected",e,i,n)):n.fromAction==="unselect"&&(Ma("map","unselected",e,i,n),Ma("pie","unselected",e,i,n))})}function lu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var Bx=Math.round(Math.random()*9),Rx=typeof Object.defineProperty=="function",$x=function(){function t(){this._id="__ec_inner_"+Bx++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return Rx?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),Vx=Vt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),zx=Vt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),Fx=Vt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),l=n-a+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;t.moveTo(r-c,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+c-f*h,l+s+d*h,r,n-v,r,n),t.bezierCurveTo(r,n-v,r-c+f*h,l+s+d*h,r-c,l+s),t.closePath()}}),Hx=Vt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),Gx={line:Dn,rect:ue,roundRect:ue,square:ue,circle:yo,diamond:zx,pin:Fx,arrow:Hx,triangle:Vx},Wx={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},Rh={};$(Gx,function(t,e){Rh[e]=new t});var Xx=Vt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=rl(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=Rh[n];i||(n="rect",i=Rh[n]),Wx[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function Yx(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||Ct.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function On(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=W1(t.slice(8),new Nt(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?l=qf(t.slice(7),{},new Nt(e,r,n,i),o?"center":"cover"):l=new Xx({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=Yx,a&&l.setColor(a),l}function A2(t){return gt(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function P2(t,e){if(t!=null)return gt(t)||(t=[t,t]),[Kt(t[0],e[0])||0,Kt(mt(t[1],t[0]),e[1])||0]}function Ei(t){return isFinite(t)}function Ux(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Ei(n)?n:0,i=Ei(i)?i:1,a=Ei(a)?a:0,o=Ei(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Zx(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),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+r.x,s=s*i+r.y,l=l*a),o=Ei(o)?o:.5,s=Ei(s)?s:.5,l=l>=0&&Ei(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function N2(t,e,r){for(var n=e.type==="radial"?Zx(t,e,r):Ux(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function qx(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function uu(t){return parseInt(t,10)}function k2(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||uu(s[n])||uu(t.style[n]))-(uu(s[a])||0)-(uu(s[o])||0)|0}function jx(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:jt(t)?[t]:gt(t)?t:null}function $h(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&jx(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=dt(r,function(a){return a/i}),n/=i)}return[r,n]}var Qx=new Mn(!0);function cu(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function O2(t){return typeof t=="string"&&t!=="none"}function fu(t){var e=t.fill;return e!=null&&e!=="none"}function I2(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function B2(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function R2(t,e,r){var n=df(e.image,e.__image,r);if(cl(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*ks),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function Kx(t,e,r,n){var i,a=cu(r),o=fu(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||Qx,f=e.__dirty;if(!n){var d=r.fill,h=r.stroke,v=o&&!!d.colorStops,p=a&&!!h.colorStops,g=o&&!!d.image,m=a&&!!h.image,y=void 0,_=void 0,b=void 0,x=void 0,S=void 0;(v||p)&&(S=e.getBoundingRect()),v&&(y=f?N2(t,d,S):e.__canvasFillGradient,e.__canvasFillGradient=y),p&&(_=f?N2(t,h,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=f||!e.__canvasFillPattern?R2(t,d,e):e.__canvasFillPattern,e.__canvasFillPattern=b),m&&(x=f||!e.__canvasStrokePattern?R2(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),v?t.fillStyle=y:g&&(b?t.fillStyle=b:o=!1),p?t.strokeStyle=_:m&&(x?t.strokeStyle=x:a=!1)}var w=e.getGlobalScale();c.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,L;t.setLineDash&&r.lineDash&&(i=$h(e),T=i[0],L=i[1]);var C=!0;(u||f&Ki)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),C=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),C&&c.rebuildPath(t,l?s:1),T&&(t.setLineDash(T),t.lineDashOffset=L),n||(r.strokeFirst?(a&&B2(t,r),o&&I2(t,r)):(o&&I2(t,r),a&&B2(t,r))),T&&t.setLineDash([])}function Jx(t,e,r){var n=e.__image=df(r.image,e.__image,e,e.onload);if(!(!n||!cl(n))){var i=r.x||0,a=r.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),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,d=s-c;t.drawImage(n,u,c,f,d,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function tw(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||Zr,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=$h(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(cu(r)&&t.strokeText(i,r.x,r.y),fu(r)&&t.fillText(i,r.x,r.y)):(fu(r)&&t.fillText(i,r.x,r.y),cu(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var $2=["shadowBlur","shadowOffsetX","shadowOffsetY"],V2=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function z2(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){Xe(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?si.opacity:o}(n||e.blend!==r.blend)&&(a||(Xe(t,i),a=!0),t.globalCompositeOperation=e.blend||si.blend);for(var s=0;s<$2.length;s++){var l=$2[s];(n||e[l]!==r[l])&&(a||(Xe(t,i),a=!0),t[l]=t.dpr*(e[l]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(Xe(t,i),a=!0),t.shadowColor=e.shadowColor||si.shadowColor),a}function F2(t,e,r,n,i){var a=Wo(e,i.inHover),o=n?null:r&&Wo(r,i.inHover)||{};if(a===o)return!1;var s=z2(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(Xe(t,i),s=!0),O2(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(Xe(t,i),s=!0),O2(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(Xe(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==u&&(s||(Xe(t,i),s=!0),t.lineWidth=u)}for(var c=0;c<V2.length;c++){var f=V2[c],d=f[0];(n||a[d]!==o[d])&&(s||(Xe(t,i),s=!0),t[d]=a[d]||f[1])}return s}function ew(t,e,r,n,i){return z2(t,Wo(e,i.inHover),r&&Wo(r,i.inHover),n,i)}function H2(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function rw(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),H2(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function nw(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var G2=1,W2=2,X2=3,Y2=4;function iw(t){var e=fu(t),r=cu(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function Xe(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Wo(t,e){return e&&t.__hoverStyle||t.style}function aw(t,e){Vh(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Vh(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~kr,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||qx(a,o))&&(o&&o.length&&(Xe(t,r),t.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(Xe(t,r),t.save(),rw(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=e instanceof Vt&&e.autoBatch&&iw(e.style);s||nw(i,u.transform)?(Xe(t,r),H2(t,e)):c||Xe(t,r);var f=Wo(e,r.inHover);e instanceof Vt?(r.lastDrawType!==G2&&(l=!0,r.lastDrawType=G2),F2(t,e,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&t.beginPath(),Kx(t,e,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):e instanceof go?(r.lastDrawType!==X2&&(l=!0,r.lastDrawType=X2),F2(t,e,u,l,r),tw(t,e,f)):e instanceof Tr?(r.lastDrawType!==W2&&(l=!0,r.lastDrawType=W2),ew(t,e,u,l,r),Jx(t,e,f)):e.getTemporalDisplayables&&(r.lastDrawType!==Y2&&(l=!0,r.lastDrawType=Y2),ow(t,e,r)),c&&n&&Xe(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function ow(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Vh(t,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Vh(t,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var zh=new $x,U2=new ta(100),Z2=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Fh(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&zh.delete(t);var a=zh.get(t);if(a)return a;var o=It(t,{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=i?1:1/r,zh.set(t,s),t.dirty=!1,s;function l(u){for(var c=[r],f=!0,d=0;d<Z2.length;++d){var h=o[Z2[d]];if(h!=null&&!gt(h)&&!xt(h)&&!jt(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var v;if(f){v=c.join(",")+(i?"-svg":"");var p=U2.get(v);p&&(i?u.svgElement=p:u.image=p)}var g=j2(o.dashArrayX),m=sw(o.dashArrayY),y=q2(o.symbol),_=lw(g),b=Q2(m),x=!i&&pn.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=L(),T;x&&(x.width=w.width*r,x.height=w.height*r,T=x.getContext("2d")),C(),f&&U2.put(v,x||S),u.image=x,u.svgElement=S,u.svgWidth=w.width,u.svgHeight=w.height;function L(){for(var M=1,A=0,E=_.length;A<E;++A)M=Sp(M,_[A]);for(var P=1,A=0,E=y.length;A<E;++A)P=Sp(P,y[A].length);M*=P;var B=b*_.length*y.length;if(process.env.NODE_ENV!=="production"){var k=function(N){console.warn("Calculated decal size is greater than "+N+" due to decal option settings so "+N+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+N+" to be larger to avoid incontinuity.")};M>o.maxTileWidth&&k("maxTileWidth"),B>o.maxTileHeight&&k("maxTileHeight")}return{width:Math.max(1,Math.min(M,o.maxTileWidth)),height:Math.max(1,Math.min(B,o.maxTileHeight))}}function C(){T&&(T.clearRect(0,0,x.width,x.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,x.width,x.height)));for(var M=0,A=0;A<m.length;++A)M+=m[A];if(M<=0)return;for(var E=-b,P=0,B=0,k=0;E<w.height;){if(P%2===0){for(var N=B/2%y.length,z=0,R=0,V=0;z<w.width*2;){for(var I=0,A=0;A<g[k].length;++A)I+=g[k][A];if(I<=0)break;if(R%2===0){var H=(1-o.symbolSize)*.5,G=z+g[k][R]*H,X=E+m[P]*H,J=g[k][R]*o.symbolSize,ct=m[P]*o.symbolSize,vt=V/2%y[N].length;U(G,X,J,ct,y[N][vt])}z+=g[k][R],++V,++R,R===g[k].length&&(R=0)}++k,k===g.length&&(k=0)}E+=m[P],++B,++P,P===m.length&&(P=0)}function U(Y,tt,j,nt,it){var at=i?1:r,Et=On(it,Y*at,tt*at,j*at,nt*at,o.color,o.symbolKeepAspect);if(i){var Q=n.painter.renderOneToVNode(Et);Q&&S.children.push(Q)}else aw(T,Et)}}}}function q2(t){if(!t||t.length===0)return[["rect"]];if(xt(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!xt(t[r])){e=!1;break}if(e)return q2([t]);for(var n=[],r=0;r<t.length;++r)xt(t[r])?n.push([t[r]]):n.push(t[r]);return n}function j2(t){if(!t||t.length===0)return[[0,0]];if(jt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!jt(t[n])){r=!1;break}if(r)return j2([t]);for(var i=[],n=0;n<t.length;++n)if(jt(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=dt(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function sw(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(jt(t)){var e=Math.ceil(t);return[e,e]}var r=dt(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function lw(t){return dt(t,function(e){return Q2(e)})}function Q2(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function uw(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=Fh(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=Fh(i,e)}}})}var Er=new jr,hu={};function cw(t,e){process.env.NODE_ENV!=="production"&&hu[t]&&Wt("Already has an implementation of "+t+"."),hu[t]=e}function fw(t){return process.env.NODE_ENV!=="production"&&(hu[t]||Wt("Implementation of "+t+" doesn't exists.")),hu[t]}var hw=1,dw=800,vw=900,pw=1e3,gw=2e3,mw=5e3,K2=1e3,yw=1100,Hh=2e3,J2=3e3,_w=4e3,du=4500,bw=4600,Sw=5e3,xw=6e3,tm=7e3,ww={PROCESSOR:{FILTER:pw,SERIES_FILTER:dw,STATISTIC:mw},VISUAL:{LAYOUT:K2,PROGRESSIVE_LAYOUT:yw,GLOBAL:Hh,CHART:J2,POST_CHART_LAYOUT:bw,COMPONENT:_w,BRUSH:Sw,CHART_ITEM:du,ARIA:xw,DECAL:tm}},ce="__flagInMainProcess",vu="__mainProcessVersion",me="__pendingUpdate",Gh="__needsUpdateStatus",em=/^[a-zA-Z0-9_]+$/,Wh="__connectUpdateStatus",rm=0,Tw=1,Lw=2;function nm(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){Ye(this.id);return}return am(this,t,e)}}function im(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return am(this,t,e)}}function am(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),jr.prototype[e].apply(t,r)}var om=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(jr),sm=om.prototype;sm.on=im("on"),sm.off=im("off");var Di,Xh,pu,sn,gu,Yh,Uh,Ca,Ea,lm,um,Zh,cm,mu,fm,hm,gr,dm,Da,vm=function(t){st(e,t);function e(r,n,i){var a=t.call(this,new Dx)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;if(a[vu]=1,process.env.NODE_ENV!=="production"){var u=Ht.hasGlobalWindow?window:global;u&&(o=mt(u.__ECHARTS__DEFAULT__RENDERER__,o),s=mt(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=mt(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr&&M6(function(h){var v=Jt(h),p=v.dataIndex;if(p!=null){var g=Pt();return g.set("series_index",v.seriesIndex),g.set("data_index",p),v.ssrType&&g.set("ssr_type",v.ssrType),g}});var c=a._zr=vp(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:mt(i.useDirtyRect,l),useCoarsePointer:mt(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=y2(re(c.flush,c),17),a._updateTheme(n),a._locale=Cb(i.locale||fg),a._coordSysMgr=new mh;var f=a._api=fm(a);function d(h,v){return h.__prio-v.__prio}return Os(bu,d),Os(Qh,d),a._scheduler=new w2(a,f,Qh,bu),a._messageCenter=new om,a._initEvents(),a.resize=re(a.resize,a),c.animation.on("frame",a._onframe,a),lm(c,a),um(c,a),oc(a),a}return e.prototype._onframe=function(){if(!this._disposed){dm(this);var r=this._scheduler;if(this[me]){var n=this[me].silent;this[ce]=!0,Da(this);try{Di(this),sn.update.call(this,null,this[me].updateParams)}catch(l){throw this[ce]=!1,this[me]=null,l}this._zr.flush(),this[ce]=!1,this[me]=null,Ca.call(this,n),Ea.call(this,n)}else if(r.unfinished){var i=hw,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),Yh(this,a),r.performVisualTasks(a),mu(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.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(r,n,i){if(this[ce]){process.env.NODE_ENV!=="production"&&Wt("`setOption` should not be called during main process.");return}if(this._disposed){Ye(this.id);return}var a,o,s;if(wt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[ce]=!0,Da(this),!this._model||n){var l=new yS(this._api),u=this._theme,c=this._model=new Lh;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},Kh);var f={seriesTransition:s,optionChanged:!0};if(i)this[me]={silent:a,updateParams:f},this[ce]=!1,this.getZr().wakeUp();else{try{Di(this),sn.update.call(this,null,f)}catch(d){throw this[me]=null,this[ce]=!1,d}this._ssr||this._zr.flush(),this[me]=null,this[ce]=!1,Ca.call(this,a),Ea.call(this,a)}},e.prototype.setTheme=function(r,n){if(this[ce]){process.env.NODE_ENV!=="production"&&Wt("`setTheme` should not be called during main process.");return}if(this._disposed){Ye(this.id);return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[me]&&(a==null&&(a=this[me].silent),o=this[me].updateParams,this[me]=null),this[ce]=!0,Da(this);try{this._updateTheme(r),i.setTheme(this._theme),Di(this),sn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[ce]=!1,s}this[ce]=!1,Ca.call(this,a),Ea.call(this,a)}},e.prototype._updateTheme=function(r){xt(r)&&(r=pm[r]),r&&(r=Ot(r),r&&Xg(r,!0),this._theme=r)},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||Ht.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&he("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return $(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){Ye(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;$(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return $(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){Ye(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(gm[i]){var l=s,u=s,c=-s,f=-s,d=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();$(Xo,function(_,b){if(_.group===i){var x=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Ot(r)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),d.push({dom:x,left:S.left,top:S.top})}}),l*=h,u*=h,c*=h,f*=h;var v=c-l,p=f-u,g=pn.createCanvas(),m=vp(g,{renderer:n?"svg":"canvas"});if(m.resize({width:v,height:p}),n){var y="";return $(d,function(_){var b=_.left-l,x=_.top-u;y+='<g transform="translate('+b+","+x+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new ue({shape:{x:0,y:0,width:v,height:p},style:{fill:r.connectedBackgroundColor}})),$(d,function(_){var b=new Tr({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return gu(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return gu(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return gu(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){Ye(this.id);return}var i=this._model,a,o=cf(i,r);return $(o,function(s,l){l.indexOf("Models")>=0&&$(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint?a=a||f.containPoint(n,u):process.env.NODE_ENV!=="production"&&Ce(l+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Ce(l+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=cf(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||Ce("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?Nx(s,l,n):kx(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;$(Mw,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&lu(l,function(p){var g=Jt(p);if(g&&g.dataIndex!=null){var m=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=m&&m.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=rt({},g.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&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(h&&v)&&Ce("model or view can not be found by params"),u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:v},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;$(jh,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),Ix(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Ye(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Ye(this.id);return}this._disposed=!0;var r=this.getDom();r&&Pp(this.getDom(),t0,"");var n=this,i=n._api,a=n._model;$(n._componentsViews,function(o){o.dispose(a,i)}),$(n._chartsViews,function(o){o.dispose(a,i)}),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 Xo[n.id]},e.prototype.resize=function(r){if(this[ce]){process.env.NODE_ENV!=="production"&&Wt("`resize` should not be called during main process.");return}if(this._disposed){Ye(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[me]&&(a==null&&(a=this[me].silent),i=!0,this[me]=null),this[ce]=!0,Da(this);try{i&&Di(this),sn.update.call(this,{type:"resize",animation:rt({duration:0},r&&r.animation)})}catch(o){throw this[ce]=!1,o}this[ce]=!1,Ca.call(this,a),Ea.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){Ye(this.id);return}if(wt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!Jh[r]){process.env.NODE_ENV!=="production"&&Ce("Loading effects "+r+" not exists.");return}var i=Jh[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){Ye(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=rt({},r);return n.type=_u[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){Ye(this.id);return}if(wt(n)||(n={silent:!!n}),!!yu[r.type]&&this._model){if(this[ce]){this._pendingActions.push(r);return}var i=n.silent;Uh.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ht.browser.weChat&&this._throttledZrFlush(),Ca.call(this,i),Ea.call(this,i)}},e.prototype.updateLabelLayout=function(){Er.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){Ye(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&bt(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Di=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),Xh(f,!0),Xh(f,!1),d.plan()},Xh=function(f,d){for(var h=f._model,v=f._scheduler,p=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<p.length;_++)p[_].__alive=!1;d?h.eachComponent(function(S,w){S!=="series"&&b(w)}):h.eachSeries(b);function b(S){var w=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,L=!w&&g[T];if(!L){var C=Vr(S.type),M=d?on.getClass(C.main,C.sub):We.getClass(C.sub);process.env.NODE_ENV!=="production"&&bt(M,C.sub+" does not exist."),L=new M,L.init(h,y),g[T]=L,p.push(L),m.add(L.group)}S.__viewId=L.__id=T,L.__alive=!0,L.__model=S,L.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!d&&v.prepareView(L,S,h,y)}for(var _=0;_<p.length;){var x=p[_];x.__alive?_++:(!d&&x.renderTask.dispose(),m.remove(x.group),x.dispose(h,y),p.splice(_,1),g[x.__id]===x&&delete g[x.__id],x.__id=x.group.__ecComponentInfo=null)}},pu=function(f,d,h,v,p){var g=f._model;if(g.setUpdatePayload(h),!v){$([].concat(f._componentsViews).concat(f._chartsViews),x);return}var m={};m[v+"Id"]=h[v+"Id"],m[v+"Index"]=h[v+"Index"],m[v+"Name"]=h[v+"Name"];var y={mainType:v,query:m};p&&(y.subType=p);var _=h.excludeSeriesId,b;_!=null&&(b=Pt(),$(Be(_),function(S){var w=$r(S,null);w!=null&&b.set(w,!0)})),g&&g.eachComponent(y,function(S){var w=b&&b.get(S.id)!=null;if(!w)if(C1(h))if(S instanceof tr)h.type===gi&&!h.notBlur&&!S.get(["emphasis","disabled"])&&o9(S,h,f._api);else{var T=$f(S.mainType,S.componentIndex,h.name,f._api),L=T.focusSelf,C=T.dispatchers;h.type===gi&&L&&!h.notBlur&&Rf(S.mainType,S.componentIndex,f._api),C&&$(C,function(M){h.type===gi?Tl(M):Ll(M)})}else zf(h)&&S instanceof tr&&(u9(S,h,f._api),T1(S),gr(f))},f),g&&g.eachComponent(y,function(S){var w=b&&b.get(S.id)!=null;w||x(f[v==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},f);function x(S){S&&S.__alive&&S[d]&&S[d](S.__model,g,f._api,h)}},sn={prepareAndUpdate:function(f){Di(this),sn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var h=this._model,v=this._api,p=this._zr,g=this._coordSysMgr,m=this._scheduler;if(h){h.setUpdatePayload(f),m.restoreData(h,f),m.performSeriesTasks(h),g.create(h,v),m.performDataProcessorTasks(h,f),Yh(this,h),g.update(h,v),n(h),m.performVisualTasks(h,f);var y=h.get("backgroundColor")||"transparent";p.setBackgroundColor(y);var _=h.get("darkMode");_!=null&&_!=="auto"&&p.setDarkMode(_),Zh(this,h,v,f,d),Er.trigger("afterupdate",h,v)}},updateTransform:function(f){var d=this,h=this._model,v=this._api;if(h){h.setUpdatePayload(f);var p=[];h.eachComponent(function(m,y){if(m!=="series"){var _=d.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(y,h,v,f);b&&b.update&&p.push(_)}else p.push(_)}});var g=Pt();h.eachSeries(function(m){var y=d._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,h,v,f);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:g}),mu(this,h,v,f,{},g),Er.trigger("afterupdate",h,v)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),We.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),Zh(this,d,this._api,f,{}),Er.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()}),We.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(v,p){if(v!=="series"){var g=d.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,h,d._api,f)}}),h.eachSeries(function(v){var p=d._chartsMap[v.__viewId];p.updateVisual(v,h,d._api,f)}),Er.trigger("afterupdate",h,this._api))},updateLayout:function(f){sn.update.call(this,f)}};function r(f,d,h,v,p){if(f._disposed){Ye(f.id);return}for(var g=f._model,m=f._coordSysMgr.getCoordinateSystems(),y,_=cf(g,h),b=0;b<m.length;b++){var x=m[b];if(x[d]&&(y=x[d](g,_,v,p))!=null)return y}process.env.NODE_ENV!=="production"&&Ce("No coordinate system that supports "+d+" found by the given finder.")}gu=r,Yh=function(f,d){var h=f._chartsMap,v=f._scheduler;d.eachSeries(function(p){v.updateStreamModes(p,h[p.__viewId])})},Uh=function(f,d){var h=this,v=this.getModel(),p=f.type,g=f.escapeConnect,m=yu[p],y=(m.update||"update").split(":"),_=y.pop(),b=y[0]!=null&&Vr(y[0]);this[ce]=!0,Da(this);var x=[f],S=!1;f.batch&&(S=!0,x=dt(f.batch,function(k){return k=It(rt({},k),f),k.batch=null,k}));var w=[],T,L=[],C=m.nonRefinedEventType,M=zf(f),A=C1(f);if(A&&w1(this._api),$(x,function(k){var N=m.action(k,v,h._api);if(m.refineEvent?L.push(N):T=N,T=T||rt({},k),T.type=C,w.push(T),A){var z=Ap(f),R=z.queryOptionMap,V=z.mainTypeSpecified,I=V?R.keys()[0]:"series";pu(h,_,k,I),gr(h)}else M?(pu(h,_,k,"series"),gr(h)):b&&pu(h,_,k,b.main,b.sub)}),_!=="none"&&!A&&!M&&!b)try{this[me]?(Di(this),sn.update.call(this,f),this[me]=null):sn[_].call(this,f)}catch(k){throw this[ce]=!1,k}if(S?T={type:C,escapeConnect:g,batch:w}:T=w[0],this[ce]=!1,!d){var E=void 0;if(m.refineEvent){var P=m.refineEvent(L,f,v,this._api).eventContent;bt(wt(P)),E=It({type:m.refinedEventType},P),E.fromAction=f.type,E.fromActionPayload=f,E.escapeConnect=!0}var B=this._messageCenter;B.trigger(T.type,T),E&&B.trigger(E.type,E)}},Ca=function(f){for(var d=this._pendingActions;d.length;){var h=d.shift();Uh.call(this,h,f)}},Ea=function(f){!f&&this.trigger("updated")},lm=function(f,d){f.on("rendered",function(h){d.trigger("rendered",h),f.animation.isFinished()&&!d[me]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},um=function(f,d){f.on("mouseover",function(h){var v=h.target,p=lu(v,da);p&&(s9(p,h,d._api),gr(d))}).on("mouseout",function(h){var v=h.target,p=lu(v,da);p&&(l9(p,h,d._api),gr(d))}).on("click",function(h){var v=h.target,p=lu(v,function(y){return Jt(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=Jt(p);d._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function i(f){var d=[],h=[],v=!1;if(f.eachComponent(function(y,_){var b=_.get("zlevel")||0,x=_.get("z")||0,S=_.getZLevelKey();v=v||!!S,(y==="series"?h:d).push({zlevel:b,z:x,idx:_.componentIndex,type:y,key:S})}),v){var p=d.concat(h),g,m;Os(p,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),$(p,function(y){var _=f.getComponent(y.type,y.idx),b=y.zlevel,x=y.key;g!=null&&(b=Math.max(g,b)),x?(b===g&&x!==m&&b++,m=x):m&&(b===g&&b++,m=""),g=b,_.setZLevel(b)})}}Zh=function(f,d,h,v,p){i(d),cm(f,d,h,v,p),$(f._chartsViews,function(g){g.__alive=!1}),mu(f,d,h,v,p),$(f._chartsViews,function(g){g.__alive||g.remove(d,h)})},cm=function(f,d,h,v,p,g){$(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,d,h,v),l(y,m),c(y,m)})},mu=function(f,d,h,v,p,g){var m=f._scheduler;p=rt(p||{},{updatedSeries:d.getSeries()}),Er.trigger("series:beforeupdate",d,h,p);var y=!1;d.eachSeries(function(_){var b=f._chartsMap[_.__viewId];b.__alive=!0;var x=b.renderTask;m.updatePayload(x,v),u(_,b),g&&g.get(_.uid)&&x.dirty(),x.perform(m.getPerformArgs(x))&&(y=!0),b.group.silent=!!_.get("silent"),s(_,b),T1(_)}),m.unfinished=y||m.unfinished,Er.trigger("series:layoutlabels",d,h,p),Er.trigger("series:transition",d,h,p),d.eachSeries(function(_){var b=f._chartsMap[_.__viewId];l(_,b),c(_,b)}),o(f,d),Er.trigger("series:afterupdate",d,h,p)},gr=function(f){f[Gh]=!0,f.getZr().wakeUp()},Da=function(f){f[vu]=(f[vu]+1)%1e3},dm=function(f){f[Gh]&&(f.getZr().storage.traverse(function(d){xo(d)||a(d)}),f[Gh]=!1)};function a(f){for(var d=[],h=f.currentStates,v=0;v<h.length;v++){var p=h[v];p==="emphasis"||p==="blur"||p==="select"||d.push(p)}f.selected&&f.states.select&&d.push("select"),f.hoverState===yl&&f.states.emphasis?d.push("emphasis"):f.hoverState===ml&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var h=f._zr,v=h.storage,p=0;v.traverse(function(g){g.isGroup||p++}),p>d.get("hoverLayerThreshold")&&!Ht.node&&!Ht.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.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=J1(f);d.eachRendered(function(v){return tg(v,h.z,h.zlevel),!0})}}function u(f,d){d.eachRendered(function(h){if(!xo(h)){var v=h.getTextContent(),p=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.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(),p=h.get("duration"),g=p>0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(xo(m))return;if(m instanceof Vt&&p9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(v){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&a(m)}})}fm=function(f){return new(function(d){st(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 p=v.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);v=v.parent}},h.prototype.enterEmphasis=function(v,p){Tl(v,p),gr(f)},h.prototype.leaveEmphasis=function(v,p){Ll(v,p),gr(f)},h.prototype.enterBlur=function(v){a9(v),gr(f)},h.prototype.leaveBlur=function(v){_1(v),gr(f)},h.prototype.enterSelect=function(v){b1(v),gr(f)},h.prototype.leaveSelect=function(v){S1(v),gr(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[vu]},h}($g))(f)},hm=function(f){function d(h,v){for(var p=0;p<h.length;p++){var g=h[p];g[Wh]=v}}$(_u,function(h,v){f._messageCenter.on(v,function(p){if(gm[f.group]&&f[Wh]!==rm){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),m=[];$(Xo,function(y){y!==f&&y.group===f.group&&m.push(y)}),d(m,rm),$(m,function(y){y[Wh]!==Tw&&y.dispatchAction(g)}),d(m,Lw)}})})}}(),e}(jr),qh=vm.prototype;qh.on=nm("on"),qh.off=nm("off"),qh.one=function(t,e,r){var n=this;Jr("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var Mw=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Ye(t){process.env.NODE_ENV!=="production"&&Ce("Instance "+t+" has been disposed")}var yu={},_u={},jh={},Qh=[],Kh=[],bu=[],pm={},Jh={},Xo={},gm={},Cw=+new Date-0,t0="_echarts_instance_";function Ew(t,e,r){var n=!(r&&r.ssr);if(n){if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var i=Dw(t);if(i)return process.env.NODE_ENV!=="production"&&Ce("There is a chart instance already initialized on the dom."),i;process.env.NODE_ENV!=="production"&&Ps(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&(!r||r.width==null)||!t.clientHeight&&(!r||r.height==null))&&Ce("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var a=new vm(t,e,r);return a.id="ec_"+Cw++,Xo[a.id]=a,n&&Pp(t,t0,a.id),hm(a),Er.trigger("afterinit",a),a}function Dw(t){return Xo[j6(t,t0)]}function mm(t,e){pm[t]=e}function ym(t){qt(Kh,t)<0&&Kh.push(t)}function _m(t,e){r0(Qh,t,e,gw)}function Aw(t){e0("afterinit",t)}function Pw(t){e0("afterupdate",t)}function e0(t,e){Er.on(t,e)}function Aa(t,e,r){var n,i,a,o,s;Lt(e)&&(r=e,e=""),wt(t)?(n=t.type,i=t.event,o=t.update,s=t.publishNonRefinedEvent,r||(r=t.action),a=t.refineEvent):(n=t,i=e);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;yu[n]||(bt(em.test(n)&&em.test(i)),a&&bt(i!==n),yu[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},jh[i]=1,a&&s&&(jh[u]=1),process.env.NODE_ENV!=="production"&&_u[u]&&Wt(u+' must not be shared; use "refineEvent" if you intend to share an event name.'),_u[u]=n)}function Nw(t,e){mh.register(t,e)}function kw(t,e){r0(bu,t,e,K2,"layout")}function Ai(t,e){r0(bu,t,e,J2,"visual")}var bm=[];function r0(t,e,r,n,i){if((Lt(e)||wt(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");$(t,function(o){bt(o.__raw!==r)})}if(!(qt(bm,r)>=0)){bm.push(r);var a=w2.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function Sm(t,e){Jh[t]=e}function Ow(t,e,r){var n=fw("registerMap");n&&n(t,e,r)}var Iw=ZS;Ai(Hh,vx),Ai(du,px),Ai(du,gx),Ai(Hh,Ax),Ai(du,Px),Ai(tm,uw),ym(Xg),_m(vw,AS),Sm("default",mx),Aa({type:gi,event:gi,update:gi},Ze),Aa({type:bl,event:bl,update:bl},Ze),Aa({type:Sl,event:kf,update:Sl,action:Ze,refineEvent:n0,publishNonRefinedEvent:!0}),Aa({type:Nf,event:kf,update:Nf,action:Ze,refineEvent:n0,publishNonRefinedEvent:!0}),Aa({type:xl,event:kf,update:xl,action:Ze,refineEvent:n0,publishNonRefinedEvent:!0});function n0(t,e,r,n){return{eventContent:{selected:c9(r),isFromClick:e.isFromClick||!1}}}mm("default",{}),mm("dark",E2);function Yo(t){return t==null?0:t.length||1}function xm(t){return t}var Bw=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||xm,this._newKeyGetter=i||xm,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=n[s],u=Yo(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(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=Yo(u),d=Yo(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[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,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=Yo(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=Yo(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},t}(),Rw=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function $w(t,e){var r={},n=r.encode={},i=Pt(),a=[],o=[],s={};$(t.dimensions,function(d){var h=t.getDimensionInfo(d),v=h.coordDim;if(v){process.env.NODE_ENV!=="production"&&bt(Sh.get(v)==null);var p=h.coordDimIndex;i0(n,v)[p]=d,h.isExtraCoord||(i.set(v,1),zw(h.type)&&(a[0]=d),i0(s,v)[p]=t.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(d)}Sh.each(function(g,m){var y=i0(n,m),_=h.otherDims[m];_!=null&&_!==!1&&(y[_]=h.name)})});var l=[],u={};i.each(function(d,h){var v=n[h];u[h]=v[0],l=l.concat(v)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=dt(l,function(d){return t.getDimensionInfo(d).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new Rw(s,e),r}function i0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Vw(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function zw(t){return!(t==="ordinal"||t==="time")}var Su=function(){function t(e){this.otherDims={},e!=null&&rt(this,e)}return t}(),Fw=ae(),Hw={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},wm=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Mm(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return mt(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=jg(this.source),n=!Cm(e),i="",a=[],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=r?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=r?d.name:null,u=d.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=Hw[u]||"f",c&&(i+=c.uid),i+="$"}var h=this.source,v=[h.seriesLayoutBy,h.startIndex,i].join("$$");return{dimensions:a,hash:v}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function Tm(t){return t instanceof wm}function Lm(t){for(var e=Pt(),r=0;r<(t||[]).length;r++){var n=t[r],i=wt(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function Mm(t){var e=Fw(t);return e.dimNameMap||(e.dimNameMap=Lm(t.dimensionsDefine))}function Cm(t){return t>30}var Uo=wt,In=dt,Gw=typeof Int32Array>"u"?Array:Int32Array,Ww="e\0\0",Em=-1,Xw=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Yw=["_approximateExtent"],Dm,xu,Zo,Pa,a0,qo,o0,Am=function(){function t(e,r){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,i=!1;Tm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=xt(f)?new Su({name:f}):f instanceof Su?f:new Su(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),a[h]=d,u[h]!=null&&(l=!0),d.createInvertedIndices&&(s[h]=[]);var p=c;jt(d.storeDimIndex)&&(p=d.storeDimIndex),v.itemName===0&&(this._nameDimIdx=p),v.itemId===0&&(this._idDimIdx=p),process.env.NODE_ENV!=="production"&&bt(i||d.storeDimIndex>=0),i&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Pt();$(o,function(m){g.set(a[m].storeDimIndex,m)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(jt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof kh&&(a=e),!a){var o=this.dimensions,s=Eh(e)||ze(e)?new Jg(e,o.length):e;a=new kh;var l=In(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=$w(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&o0(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==nn&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Je;if(l&&!i.pure)for(var u=[],c=e;c<r;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&V6(f)&&(this.hasItemOption=!0),f){var d=f.name;a[c]==null&&d!=null&&(a[c]=$r(d,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=$r(h,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<r;c++)o0(this,c);Dm(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){Uo(e)?rt(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=Zo(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return xu(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return gt(e)?i.getValues(In(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[r];return i==null||isNaN(i)?Em:i},t.prototype.each=function(e,r,n){Lt(e)&&(n=r,r=e,e=[]);var i=n||this,a=In(Pa(e),this._getStoreDimIndex,this);this._store.each(a,i?re(r,i):r)},t.prototype.filterSelf=function(e,r,n){Lt(e)&&(n=r,r=e,e=[]);var i=n||this,a=In(Pa(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?re(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Bt(e);return $(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){Lt(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=In(Pa(e),this._getStoreDimIndex,this),s=qo(this);return s._store=this._store.map(o,a?re(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&$(Pa(e),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=In(Pa(e),this._getStoreDimIndex,this);this._store.modify(s,o?re(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=qo(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.minmaxDownSample=function(e,r){var n=qo(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),r),n},t.prototype.lttbDownSample=function(e,r){var n=qo(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new de(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new Bw(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return xu(e,n)},function(n){return xu(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},Uo(e)?rt(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),gt(a)?a=a.slice():Uo(a)&&(a=rt({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,Uo(r)?rt(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){Uo(e)?rt(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?rt(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;q8(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){$(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:In(this.dimensions,this._getDimInfo,this),this.hostModel)),a0(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];Lt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(ic(arguments)))})},t.internalField=function(){Dm=function(e){var r=e._invertedIndicesMap;$(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new Gw(o.categories.length);for(var l=0;l<n.length;l++)n[l]=Em;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Zo=function(e,r,n){return $r(e._getCategory(r,n),null)},xu=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=Zo(e,e._idDimIdx,r)),n==null&&(n=Ww+r),n},Pa=function(e){return gt(e)||(e=e!=null?[e]:[]),e},qo=function(e){var r=new t(e._schema?e._schema:In(e.dimensions,e._getDimInfo,e),e.hostModel);return a0(r,e),r},a0=function(e,r){$(Xw.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,$(Yw,function(n){e[n]=Ot(r[n])}),e._calculationInfo=rt({},r._calculationInfo)},o0=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=Zo(e,a,r)),l==null&&o!=null&&(i[r]=l=Zo(e,o,r)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function Pm(t,e){Eh(t)||(t=Yg(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Pt(),a=[],o=Zw(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Cm(o),l=n===t.dimensionsDefine,u=l?Mm(t):Lm(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=Pt(c),d=new s2(o),h=0;h<d.length;h++)d[h]=-1;function v(L){var C=d[L];if(C<0){var M=n[L],A=wt(M)?M:{name:M},E=new Su,P=A.name;P!=null&&u.get(P)!=null&&(E.name=E.displayName=P),A.type!=null&&(E.type=A.type),A.displayName!=null&&(E.displayName=A.displayName);var B=a.length;return d[L]=B,E.storeDimIndex=L,a.push(E),E}return a[C]}if(!s)for(var h=0;h<o;h++)v(h);f.each(function(L,C){var M=Be(L).slice();if(M.length===1&&!xt(M[0])&&M[0]<0){f.set(C,!1);return}var A=f.set(C,[]);$(M,function(E,P){var B=xt(E)?u.get(E):E;B!=null&&B<o&&(A[P]=B,g(v(B),C,P))})});var p=0;$(r,function(L){var C,M,A,E;if(xt(L))C=L,E={};else{E=L,C=E.name;var P=E.ordinalMeta;E.ordinalMeta=null,E=rt({},E),E.ordinalMeta=P,M=E.dimsDef,A=E.otherDims,E.name=E.coordDim=E.coordDimIndex=E.dimsDef=E.otherDims=null}var B=f.get(C);if(B!==!1){if(B=Be(B),!B.length)for(var k=0;k<(M&&M.length||1);k++){for(;p<o&&v(p).coordDim!=null;)p++;p<o&&B.push(p++)}$(B,function(N,z){var R=v(N);if(l&&E.type!=null&&(R.type=E.type),g(It(R,E),C,z),R.name==null&&M){var V=M[z];!wt(V)&&(V={name:V}),R.name=R.displayName=V.name,R.defaultTooltip=V.defaultTooltip}A&&It(R.otherDims,A)})}});function g(L,C,M){Sh.get(C)!=null?L.otherDims[C]=M:(L.coordDim=C,L.coordDimIndex=M,i.set(C,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var b=m||"value";function x(L){L.name==null&&(L.name=L.coordDim)}if(s)$(a,function(L){x(L)}),a.sort(function(L,C){return L.storeDimIndex-C.storeDimIndex});else for(var S=0;S<o;S++){var w=v(S),T=w.coordDim;T==null&&(w.coordDim=qw(b,i,_),w.coordDimIndex=0,(!m||y<=0)&&(w.isExtraCoord=!0),y--),x(w),w.type==null&&(Ag(t,S)===Se.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return Uw(a),new wm({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Uw(t){for(var e=Pt(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function Zw(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return $(e,function(a){var o;wt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function qw(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var jw=function(){function t(e){this.coordSysDims=[],this.axisMap=Pt(),this.categoryAxisMap=Pt(),this.coordSysName=e}return t}();function Qw(t){var e=t.get("coordinateSystem"),r=new jw(e),n=Kw[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Kw={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",sr).models[0],a=t.getReferringComponents("yAxis",sr).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+Xi(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+Xi(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Na(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Na(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",sr).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),Na(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",sr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Na(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Na(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();$(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Na(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",sr).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("matrix coordinate system should be specified.");e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Na(t){return t.get("type")==="category"}function Jw(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;tT(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,d;if($(a,function(y,_){xt(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+t.id,d="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,v=c.type,p=0;$(a,function(y){y.coordDim===h&&p++});var g={name:f,coordDim:h,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,v),m.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function tT(t){return!Tm(t.schema)}function ka(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function eT(t,e){return ka(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rT(t,e){var r=t.get("coordinateSystem"),n=mh.get(r),i;return e&&e.coordSysDims&&(i=dt(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Vw(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nT(t,e,r){var n,i;return r&&$(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function wu(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===Je;var o=Qw(e),s=rT(e,o),l=r.useEncodeDefaulter,u=Lt(l)?l:l?Ue(nS,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Pm(i,c),d=nT(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),v=Jw(e,{schema:f,store:h}),p=new Am(f,e);p.setCalculationInfo(v);var g=d!=null&&iT(i)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return p.hasItemOption=!1,p.initData(a?i:h,null,g),p}function iT(t){if(t.sourceFormat===Je){var e=aT(t.data||[]);return!gt(uo(e))}}function aT(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function oT(t){var e=Math.pow(10,ol(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function s0(t){return t.type==="interval"||t.type==="log"}function sT(t,e,r,n,i){var a={},o=a.interval=yp(e/r);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=jo(o),l=a.niceTickExtent=[be(Math.ceil(t[0]/o)*o,s),be(Math.floor(t[1]/o)*o,s)];return lT(l,t),a}function l0(t){var e=Math.pow(10,ol(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,be(r*e)}function jo(t){return Kr(t)+2}function Nm(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function lT(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Nm(t,0,e),Nm(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function u0(t,e){return t>=e[0]&&t<=e[1]}var uT=function(){function t(){this.normalize=km,this.scale=Om}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=re(e.normalize,e),this.scale=re(e.scale,e)):(this.normalize=km,this.scale=Om)},t}();function km(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Om(t,e){return t*(e[1]-e[0])+e[0]}function c0(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Bn=function(){function t(e){this._calculator=new uT,this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]<r[0]?e[0]:r[0],e[1]>r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ul(Bn);var cT=0,f0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++cT,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&dt(n,fT);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!xt(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Pt(this.categories))},t}();function fT(t){return wt(t)&&t.value!=null?t.value:t+""}var Im=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new f0({})),gt(i)&&(i=new f0({categories:dt(i,function(a){return wt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:xt(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return u0(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},e.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Bn);Bn.registerClass(Im);var Rn=be,$n=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return u0(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=jo(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Wl(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:Rn(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(v,p){return Math.round((p-v)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=Rn(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=Rn(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:a[1];return i[1]>h&&(r.expandToNicedExtent?l.push({value:Rn(h+n,o)}):l.push({value:i[1]})),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=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/r,h=jo(d);u<r-1;){var v=Rn(l.value+(u+1)*d,h);v>a[0]&&v<a[1]&&c.push(v),u++}var p=Wl();p&&p.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(g){return g},this._interval,a),i.push(c)}}return i},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=Kr(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Rn(r.value,i,!0);return zb(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=sT(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=Rn(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=Rn(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(Bn);Bn.registerClass($n);var Bm=typeof Float32Array<"u",hT=Bm?Float32Array:Array;function ln(t){return gt(t)?Bm?new Float32Array(t):t:new hT(t)}var dT="__ec_stack_";function h0(t){return t.get("stack")||dT+t.seriesIndex}function d0(t){return t.dim+t.index}function Rm(t,e){var r=[];return e.eachSeriesByType(t,function(n){Vm(n)&&r.push(n)}),r}function vT(t){var e={};$(t,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(),p=0,g=v.count();p<g;++p){var m=v.get(h,p);e[d]?e[d].push(m):e[d]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function $m(t){var e=vT(t),r=[];return $(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.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=Kt(n.get("barWidth"),s),p=Kt(n.get("barMaxWidth"),s),g=Kt(n.get("barMinWidth")||(zm(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,defaultBarGap:_,axisKey:d0(a),stackId:h0(n)})}),pT(r)}function pT(t){var e={};$(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=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 r={};return $(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Bt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Kt(s,o),c=Kt(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),$(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,f-=b+c*b,d--}else{var b=h;y&&y<b&&(b=Math.min(y,f)),_&&_>b&&(b=_),b!==h&&(m.width=b,f-=b+c*b,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var v=0,p;$(a,function(m,y){m.width||(m.width=h),p=m,v+=m.width*(1+c)}),p&&(v-=p.width*c);var g=-v/2;$(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function gT(t,e,r){if(t&&e){var n=t[d0(e)];return n!=null&&r!=null?n[h0(r)]:n}}function mT(t,e){var r=Rm(t,e),n=$m(r);$(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=h0(i),u=n[d0(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function yT(t){return{seriesType:t,plan:Ih(),reset:function(e){if(Vm(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=ka(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),h=_T(i,a),v=zm(e),p=e.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,b){for(var x=_.count,S=v&&ln(x*3),w=v&&l&&ln(x*3),T=v&&ln(x),L=n.master.getRect(),C=d?L.width:L.height,M,A=b.getStore(),E=0;(M=_.next())!=null;){var P=A.get(f?g:o,M),B=A.get(s,M),k=h,N=void 0;f&&(N=+P-A.get(o,M));var z=void 0,R=void 0,V=void 0,I=void 0;if(d){var H=n.dataToPoint([P,B]);if(f){var G=n.dataToPoint([N,B]);k=G[0]}z=k,R=H[1]+y,V=H[0]-k,I=m,Math.abs(V)<p&&(V=(V<0?-1:1)*p)}else{var H=n.dataToPoint([B,P]);if(f){var G=n.dataToPoint([B,N]);k=G[1]}z=H[0]+y,R=k,V=m,I=H[1]-k,Math.abs(I)<p&&(I=(I<=0?-1:1)*p)}v?(S[E]=z,S[E+1]=R,S[E+2]=d?V:I,w&&(w[E]=d?L.x:z,w[E+1]=d?R:L.y,w[E+2]=C),T[M]=M):b.setItemLayout(M,{x:z,y:R,width:V,height:I}),E+=3}v&&b.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:d})}}}}}}function Vm(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function zm(t){return t.pipelineContext&&t.pipelineContext.large}function _T(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var bT=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},Fm=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return pg(r.value,vg[Rb(Do(this._minLevelUnit))]||vg.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return $b(r,n,i,o,a)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=[];if(!n)return a;var o=this.getSetting("useUTC"),s=Ul(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=ET(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(l);var u=Ul(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=Si.length-1,f=0;return $(a,function(d){c=Math.min(c,qt(Si,d.time.upperTimeUnit)),f=Math.max(f,d.time.level)}),a},e.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=hr,n[1]+=hr),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-hr}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=Tu.length,s=Math.min(bT(Tu,this._approxInterval,0,o),o-1);this._interval=Tu[s][1],this._intervalPrecision=jo(this._interval),this._minLevelUnit=Tu[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return jt(r)?r:+lo(r)},e.prototype.contain=function(r){return u0(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}($n),Tu=[["second",ah],["minute",oh],["hour",Eo],["quarter-day",Eo*6],["half-day",Eo*12],["day",hr*1.2],["half-week",hr*3.5],["week",hr*7],["month",hr*31],["quarter",hr*95],["half-year",dg/2],["year",dg]];function ST(t,e,r,n){return sh(new Date(e),t,n).getTime()===sh(new Date(r),t,n).getTime()}function xT(t,e){return t/=hr,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function wT(t){var e=30*hr;return t/=e,t>6?6:t>3?3:t>2?2:1}function TT(t){return t/=Eo,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function Hm(t,e){return t/=e?oh:ah,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function LT(t){return yp(t)}function MT(t,e,r){var n=Math.max(0,qt(Si,e)-1);return sh(new Date(t),Si[n],r).getTime()}function CT(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function ET(t,e,r,n,i,a){var o=1e4,s=kb,l=0;function u(E,P,B,k,N,z,R){for(var V=CT(N,E),I=P,H=new Date(I);I<B&&I<=n[1];){if(R.push({value:I}),l++>o){process.env.NODE_ENV!=="production"&&Ce("Exceed safe limit in time scale.");break}if(H[N](H[k]()+E),I=H.getTime(),a){var G=a.calcNiceTickMultiple(I,V);G>0&&(H[N](H[k]()+G*E),I=H.getTime())}}R.push({value:I,notAdd:!0})}function c(E,P,B){var k=[],N=!P.length;if(!ST(Do(E),n[0],n[1],r)){N&&(P=[{value:MT(n[0],E,r)},{value:n[1]}]);for(var z=0;z<P.length-1;z++){var R=P[z].value,V=P[z+1].value;if(R!==V){var I=void 0,H=void 0,G=void 0,X=!1;switch(E){case"year":I=Math.max(1,Math.round(e/hr/365)),H=gg(r),G=Vb(r);break;case"half-year":case"quarter":case"month":I=wT(e),H=lh(r),G=mg(r);break;case"week":case"half-week":case"day":I=xT(e),H=uh(r),G=yg(r),X=!0;break;case"half-day":case"quarter-day":case"hour":I=TT(e),H=ch(r),G=_g(r);break;case"minute":I=Hm(e,!0),H=fh(r),G=bg(r);break;case"second":I=Hm(e,!1),H=hh(r),G=Sg(r);break;case"millisecond":I=LT(e),H=dh(r),G=xg(r);break}V>=n[0]&&R<=n[1]&&u(I,R,V,H,G,X,k),E==="year"&&B.length>1&&z===0&&B.unshift({value:B[0].value-I})}}for(var z=0;z<k.length;z++)B.push(k[z])}}for(var f=[],d=[],h=0,v=0,p=0;p<s.length;++p){var g=Do(s[p]);if(Bb(s[p])){c(s[p],f[f.length-1]||[],d);var m=s[p+1]?Do(s[p+1]):null;if(g!==m){if(d.length){v=h,d.sort(function(E,P){return E.value-P.value});for(var y=[],_=0;_<d.length;++_){var b=d[_].value;(_===0||d[_-1].value!==b)&&(y.push(d[_]),b>=n[0]&&b<=n[1]&&h++)}var x=i/e;if(h>x*1.5&&v>x/1.5||(f.push(y),h>x||t===s[p]))break}d=[]}}}for(var S=fe(dt(f,function(E){return fe(E,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(E){return E.length>0}),w=[],T=S.length-1,p=0;p<S.length;++p)for(var L=S[p],C=0;C<L.length;++C){var M=Ul(L[C].value,r);w.push({value:L[C].value,time:{level:T-p,upperTimeUnit:M,lowerTimeUnit:M}})}w.sort(function(E,P){return E.value-P.value});for(var A=[],p=0;p<w.length;++p)(p===0||w[p].value!==w[p-1].value)&&A.push(w[p]);return A}Bn.registerClass(Fm);var v0=be,DT=Math.floor,AT=Math.ceil,Lu=Math.pow,Mu=Math.log,Gm=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new $n,r}return e.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=t.prototype.getTicks.call(this,r),o=this.base;return this._originalScale._innerGetBreaks(),dt(a,function(s){var l=s.value,u=null,c=Lu(o,l);l===n[0]&&this._fixMin?u=i[0]:l===n[1]&&this._fixMax&&(u=i[1]);var f;return u!=null&&(c=p0(c,u)),{value:c,break:f}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=c0(this.base,[r,n]);t.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var r=this.base,n=t.prototype.getExtent.call(this);n[0]=Lu(r,n[0]),n[1]=Lu(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=p0(n[0],i[0])),this._fixMax&&(n[1]=p0(n[1],i[1])),n},e.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=c0(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=k6(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[v0(AT(n[0]/a)*a),v0(DT(n[1]/a)*a)];this._interval=a,this._intervalPrecision=jo(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=Mu(r)/Mu(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=Mu(r)/Mu(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),Lu(this.base,r)},e.prototype.setBreaksFromOption=function(r){},e.type="log",e}($n);function p0(t,e){return v0(t,Kr(e))}Bn.registerClass(Gm);var PT=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;Lt(o)?this._modelMinNum=Cu(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Cu(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(Lt(s)?this._modelMaxNum=Cu(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Cu(e,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=gt(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[wn(u[0],1),wn(u[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),l==null&&(l=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Wi(s)||Wi(l)||e&&!i;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}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&bt(!this.frozen),this[kT[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=NT[e];process.env.NODE_ENV!=="production"&&bt(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),NT={min:"_determinedMin",max:"_determinedMax"},kT={min:"_dataMin",max:"_dataMax"};function OT(t,e,r){var n=t.rawExtentInfo;return n||(n=new PT(t,e,r),t.rawExtentInfo=n,n)}function Cu(t,e){return e==null?null:Wi(e)?NaN:t.parse(e)}function Wm(t,e){var r=t.type,n=OT(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=Rm("bar",o),l=!1;if($(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=$m(s),c=IT(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function IT(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=gT(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;$(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;$(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-t,f=1-(s+l)/a,d=c/f-c;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function Xm(t,e){var r=e,n=Wm(t,r),i=n.extent,a=r.get("splitNumber");t instanceof Gm&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(Zm(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function BT(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Im({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Fm({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Bn.getClass(e)||$n)}}function RT(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Qo(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=Ob(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(xt(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(Lt(e)){if(t.type==="category")return function(i,a){return e(Ym(t,i),i.value-t.scale.getExtent()[0],null)};var n=Wl();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(Ym(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Ym(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function g0(t){var e=t.get("interval");return e??"auto"}function Um(t){return t.type==="category"&&g0(t.getLabelModel())===0}function $T(t,e){var r={};return $(t.mapDimensionsAll(e),function(n){r[eT(t,n)]=!0}),Bt(r)}function Oa(t){return t==="middle"||t==="center"}function Ko(t){return t.getShallow("show")}function Zm(t){var e=t.get("breaks",!0);if(e!=null){process.env.NODE_ENV!=="production"&&Wt('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var qm=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),jm=[],VT={registerPreprocessor:ym,registerProcessor:_m,registerPostInit:Aw,registerPostUpdate:Pw,registerUpdateLifecycle:e0,registerAction:Aa,registerCoordinateSystem:Nw,registerLayout:kw,registerVisual:Ai,registerTransform:Iw,registerLoading:Sm,registerMap:Ow,registerImpl:cw,PRIORITY:ww,ComponentModel:Xt,ComponentView:on,SeriesModel:tr,ChartView:We,registerComponentModel:function(t){Xt.registerClass(t)},registerComponentView:function(t){on.registerClass(t)},registerSeriesModel:function(t){tr.registerClass(t)},registerChartView:function(t){We.registerClass(t)},registerCustomSeries:function(t,e){},registerSubTypeDefaulter:function(t,e){Xt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){T6(t,e)}};function Pi(t){if(gt(t)){$(t,function(e){Pi(e)});return}qt(jm,t)>=0||(jm.push(t),Lt(t)&&(t={install:t}),t.install(VT))}var zT=ae(),Jo=ae(),Dr={estimate:1,determine:2};function Eu(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Qm(t,e){var r=dt(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function FT(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Qo(t),i=t.scale.getExtent(),a=Qm(t,r),o=fe(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:dt(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?GT(t,e):XT(t)}function HT(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=Qm(t,n);return{ticks:fe(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?WT(t,e):{ticks:dt(t.scale.getTicks(r),function(o){return o.value})}}function GT(t,e){var r=t.getLabelModel(),n=Km(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function Km(t,e,r){var n=UT(t),i=g0(e),a=r.kind===Dr.estimate;if(!a){var o=ty(n,i);if(o)return o}var s,l;Lt(i)?s=ny(t,i):(l=i==="auto"?ZT(t,r):i,s=ry(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return m0(n,i,u),!0}):m0(n,i,u),u}function WT(t,e){var r=YT(t),n=g0(e),i=ty(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),Lt(n))a=ny(t,n,!0);else if(n==="auto"){var s=Km(t,t.getLabelModel(),Eu(Dr.determine));o=s.labelCategoryInterval,a=dt(s.labels,function(l){return l.tickValue})}else o=n,a=ry(t,o,!0);return m0(r,n,{ticks:a,tickCategoryInterval:o})}function XT(t){var e=t.scale.getTicks(),r=Qo(t);return{labels:dt(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var YT=Jm("axisTick"),UT=Jm("axisLabel");function Jm(t){return function(r){return Jo(r)[t]||(Jo(r)[t]={list:[]})}}function ty(t,e){for(var r=0;r<t.list.length;r++)if(t.list[r].key===e)return t.list[r].value}function m0(t,e,r){return t.list.push({key:e,value:r}),r}function ZT(t,e){if(e.kind===Dr.estimate){var r=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Jo(t).autoInterval=r,!0}),r}var n=Jo(t).autoInterval;return n??(Jo(t).autoInterval=t.calculateCategoryInterval(e))}function qT(t,e){var r=e.kind,n=QT(t),i=Qo(t),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=t.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=t.dataToCoord(f+1)-t.dataToCoord(f),h=Math.abs(d*Math.cos(a)),v=Math.abs(d*Math.sin(a)),p=0,g=0;f<=s[1];f+=u){var m=0,y=0,_=v6(i({value:f}),n.font,"center","top");m=_.width*1.3,y=_.height*1.3,p=Math.max(p,m,7),g=Math.max(g,y,7)}var b=p/h,x=g/v;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));if(r===Dr.estimate)return e.out.noPxChangeTryDetermine.push(re(jT,null,t,S,l)),S;var w=ey(t,S,l);return w??S}function jT(t,e,r){return ey(t,e,r)==null}function ey(t,e,r){var n=zT(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function QT(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function ry(t,e,r){var n=Qo(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Um(t),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==a[0]&&p(a[0]);for(var v=u;v<=a[1];v+=l)p(v);h&&v-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g,time:void 0,break:void 0})}return s}function ny(t,e,r){var n=t.scale,i=Qo(t),a=[];return $(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var iy=[0,1],ay=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return D6(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),oy(n,i.count())),nf(e,iy,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),oy(n,i.count()));var a=nf(e,n,iy,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=HT(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=dt(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return KT(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=dt(n,function(a){return dt(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Eu(Dr.determine),FT(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Eu(Dr.determine),qT(this,e)},t}();function oy(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function KT(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;$(e,function(h){h.coord-=u/2,h.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=a[0]>a[1];d(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&d(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),d(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&d(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function d(h,v){return h=be(h),v=be(v),f?h>v:h<v}}function sy(t,e,r,n,i,a,o,s){var l=i-t,u=a-e,c=r-t,f=n-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,v=h/d;v*=d;var p=o[0]=t+v*c,g=o[1]=e+v*f;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}var Vn=new Mt,ie=new Mt,xe=new Mt,zn=new Mt,Yr=new Mt,Du=[],$e=new Mt;function JT(t,e){if(e<=180&&e>0){e=e/180*Math.PI,Vn.fromArray(t[0]),ie.fromArray(t[1]),xe.fromArray(t[2]),Mt.sub(zn,Vn,ie),Mt.sub(Yr,xe,ie);var r=zn.len(),n=Yr.len();if(!(r<.001||n<.001)){zn.scale(1/r),Yr.scale(1/n);var i=zn.dot(Yr),a=Math.cos(e);if(a<i){var o=sy(ie.x,ie.y,xe.x,xe.y,Vn.x,Vn.y,Du);$e.fromArray(Du),$e.scaleAndAdd(Yr,o/Math.tan(Math.PI-e));var s=xe.x!==ie.x?($e.x-ie.x)/(xe.x-ie.x):($e.y-ie.y)/(xe.y-ie.y);if(isNaN(s))return;s<0?Mt.copy($e,ie):s>1&&Mt.copy($e,xe),$e.toArray(t[1])}}}}function tL(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Vn.fromArray(t[0]),ie.fromArray(t[1]),xe.fromArray(t[2]),Mt.sub(zn,ie,Vn),Mt.sub(Yr,xe,ie);var n=zn.len(),i=Yr.len();if(!(n<.001||i<.001)){zn.scale(1/n),Yr.scale(1/i);var a=zn.dot(e),o=Math.cos(r);if(a<o){var s=sy(ie.x,ie.y,xe.x,xe.y,Vn.x,Vn.y,Du);$e.fromArray(Du);var l=Math.PI/2,u=Math.acos(Yr.dot(e)),c=l+u-r;if(c>=l)Mt.copy($e,xe);else{$e.scaleAndAdd(Yr,s/Math.tan(Math.PI/2-c));var f=xe.x!==ie.x?($e.x-ie.x)/(xe.x-ie.x):($e.y-ie.y)/(xe.y-ie.y);if(isNaN(f))return;f<0?Mt.copy($e,ie):f>1&&Mt.copy($e,xe)}$e.toArray(t[1])}}}}function y0(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function eL(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=uc(n[0],n[1]),a=uc(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=cc([],n[1],n[0],o/i),l=cc([],n[1],n[2],o/a),u=cc([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)t.lineTo(n[c][0],n[c][1])}function rL(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,l=0;l<_l.length;l++){var u=_l[l],c=e[u],f=u==="normal";if(c){var d=c.get("show"),h=f?s:mt(i.states[u]&&i.states[u].ignore,s);if(h||!mt(d,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0),n&&y0(n,!0,u,c);continue}n||(n=new yi,t.setTextGuideLine(n),!f&&(s||!o)&&y0(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),y0(n,!1,u,c)}}if(n){It(n.style,r),n.style.fill=null;var p=a.get("showAbove"),g=t.textGuideLineConfig=t.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=eL}}function nL(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<fr.length;n++){var i=fr[n];r[i]=t.getModel([i,e])}return r}var ly=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],iL=1,Au=2,uy=iL|Au;function Pu(t,e,r){r=r||uy,e?t.dirty|=r:t.dirty&=~r}function cy(t,e){return e=e||uy,t.dirty==null||!!(t.dirty&e)}function Fn(t){if(t)return cy(t)&&fy(t,t.label,t),t}function fy(t,e,r){var n=e.getComputedTransform();t.transform=th(t.transform,n);var i=t.localRect=Mo(t.localRect,e.getBoundingRect()),a=e.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=_a.textMargin);for(var f=0;f<4;f++)_0[f]=c===_a.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===_a.textMargin&&Il(i,_0,!1,!1);var d=t.rect=Mo(t.rect,i);return n&&d.applyTransform(n),c===_a.minMargin&&Il(d,_0,!1,!1),t.axisAligned=Jf(n),(t.label=t.label||{}).ignore=e.ignore,Pu(t,!1),Pu(t,!0,Au),t}var _0=[0,0,0,0];function aL(t,e,r){return t.transform=th(t.transform,r),t.localRect=Mo(t.localRect,e),t.rect=Mo(t.rect,e),r&&t.rect.applyTransform(r),t.axisAligned=Jf(r),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}function oL(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var r=t.transform;r&&(r[4]+=e.x,r[5]+=e.y);var n=t.rect;n&&(n.x+=e.x,n.y+=e.y);var i=t.obb;i&&i.fromBoundingRect(t.localRect,r)}}function hy(t,e){for(var r=0;r<ly.length;r++){var n=ly[r];t[n]==null&&(t[n]=e[n])}return Fn(t)}function dy(t){var e=t.obb;return(!e||cy(t,Au))&&(t.obb=e=e||new H1,e.fromBoundingRect(t.localRect,t.transform),Pu(t,!1,Au)),e}function sL(t,e,r,n,i){var a=t.length,o=An[e],s=ga[e];if(a<2)return!1;t.sort(function(L,C){return L.rect[o]-C.rect[o]});for(var l=0,u,c=!1,f=0,d=0;d<a;d++){var h=t[d],v=h.rect;u=v[o]-l,u<0&&(v[o]-=u,h.label[o]-=u,c=!0);var p=Math.max(-u,0);f+=p,l=v[o]+v[s]}f>0&&i&&S(-f/a,0,a);var g=t[0],m=t[a-1],y,_;b(),y<0&&w(-y,.8),_<0&&w(_,.8),b(),x(y,_,1),x(_,y,-1),b(),y<0&&T(-y),_<0&&T(_);function b(){y=g.rect[o]-r,_=n-m.rect[o]-m.rect[s]}function x(L,C,M){if(L<0){var A=Math.min(C,-L);if(A>0){S(A*M,0,a);var E=A+L;E<0&&w(-E*M,1)}else w(-L*M,1)}}function S(L,C,M){L!==0&&(c=!0);for(var A=C;A<M;A++){var E=t[A],P=E.rect;P[o]+=L,E.label[o]+=L}}function w(L,C){for(var M=[],A=0,E=1;E<a;E++){var P=t[E-1].rect,B=Math.max(t[E].rect[o]-P[o]-P[s],0);M.push(B),A+=B}if(A){var k=Math.min(Math.abs(L)/A,C);if(L>0)for(var E=0;E<a-1;E++){var N=M[E]*k;S(N,0,E+1)}else for(var E=a-1;E>0;E--){var N=M[E-1]*k;S(-N,E,a)}}}function T(L){var C=L<0?-1:1;L=Math.abs(L);for(var M=Math.ceil(L/(a-1)),A=0;A<a-1;A++)if(C>0?S(M,0,A+1):S(-M,a-A-1,a),L-=M,L<=0)return}return c}function lL(t){var e=[];t.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<t.length;n++){var i=Fn(t[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<e.length;l++)if(b0(i,e[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):e.push(i)}}}function b0(t,e,r,n){return!t||!e||t.label&&t.label.ignore||e.label&&e.label.ignore||!t.rect.intersect(e.rect,r,n)?!1:t.axisAligned&&e.axisAligned?!0:dy(t).intersect(dy(e),r,n)}var uL=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new le,i=On("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=On(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Ct.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}(tr);function S0(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=wa(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(wa(t,e,r[o]));return a.join(" ")}}function vy(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!gt(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var x0=function(t){st(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=On(r,-1,-1,2,2,null,s);l.attr({z2:mt(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=cL,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Tl(this.childAt(0))},e.prototype.downplay=function(){Ll(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var d=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,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):De(h,v,s,n),To(h)}if(this._updateCommon(r,n,l,i,a),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,Ge(h,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,d,h,v,p,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,d=a.focus,h=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),d=_.get("focus"),h=_.get("blurScope"),v=_.get("disabled"),p=ya(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var x=P2(r.getItemVisual(n,"symbolOffset"),i);x&&(s.x=x[0],s.y=x[1]),m&&s.attr("cursor",m);var S=r.getItemVisual(n,"style"),w=S.fill;if(s instanceof Tr){var T=s.style;s.useStyle(rt({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(rt({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var L=r.getItemVisual(n,"liftZ"),C=this._z2;L!=null?C==null&&(this._z2=s.z2,s.z2+=L):C!=null&&(s.z2=C,this._z2=null);var M=o&&o.useNameLabel;ma(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:A,inheritColor:w,defaultOpacity:S.opacity});function A(B){return M?r.getName(B):S0(r,B)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var E=s.ensureState("emphasis");E.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;E.scaleX=this._sizeX*P,E.scaleY=this._sizeY*P,this.setSymbolScale(1),fa(this,d,h,v)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Jt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Ol(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ol(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return A2(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(le);function cL(t,e){this.parent.drift(t,e)}function w0(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function py(t){return t!=null&&!wt(t)&&(t={isIgnore:t}),t||{}}function gy(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ya(e),cursorStyle:e.get("cursor")}}var my=function(){function t(e){this.group=new le,this._SymbolCtor=e||x0}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=py(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=gy(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var d=c(f);if(w0(e,d,f,r)){var h=new o(e,f,l,u);h.setPosition(d),e.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,d){var h=a.getItemGraphicEl(d),v=c(f);if(!w0(e,v,f,r)){n.remove(h);return}var p=e.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==p)n.remove(h),h=new o(e,f,l,u),h.setPosition(v);else{h.updateData(e,f,l,u);var m={x:v[0],y:v[1]};s?h.attr(m):De(h,m,i)}n.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var d=a.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gy(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=py(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(w0(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Rl(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function yy(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=fL(i,r),o=n.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=dt(t.dimensions,function(v){return e.mapDimension(v)}),d=!1,h=e.getCalculationInfo("stackResultDimension");return ka(e,f[0])&&(d=!0,f[0]=h),ka(e,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function fL(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:jt(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function _y(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function hL(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function dL(t,e,r,n,i,a,o,s){for(var l=hL(t,e),u=[],c=[],f=[],d=[],h=[],v=[],p=[],g=yy(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],x=!0,S=void 0,w=void 0;switch(b.cmd){case"=":S=b.idx*2,w=b.idx1*2;var T=m[S],L=m[S+1],C=y[w],M=y[w+1];(isNaN(T)||isNaN(L))&&(T=C,L=M),u.push(T,L),c.push(C,M),f.push(r[S],r[S+1]),d.push(n[w],n[w+1]),p.push(e.getRawIndex(b.idx1));break;case"+":var A=b.idx,E=g.dataDimsForPoint,P=i.dataToPoint([e.get(E[0],A),e.get(E[1],A)]);w=A*2,u.push(P[0],P[1]),c.push(y[w],y[w+1]);var B=_y(g,i,e,A);f.push(B[0],B[1]),d.push(n[w],n[w+1]),p.push(e.getRawIndex(A));break;case"-":x=!1}x&&(h.push(b),v.push(v.length))}v.sort(function(J,ct){return p[J]-p[ct]});for(var k=u.length,N=ln(k),z=ln(k),R=ln(k),V=ln(k),I=[],_=0;_<v.length;_++){var H=v[_],G=_*2,X=H*2;N[G]=u[X],N[G+1]=u[X+1],z[G]=c[X],z[G+1]=c[X+1],R[G]=f[X],R[G+1]=f[X+1],V[G]=d[X],V[G+1]=d[X+1],I[_]=h[H]}return{current:N,next:z,stackedOnCurrent:R,stackedOnNext:V,status:I}}var Hn=Math.min,Gn=Math.max;function Ni(t,e){return isNaN(t)||isNaN(e)}function T0(t,e,r,n,i,a,o,s,l){for(var u,c,f,d,h,v,p=r,g=0;g<n;g++){var m=e[p*2],y=e[p*2+1];if(p>=i||p<0)break;if(Ni(m,y)){if(l){p+=a;continue}break}if(p===r)t[a>0?"moveTo":"lineTo"](m,y),f=m,d=y;else{var _=m-u,b=y-c;if(_*_+b*b<.5){p+=a;continue}if(o>0){for(var x=p+a,S=e[x*2],w=e[x*2+1];S===m&&w===y&&g<n;)g++,x+=a,p+=a,S=e[x*2],w=e[x*2+1],m=e[p*2],y=e[p*2+1],_=m-u,b=y-c;var T=g+1;if(l)for(;Ni(S,w)&&T<n;)T++,x+=a,S=e[x*2],w=e[x*2+1];var L=.5,C=0,M=0,A=void 0,E=void 0;if(T>=n||Ni(S,w))h=m,v=y;else{C=S-u,M=w-c;var P=m-u,B=S-m,k=y-c,N=w-y,z=void 0,R=void 0;if(s==="x"){z=Math.abs(P),R=Math.abs(B);var V=C>0?1:-1;h=m-V*z*o,v=y,A=m+V*R*o,E=y}else if(s==="y"){z=Math.abs(k),R=Math.abs(N);var I=M>0?1:-1;h=m,v=y-I*z*o,A=m,E=y+I*R*o}else z=Math.sqrt(P*P+k*k),R=Math.sqrt(B*B+N*N),L=R/(R+z),h=m-C*o*(1-L),v=y-M*o*(1-L),A=m+C*o*L,E=y+M*o*L,A=Hn(A,Gn(S,m)),E=Hn(E,Gn(w,y)),A=Gn(A,Hn(S,m)),E=Gn(E,Hn(w,y)),C=A-m,M=E-y,h=m-C*z/R,v=y-M*z/R,h=Hn(h,Gn(u,m)),v=Hn(v,Gn(c,y)),h=Gn(h,Hn(u,m)),v=Gn(v,Hn(c,y)),C=m-h,M=y-v,A=m+C*R/z,E=y+M*R/z}t.bezierCurveTo(f,d,h,v,m,y),f=A,d=E}else t.lineTo(m,y)}u=m,c=y,p+=a}return g}var by=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),vL=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:Ct.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new by},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Ni(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Ni(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=T0(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Mn.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var d=a[f++],h=void 0,v=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(d){case o.M:s=a[f++],l=a[f++];break;case o.L:if(h=a[f++],v=a[f++],_=u?(r-s)/(h-s):(r-l)/(v-l),_<=1&&_>=0){var b=u?(v-l)*_+l:(h-s)*_+s;return u?[r,b]:[b,r]}s=h,l=v;break;case o.C:h=a[f++],v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++];var x=u?$s(s,h,p,m,r,c):$s(l,v,g,y,r,c);if(x>0)for(var S=0;S<x;S++){var w=c[S];if(w<=1&&w>=0){var b=u?_e(l,v,g,y,w):_e(s,h,p,m,w);return u?[r,b]:[b,r]}}s=m,l=y;break}}},e}(Vt),pL=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(by),gL=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new pL},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Ni(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Ni(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=T0(r,i,o,s,s,1,n.smooth,l,n.connectNulls);T0(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},e}(Vt);function Sy(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.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 ue({shape:{x:o,y:s,width:l,height:u}});if(e){var d=t.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 p=Lt(i)?function(g){i(g,f)}:null;Ge(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,p)}return f}function xy(t,e,r){var n=t.getArea(),i=be(n.r0,1),a=be(n.r,1),o=new En({shape:{cx:be(t.cx,1),cy:be(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Ge(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function mL(t,e,r,n,i){if(t){if(t.type==="polar")return xy(t,e,r);if(t.type==="cartesian2d")return Sy(t,e,r,n,i)}else return null;return null}function L0(t,e){return t.type===e}function wy(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function Ty(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function Ly(t,e){var r=Ty(t),n=r[0],i=r[1],a=Ty(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function My(t){return jt(t)?t:t?.5:0}function yL(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=ln(n*2),a=0;a<n;a++){var o=_y(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Wn(t,e,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(i){for(l=0;l<t.length;l+=2){var h=e||t;!isNaN(h[l])&&!isNaN(h[l+1])&&d.push(t[l],t[l+1])}t=d}for(l=0;l<t.length-2;l+=2)switch(f[0]=t[l+2],f[1]=t[l+3],c[0]=t[l],c[1]=t[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,p=[];u[o]=p[o]=v,u[1-o]=c[1-o],p[1-o]=f[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(t[l++],t[l++]),s}function _L(t,e){var r=[],n=t.length,i,a;function o(c,f,d){var h=c.coord,v=(d-h)/(f.coord-h),p=W7(v,[c.color,f.color]);return{coord:d,color:p}}for(var s=0;s<n;s++){var l=t[s],u=l.coord;if(u<0)i=l;else if(u>e){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function bL(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=e.getAxis(i),u=dt(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=_L(u,i==="x"?r.getWidth():r.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,p=d[0].coord-v,g=d[h-1].coord+v,m=g-p;if(m<.001)return"transparent";$(d,function(_){_.offset=(_.coord-p)/m}),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 y=new F1(0,0,0,0,d,!0);return y[i]=p,y[i+"2"]=g,y}}function SL(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&xL(a,e))){var o=e.mapDimension(a.dim),s={};return $(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function xL(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(x0.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function wL(t,e){return isNaN(t)||isNaN(e)}function TL(t){for(var e=t.length/2;e>0&&wL(t[e*2-2],t[e*2-1]);e--);return e-1}function Cy(t,e){return[t[e*2],t[e*2+1]]}function LL(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=t[u*2+i],!(isNaN(o)||isNaN(t[u*2+1-i]))){if(u===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function Ey(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<fr.length;e++)if(t.get([fr[e],"endLabel","show"]))return!0;return!1}function M0(t,e,r,n){if(L0(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=Ey(n)?function(h,v){t._endLabelOnDuring(h,v,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=Sy(e,r,n,function(){var h=t._endLabel;h&&r&&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 process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),xy(e,r,n)}function ML(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var CL=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new le,n=new my;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=re(this._changePolyState,this)},e.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",d=this._coordSys,h=this._symbolDraw,v=this._polyline,p=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),b=yy(a,s,_),x=y&&yL(a,s,b),S=r.get("showSymbol"),w=r.get("connectNulls"),T=S&&!f&&SL(r,s,a),L=this._data;L&&L.eachItemGraphicEl(function(J,ct){J.__temp&&(o.remove(J),L.setItemGraphicEl(ct,null))}),S||h.remove(),o.add(g);var C=f?!1:r.get("step"),M;a&&a.getArea&&r.get("clip",!0)&&(M=a.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var A=bL(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(v&&d.type===a.type&&C===this._step))S&&h.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(J){return[c[J*2],c[J*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,M),C&&(x&&(x=Wn(x,c,a,C,w)),c=Wn(c,null,a,C,w)),v=this._newPolyline(c),y?p=this._newPolygon(c,x):p&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,ph(A)),g.setClipPath(M0(this,a,!0,r));else{y&&!p?p=this._newPolygon(c,x):p&&!y&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,ph(A));var E=g.getClipPath();if(E){var P=M0(this,a,!1,r);Ge(E,{shape:P.shape},r)}else g.setClipPath(M0(this,a,!0,r));S&&h.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(J){return[c[J*2],c[J*2+1]]}}),(!wy(this._stackedOnPoints,x)||!wy(this._points,c))&&(m?this._doUpdateAnimation(s,x,a,i,C,_,w):(C&&(x&&(x=Wn(x,c,a,C,w)),c=Wn(c,null,a,C,w)),v.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:x})))}var B=r.getModel("emphasis"),k=B.get("focus"),N=B.get("blurScope"),z=B.get("disabled");if(v.useStyle(It(l.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),ha(v,r,"lineStyle"),v.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var R=v.getState("emphasis").style;R.lineWidth=+v.style.lineWidth+1}Jt(v).seriesIndex=r.seriesIndex,fa(v,k,N,z);var V=My(r.get("smooth")),I=r.get("smoothMonotone");if(v.setShape({smooth:V,smoothMonotone:I,connectNulls:w}),p){var H=s.getCalculationInfo("stackedOnSeries"),G=0;p.useStyle(It(u.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(G=My(H.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:G,smoothMonotone:I,connectNulls:w}),ha(p,r,"areaStyle"),Jt(p).seriesIndex=r.seriesIndex,fa(p,k,N,z)}var X=this._changePolyState;s.eachItemGraphicEl(function(J){J&&(J.onHoverStateChange=X)}),this._polyline.onHoverStateChange=X,this._data=s,this._coordSys=a,this._stackedOnPoints=x,this._points=c,this._step=C,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,v),p&&this.packEventData(r,p))},e.prototype.packEventData=function(r,n){Jt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=sa(o,a);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=r.get("zlevel")||0,h=r.get("z")||0;u=new x0(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 We.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=sa(o,a);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 We.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;g1(this._polyline,r),n&&g1(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new vL({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new gL({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Lt(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Lt(f)?f(null):f;r.eachItemGraphicEl(function(h,v){var p=h;if(p){var g=[h.x,h.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var b=i,x=n.pointToCoord(g);a?(m=b.startAngle,y=b.endAngle,_=-x[1]/180*Math.PI):(m=b.r0,y=b.r,_=x[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,_=h.x):(m=S.y+S.height,y=S.y,_=h.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var T=Lt(f)?f(v):c*w+d,L=p.getSymbolPath(),C=L.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),L.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(Ey(r)){var o=r.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 Ke({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=TL(l);c>=0&&(ma(s,ya(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?vy(o,h):S0(o,f)},enableTextSetter:!0},ML(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),d=i.hostModel,h=d.get("connectNulls"),v=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,b=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,x=(m?p:0)*(y?-1:1),S=(m?0:-p)*(y?-1:1),w=m?"x":"y",T=LL(f,b,w),L=T.range,C=L[1]-L[0],M=void 0;if(C>=1){if(C>1&&!h){var A=Cy(f,L[0]);u.attr({x:A[0]+x,y:A[1]+S}),o&&(M=d.getRawValue(L[0]))}else{var A=c.getPointOn(b,w);A&&u.attr({x:A[0]+x,y:A[1]+S});var E=d.getRawValue(L[0]),P=d.getRawValue(L[1]);o&&(M=Q6(i,v,E,P,T.t))}a.lastFrameIndex=L[0]}else{var B=r===1||a.lastFrameIndex>0?L[0]:0,A=Cy(f,B);o&&(M=d.getRawValue(B)),u.attr({x:A[0]+x,y:A[1]+S})}if(o){var k=zl(u);typeof k.setLabelText=="function"&&k.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,d=dL(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),h=d.current,v=d.stackedOnCurrent,p=d.next,g=d.stackedOnNext;if(o&&(v=Wn(d.stackedOnCurrent,d.current,i,o,l),h=Wn(d.current,null,i,o,l),g=Wn(d.stackedOnNext,d.next,i,o,l),p=Wn(d.next,null,i,o,l)),Ly(h,p)>3e3||c&&Ly(v,g)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=h;var m={shape:{points:p}};d.current!==h&&(m.shape.__points=d.next),u.stopAnimation(),De(u,m,f),c&&(c.setShape({points:h,stackedOnPoints:v}),c.stopAnimation(),De(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=d.status,b=0;b<_.length;b++){var x=_[b].cmd;if(x==="="){var S=r.getItemGraphicEl(_[b].idx1);S&&y.push({el:S,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,T=0;T<y.length;T++){var L=y[T].el,C=y[T].ptIdx*2;L.x=w[C],L.y=w[C+1],L.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(We);function C0(t,e){return{seriesType:t,plan:Ih(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=e||a.large;if(i){var s=dt(i.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");ka(n,s[0])&&(s[0]=u),ka(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 p=h.end-h.start,g=o&&ln(p*l),m=[],y=[],_=h.start,b=0;_<h.end;_++){var x=void 0;if(l===1){var S=c.get(f,_);x=i.dataToPoint(S,null,y)}else m[0]=c.get(f,_),m[1]=c.get(d,_),x=i.dataToPoint(m,null,y);o?(g[b++]=x[0],g[b++]=x[1]):v.setItemLayout(_,x.slice())}o&&v.setLayout("points",g)}}}}}}var EL={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},DL=function(t){return Math.round(t.length/2)};function Dy(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){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){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/h));var v=void 0;xt(a)?v=EL[a]:Lt(a)&&(v=a),v&&e.setData(i.downSample(i.mapDimension(u.dim),1/h,v,DL))}}}}}function AL(t){t.registerChartView(CL),t.registerSeriesModel(uL),t.registerLayout(C0("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Dy("line"))}var E0=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)$(a.getAxes(),function(d,h){if(d.type==="category"&&n!=null){var v=d.getTicksCoords(),p=d.getTickModel().get("alignWithLabel"),g=o[h],m=n[h]==="x1"||n[h]==="y1";if(m&&!p&&(g+=1),v.length<2)return;if(v.length===2){s[h]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,b=1,x=0;x<v.length;x++){var S=v[x].coord,w=x===v.length-1?v[x-1].tickValue+b:v[x].tickValue;if(w===g){_=S;break}else if(w<g)y=S;else if(y!=null&&w>g){_=(S+y)/2;break}x===1&&(b=w-v[0].tickValue)}_==null&&(y?y&&(_=v[v.length-1].coord):_=v[0].coord),s[h]=d.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.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}(tr);tr.registerClass(E0);var PL=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return wu(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 r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=cg(E0.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:Ct.color.primary,borderWidth:2}},realtimeSort:!1}),e}(E0),NL=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Ay=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new NL},e.prototype.buildPath=function(r,n){var i=n.cx,a=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 p=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);v?(r.moveTo(p*o+i,g*o+a),r.arc(p*u+i,g*u+a,l,-Math.PI+c,c,!d)):r.moveTo(p*s+i,g*s+a),r.arc(i,a,s,c,f,!d),r.arc(m*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&r.arc(i,a,o,f,c,d)},e}(Vt);function kL(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return rl(n,i,a);var s=t(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,h=u.r0,v=(d+h)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=r?Math.abs(d-h)/2:0,_=Math.cos,b=Math.sin,x=c+d*_(p),S=f+d*b(p),w="left",T="top";switch(s){case"startArc":x=c+(h-l)*_(m),S=f+(h-l)*b(m),w="center",T="top";break;case"insideStartArc":x=c+(h+l)*_(m),S=f+(h+l)*b(m),w="center",T="bottom";break;case"startAngle":x=c+v*_(p)+Nu(p,l+y,!1),S=f+v*b(p)+ku(p,l+y,!1),w="right",T="middle";break;case"insideStartAngle":x=c+v*_(p)+Nu(p,-l+y,!1),S=f+v*b(p)+ku(p,-l+y,!1),w="left",T="middle";break;case"middle":x=c+v*_(m),S=f+v*b(m),w="center",T="middle";break;case"endArc":x=c+(d+l)*_(m),S=f+(d+l)*b(m),w="center",T="bottom";break;case"insideEndArc":x=c+(d-l)*_(m),S=f+(d-l)*b(m),w="center",T="top";break;case"endAngle":x=c+v*_(g)+Nu(g,l+y,!0),S=f+v*b(g)+ku(g,l+y,!0),w="left",T="middle";break;case"insideEndAngle":x=c+v*_(g)+Nu(g,-l+y,!0),S=f+v*b(g)+ku(g,-l+y,!0),w="right",T="middle";break;default:return rl(n,i,a)}return n=n||{},n.x=x,n.y=S,n.align=w,n.verticalAlign=T,n}}function OL(t,e,r,n){if(jt(n)){t.setTextConfig({rotation:n});return}else if(gt(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:t.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),t.setTextConfig({rotation:c})}function Nu(t,e,r){return e*Math.sin(t)*(r?-1:1)}function ku(t,e,r){return e*Math.cos(t)*(r?1:-1)}function ts(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;gt(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:dt(n,function(a){return wn(a,i)})}}var D0=Math.max,A0=Math.min;function IL(t,e){var r=t.getArea&&t.getArea();if(L0(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var BL=function(t){st(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&Ce("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){Rl(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=r.isAnimationEnabled()?r:null,h=RL(r,u);h&&this._enableRealtimeSort(h,s,i);var v=r.get("clip",!0)||h,p=IL(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,b=[],x=this._backgroundEls,S=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function T(M){var A=Ou[u.type](s,M);if(!A)return null;var E=WL(u,f,A);return E.useStyle(y.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",_):E.setShape("cornerRadius",_),b[M]=E,E}s.diff(l).add(function(M){var A=s.getItemModel(M),E=Ou[u.type](s,M,A);if(E&&(m&&T(M),!(!s.hasValue(M)||!Iy[u.type](E)))){var P=!1;v&&(P=Py[u.type](p,E));var B=Ny[u.type](r,s,M,E,f,d,c.model,!1,g);h&&(B.forceLabelAnimation=!0),Ry(B,s,M,A,E,r,f,u.type==="polar"),S?B.attr({shape:E}):h?ky(h,d,B,E,M,f,!1,!1):Ge(B,{shape:E},r,M),s.setItemGraphicEl(M,B),o.add(B),B.ignore=P}}).update(function(M,A){var E=s.getItemModel(M),P=Ou[u.type](s,M,E);if(P){if(m){var B=void 0;x.length===0?B=T(A):(B=x[A],B.useStyle(y.getItemStyle()),u.type==="cartesian2d"?B.setShape("r",_):B.setShape("cornerRadius",_),b[M]=B);var k=Ou[u.type](s,M),N=Fy(f,k,u);De(B,{shape:N},d,M)}var z=l.getItemGraphicEl(A);if(!s.hasValue(M)||!Iy[u.type](P)){o.remove(z);return}var R=!1;v&&(R=Py[u.type](p,P),R&&o.remove(z));var V=z&&(z.type==="sector"&&g||z.type==="sausage"&&!g);if(V&&(z&&wo(z,r,A),z=null),z?To(z):z=Ny[u.type](r,s,M,P,f,d,c.model,!0,g),h&&(z.forceLabelAnimation=!0),w){var I=z.getTextContent();if(I){var H=zl(I);H.prevValue!=null&&(H.prevValue=H.value)}}else Ry(z,s,M,E,P,r,f,u.type==="polar");S?z.attr({shape:P}):h?ky(h,d,z,P,M,f,!0,w):De(z,{shape:P},r,M,null),s.setItemGraphicEl(M,z),z.ignore=R,o.add(z)}}).remove(function(M){var A=l.getItemGraphicEl(M);A&&wo(A,r,M)}).execute();var L=this._backgroundGroup||(this._backgroundGroup=new le);L.removeAll();for(var C=0;C<b.length;++C)L.add(b[C]);o.add(L),this._backgroundEls=b,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),Vy(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),Vy(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&mL(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),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(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:dt(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){wo(a,r,Jt(a).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}(We),Py={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=D0(e.x,t.x),s=A0(e.x+e.width,i),l=D0(e.y,t.y),u=A0(e.y+e.height,a),c=s<o,f=u<l;return e.x=c&&o>i?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=A0(e.r,t.r),a=D0(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},Ny={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new ue({shape:rt({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Ay:En,c=new u({shape:n,z2:1});c.name="item";var f=By(i);if(c.calculateTextPosition=kL(f,{isRoundCap:u===Ay}),a){var d=c.shape,h=i?"r":"endAngle",v={};d[h]=i?n.r0:n.startAngle,v[h]=n[h],(s?De:Ge)(c,{shape:v},a)}return c}};function RL(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&Ce("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&Ce("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function ky(t,e,r,n,i,a,o,s){var l,u;a?(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?De:Ge)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?De:Ge)(r,{shape:u},c,i)}function Oy(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var $L=["x","y","width","height"],VL=["cx","cy","r","startAngle","endAngle"],Iy={cartesian2d:function(t){return!Oy(t,$L)},polar:function(t){return!Oy(t,VL)}},Ou={cartesian2d:function(t,e,r){var n=t.getItemLayout(e);if(!n)return null;var i=r?FL(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.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 zL(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function By(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function Ry(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ts(n.getModel("itemStyle"),c,!0);rt(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var d=n.getShallow("cursor");d&&t.attr("cursor",d);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=ya(n);ma(t,v,{labelFetcher:a,labelDataIndex:r,defaultText:S0(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=t.getTextContent();if(s&&p){var g=n.get(["label","position"]);t.textConfig.inside=g==="middle"?!0:null,OL(t,g==="outside"?h:g,By(o),n.get(["label","rotate"]))}pb(p,v,a.getRawValue(r),function(y){return vy(e,y)});var m=n.getModel(["emphasis"]);fa(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),ha(t,n),zL(i)&&(t.style.fill="none",t.style.stroke="none",$(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function FL(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var HL=function(){function t(){}return t}(),$y=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new HL},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},e}(Vt);function Vy(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=t.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new $y({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),r&&r.push(c)}var f=new $y({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,Jt(f).seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",zy),f.on("mousemove",zy)),r&&r.push(f)}var zy=y2(function(t){var e=this,r=GL(e,t.offsetX,t.offsetY);Jt(e).dataIndex=r>=0?r:null},30,!1);function GL(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,f=a.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[i]=a[d+2],s[n]=a[d+n],s[i]=a[d+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function Fy(t,e,r){if(L0(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function WL(t,e,r){var n=t.type==="polar"?En:ue;return new n({shape:Fy(e,r,t),silent:!0,z2:0})}function XL(t){t.registerChartView(BL),t.registerSeriesModel(PL),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ue(mT,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,yT("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Dy("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var Hy=Math.PI*2,Iu=Math.PI/180;function YL(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=jb(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*Iu,h=n.get("endAngle"),v=n.get("padAngle")*Iu;h=h==="auto"?d-Hy:-h*Iu;var p=n.get("minAngle")*Iu,g=p+v,m=0;i.each(a,function(N){!isNaN(N)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,b=n.get("clockwise"),x=n.get("roseType"),S=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var T=b?1:-1,L=[d,h],C=T*v/2;Up(L,!b),d=L[0],h=L[1];var M=Gy(n);M.startAngle=d,M.endAngle=h,M.clockwise=b,M.cx=s,M.cy=l,M.r=u,M.r0=c;var A=Math.abs(h-d),E=A,P=0,B=d;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(N,z){var R;if(isNaN(N)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:x?NaN:u});return}x!=="area"?R=y===0&&S?_:N*_:R=A/m,R<g?(R=g,E-=g):P+=N;var V=B+T*R,I=0,H=0;v>R?(I=B+T*R/2,H=I):(I=B+C,H=V-C),i.setItemLayout(z,{angle:R,startAngle:I,endAngle:H,clockwise:b,cx:s,cy:l,r0:c,r:x?nf(N,w,[c,u]):u}),B=V}),E<Hy&&m)if(E<=.001){var k=A/m;i.each(a,function(N,z){if(!isNaN(N)){var R=i.getItemLayout(z);R.angle=k;var V=0,I=0;k<v?(V=d+T*(z+1/2)*k,I=V):(V=d+T*z*k+C,I=d+T*(z+1)*k-C),R.startAngle=V,R.endAngle=I}})}else _=E/P,B=d,i.each(a,function(N,z){if(!isNaN(N)){var R=i.getItemLayout(z),V=R.angle===g?g:N*_,I=0,H=0;V<v?(I=B+T*V/2,H=I):(I=B+C,H=B+T*V-C),R.startAngle=I,R.endAngle=H,B+=T*V}})})}var Gy=ae();function Wy(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var UL=Math.PI/180;function Xy(t,e,r,n,i,a,o,s,l,u){if(t.length<2)return;function c(p){for(var g=p.rB,m=g*g,y=0;y<p.list.length;y++){var _=p.list[y],b=Math.abs(_.label.y-r),x=n+_.len,S=x*x,w=Math.sqrt(Math.abs((1-b*b/m)*S)),T=e+(w+_.len2)*i,L=T-_.label.x,C=_.targetTextWidth-L*i;Yy(_,C,!0),_.label.x=T}}function f(p){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<p.length;y++)if(p[y].labelAlignTo==="none"){var _=p[y],b=_.label.y>r?m:g,x=Math.abs(_.label.y-r);if(x>=b.maxY){var S=_.label.x-e-_.len2*i,w=n+_.len,T=Math.abs(S)<w?Math.sqrt(x*x/(1-S*S/w/w)):w;b.rB=T,b.maxY=x}b.list.push(_)}c(g),c(m)}for(var d=t.length,h=0;h<d;h++)if(t[h].position==="outer"&&t[h].labelAlignTo==="labelLine"){var v=t[h].label.x-u;t[h].linePoints[1][0]+=v,t[h].label.x=u}sL(t,1,l,l+o)&&f(t)}function ZL(t,e,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<t.length;d++){var h=t[d].label;P0(t[d])||(h.x<e?(c=Math.min(c,h.x),l.push(t[d])):(f=Math.max(f,h.x),u.push(t[d])))}for(var d=0;d<t.length;d++){var v=t[d];if(!P0(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var h=v.label,p=v.linePoints,g=void 0;v.labelAlignTo==="edge"?h.x<e?g=p[2][0]-v.labelDistance-o-v.edgeDistance:g=o+i-v.edgeDistance-p[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?h.x<e?g=c-o-v.bleedMargin:g=o+i-f-v.bleedMargin:h.x<e?g=h.x-o-v.bleedMargin:g=o+i-h.x-v.bleedMargin,v.targetTextWidth=g,Yy(v,g,!1)}}Xy(u,e,r,n,1,i,a,o,s,f),Xy(l,e,r,n,-1,i,a,o,s,c);for(var d=0;d<t.length;d++){var v=t[d];if(!P0(v)&&v.linePoints){var h=v.label,p=v.linePoints,m=v.labelAlignTo==="edge",y=h.style.padding,_=y?y[1]+y[3]:0,b=h.style.backgroundColor?0:_,x=v.rect.width+b,S=p[1][0]-p[2][0];m?h.x<e?p[2][0]=o+v.edgeDistance+x+v.labelDistance:p[2][0]=o+i-v.edgeDistance-x-v.labelDistance:(h.x<e?p[2][0]=h.x+v.labelDistance:p[2][0]=h.x-v.labelDistance,p[1][0]=p[2][0]+S),p[1][1]=p[2][1]=h.y}}}function Yy(t,e,r){if(t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(e<c||r){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:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",h)}Uy(a,n)}}}function Uy(t,e){Zy.rect=t,fy(Zy,e,qL)}var qL={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Zy={};function P0(t){return t.position==="center"}function jL(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*UL,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(S){S.ignore=!0}function v(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}e.each(function(S){var w=e.getItemGraphicEl(S),T=w.shape,L=w.getTextContent(),C=w.getTextGuideLine(),M=e.getItemModel(S),A=M.getModel("label"),E=A.get("position")||M.get(["emphasis","label","position"]),P=A.get("distanceToLabelLine"),B=A.get("alignTo"),k=Kt(A.get("edgeDistance"),u),N=A.get("bleedMargin");N==null&&(N=Math.min(u,d)>200?10:2);var z=M.getModel("labelLine"),R=z.get("length");R=Kt(R,u);var V=z.get("length2");if(V=Kt(V,u),Math.abs(T.endAngle-T.startAngle)<o){$(L.states,h),L.ignore=!0,C&&($(C.states,h),C.ignore=!0);return}if(v(L)){var I=(T.startAngle+T.endAngle)/2,H=Math.cos(I),G=Math.sin(I),X,J,ct,vt;n=T.cx,i=T.cy;var U=E==="inside"||E==="inner";if(E==="center")X=T.cx,J=T.cy,vt="center";else{var Y=(U?(T.r+T.r0)/2*H:T.r*H)+n,tt=(U?(T.r+T.r0)/2*G:T.r*G)+i;if(X=Y+H*3,J=tt+G*3,!U){var j=Y+H*(R+l-T.r),nt=tt+G*(R+l-T.r),it=j+(H<0?-1:1)*V,at=nt;B==="edge"?X=H<0?c+k:c+u-k:X=it+(H<0?-P:P),J=at,ct=[[Y,tt],[j,nt],[it,at]]}vt=U?"center":B==="edge"?H>0?"right":"left":H>0?"left":"right"}var Et=Math.PI,Q=0,K=A.get("rotate");if(jt(K))Q=K*(Et/180);else if(E==="center")Q=0;else if(K==="radial"||K===!0){var _t=H<0?-I+Et:-I;Q=_t}else if(K==="tangential"&&E!=="outside"&&E!=="outer"){var pt=Math.atan2(H,G);pt<0&&(pt=Et*2+pt);var yt=G>0;yt&&(pt=Et+pt),Q=pt-Et}if(a=!!Q,L.x=X,L.y=J,L.rotation=Q,L.setStyle({verticalAlign:"middle"}),U){L.setStyle({align:vt});var F=L.states.select;F&&(F.x+=L.x,F.y+=L.y)}else{var W=new Nt(0,0,0,0);Uy(W,L),r.push({label:L,labelLine:C,position:E,len:R,len2:V,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new Mt(H,G),linePoints:ct,textAlign:vt,labelDistance:P,labelAlignTo:B,edgeDistance:k,bleedMargin:N,rect:W,unconstrainedWidth:W.width,labelStyleWidth:L.style.width})}w.setTextConfig({inside:U})}}),!a&&t.get("avoidLabelOverlap")&&ZL(r,n,i,l,u,d,c,f);for(var p=0;p<r.length;p++){var g=r[p],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&($(m.states,h),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var x=g.linePoints;_||!x?($(y.states,h),y.ignore=!0):(JT(x,g.minTurnAngle),tL(x,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:x}),m.__hostTarget.textGuideLineConfig={anchor:new Mt(x[0][0],x[0][1])})}}}var QL=function(t){st(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Ke;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),f=rt(ts(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(Ge(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,Ge(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Ge(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,De(o,{shape:{endAngle:c.endAngle}},s,n))}else To(o),De(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),ha(o,l);var h=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),p=Math.cos(h)*v,g=Math.sin(h)*v,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=rt({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},ts(u.getModel("itemStyle"),c)),rt(o.ensureState("select"),{x:p,y:g,shape:ts(l.getModel(["select","itemStyle"]),c)}),rt(o.ensureState("blur"),{shape:ts(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&rt(y.ensureState("select"),{x:p,y:g}),rt(_.ensureState("select"),{x:p,y:g}),fa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;ma(a,ya(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")a.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new yi,this.setTextGuideLine(h)),rL(this,nL(o),{stroke:u,opacity:qr(s.get(["lineStyle","opacity"]),c,1)})}},e}(En),KL=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.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&&r.get("showEmptyCircle")){var d=Gy(r),h=new En({shape:Ot(d)});h.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(v){var p=new QL(o,v,u);o.setItemGraphicEl(v,p),l.add(p)}).update(function(v,p){var g=s.getItemGraphicEl(p);g.updateData(o,v,u),g.off("click"),l.add(g),o.setItemGraphicEl(v,g)}).remove(function(v){var p=s.getItemGraphicEl(v);wo(p,r,v)}).execute(),jL(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="pie",e}(We);function qy(t,e,r){e=gt(e)&&{coordDimensions:e}||rt({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Pm(n,e).dimensions,a=new Am(i,t);return a.initData(n,r),a}var jy=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),JL=ae(),Qy=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new jy(re(this.getData,this),re(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return qy(this,{coordDimensions:["value"],encodeDefaulter:Ue(iS,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=JL(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=A6(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){lf(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.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}(tr);Gb({fullType:Qy.type,getCoord2:function(t){return t.getShallow("center")}});function tM(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(jt(o)&&!isNaN(o)&&o<0)})}}}function eM(t){t.registerChartView(KL),t.registerSeriesModel(Qy),Ox("pie",t.registerAction),t.registerLayout(Ue(YL,"pie")),t.registerProcessor(Wy("pie")),t.registerProcessor(tM("pie"))}var rM=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},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:Ct.color.primary}},universalTransition:{divideShape:"clone"}},e}(tr),Ky=4,nM=function(){function t(){}return t}(),iM=function(t){st(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new nM},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<Ky,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var d=i[f++],h=i[f++];isNaN(d)||isNaN(h)||c&&!c.contain(d,h)||(s.x=d-a[0]/2,s.y=h-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,d=a[c+1]-l/2;if(r>=f&&n>=d&&r<=f+s&&n<=d+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<i.length;){var h=i[d++],v=i[d++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(v,u),f=Math.max(v,f)}r=this._rect=new Nt(l-o/2,u-s/2,c-l+o,f-u+s)}return r},e}(Vt),aM=function(){function t(){this.group=new le}return t.prototype.updateData=function(e,r){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,r)},t.prototype.updateLayout=function(e){var r=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},t.prototype.incrementalPrepareUpdate=function(e){this._clear()},t.prototype.incrementalUpdate=function(e,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},t.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},t.prototype._create=function(){var e=new iM({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},t.prototype._setCommon=function(e,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=n.clipShape||null,e.symbolProxy=On(r.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<Ky;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=Jt(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),oM=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=C0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new aM:new my,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(We),Jy={left:0,right:0,top:0,bottom:0},Bu=["25%","25%"],sM=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=ko(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Nn(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Nn(this.option.outerBounds,r.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:Jy,outerBoundsContain:"all",outerBoundsClampWidth:Bu[0],outerBoundsClampHeight:Bu[1],backgroundColor:Ct.color.transparent,borderWidth:1,borderColor:Ct.color.neutral30},e}(Xt),N0=function(t){st(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",sr).models[0]},e.type="cartesian2dAxis",e}(Xt);br(N0,qm);var t5={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:Ct.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:Ct.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Ct.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Ct.color.backgroundTint,Ct.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Ct.color.neutral00,borderColor:Ct.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},lM=Zt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},t5),k0=Zt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Ct.color.axisMinorSplitLine,width:1}}},t5),uM=Zt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},k0),cM=It({logBase:10},k0);const e5={category:lM,value:k0,time:uM,log:cM};var fM={value:1,category:1,time:1,log:1},hM=null;function r5(){return hM}function n5(t,e,r,n){$(fM,function(i,a){var o=Zt(Zt({},e5[a],!0),n,!0),s=function(l){st(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=No(this),h=d?ko(c):{},v=f.getTheme();Zt(c,v.get(a+"Axis")),Zt(c,this.getDefaultOption()),c.type=i5(c),d&&Nn(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=f0.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=r5();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",i5)}function i5(t){return t.type||(t.data?"category":"value")}var dM=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return dt(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),fe(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),O0=["x","y"];function a5(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var vM=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=O0,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!a5(r)||!a5(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-i[0]*c,h=o[1]-a[0]*f,v=this._transform=[c,0,0,f,d,h];this._invTransform=Ua([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Nt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ir(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[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(r,n,i){if(i=i||[],this._invTransform)return ir(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Nt(a,o,s,l)},e}(dM),pM=function(t){st(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(ay),gM="expandAxisBreak",Xn=Math.PI,mM=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],yM=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],es=ae(),o5=ae(),s5=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function _M(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=B0(t.axisName)&&Oa(t.nameLocation);$(n,function(v){var p=Fn(v);if(!(!p||p.label.ignore)){o.push(p);var g=a.transGroup;l&&(g.transform?Ua(rs,g.transform):gc(rs),p.transform&&Ya(rs,rs,p.transform),Nt.copy(Ru,p.localRect),Ru.applyTransform(rs),s?s.union(Ru):Nt.copy(s=new Nt(0,0,0,0),Ru))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(v,p){return Math.abs(v.label[u]-c)-Math.abs(p.label[u]-c)}),l&&s){var f=i.getExtent(),d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-d;s.union(new Nt(d,0,h,1))}a.stOccupiedRect=s,a.labelInfoList=o}var rs=yn(),Ru=new Nt(0,0,0,0),l5=function(t,e,r,n,i,a){if(Oa(t.nameLocation)){var o=a.stOccupiedRect;o&&u5(aL({},o,a.transGroup.transform),n,i)}else c5(a.labelInfoList,a.dirVec,n,i)};function u5(t,e,r){var n=new Mt;b0(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&oL(e,n)}function c5(t,e,r,n){for(var i=Mt.dot(n,e)>=0,a=0,o=t.length;a<o;a++){var s=t[i?a:o-1-a];s.label.ignore||u5(s,r,n)}}var ki=function(){function t(e,r,n,i){this.group=new le,this._axisModel=e,this._api=r,this._local={},this._shared=i||new s5(l5),this._resetCfgDetermined(n)}return t.prototype.updateCfg=function(e){if(process.env.NODE_ENV!=="production"){var r=this._shared.ensureRecord(this._axisModel).ready;bt(!r.axisLine&&!r.axisTickLabelDetermine),r.axisName=r.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=e.position,n.labelOffset=e.labelOffset,this._resetCfgDetermined(n)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(e){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=mt(e.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=mt(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:mt(e.nameDirection,1),tickDirection:mt(e.tickDirection,1),labelDirection:mt(e.labelDirection,1),labelOffset:mt(e.labelOffset,0),silent:mt(e.silent,!0),axisName:i,nameLocation:qr(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:B0(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(bt(o.position!=null),bt(o.rotation!=null)),this._cfg=o;var s=new le({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Mt(Math.cos(-o.rotation),Math.sin(-o.rotation))},t.prototype.build=function(e,r){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),$(bM,function(i){e[i]&&SM[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},t.innerTextLayout=function(e,r,n){var i=mp(r-e),a,o;return al(i)?(o=n>0?"top":"bottom",a="center"):al(i-Xn)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Xn?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),bM=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],SM={axisLine:function(t,e,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=r.ensureRecord(n).ready;bt(!s.axisLine),s.axisLine=!0}var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,t.raw.axisLineAutoShow!=null&&(l=!!t.raw.axisLineAutoShow)),!!l){var u=n.axis.getExtent(),c=a.transform,f=[u[0],0],d=[u[1],0],h=f[0]>d[0];c&&(ir(f,f,c),ir(d,d,c));var v=rt({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())r5().buildAxisBreakLine(n,i,a,p);else{var g=new Dn(rt({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]}},p));Lo(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);xt(m)&&(m=[m,m]),(xt(y)||jt(y))&&(y=[y,y]);var _=P2(n.get(["axisLine","symbolOffset"])||0,y),b=y[0],x=y[1];$([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-d[0])*(f[0]-d[0])+(f[1]-d[1])*(f[1]-d[1]))}],function(S,w){if(m[w]!=="none"&&m[w]!=null){var T=On(m[w],-b/2,-x/2,b,x,v.stroke,!0),L=S.r+S.offset,C=h?d:f;T.attr({rotation:S.rotate,x:C[0]+L*Math.cos(t.rotation),y:C[1]-L*Math.sin(t.rotation),silent:!0,z2:11}),i.add(T)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;bt(!l.axisTickLabelDetermine),l.axisTickLabelEstimate=!0}var u=d5(e,i,s);u&&f5(t,e,r,n,i,a,o,Dr.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;l.axisTickLabelDetermine=!0}var u=d5(e,i,s);u&&f5(t,e,r,n,i,a,o,Dr.determine);var c=LM(t,i,a,n);TM(t,e.labelLayoutList,c),MM(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);if(process.env.NODE_ENV!=="production"){var u=l.ready;bt(u.axisTickLabelEstimate||u.axisTickLabelDetermine),u.axisName=!0}e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var c=t.axisName;if(B0(c)){var f=t.nameLocation,d=t.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Mt(0,0),y=new Mt(0,0);f==="start"?(m.x=p[0]-g*v,y.x=-g):f==="end"?(m.x=p[1]+g*v,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+d*v,y.y=d);var _=yn();y.transform(_v(_,_,t.rotation));var b=n.get("nameRotate");b!=null&&(b=b*Xn/180);var x,S;Oa(f)?x=ki.innerTextLayout(t.rotation,b??t.rotation,d):(x=xM(t.rotation,f,b||0,p),S=t.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(x.rotation)),!isFinite(S)&&(S=null)));var w=h.getFont(),T=n.get("nameTruncate",!0)||{},L=T.ellipsis,C=Xi(t.raw.nameTruncateMaxWidth,T.maxWidth,S),M=s.nameMarginLevel||0,A=new Ke({x:m.x,y:m.y,rotation:x.rotation,silent:ki.isLabelSilent(n),style:Co(h,{text:c,font:w,overflow:"truncate",width:C,ellipsis:L,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||x.textAlign,verticalAlign:h.get("verticalAlign")||x.textVerticalAlign}),z2:1});if(Bl({el:A,componentModel:n,itemName:c}),A.__fullText=c,A.anid="name",n.get("triggerEvent")){var E=ki.makeAxisEventDataBase(n);E.targetType="axisName",E.name=c,Jt(A).eventData=E}a.add(A),A.updateTransform(),e.nameEl=A;var P=l.nameLayout=Fn({label:A,priority:A.z2,defaultAttr:{ignore:A.ignore},marginDefault:Oa(f)?mM[M]:yM[M]});if(l.nameLocation=f,i.add(A),A.decomposeTransform(),t.shouldNameMoveOverlap&&P){var B=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&bt(B.labelInfoList),r.resolveAxisNameOverlap(t,r,n,P,y,B)}}}};function f5(t,e,r,n,i,a,o,s){v5(e)||CM(t,e,i,s,n,o);var l=e.labelLayoutList;EM(t,n,l,a),t.rotation;var u=t.optionHideOverlap;wM(n,l,u),u&&lL(fe(l,function(c){return c&&!c.label.ignore})),_M(t,r,n,l)}function xM(t,e,r,n){var i=mp(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return al(i-Xn/2)?(o=l?"bottom":"top",a="center"):al(i-Xn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Xn*1.5&&i>Xn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function wM(t,e,r){if(Um(t.axis))return;function n(s,l,u){var c=Fn(e[l]),f=Fn(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){ns(c.label);return}if(f.suggestIgnore){ns(f.label);return}var d=.1;if(!r){var h=[0,0,0,0];c=hy({marginForce:h},c),f=hy({marginForce:h},f)}b0(c,f,null,{touchThreshold:d})&&ns(s?f.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function TM(t,e,r){t.showMinorTicks||$(e,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=o5(a),s=es(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){ns(a);return}}})}function ns(t){t&&(t.ignore=!0)}function h5(t,e,r,n,i){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(ir(o,o,e),ir(s,s,e));var c=new Dn({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Lo(c.shape,c.style.lineWidth),c.anid=i+"_"+t[l].tickValue,a.push(c);var f=o5(c);f.onBand=!!t[l].onBand,f.tickValue=t[l].tickValue}return a}function LM(t,e,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,t.raw.axisTickAutoShow!=null&&(o=!!t.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=t.tickDirection*a.get("length"),u=i.getTicksCoords(),c=h5(u,r.transform,l,It(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)e.add(c[f]);return c}function MM(t,e,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!t.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=It(l.getLineStyle(),It(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=h5(s[f],r.transform,u,c,"minorticks_"+f),h=0;h<d.length;h++)e.add(d[h])}}function d5(t,e,r){if(v5(t)){var n=t.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&bt(t.labelGroup&&n);var i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(e.remove(t.labelGroup),I0(t,null,null,null))}return!0}function CM(t,e,r,n,i,a){var o=i.axis,s=Xi(t.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new le;r.add(l);var u=Eu(n);if(!s||o.scale.isBlank()){I0(e,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),d=(Xi(t.raw.labelRotate,c.get("rotate"))||0)*Xn/180,h=ki.innerTextLayout(t.rotation,d,t.labelDirection),v=i.getCategories&&i.getCategories(!0),p=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;$(f,function(b,x){var S,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(b.tickValue):b.tickValue,T=b.formattedLabel,L=b.rawLabel,C=c;if(v&&v[w]){var M=v[w];wt(M)&&M.textStyle&&(C=new de(M.textStyle,c,i.ecModel))}var A=C.getTextColor()||i.get(["axisLine","lineStyle","color"]),E=C.getShallow("align",!0)||h.textAlign,P=mt(C.getShallow("alignMinLabel",!0),E),B=mt(C.getShallow("alignMaxLabel",!0),E),k=C.getShallow("verticalAlign",!0)||C.getShallow("baseline",!0)||h.textVerticalAlign,N=mt(C.getShallow("verticalAlignMinLabel",!0),k),z=mt(C.getShallow("verticalAlignMaxLabel",!0),k),R=10+(((S=b.time)===null||S===void 0?void 0:S.level)||0);m=Math.min(m,R),y=Math.max(y,R);var V=new Ke({x:0,y:0,rotation:0,silent:ki.isLabelSilent(i),z2:R,style:Co(C,{text:T,align:x===0?P:x===f.length-1?B:E,verticalAlign:x===0?N:x===f.length-1?z:k,fill:Lt(A)?A(o.type==="category"?L:o.type==="value"?w+"":w,x):A})});V.anid="label_"+w;var I=es(V);if(I.break=b.break,I.tickValue=w,I.layoutRotation=h.rotation,Bl({el:V,componentModel:i,itemName:T,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:L,tickIndex:x}}),g){var H=ki.makeAxisEventDataBase(i);H.targetType="axisLabel",H.value=L,H.tickIndex=x,b.break&&(H.break={start:b.break.parsedBreak.vmin,end:b.break.parsedBreak.vmax}),o.type==="category"&&(H.dataIndex=w),Jt(V).eventData=H,b.break&&AM(i,a,V,b.break)}p.push(V),l.add(V)});var _=dt(p,function(b){return{label:b,priority:es(b).break?b.z2+(y-m+1):b.z2,defaultAttr:{ignore:b.ignore}}});I0(e,_,l,u)}function v5(t){return!!t.labelLayoutList}function I0(t,e,r,n){t.labelLayoutList=e,t.labelGroup=r,t.axisLabelsCreationContext=n}function EM(t,e,r,n){var i=e.get(["axisLabel","margin"]);$(r,function(a,o){var s=Fn(a);if(s){var l=s.label,u=es(l);s.suggestIgnore=l.ignore,l.ignore=!1,tl(un,DM),un.x=e.axis.dataToCoord(u.tickValue),un.y=t.labelOffset+t.labelDirection*i,un.rotation=u.layoutRotation,n.add(un),un.updateTransform(),n.remove(un),un.decomposeTransform(),tl(l,un),l.markRedraw(),Pu(s,!0),Fn(s)}})}var un=new ue,DM=new ue;function B0(t){return!!t}function AM(t,e,r,n){r.on("click",function(i){var a={type:gM,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(a)})}function yA(t,e,r){}const p5=ki;function g5(t,e,r){r=r||{};var n=e.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[t.x,t.x+t.width,t.y,t.y+t.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(a){var h=a.toGlobalCoord(a.dataToCoord(0));d[c.onZero]=Math.max(Math.min(h,d[1]),d[0])}i.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=v[o],i.labelOffset=a?d[c[o]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Xi(r.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var p=e.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-p:p,i.z2=1,i}function PM(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function m5(t){var e={xAxisModel:null,yAxisModel:null};return $(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,sr).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+qr(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}function NM(t,e,r,n,i,a){for(var o=g5(t,r),s=!1,l=!1,u=0;u<e.length;u++)s0(e[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new p5(r,n,o,i)}function kM(t,e,r){var n=g5(e,r);if(process.env.NODE_ENV!=="production"){var i=t.__getRawCfg();$(Bt(n),function(a){a!=="position"&&a!=="labelOffset"&&bt(n[a]===i[a])})}t.updateCfg(n)}function y5(t,e,r){var n,i=$n.prototype,a=i.getTicks.call(r),o=i.getTicks.call(r,{expandToNicedExtent:!0}),s=a.length-1,l=i.getInterval.call(r),u=Wm(t,e),c=u.extent,f=u.fixMin,d=u.fixMax;t.type==="log"&&(c=c0(t.base,c,!0)),t.setBreaksFromOption(Zm(e)),t.setExtent(c[0],c[1]),t.calcNiceExtent({splitNumber:s,fixMin:f,fixMax:d});var h=i.getExtent.call(t);f&&(c[0]=h[0]),d&&(c[1]=h[1]);var v=i.getInterval.call(t),p=c[0],g=c[1];if(f&&d)v=(g-p)/s;else if(f)for(g=c[0]+v*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)v=l0(v),g=c[0]+v*s;else if(d)for(p=c[1]-v*s;p>c[0]&&isFinite(p)&&isFinite(c[0]);)v=l0(v),p=c[1]-v*s;else{var m=t.getTicks().length-1;m>s&&(v=l0(v));var y=v*s;g=Math.ceil(c[1]/v)*v,p=be(g-y),p<0&&c[0]>=0?(p=0,g=be(y)):g>0&&c[1]<=0&&(g=0,p=-be(y))}var _=(a[0].value-o[0].value)/l,b=(a[s].value-o[s].value)/l;if(i.setExtent.call(t,p+v*_,g+v*b),i.setInterval.call(t,v),(_||b)&&i.setNiceExtent.call(t,p+v,g-v),process.env.NODE_ENV!=="production"){var x=i.getTicks.call(t);x[1]&&(!oT(v)||of(x[1].value)>of(v))&&Ce("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+(" and alignTicks: true. ("+((n=e.axis)===null||n===void 0?void 0:n.dim)+"AxisIndex: "+e.componentIndex+")"),!0)}}var _5=[[3,1],[0,2]],OM=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=O0,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Bt(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,p=h.scale;s0(p)&&v.get("alignTicks")&&v.get("interval")==null?c.push(h):(Xm(p,v),s0(p)&&(s=h))}c.length&&(s||(s=c.pop(),Xm(s.scale,s.model)),$(c,function(g){y5(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};$(n.x,function(o){b5(n,"y",o,a)}),$(n.y,function(o){b5(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=Ql(e,r),a=this._rect=Sa(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if($0(o,a),!n){var u=BM(a,s,o,l,r),c=void 0;if(l)w5?(w5(this._axesList,a),$0(o,a)):(process.env.NODE_ENV!=="production"&&wp("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=T5(a.clone(),"axisLabel",null,a,o,u,i));else{var f=RM(e,a,i),d=f.outerBoundsRect,h=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;d&&(c=T5(d,h,v,a,o,u,i))}L5(a,o,Dr.determine,null,c,i)}$(this._coordsList,function(p){p.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}wt(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",sr).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",sr).models[0],a=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,qt(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,$(s.x,function(c,f){$(s.y,function(d,h){var v="x"+f+"y"+h,p=new vM(v);p.master=i,p.model=e,i._coordsMap[v]=p,i._coordsList.push(p),p.addAxis(c),p.addAxis(d)})});function u(c){return function(f,d){if(R0(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 pM(c,BT(f),[0,0],f.get("type"),h),p=v.type==="category";v.onBand=p&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=a,v.index=d,a._axesList.push(v),s[c][d]=v,l[c]++}}}},t.prototype._updateScale=function(e,r){$(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(PM(i)){var a=m5(i),o=a.xAxisModel,s=a.yAxisModel;if(!R0(o,r)||!R0(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){$($T(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return $(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);qt(r,a)<0&&r.push(a),qt(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){Yb({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=m5(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+qr(s.get("gridIndex"),s.get("gridId"),0)+'" not found');if(s.getCoordSysModel()!==l.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},t.dimensions=O0,t}();function R0(t,e){return t.getCoordSysModel()===e}function b5(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)S5(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&S5(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function S5(t){return t&&t.type!=="category"&&t.type!=="time"&&RT(t)}function IM(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}function $0(t,e){$(t.x,function(r){return x5(r,e.x,e.width)}),$(t.y,function(r){return x5(r,e.y,e.height)})}function x5(t,e,r){var n=[0,r],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),IM(t,e)}var w5;function T5(t,e,r,n,i,a,o){process.env.NODE_ENV!=="production"&&bt(e==="all"||e==="axisLabel"),L5(n,i,Dr.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=sv(s,function(d){return d>0})==null;return Il(n,s,!0,!0,r),$0(i,n),l;function u(d){$(i[An[d]],function(h){if(Ko(h.model)){var v=a.ensureRecord(h.model),p=v.labelInfoList;if(p)for(var g=0;g<p.length;g++){var m=p[g],y=h.scale.normalize(es(m.label).tickValue);y=d===1?1-y:y,c(m.rect,d,y),c(m.rect,1-d,NaN)}var _=v.nameLayout;if(_){var y=Oa(v.nameLocation)?.5:NaN;c(_.rect,d,y),c(_.rect,1-d,NaN)}}})}function c(d,h,v){var p=t[An[h]]-d[An[h]],g=d[ga[h]]+d[An[h]]-(t[ga[h]]+t[An[h]]);p=f(p,1-v),g=f(g,v);var m=_5[h][0],y=_5[h][1];s[m]=je(s[m],p),s[y]=je(s[y],g)}function f(d,h){return d>0&&!Wi(h)&&h>1e-4&&(d/=h),d}}function BM(t,e,r,n,i){var a=new s5($M);return $(r,function(o){return $(o,function(s){if(Ko(s.model)){var l=!n;s.axisBuilder=NM(t,e,s.model,i,a,l)}})}),a}function L5(t,e,r,n,i,a){var o=r===Dr.determine;$(e,function(u){return $(u,function(c){Ko(c.model)&&(kM(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[An[1-u]]=t[ga[u]]<=a.refContainer[ga[u]]*.5?0:1-u===1?2:1}$(e,function(u,c){return $(u,function(f){Ko(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function RM(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():i==null||i==="auto"?n=Sa(t.get("outerBounds",!0)||Jy,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&Wt("Invalid grid["+t.componentIndex+"].outerBoundsMode.");var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":qt(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&Wt("Invalid grid["+t.componentIndex+"].outerBoundsContain."),o="all"):o=a;var s=[af(mt(t.get("outerBoundsClampWidth",!0),Bu[0]),e.width),af(mt(t.get("outerBoundsClampHeight",!0),Bu[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var $M=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";l5(t,e,r,n,i,a),Oa(t.nameLocation)||$(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&c5(s.labelInfoList,s.dirVec,n,i)})};function VM(t){var e=M5(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=FM(r);a==null&&(i.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]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function M5(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[HM(t)]}function zM(t){var e=M5(t);return e&&e.axisPointerModel}function FM(t){return!!t.get(["handle","show"])}function HM(t){return t.type+"||"+t.id}var V0={},GM=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&VM(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=zM(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&V0[r])throw new Error("axisPointer "+r+" exists");V0[r]=n},e.getAxisPointerClass=function(r){return r&&V0[r]},e.type="axis",e}(on),z0=ae();function WM(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=z0(t).splitAreaColors,d=Pt(),h=0;if(f)for(var v=0;v<u.length;v++){var p=f.get(u[v].tickValue);if(p!=null){h=(p+(c-1)*v)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=gt(s)?s:[s];for(var v=1;v<u.length;v++){var y=i.toGlobalCoord(u[v].coord),_=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(_=g,b=l.y,x=y-_,S=l.height,g=_+x):(_=l.x,b=g,x=l.width,S=y-b,g=b+S);var w=u[v-1].tickValue;w!=null&&d.set(w,h),e.add(new ue({anid:w!=null?"area_"+w:null,shape:{x:_,y:b,width:x,height:S},style:It({fill:s[h]},m),autoBatch:!0,silent:!0})),h=(h+1)%c}z0(t).splitAreaColors=d}}}function XM(t){z0(t).splitAreaColors=null}var YM=["splitArea","splitLine","minorSplitLine","breakArea"],C5=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new le,this.group.add(this._axisGroup),!!Ko(r)){this._axisGroup.add(r.axis.axisBuilder.group),$(YM,function(l){r.get([l,"show"])&&UM[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||q1(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){XM(this)},e.type="cartesianAxis",e}(GM),UM={splitLine:function(t,e,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=gt(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=a.isHorizontal(),h=0,v=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],m=s.getLineStyle(),y=0;y<v.length;y++){var _=a.toGlobalCoord(v[y].coord);if(!(y===0&&!u||y===v.length-1&&!c)){var b=v[y].tickValue;d?(p[0]=_,p[1]=f.y,g[0]=_,g[1]=f.y+f.height):(p[0]=f.x,p[1]=_,g[0]=f.x+f.width,g[1]=_);var x=h++%l.length,S=new Dn({anid:b!=null?"line_"+b:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:It({stroke:l[x]},m),silent:!0});Lo(S.shape,m.lineWidth),e.add(S)}}}},minorSplitLine:function(t,e,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],d=[],h=s.getLineStyle(),v=0;v<c.length;v++)for(var p=0;p<c[v].length;p++){var g=a.toGlobalCoord(c[v][p].coord);u?(f[0]=g,f[1]=l.y,d[0]=g,d[1]=l.y+l.height):(f[0]=l.x,f[1]=g,d[0]=l.x+l.width,d[1]=g);var m=new Dn({anid:"minor_line_"+c[v][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0});Lo(m.shape,h.lineWidth),e.add(m)}},splitArea:function(t,e,r,n,i){WM(t,e,r,n)},breakArea:function(t,e,r,n,i){r.axis.scale}},E5=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(C5),ZM=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=E5.type,r}return e.type="yAxis",e}(C5),qM=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new ue({shape:r.coordinateSystem.getRect(),style:It({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(on),D5={offset:0};function jM(t){t.registerComponentView(qM),t.registerComponentModel(sM),t.registerCoordinateSystem("cartesian2d",OM),n5(t,"x",N0,D5),n5(t,"y",N0,D5),t.registerComponentView(E5),t.registerComponentView(ZM),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function QM(t){Pi(jM),t.registerSeriesModel(rM),t.registerChartView(oM),t.registerLayout(C0("scatter"))}function KM(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();$(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=A5(c)?c:P5(i)})}),r.each(function(o){var s=sv(n[o],function(l){return A5(l)})||P5(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function A5(t){return!isNaN(t[0])&&!isNaN(t[1])}function P5(t){return[t.cx,t.cy]}function JM(t){var e=t.polar;if(e){gt(e)||(e=[e]);var r=[];$(e,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),t.radar=t.radar||[],gt(t.radar)||(t.radar=[t.radar]),t.radar.push(n)):r.push(n)}),t.polar=r}$(t.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var tC=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(d,h){var v=d.getItemVisual(h,"symbol")||"circle";if(v!=="none"){var p=A2(d.getItemVisual(h,"symbolSize")),g=On(v,-1,-1,2,2),m=d.getItemVisual(h,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:m*Math.PI/180||0}),g}}function c(d,h,v,p,g,m){v.removeAll();for(var y=0;y<h.length-1;y++){var _=u(p,g);_&&(_.__dimIdx=y,d[y]?(_.setPosition(d[y]),cb[m?"initProps":"updateProps"](_,{x:h[y][0],y:h[y][1]},r,g)):_.setPosition(h[y]),v.add(_))}}function f(d){return dt(d,function(h){return[a.cx,a.cy]})}s.diff(l).add(function(d){var h=s.getItemLayout(d);if(h){var v=new So,p=new yi,g={shape:{points:h}};v.shape.points=f(h),p.shape.points=f(h),Ge(v,g,r,d),Ge(p,g,r,d);var m=new le,y=new le;m.add(p),m.add(v),m.add(y),c(p.shape.points,h,y,s,d,!0),s.setItemGraphicEl(d,m)}}).update(function(d,h){var v=l.getItemGraphicEl(h),p=v.childAt(0),g=v.childAt(1),m=v.childAt(2),y={shape:{points:s.getItemLayout(d)}};y.shape.points&&(c(p.shape.points,y.shape.points,m,s,d,!1),To(g),To(p),De(p,y,r),De(g,y,r),s.setItemGraphicEl(d,v))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,h){var v=s.getItemModel(h),p=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y=s.getItemVisual(h,"style"),_=y.fill;o.add(d),p.useStyle(It(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),ha(p,v,"lineStyle"),ha(g,v,"areaStyle");var b=v.getModel("areaStyle"),x=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=x,$(["emphasis","select","blur"],function(w){var T=v.getModel([w,"areaStyle"]),L=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(w).ignore=L&&x;var C=v.getModel([w,"lineStyle"]).getLineStyle();p.ensureState(w).style=C;var M=T.getAreaStyle();g.ensureState(w).style=M;var A=v.getModel([w,"itemStyle"]).getItemStyle();m.eachChild(function(E){E.ensureState(w).style=Ot(A)})}),g.useStyle(It(v.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var S=v.getModel("emphasis");m.eachChild(function(w){if(w instanceof Tr){var T=w.style;w.useStyle(rt({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},y))}else w.useStyle(y),w.setColor(_),w.style.strokeNoScale=!0;var L=s.getStore().get(s.getDimensionIndex(w.__dimIdx),h);(L==null||isNaN(L))&&(L=""),ma(w,ya(v),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:w.__dimIdx,defaultText:L,inheritColor:_,defaultOpacity:y.opacity})}),fa(d,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(We),eC=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new jy(re(this.getData,this),re(this.getRawData,this))},e.prototype.getInitialData=function(r,n){return qy(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=h2(this,r);return zo("section",{header:u,sortBlocks:!0,blocks:dt(s,function(f){var d=a.get(a.mapDimension(f.dim),r);return zo("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(dt(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[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}(tr),is=e5.value;function $u(t,e){return It({show:e},t)}var rC=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=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=dt(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 p=l;v.color!=null&&(p=It({color:v.color},l));var g=Zt(Ot(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:d},!1);if(xt(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else Lt(c)&&(g.name=c(g.name,g));var y=new de(g,null,this.ecModel);return br(y,qm.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},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:Ct.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Zt({lineStyle:{color:Ct.color.neutral20}},is.axisLine),axisLabel:$u(is.axisLabel,!1),axisTick:$u(is.axisTick,!1),splitLine:$u(is.splitLine,!0),splitArea:$u(is.splitArea,!0),indicator:[]},e}(Xt),nC=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=dt(a,function(s){var l=s.model.get("showName")?s.name:"",u=new p5(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});$(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.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=gt(d)?d:[d],p=gt(h)?h:[h],g=[],m=[];function y(B,k,N){var z=N%k.length;return B[z]=B[z]||[],z}if(a==="circle")for(var _=i[0].getTicksCoords(),b=n.cx,x=n.cy,S=0;S<_.length;S++){if(c){var w=y(g,v,S);g[w].push(new yo({shape:{cx:b,cy:x,r:_[S].coord}}))}if(f&&S<_.length-1){var w=y(m,p,S);m[w].push(new Dl({shape:{cx:b,cy:x,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,L=dt(i,function(B,k){var N=B.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),dt(N,function(z){return n.coordToPoint(z.coord,k)})}),C=[],S=0;S<=T;S++){for(var M=[],A=0;A<i.length;A++)M.push(L[A][S]);if(M[0]?M.push(M[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+S),c){var w=y(g,v,S);g[w].push(new yi({shape:{points:M}}))}if(f&&C){var w=y(m,p,S-1);m[w].push(new So({shape:{points:M.concat(C)}}))}C=M.slice().reverse()}var E=l.getLineStyle(),P=u.getAreaStyle();$(m,function(B,k){this.group.add(jf(B,{style:It({stroke:"none",fill:p[k%p.length]},P),silent:!0}))},this),$(g,function(B,k){this.group.add(jf(B,{style:It({fill:"none",stroke:v[k%v.length]},E),silent:!0}))},this)},e.type="radar",e}(on),iC=function(t){st(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return e}(ay),aC=function(){function t(e,r,n){this.dimensions=[],this._model=e,this._indicatorAxes=dt(e.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new iC(o,new $n);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(e,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(e),r)},t.prototype.coordToPoint=function(e,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[a,o]},t.prototype.pointToData=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},t.prototype.resize=function(e,r){var n=Ql(e,r).refContainer,i=e.get("center"),a=Math.min(n.width,n.height)/2;this.cx=Kt(i[0],n.width)+n.x,this.cy=Kt(i[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(xt(o)||jt(o))&&(o=[0,o]),this.r0=Kt(o[0],a),this.r=Kt(o[1],a),$(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)},t.prototype.update=function(e,r){var n=this._indicatorAxes,i=this._model;$(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"))!==i)){var u=s.getData();$(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new $n;o.setExtent(0,a),o.setInterval(1),$(n,function(s,l){y5(s.scale,s.model,o)})},t.prototype.convertToPixel=function(e,r,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(e,r,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},t.create=function(e,r){var n=[];return e.eachComponent("radar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},t.dimensions=[],t}();function oC(t){t.registerCoordinateSystem("radar",aC),t.registerComponentModel(rC),t.registerComponentView(nC),t.registerVisual({seriesType:"radar",reset:function(e){var r=e.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function sC(t){Pi(oC),t.registerChartView(tC),t.registerSeriesModel(eC),t.registerLayout(KM),t.registerProcessor(Wy("radar")),t.registerPreprocessor(JM)}function lC(t,e){var r=wg(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new ue({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var uC=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},F0=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),gt(n)&&$(n,function(a,o){xt(a)&&(a={type:a}),n[o]=Zt(a,uC(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&uf(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Pt(),s=dt(a,function(l){return(xt(l)||jt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new de(l,this,this.ecModel))},this);this._data=fe(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;$(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;$(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;$(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&qt(this._availableNames,r)>=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:Ct.size.m,align:"auto",backgroundColor:Ct.color.transparent,borderColor:Ct.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:Ct.color.disabled,inactiveBorderColor:Ct.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:Ct.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:Ct.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:Ct.color.tertiary,borderWidth:1,borderColor:Ct.color.border},emphasis:{selectorLabel:{show:!0,color:Ct.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Xt),Ia=Ue,H0=$,Vu=le,N5=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Vu),this.group.add(this._selectorGroup=new Vu),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=Ql(r,i).refContainer,f=r.getBoxLayoutParams(),d=r.get("padding"),h=Sa(f,c,d),v=this.layoutInner(r,o,h,a,l,u),p=Sa(It({width:v.width,height:v.height},f),c,d);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=lC(v,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Pt(),f=n.get("selectedMode"),d=n.get("triggerEvent"),h=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),H0(n.getData(),function(v,p){var g=this,m=v.get("name");if(!this.newlineDisabled&&(m===""||m===`
|
|
38
|
+
`)){var y=new Vu;y.newline=!0,u.add(y);return}var _=i.getSeriesByName(m)[0];if(!c.get(m)){if(_){var b=_.getData(),x=b.getVisual("legendLineStyle")||{},S=b.getVisual("legendIcon"),w=b.getVisual("style"),T=this._createItem(_,m,p,v,n,r,x,w,S,f,a);T.on("click",Ia(k5,m,null,a,h)).on("mouseover",Ia(G0,_.name,null,a,h)).on("mouseout",Ia(W0,_.name,null,a,h)),i.ssr&&T.eachChild(function(L){var C=Jt(L);C.seriesIndex=_.seriesIndex,C.dataIndex=p,C.ssrType="legend"}),d&&T.eachChild(function(L){g.packEventData(L,n,_,p,m)}),c.set(m,!0)}else i.eachRawSeries(function(L){var C=this;if(!c.get(m)&&L.legendVisualProvider){var M=L.legendVisualProvider;if(!M.containName(m))return;var A=M.indexOfName(m),E=M.getItemVisual(A,"style"),P=M.getItemVisual(A,"legendIcon"),B=xr(E.fill);B&&B[3]===0&&(B[3]=.2,E=rt(rt({},E),{fill:to(B,"rgba")}));var k=this._createItem(L,m,p,v,n,r,{},E,P,f,a);k.on("click",Ia(k5,null,m,a,h)).on("mouseover",Ia(G0,null,m,a,h)).on("mouseout",Ia(W0,null,m,a,h)),i.ssr&&k.eachChild(function(N){var z=Jt(N);z.seriesIndex=L.seriesIndex,z.dataIndex=p,z.ssrType="legend"}),d&&k.eachChild(function(N){C.packEventData(N,n,L,p,m)}),c.set(m,!0)}},this);process.env.NODE_ENV!=="production"&&(c.get(m)||console.warn(m+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Jt(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();H0(r,function(u){var c=u.type,f=new Ke({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);ma(f,{normal:d,emphasis:h},{defaultText:u.title}),Vf(f)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,d){var h=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=cC(c,a,l,u,h,g,d),x=new Vu,S=a.getModel("textStyle");if(Lt(r.getLegendIcon)&&(!_||_==="inherit"))x.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;x.add(fC({itemWidth:v,itemHeight:p,icon:c,iconRotate:w,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?v+5:-5,L=s,C=o.get("formatter"),M=n;xt(C)&&C?M=C.replace("{name}",n??""):Lt(C)&&(M=C(n));var A=g?S.getTextColor():a.get("inactiveColor");x.add(new Ke({style:Co(S,{text:M,x:T,y:p/2,fill:A,align:L,verticalAlign:"middle"},{inheritColor:A})}));var E=new ue({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&Bl({el:E,componentModel:o,itemName:n,itemTooltipOption:P.option}),x.add(E),x.eachChild(function(B){B.silent=!0}),E.silent=!f,this.getContentGroup().add(x),Vf(x),x.__legendDataIndex=i,x},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ao(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ao("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?h[p]+=c[g]+v:f[p]+=d[g]+v,h[1-p]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+v+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+h[1-p]),_}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}(on);function cC(t,e,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),H0(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Fh(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=e.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var v=e.get("inactiveBorderWidth"),p=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&p?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 fC(t){var e=t.icon||"roundRect",r=On(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=Ct.color.neutral00,r.style.lineWidth=2),r}function k5(t,e,r,n){W0(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),G0(t,e,r,n)}function O5(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;n<i&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function G0(t,e,r,n){O5(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function W0(t,e,r,n){O5(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function hC(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function as(t,e,r){var n=t==="allSelect"||t==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:e},function(s){n?s[t]():s[t](e.name),I5(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){$(i,function(l,u){s[l?"select":"unSelect"](u)}),I5(s,o)}),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function I5(t,e){var r=e||{};return $(t.getData(),function(n){var i=n.get("name");if(!(i===`
|
|
39
|
+
`||i==="")){var a=t.isSelected(i);Nr(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function dC(t){t.registerAction("legendToggleSelect","legendselectchanged",Ue(as,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",Ue(as,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",Ue(as,"inverseSelect")),t.registerAction("legendSelect","legendselected",Ue(as,"select")),t.registerAction("legendUnSelect","legendunselected",Ue(as,"unSelect"))}function B5(t){t.registerComponentModel(F0),t.registerComponentView(N5),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,hC),t.registerSubTypeDefaulter("legend",function(){return"plain"}),dC(t)}var vC=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,i){var a=ko(r);t.prototype.init.call(this,r,n,i),R5(this,r,a)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),R5(this,this.option,r)},e.type="legend.scroll",e.defaultOption=cg(F0.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:Ct.color.accent50,pageIconInactiveColor:Ct.color.accent10,pageIconSize:15,pageTextStyle:{color:Ct.color.tertiary},animationDurationUpdate:800}),e}(F0);function R5(t,e,r){var n=t.getOrient(),i=[1,1];i[n.index]=0,Nn(e,r,{type:"box",ignoreSize:!!i})}var $5=le,X0=["width","height"],Y0=["x","y"],pC=function(t){st(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new $5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new $5)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;t.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=gt(f)?f:[f,f];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new Ke({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(p,g){var m=p+"DataIndex",y=j1(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:re(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=p,c.add(y)}},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=X0[u],f=Y0[u],d=X0[1-u],h=Y0[1-u];o&&Ao("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=Ot(i);o&&(m[c]=i[c]-p[c]-v);var y=this._layoutContentAndController(r,a,m,u,c,d,h,f);if(o){if(s==="end")g[u]+=y[c]+v;else{var _=p[c]+v;g[u]-=_,y[f]-=_}y[c]+=p[c]+v,g[1-u]+=y[h]+y[d]/2-p[d]/2,y[d]=Math.max(y[d],p[d]),y[h]=Math.min(y[h],p[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;Ao(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),Ao("horizontal",d,r.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),v=d.getBoundingRect(),p=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-v.x,-v.y],_=mt(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=h[s]/2-v[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var x={x:0,y:0};if(x[o]=p?i[o]:h[o],x[s]=Math.max(h[s],v[s]),x[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var S={x:0,y:0};S[o]=Math.max(i[o]-v[o]-_,0),S[s]=x[s],f.setClipPath(new ue({shape:S})),f.__rectSize=S[o]}else d.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(r);return w.pageIndex!=null&&De(c,{x:w.contentPosition[0],y:w.contentPosition[1]},p?r:null),this._updatePageInfoView(r,w),x},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;$(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",xt(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=X0[o],l=Y0[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var p=b(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!x(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!x(y,_.s))&&m.i<y.i&&(y=m,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=m.i),++v.pageCount,++v.pageIndex),m=_;return v;function b(S){if(S){var w=S.getBoundingRect(),T=w[l]+S[l];return{s:T,e:T+w[s],i:S.__legendDataIndex}}}function x(S,w){return S.e>=w&&S.s<=w+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(N5);function gC(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function mC(t){Pi(B5),t.registerComponentModel(vC),t.registerComponentView(pC),gC(t)}function yC(t){Pi(B5),Pi(mC)}var U0=Math.sin,Z0=Math.cos,V5=Math.PI,Oi=Math.PI*2,_C=180/V5,z5=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),d=xn(f-Oi)||(c?u>=Oi:-u>=Oi),h=u>0?u%Oi:u%Oi+Oi,v=!1;d?v=!0:xn(f)?v=!1:v=h>=V5==!!c;var p=e+n*Z0(o),g=r+i*U0(o);this._start&&this._add("M",p,g);var m=Math.round(a*_C);if(d){var y=1/this._p,_=(c?1:-1)*(Oi-y);this._add("A",n,i,m,1,+c,e+n*Z0(o+_),r+i*U0(o+_)),y>.01&&this._add("A",n,i,m,0,+c,p,g)}else{var b=e+n*Z0(s),x=r+i*U0(s);this._add("A",n,i,m,+v,+c,b,x)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,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"},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),q0="none",bC=Math.round;function SC(t){var e=t.fill;return e!=null&&e!==q0}function xC(t){var e=t.stroke;return e!=null&&e!==q0}var j0=["lineCap","miterLimit","lineJoin"],wC=dt(j0,function(t){return"stroke-"+t.toLowerCase()});function TC(t,e,r,n){var i=e.opacity==null?1:e.opacity;if(r instanceof Tr){t("opacity",i);return}if(SC(e)){var a=eo(e.fill);t("fill",a.color);var o=e.fillOpacity!=null?e.fillOpacity*a.opacity*i:a.opacity*i;o<1&&t("fill-opacity",o)}else t("fill",q0);if(xC(e)){var s=eo(e.stroke);t("stroke",s.color);var l=e.strokeNoScale?r.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,f=e.strokeFirst;if(u!==1&&t("stroke-width",u),f&&t("paint-order",f?"stroke":"fill"),c<1&&t("stroke-opacity",c),e.lineDash){var d=$h(r),h=d[0],v=d[1];h&&(v=bC(v||0),t("stroke-dasharray",h.join(",")),(v||n)&&t("stroke-dashoffset",v))}for(var p=0;p<j0.length;p++){var g=j0[p];if(e[g]!==gl[g]){var m=e[g]||gl[g];m&&t(wC[p],m)}}}}var F5="http://www.w3.org/2000/svg",H5="http://www.w3.org/1999/xlink",LC="http://www.w3.org/2000/xmlns/",MC="http://www.w3.org/XML/1998/namespace",G5="ecmeta_";function W5(t){return document.createElementNS(F5,t)}function ve(t,e,r,n,i){return{tag:t,attrs:r||{},children:n,text:i,key:e}}function CC(t,e){var r=[];if(e)for(var n in e){var i=e[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+t+" "+r.join(" ")+">"}function EC(t){return"</"+t+">"}function Q0(t,e){e=e||{};var r=e.newline?`
|
|
40
|
+
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return CC(o,s)+(o!=="style"?d7(l):l||"")+(a?""+r+dt(a,function(u){return n(u)}).join(r)+r:"")+EC(o)}return n(t)}function DC(t,e,r){r=r||{};var n=r.newline?`
|
|
41
|
+
`:"",i=" {"+n,a=n+"}",o=dt(Bt(t),function(l){return l+i+dt(Bt(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=dt(Bt(e),function(l){return"@keyframes "+l+i+dt(Bt(e[l]),function(u){return u+i+dt(Bt(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function K0(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function X5(t,e,r,n){return ve("svg","root",{width:t,height:e,xmlns:F5,"xmlns:xlink":H5,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var AC=0;function Y5(){return AC++}var U5={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"},Ii="transform-origin";function PC(t,e,r){var n=rt({},t.shape);rt(n,e),t.buildPath(r,n);var i=new z5;return i.reset(qv(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function NC(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[Ii]=r+"px "+n+"px")}var kC={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Z5(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function OC(t,e,r){var n=t.shape.paths,i={},a,o;if($(n,function(l){var u=K0(r.zrId);u.animation=!0,zu(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,d=Bt(c),h=d.length;if(h){o=d[h-1];var v=c[o];for(var p in v){var g=v[p];i[p]=i[p]||{d:""},i[p].d+=g.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=Z5(i,r);return a.replace(o,s)}}function q5(t){return xt(t)?U5[t]?"cubic-bezier("+U5[t]+")":Tc(t)?t:"":""}function zu(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof V1){var s=OC(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],d=q5(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 p(y){var _=y[1],b=_.length,x={},S={},w={},T="animation-timing-function";function L(U,Y,tt){for(var j=U.getTracks(),nt=U.getMaxTime(),it=0;it<j.length;it++){var at=j[it];if(at.needsAnimate()){var Et=at.keyframes,Q=at.propName;if(tt&&(Q=tt(Q)),Q)for(var K=0;K<Et.length;K++){var _t=Et[K],pt=Math.round(_t.time/nt*100)+"%",yt=q5(_t.easing),W=_t.rawValue;(xt(W)||jt(W))&&(Y[pt]=Y[pt]||{},Y[pt][Q]=_t.rawValue,yt&&(Y[pt][T]=yt))}}}}for(var C=0;C<b;C++){var M=_[C],A=M.targetName;A?A==="shape"&&L(M,S):!n&&L(M,x)}for(var E in x){var P={};tl(P,t),rt(P,x[E]);var B=jv(P),k=x[E][T];w[E]=B?{transform:B}:{},NC(w[E],P),k&&(w[E][T]=k)}var N,z=!0;for(var E in S){w[E]=w[E]||{};var R=!N,k=S[E][T];R&&(N=new Mn);var V=N.len();N.reset(),w[E].d=PC(t,S[E],N);var I=N.len();if(!R&&V!==I){z=!1;break}k&&(w[E][T]=k)}if(!z)for(var E in w)delete w[E].d;if(!n)for(var C=0;C<b;C++){var M=_[C],A=M.targetName;A==="style"&&L(M,w,function(j){return kC[j]})}for(var H=Bt(w),G=!0,X,C=1;C<H.length;C++){var J=H[C-1],ct=H[C];if(w[J][Ii]!==w[ct][Ii]){G=!1;break}X=w[J][Ii]}if(G&&X){for(var E in w)w[E][Ii]&&delete w[E][Ii];e[Ii]=X}if(fe(H,function(U){return Bt(w[U]).length>0}).length){var vt=Z5(w,r);return vt+" "+y[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var m=r.zrId+"-cls-"+Y5();r.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function IC(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};j5(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=Pc(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),j5(n,e,r)}}function j5(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+Y5(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var os=Math.round;function Q5(t){return t&&xt(t.src)}function K5(t){return t&&Lt(t.toDataURL)}function J0(t,e,r,n){TC(function(i,a){var o=i==="fill"||i==="stroke";o&&Zv(a)?i4(e,t,i,n):o&&kc(a)?a4(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),HC(r,t,n)}function td(t,e){var r=L6(e);r&&(r.each(function(n,i){n!=null&&(t[(G5+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[G5+"silent"]="true"))}function J5(t){return xn(t[0]-1)&&xn(t[1])&&xn(t[2])&&xn(t[3]-1)}function BC(t){return xn(t[4])&&xn(t[5])}function ed(t,e,r){if(e&&!(BC(e)&&J5(e))){var n=1e4;t.transform=J5(e)?"translate("+os(e[4]*n)/n+" "+os(e[5]*n)/n+")":X7(e)}}function t4(t,e,r){for(var n=t.points,i=[],a=0;a<n.length;a++)i.push(os(n[a][0]*r)/r),i.push(os(n[a][1]*r)/r);e.points=i.join(" ")}function e4(t){return!t.smooth}function RC(t){var e=dt(t,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<e.length;a++){var o=e[a],s=r[o[0]];s!=null&&(n[o[1]]=os(s*i)/i)}}}var $C={circle:[RC(["cx","cy","r"])],polyline:[t4,e4],polygon:[t4,e4]};function VC(t){for(var e=t.animators,r=0;r<e.length;r++)if(e[r].targetName==="shape")return!0;return!1}function r4(t,e){var r=t.style,n=t.shape,i=$C[t.type],a={},o=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&qv(t)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&VC(t))&&!(l<1)){s=t.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!t.path||t.shapeChanged();t.path||t.createPathProxy();var d=t.path;f&&(d.beginPath(),t.buildPath(d,t.shape),t.pathUpdated());var h=d.getVersion(),v=t,p=v.__svgPathBuilder;(v.__svgPathVersion!==h||!p||l!==v.__svgPathStrokePercent)&&(p||(p=v.__svgPathBuilder=new z5),p.reset(u),d.rebuildPath(p,l),p.generateStr(),v.__svgPathVersion=h,v.__svgPathStrokePercent=l),a.d=p.getStr()}return ed(a,t.transform),J0(a,r,t,e),td(a,t),e.animation&&zu(t,a,e),e.emphasis&&IC(t,a,e),ve(s,t.id+"",a)}function zC(t,e){var r=t.style,n=r.image;if(n&&!xt(n)&&(Q5(n)?n=n.src:K5(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),ed(l,t.transform),J0(l,r,t,e),td(l,t),e.animation&&zu(t,l,e),ve("image",t.id+"",l)}}function FC(t,e){var r=t.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||Zr,a=r.x||0,o=U7(r.y||0,ao(i),r.textBaseline),s=Y7[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(n1(r)){var u="",c=r.fontStyle,f=e1(r.fontSize);if(!parseFloat(f))return;var d=r.fontFamily||rv,h=r.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: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),ed(l,t.transform),J0(l,r,t,e),td(l,t),e.animation&&zu(t,l,e),ve("text",t.id+"",l,void 0,n)}}function n4(t,e){if(t instanceof Vt)return r4(t,e);if(t instanceof Tr)return zC(t,e);if(t instanceof go)return FC(t,e)}function HC(t,e,r){var n=t.style;if(Z7(n)){var i=q7(t),a=r.shadowCache,o=a[i];if(!o){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,h=eo(n.shadowColor),v=h.opacity,p=h.color,g=d/2/l,m=d/2/u,y=g+" "+m;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=ve("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ve("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":p,"flood-opacity":v})]),a[i]=o}e.filter=Ys(o)}}function i4(t,e,r,n){var i=t[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(Yv(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(Uv(i))a="radialGradient",o.cx=mt(i.x,.5),o.cy=mt(i.y,.5),o.r=mt(i.r,.5);else{process.env.NODE_ENV!=="production"&&Gi("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=Nc(s[u].offset)*100+"%",d=s[u].color,h=eo(d),v=h.color,p=h.opacity,g={offset:f};g["stop-color"]=v,p<1&&(g["stop-opacity"]=p),l.push(ve("stop",u+"",g))}var m=ve(a,"",o,l),y=Q0(m),_=n.gradientCache,b=_[y];b||(b=n.zrId+"-g"+n.gradientIdx++,_[y]=b,o.id=b,n.defs[b]=ve(a,b,o,l)),e[r]=Ys(b)}function a4(t,e,r,n){var i=t.style[r],a=t.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(Xv(i)){var d=i.imageWidth,h=i.imageHeight,v=void 0,p=i.image;if(xt(p)?v=p:Q5(p)?v=p.src:K5(p)&&(v=p.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";bt(d,g),bt(h,g)}else if(d==null||h==null){var m=function(C,M){if(C){var A=C.elm,E=d||M.width,P=h||M.height;C.tag==="pattern"&&(u?(P=1,E/=a.width):c&&(E=1,P/=a.height)),C.attrs.width=E,C.attrs.height=P,A&&(A.setAttribute("width",E),A.setAttribute("height",P))}},y=df(v,null,t,function(C){l||m(S,C),m(f,C)});y&&y.width&&y.height&&(d=d||y.width,h=h||y.height)}f=ve("image","img",{href:v,width:d,height:h}),o.width=d,o.height=h}else i.svgElement&&(f=Ot(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var _,b;l?_=b=1:u?(b=1,_=o.width/a.width):c?(_=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),b!=null&&!isNaN(b)&&(o.height=b);var x=jv(i);x&&(o.patternTransform=x);var S=ve("pattern","",o,[f]),w=Q0(S),T=n.patternCache,L=T[w];L||(L=n.zrId+"-p"+n.patternIdx++,T[w]=L,o.id=L,S=n.defs[L]=ve("pattern",L,o,[f])),e[r]=Ys(L)}}function GC(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=ve("clipPath",a,o,[r4(t,r)])}e["clip-path"]=Ys(a)}function o4(t){return document.createTextNode(t)}function Bi(t,e,r){t.insertBefore(e,r)}function s4(t,e){t.removeChild(e)}function l4(t,e){t.appendChild(e)}function u4(t){return t.parentNode}function c4(t){return t.nextSibling}function rd(t,e){t.textContent=e}var f4=58,WC=120,XC=ve("","");function nd(t){return t===void 0}function Ur(t){return t!==void 0}function YC(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(process.env.NODE_ENV!=="production"&&n[a]!=null&&console.error("Duplicate key "+a),n[a]=i)}return n}function ss(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function ls(t){var e,r=t.children,n=t.tag;if(Ur(n)){var i=t.elm=W5(n);if(id(XC,t),gt(r))for(e=0;e<r.length;++e){var a=r[e];a!=null&&l4(i,ls(a))}else Ur(t.text)&&!wt(t.text)&&l4(i,o4(t.text))}else t.elm=o4(t.text);return t.elm}function h4(t,e,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&Bi(t,ls(a),e)}}function Fu(t,e,r,n){for(;r<=n;++r){var i=e[r];if(i!=null)if(Ur(i.tag)){var a=u4(i.elm);s4(a,i.elm)}else s4(t,i.elm)}}function id(t,e){var r,n=e.elm,i=t&&t.attrs||{},a=e.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==WC?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(LC,r,o):r.charCodeAt(3)===f4?n.setAttributeNS(MC,r,o):r.charCodeAt(5)===f4?n.setAttributeNS(H5,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function UC(t,e,r){for(var n=0,i=0,a=e.length-1,o=e[0],s=e[a],l=r.length-1,u=r[0],c=r[l],f,d,h,v;n<=a&&i<=l;)o==null?o=e[++n]:s==null?s=e[--a]:u==null?u=r[++i]:c==null?c=r[--l]:ss(o,u)?(Ba(o,u),o=e[++n],u=r[++i]):ss(s,c)?(Ba(s,c),s=e[--a],c=r[--l]):ss(o,c)?(Ba(o,c),Bi(t,o.elm,c4(s.elm)),o=e[++n],c=r[--l]):ss(s,u)?(Ba(s,u),Bi(t,s.elm,o.elm),s=e[--a],u=r[++i]):(nd(f)&&(f=YC(e,n,a)),d=f[u.key],nd(d)?Bi(t,ls(u),o.elm):(h=e[d],h.tag!==u.tag?Bi(t,ls(u),o.elm):(Ba(h,u),e[d]=void 0,Bi(t,h.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(v=r[l+1]==null?null:r[l+1].elm,h4(t,v,r,i,l)):Fu(t,e,n,a))}function Ba(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(id(t,e),nd(e.text)?Ur(n)&&Ur(i)?n!==i&&UC(r,n,i):Ur(i)?(Ur(t.text)&&rd(r,""),h4(r,null,i,0,i.length-1)):Ur(n)?Fu(r,n,0,n.length-1):Ur(t.text)&&rd(r,""):t.text!==e.text&&(Ur(n)&&Fu(r,n,0,n.length-1),rd(r,e.text)))}function ZC(t,e){if(ss(t,e))Ba(t,e);else{var r=t.elm,n=u4(r);ls(e),n!==null&&(Bi(n,e.elm,c4(r)),Fu(n,[t],0,0))}return e}var qC=0,jC=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=d4("refreshHover"),this.configLayer=d4("configLayer"),this.storage=r,this._opts=n=rt({},n),this.root=e,this._id="zr"+qC++,this._oldVNode=X5(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=W5("svg");id(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",ZC(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return n4(e,K0(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=K0(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=QC(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=ve("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=dt(Bt(a.defs),function(d){return a.defs[d]});if(u.length&&o.push(ve("defs","defs",{},u)),e.animation){var c=DC(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=ve("style","stl",{},[],c);o.push(f)}}return X5(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},Q0(this.renderToVNode({animation:mt(e.cssAnimation,!0),emphasis:mt(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:mt(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=e[c];if(!f.invisible){var d=f.__clipPaths,h=d&&d.length||0,v=l&&l.length||0,p=void 0;for(p=Math.max(h-1,v-1);p>=0&&!(d&&l&&d[p]===l[p]);p--);for(var g=v-1;g>p;g--)o--,s=a[o-1];for(var m=p+1;m<h;m++){var y={};GC(d[m],y,r);var _=ve("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=d;var b=n4(f,r);b&&(s?s.children:n).push(b)}}},t.prototype.resize=function(e,r){var n=this._opts,i=this.root,a=this._viewport;if(e!=null&&(n.width=e),r!=null&&(n.height=r),i&&a&&(a.style.display="none",e=k2(i,0,n),r=k2(i,1,n),a.style.display=""),this._width!==e||this._height!==r){if(this._width=e,this._height=r,a){var o=a.style;o.width=e+"px",o.height=r+"px"}if(kc(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",r))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(e){var r=this.renderToString(),n="data:image/svg+xml;";return e?(r=Q7(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},t}();function d4(t){return function(){process.env.NODE_ENV!=="production"&&Gi('In SVG mode painter not support method "'+t+'"')}}function QC(t,e,r,n){var i;if(r&&r!=="none")if(i=ve("rect","bg",{width:t,height:e,x:"0",y:"0"}),Zv(r))i4({fill:r},i.attrs,"fill",n);else if(kc(r))a4({style:{fill:r},dirty:Ze,getBoundingRect:function(){return{width:t,height:e}}},i.attrs,"fill",n);else{var a=eo(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function KC(t){t.registerPainter("svg",jC)}const JC=({type:t,data:e,themeColors:r,textColor:n,lineColor:i,lineSmooth:a,stack:o})=>{const s=n?{color:n}:{},l=n?{lineStyle:{color:n}}:void 0,u=n?{color:n}:void 0,c=i?{lineStyle:{color:i}}:{},f=e.series.length>1?{top:"bottom",textStyle:s}:void 0;if(t==="bar")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",data:e.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[2,2,0,0]}};return o&&(v.stack="A"),v})};if(t==="column")return{color:r,textStyle:s,legend:f,yAxis:{type:"category",data:e.labels,axisLine:l,axisLabel:u},xAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[0,2,2,0]}};return o&&(v.stack="A"),v})};if(t==="line")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",data:e.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"line",smooth:a,label:{show:!0}};return o&&(v.stack="A"),v})};if(t==="pie")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:e.series[0].map((d,h)=>({value:d,name:e.labels[h]})),label:n?{color:n}:{},type:"pie",radius:"70%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(t==="ring")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:e.series[0].map((d,h)=>({value:d,name:e.labels[h]})),label:n?{color:n}:{},type:"pie",radius:["40%","70%"],padAngle:1,avoidLabelOverlap:!1,itemStyle:{borderRadius:4},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(t==="area")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",boundaryGap:!1,data:e.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:e.series.map((d,h)=>{const v={data:d,name:e.legends[h],type:"line",areaStyle:{},label:{show:!0}};return o&&(v.stack="A"),v})};if(t==="radar")return{color:r,textStyle:s,legend:f,radar:{indicator:e.labels.map(d=>({name:d})),splitLine:c,axisLine:i?{lineStyle:{color:i}}:void 0},series:[{data:e.series.map((d,h)=>({value:d,name:e.legends[h]})),type:"radar"}]};if(t==="scatter"){const d=[];for(let h=0;h<e.series[0].length;h++){const v=e.series[0][h],p=e.series[1]?e.series[1][h]:v;d.push([v,p])}return{color:r,textStyle:s,xAxis:{axisLine:l,axisLabel:u,splitLine:c},yAxis:{axisLine:l,axisLabel:u,splitLine:c},series:[{symbolSize:12,data:d,type:"scatter"}]}}return null},tE={chart:"_chart_1g0qq_1"};Pi([XL,AL,eM,QM,sC,yC,KC]);const v4=({width:t,height:e,type:r,data:n,themeColors:i,textColor:a,lineColor:o,options:s})=>{const l=O.useRef(null),u=O.useRef(null),c=O.useMemo(()=>{let d=[];if(i.length>=10)d=i;else if(i.length===1)d=ms(i[0]).analogous(10).map(h=>h.toRgbString());else{const h=i.length,v=ms(i[h-1]).analogous(11-h).map(p=>p.toRgbString());d=[...i.slice(0,h-1),...v]}return d},[i]),f=O.useCallback(()=>{if(!u.current)return;const d=JC({type:r,data:n,themeColors:c,textColor:a,lineColor:o,lineSmooth:(s==null?void 0:s.lineSmooth)||!1,stack:(s==null?void 0:s.stack)||!1});d&&u.current.setOption(d,!0)},[r,n,c,a,o,s]);return O.useEffect(()=>{if(!l.current)return;u.current=Ew(l.current,null,{renderer:"svg"}),f();const d=()=>{var v;return(v=u.current)==null?void 0:v.resize()},h=new ResizeObserver(d);return h.observe(l.current),()=>{var v;h.disconnect(),(v=u.current)==null||v.dispose(),u.current=null}},[]),O.useEffect(()=>{f()},[f]),D.jsx("div",{className:tE.chart,ref:l})},ad={editableElementChart:"_editableElementChart_1i7hz_1",rotateWrapper:"_rotateWrapper_1i7hz_5",elementContent:"_elementContent_1i7hz_10"},eE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=O.useRef(null),i=o=>{o.stopPropagation(),e==null||e(o.nativeEvent,t)},a=()=>{Fi.emit(jn.OPEN_CHART_DATA_EDITOR)};return Pr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:ad.editableElementChart,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:ad.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{ref:n,className:ad.elementContent,style:{backgroundColor:t.fill},onMouseDown:i,onTouchStart:i,onDoubleClick:a,children:[D.jsx(Ms,{width:t.width,height:t.height,outline:t.outline}),D.jsx(v4,{width:t.width,height:t.height,type:t.chartType,data:t.data,themeColors:t.themeColors,textColor:t.textColor,lineColor:t.lineColor,options:t.options})]})})})},p4=t=>{if(!t)return{};const{bold:e,em:r,underline:n,strikethrough:i,color:a,backcolor:o,fontsize:s,fontname:l,align:u}=t;let c=`${n?"underline":""} ${i?"line-through":""}`;return c.trim()===""&&(c="none"),{fontWeight:e?"bold":"normal",fontStyle:r?"italic":"normal",textDecoration:c,color:a||"#000",backgroundColor:o||"",fontSize:s||"14px",fontFamily:l||"",textAlign:u||"left"}},g4=t=>t.replace(/\n/g,"</br>").replace(/ /g," "),m4=t=>({hideCells:O.useMemo(()=>{const r=[];for(let n=0;n<t.length;n++){const i=t[n];for(let a=0;a<i.length;a++){const o=i[a];if(o.colspan>1||o.rowspan>1)for(let s=n;s<n+o.rowspan;s++)for(let l=s===n?a+1:a;l<a+o.colspan;l++)r.push(`${s}_${l}`)}}return r},[t])}),y4=t=>({subThemeColor:O.useMemo(()=>t?Z4(t.color):["",""],[t])}),rE={customTextarea:"_customTextarea_15hzl_1"},nE=({value:t,className:e,style:r,onUpdateValue:n,onInsertExcelData:i})=>{const a=O.useRef(null),o=O.useRef(!1);O.useEffect(()=>{o.current||!a.current||a.current.innerHTML!==t&&(a.current.innerHTML=t)},[t]);const s=()=>{if(!a.current)return;const f=a.current.innerHTML;n(f)},l=()=>{o.current=!0},u=f=>{if(f.preventDefault(),!f.clipboardData)return;const d=f.clipboardData.items[0];d&&d.kind==="string"&&(d.type==="text/plain"?d.getAsString(h=>{if(typeof Md(h)=="object")return;const p=X4(h);if(p){i(p),a.current&&(a.current.innerHTML=p[0][0]);return}document.execCommand("insertText",!1,h)}):d.type==="text/html"&&d.getAsString(h=>{const v=Y4(h);v&&(i(v),a.current&&(a.current.innerHTML=v[0][0]))}))},c=()=>{o.current=!1};return D.jsx("div",{className:Dt(rE.customTextarea,e),style:r,ref:a,contentEditable:!0,onFocus:l,onBlur:c,onInput:s,onPaste:u,dangerouslySetInnerHTML:{__html:t}})},Ne={editableTable:"_editableTable_1ul9j_1",theme:"_theme_1ul9j_19",cell:"_cell_1ul9j_22",rowHeader:"_rowHeader_1ul9j_28",rowFooter:"_rowFooter_1ul9j_31",colHeader:"_colHeader_1ul9j_34",colFooter:"_colFooter_1ul9j_37",selected:"_selected_1ul9j_49",cellText:"_cellText_1ul9j_58",active:"_active_1ul9j_64",dragLine:"_dragLine_1ul9j_68"},iE=({data:t,width:e,cellMinHeight:r,colWidths:n,outline:i,theme:a,editable:o=!0,onChange:s,onChangeColWidths:l,onChangeSelectedCells:u,onMouseDown:c,contextmenus:f})=>{const{canvasScale:d,setSelectedTableCells:h}=St(),[v,p]=O.useState(!1),[g,m]=O.useState([]),[y,_]=O.useState([]),[b,x]=O.useState([]);O.useEffect(()=>{x(n.map(W=>W*e))},[n,e]);const S=O.useMemo(()=>b.reduce((W,F)=>W+F,0),[b]),{hideCells:w}=m4(t),{subThemeColor:T}=y4(a),L=O.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":T[0],"--subThemeColor2":T[1]}:{},[a,T]);O.useEffect(()=>{o||(m([]),_([]))},[o]);const C=O.useMemo(()=>{const W=[];for(let F=1;F<b.length+1;F++){const q=b.slice(0,F).reduce((Z,lt)=>Z+lt,0);W.push(q)}return W},[b]),M=O.useMemo(()=>{if(!g.length)return[];const[W,F]=g;if(!y.length)return[`${W}_${F}`];const[q,Z]=y;if(W===q&&F===Z)return[`${W}_${F}`];const lt=[],ft=Math.min(W,q),ht=Math.min(F,Z),Yt=Math.max(W,q),Qt=Math.max(F,Z);for(let zt=0;zt<t.length;zt++){const we=t[zt];for(let Oe=0;Oe<we.length;Oe++)zt>=ft&&zt<=Yt&&Oe>=ht&&Oe<=Qt&<.push(`${zt}_${Oe}`)}return lt},[g,y,t]);O.useEffect(()=>{u(M),h(M)},[M,u,h]);const A=O.useMemo(()=>M.length>1?null:M[0]||null,[M]),E=O.useCallback(()=>p(!1),[]);O.useEffect(()=>(document.addEventListener("mouseup",E),()=>{document.removeEventListener("mouseup",E)}),[E]);const P=(W,F,q)=>{W.button===0&&(_([]),p(!0),m([F,q]))},B=(W,F)=>{v&&_([W,F])},k=(W,F)=>w.includes(`${W}_${F}`),N=W=>{const F=JSON.parse(JSON.stringify(t)),q=[];for(let Z=0;Z<F[0].length;Z++)q.push({colspan:1,rowspan:1,text:"",id:Rt.nanoid(10)});F.splice(W,0,q),s(F)},z=W=>{const F=t.map(Z=>{const lt={colspan:1,rowspan:1,text:"",id:Rt.nanoid(10)},ft=[...Z];return ft.splice(W,0,lt),ft}),q=[...b];q.splice(W,0,100),s(F),l(q)},R=W=>{const F=JSON.parse(JSON.stringify(t)),q=t[W],Z=[];for(let lt=0;lt<q.length;lt++)k(W,lt)&&Z.push(lt);for(const lt of Z)for(let ft=W;ft>=0;ft--)if(!k(ft,lt)){F[ft][lt].rowspan=F[ft][lt].rowspan-1;break}F.splice(W,1),s(F)},V=W=>{const F=JSON.parse(JSON.stringify(t)),q=[];for(let ft=0;ft<t.length;ft++)k(ft,W)&&q.push(ft);for(const ft of q)for(let ht=W;ht>=0;ht--)if(!k(ft,ht)){F[ft][ht].colspan=F[ft][ht].colspan-1;break}const Z=F.map(ft=>(ft.splice(W,1),ft)),lt=[...b];lt.splice(W,1),s(Z),l(lt)},I=()=>{const[W,F]=g,[q,Z]=y,lt=Math.min(W,q),ft=Math.min(F,Z),ht=Math.max(W,q),Yt=Math.max(F,Z),Qt=JSON.parse(JSON.stringify(t));Qt[lt][ft].rowspan=ht-lt+1,Qt[lt][ft].colspan=Yt-ft+1,s(Qt),m([]),_([])},H=(W,F)=>{const q=JSON.parse(JSON.stringify(t));q[W][F].rowspan=1,q[W][F].colspan=1,s(q),m([]),_([])},G=W=>{const F=t.length-1;m([0,W]),_([F,W])},X=W=>{const F=t[W].length-1;m([W,0]),_([W,F])},J=()=>{const W=t.length-1,F=t[W].length-1;m([0,0]),_([W,F])},ct=()=>{const W=JSON.parse(JSON.stringify(t));for(let F=0;F<W.length;F++)for(let q=0;q<W[F].length;q++)M.includes(`${F}_${q}`)&&(W[F][q].text="");s(W)},vt=()=>{requestAnimationFrame(()=>{const W=document.querySelector(`.${Ne.cellText}.${Ne.active}`);W&&W.focus()})},U=()=>{const W=(lt,ft)=>t[lt]?t[lt][ft]?k(lt,ft)?W(lt,ft+1):[lt,ft]:W(lt+1,0):null;_([]);const F=g[0],q=g[1]+1,Z=W(F,q);Z?m(Z):(N(F+1),m([F+1,0])),vt()},Y=W=>{var q;const F=window.getSelection();if(F&&F.rangeCount>0){const Z=F.getRangeAt(0),lt=Z.cloneRange();lt.selectNodeContents(W),lt.setEnd(Z.startContainer,Z.startOffset);const ft=lt.toString().length;lt.setEnd(Z.endContainer,Z.endOffset);const ht=lt.toString().length,Yt=((q=W.textContent)==null?void 0:q.length)||0;return{start:ft,end:ht,len:Yt}}return null},tt=W=>{const F=+M[0].split("_")[0],q=+M[0].split("_")[1],Z=t.length,lt=t[0].length,ft=ht=>{if(ht[0]<0||ht[1]<0||ht[0]>Z-1||ht[1]>lt-1)return[0,0];const Yt=`${ht[0]}_${ht[1]}`;return w.includes(Yt)?W==="UP"?ft([ht[0],ht[1]-1]):W==="DOWN"?ft([ht[0],ht[1]-1]):W==="LEFT"?ft([ht[0]-1,ht[1]]):W==="RIGHT"?ft([ht[0]-1,ht[1]]):[0,0]:ht};if(W==="UP"){const ht=F-1;if(ht<0)return;_([]),m(ft([ht,q]))}else if(W==="DOWN"){const ht=F+1;if(ht>Z-1)return;_([]),m(ft([ht,q]))}else if(W==="LEFT"){const ht=q-1;if(ht<0)return;_([]),m(ft([F,ht]))}else if(W==="RIGHT"){const ht=q+1;if(ht>lt-1)return;_([]),m(ft([F,ht]))}vt()},j=()=>{const W=[];for(let F=0;F<t.length;F++){const q=t[F],Z=[];for(let lt=0;lt<q.length;lt++)k(F,lt)||Z.push(q[lt]);Z.length&&W.push(Z)}return W},nt=()=>{const W=j(),F=W.length>1,q=W[0].length>1;return{canDeleteRow:F,canDeleteCol:q}},it=(W,F)=>{const q=M.length>1,Z=t[W][F],lt=q,ft=!q&&(Z.rowspan>1||Z.colspan>1);return{canMerge:lt,canSplit:ft}},at=(W,F,q)=>{W.preventDefault(),W.stopPropagation();const Z=document.getElementById("global-contextmenu-container");Z&&document.body.removeChild(Z);const lt=document.createElement("div");lt.id="global-contextmenu-container",document.body.appendChild(lt);const ft=ws(lt),ht=()=>{setTimeout(()=>{ft.unmount(),document.body.contains(lt)&&document.body.removeChild(lt),F.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",ht),window.removeEventListener("resize",ht)},0)};ft.render(D.jsx(Hd,{axis:{x:W.clientX,y:W.clientY},el:F,menus:q,removeContextmenu:ht})),F.classList.add("contextmenu-active"),document.body.addEventListener("scroll",ht),window.addEventListener("resize",ht)};O.useEffect(()=>{const W=F=>{if(!o||!M.length)return;const q=F.key.toUpperCase();if(M.length<2){if(q===se.TAB)F.preventDefault(),U();else if(F.ctrlKey&&q===se.UP){F.preventDefault();const Z=+M[0].split("_")[0];N(Z)}else if(F.ctrlKey&&q===se.DOWN){F.preventDefault();const Z=+M[0].split("_")[0];N(Z+1)}else if(F.ctrlKey&&q===se.LEFT){F.preventDefault();const Z=+M[0].split("_")[1];z(Z)}else if(F.ctrlKey&&q===se.RIGHT){F.preventDefault();const Z=+M[0].split("_")[1];z(Z+1)}else if(q===se.UP){const Z=Y(F.target);Z&&Z.start===Z.end&&Z.start===0&&tt("UP")}else if(q===se.DOWN){const Z=Y(F.target);Z&&Z.start===Z.end&&Z.start===Z.len&&tt("DOWN")}else if(q===se.LEFT){const Z=Y(F.target);Z&&Z.start===Z.end&&Z.start===0&&tt("LEFT")}else if(q===se.RIGHT){const Z=Y(F.target);Z&&Z.start===Z.end&&Z.start===Z.len&&tt("RIGHT")}}else q===se.DELETE&&ct()};return document.addEventListener("keydown",W),()=>{document.removeEventListener("keydown",W)}},[o,M,t,s]);const Et=(W,F)=>{W.stopPropagation(),m([]),_([]);let q=!0;const Z=b[F],lt=W.pageX,ft=50,ht=Qt=>{if(!q)return;const zt=(Qt.pageX-lt)/d,we=Z+zt<ft?ft:Math.round(Z+zt),Oe=[...b];Oe[F]=we,x(Oe)},Yt=()=>{q=!1,document.removeEventListener("mousemove",ht),document.removeEventListener("mouseup",Yt),l(Q.current)};document.addEventListener("mousemove",ht),document.addEventListener("mouseup",Yt)},Q=O.useRef(b);O.useEffect(()=>{Q.current=b},[b]);const K=(W,F,q)=>{const Z=JSON.parse(JSON.stringify(t));Z[F][q].text=W,s(Z)},_t=O.useMemo(()=>mr.debounce(K,300,{trailing:!0}),[t,s]),pt=(W,F,q)=>{const Z=W.length,lt=W[0].length;let ft=0,ht=0;if(F+Z>t.length&&(ft=F+Z-t.length),q+lt>t[0].length&&(ht=q+lt-t[0].length),ft||ht){let Yt=JSON.parse(JSON.stringify(t));const Qt={colspan:1,rowspan:1,text:""};if(ft){const zt=[];for(let we=0;we<ft;we++){const Oe=[];for(let ot=0;ot<Yt[0].length;ot++)Oe.push({...Qt,id:Rt.nanoid(10)});zt.push(Oe)}Yt=[...Yt,...zt]}if(ht){Yt=Yt.map(we=>{const Oe=[];for(let ot=0;ot<ht;ot++){const er={...Qt,id:Rt.nanoid(10)};Oe.push(er)}return[...we,...Oe]});const zt=[...b,...new Array(ht).fill(100)];x(zt),l(zt)}s(Yt)}requestAnimationFrame(()=>{const Yt=JSON.parse(JSON.stringify(t));for(let Qt=0;Qt<Z;Qt++)for(let zt=0;zt<lt;zt++)Yt[F+Qt]&&Yt[F+Qt][q+zt]&&(Yt[F+Qt][q+zt].text=W[Qt][zt]);s(Yt)})},yt=(W,F,q)=>{const Z=W.currentTarget;M.includes(`${F}_${q}`)||(m([F,q]),_([]));const{canMerge:lt,canSplit:ft}=it(F,q),{canDeleteRow:ht,canDeleteCol:Yt}=nt(),Qt=[{text:"插入列",children:[{text:"到左侧",handler:()=>z(q)},{text:"到右侧",handler:()=>z(q+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>N(F)},{text:"到下方",handler:()=>N(F+1)}]},{text:"删除列",disable:!Yt,handler:()=>V(q)},{text:"删除行",disable:!ht,handler:()=>R(F)},{divider:!0},{text:"合并单元格",disable:!lt,handler:I},{text:"取消合并单元格",disable:!ft,handler:()=>H(F,q)},{divider:!0},{text:"选中当前列",handler:()=>G(q)},{text:"选中当前行",handler:()=>X(F)},{text:"选中全部单元格",handler:J}],zt=f?f(Z)||[]:[],we=[...Qt,...zt||[]];we.length&&at(W,Z,we)};return D.jsxs("div",{className:Ne.editableTable,style:{width:S+"px"},onMouseDown:c,children:[o&&D.jsx("div",{className:Ne.handler,children:C.map((W,F)=>D.jsx("div",{className:Ne.dragLine,style:{left:W+"px"},onMouseDown:q=>Et(q,F)},F))}),D.jsxs("table",{className:Dt({[Ne.theme]:a,[Ne.rowHeader]:a==null?void 0:a.rowHeader,[Ne.rowFooter]:a==null?void 0:a.rowFooter,[Ne.colHeader]:a==null?void 0:a.colHeader,[Ne.colFooter]:a==null?void 0:a.colFooter}),style:L,children:[D.jsx("colgroup",{children:b.map((W,F)=>D.jsx("col",{span:1,width:W},F))}),D.jsx("tbody",{children:t.map((W,F)=>D.jsx("tr",{style:{height:r+"px"},children:W.map((q,Z)=>{if(w.includes(`${F}_${Z}`))return null;const lt=M.includes(`${F}_${Z}`)&&M.length>1,ft=A===`${F}_${Z}`;return D.jsx("td",{className:Dt(Ne.cell,{[Ne.selected]:lt,[Ne.active]:ft}),style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...p4(q.style)},rowSpan:q.rowspan,colSpan:q.colspan,"data-cell-index":`${F}_${Z}`,onMouseDown:ht=>P(ht,F,Z),onMouseEnter:()=>B(F,Z),onContextMenu:ht=>yt(ht,F,Z),children:ft?D.jsx(nE,{className:Dt(Ne.cellText,{[Ne.active]:!0}),style:{minHeight:r-4+"px"},value:q.text,onUpdateValue:ht=>_t(ht,F,Z),onInsertExcelData:ht=>pt(ht,F,Z)}):D.jsx("div",{className:Ne.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:g4(q.text)}})},q.id)})},F))})]})]})},us={editableElementTable:"_editableElementTable_gxw12_1",rotateWrapper:"_rotateWrapper_gxw12_5",elementContent:"_elementContent_gxw12_10",tableMask:"_tableMask_gxw12_17",maskTip:"_maskTip_gxw12_26"},aE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,{canvasScale:i,handleElementId:a,isScaling:o,setDisableHotkeysState:s,setSelectedTableCells:l}=St(),{updateElement:u}=kt(),{addHistorySnapshot:c}=Me(),f=O.useRef(null),d=O.useRef(null),[h,v]=O.useState(!1),p=O.useRef(-1),g=(S,w=!0)=>{S.stopPropagation(),e==null||e(S.nativeEvent,n,w)};O.useEffect(()=>{a!==n.id&&v(!1)},[a,n.id]),O.useEffect(()=>{s(h)},[h,s]);const m=()=>{v(!0)};O.useEffect(()=>{a===n.id&&(o&&v(!1),!o&&p.current!==-1&&(u({id:n.id,props:{height:p.current}}),p.current=-1))},[o,a,n.id,u]);const y=O.useCallback(S=>{const w=S[0].contentRect;if(!f.current)return;const T=w.height;n.height!==T&&(o?p.current=T:u({id:n.id,props:{height:T}}))},[n.height,n.id,o,u]);O.useEffect(()=>{const S=new ResizeObserver(y);return f.current&&S.observe(f.current),()=>{f.current&&S.unobserve(f.current),S.disconnect()}},[y]);const _=S=>{u({id:n.id,props:{data:S}}),c()},b=S=>{const w=S.reduce((L,C)=>L+C),T=S.map(L=>L/w);u({id:n.id,props:{width:w,colWidths:T}}),c()},x=S=>{setTimeout(()=>l(S),0)};return Pr(d,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:us.editableElementTable,ref:f,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px"},children:D.jsx("div",{className:us.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{ref:d,className:us.elementContent,children:[D.jsx(iE,{data:n.data,width:n.width,cellMinHeight:n.cellMinHeight,colWidths:n.colWidths,outline:n.outline,theme:n.theme,editable:h,onChange:_,onChangeColWidths:b,onChangeSelectedCells:x,onMouseDown:S=>S.stopPropagation()}),!h&&D.jsx("div",{className:us.tableMask,onDoubleClick:m,onMouseDown:g,onTouchStart:g,children:a===n.id&&D.jsx("div",{className:us.maskTip,style:{transform:`scale(${1/i})`},children:"双击编辑"})})]})})})},od={editableElementLatex:"_editableElementLatex_106e3_1",rotateWrapper:"_rotateWrapper_106e3_5",elementContent:"_elementContent_106e3_10"},oE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=O.useRef(null),i=o=>{o.stopPropagation(),e==null||e(o.nativeEvent,t)},a=()=>{Fi.emit(jn.OPEN_LATEX_EDITOR)};return Pr(n,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:od.editableElementLatex,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:od.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{ref:n,className:od.elementContent,onMouseDown:i,onTouchStart:i,onDoubleClick:a,children:D.jsx("svg",{overflow:"visible",width:t.width,height:t.height,stroke:t.color,strokeWidth:t.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:D.jsx("g",{transform:`scale(${t.width/t.viewBox[0]}, ${t.height/t.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{d:t.path})})})})})})},sE=(t,e)=>{O.useEffect(()=>{if(!e.current)return;let r="normal";if(/m3u8(#|\?|$)/i.exec(t)?r="hls":/.flv(#|\?|$)/i.exec(t)&&(r="flv"),e.current&&r==="hls"&&(e.current.canPlayType("application/x-mpegURL")||e.current.canPlayType("application/vnd.apple.mpegURL"))&&(r="normal"),r==="hls"){const n=window.Hls;if(n&&n.isSupported()){const i=new n;return i.loadSource(t),i.attachMedia(e.current),()=>{i.destroy()}}}else if(r==="flv"){const n=window.flvjs;if(n&&n.isSupported()){const i=n.createPlayer({type:"flv",url:t});return i.attachMediaElement(e.current),i.load(),()=>{i.destroy()}}}},[t,e])},Tt={videoPlayer:"_videoPlayer_17n95_1",hideController:"_hideController_17n95_8",controllerMask:"_controllerMask_17n95_11",controller:"_controller_17n95_11",videoWrap:"_videoWrap_17n95_20",bgCanvas:"_bgCanvas_17n95_27",video:"_video_17n95_1",loadError:"_loadError_17n95_43",barWrap:"_barWrap_17n95_79",bar:"_bar_17n95_79",played:"_played_17n95_87",thumb:"_thumb_17n95_87",barTime:"_barTime_17n95_90",barTimeHidden:"_barTimeHidden_17n95_107",loaded:"_loaded_17n95_117",icons:"_icons_17n95_150",time:"_time_17n95_157",icon:"_icon_17n95_150",playIcon:"_playIcon_17n95_174",iconContent:"_iconContent_17n95_177",loopIcon:"_loopIcon_17n95_182",speedIcon:"_speedIcon_17n95_188",speedMenu:"_speedMenu_17n95_192",speedMenuItem:"_speedMenuItem_17n95_201",volume:"_volume_17n95_212",volumeBarWrap:"_volumeBarWrap_17n95_219",volumeBar:"_volumeBar_17n95_219",volumeBarInner:"_volumeBarInner_17n95_222",volumeActive:"_volumeActive_17n95_225",loop:"_loop_17n95_182",iconsRight:"_iconsRight_17n95_272",speedMenuItemActive:"_speedMenuItemActive_17n95_275",iconActive:"_iconActive_17n95_279",bezel:"_bezel_17n95_283",bezelIcon:"_bezelIcon_17n95_294",bezelTransition:"_bezelTransition_17n95_311","bezel-hide":"_bezel-hide_17n95_1"},lE=({width:t,height:e,src:r,poster:n="",autoplay:i=!1,scale:a=1})=>{const o=O.useRef(null),s=O.useRef(null),l=O.useRef(null),u=O.useRef(null),[c,f]=O.useState(.5),[d,h]=O.useState(!0),[v,p]=O.useState(0),[g,m]=O.useState(0),[y,_]=O.useState(0),[b,x]=O.useState(!1),[S,w]=O.useState(!1),[T,L]=O.useState(1),[C,M]=O.useState(!1),[A,E]=O.useState(!1),[P,B]=O.useState("00:00"),[k,N]=O.useState("0"),[z,R]=O.useState(!1),[V,I]=O.useState(!1);sE(r,o);const H=(ot=0)=>{if(ot===0||isNaN(ot))return"00:00";const er=hd=>hd<10?"0"+hd:""+hd,Te=Math.floor(ot/3600),cn=Math.floor((ot-Te*3600)/60),S4=Math.floor(ot-Te*3600-cn*60);return(Te>0?[Te,cn,S4]:[cn,S4]).map(er).join(":")},G=O.useMemo(()=>H(v),[v]),X=O.useMemo(()=>H(g),[g]),J=O.useMemo(()=>(g?v/g*100:0)+"%",[v,g]),ct=O.useMemo(()=>(g?y/g*100:0)+"%",[y,g]),vt=O.useMemo(()=>c*100+"%",[c]),U=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],Y=O.useRef(null),tt=O.useCallback(()=>{I(!1),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>{o.current&&!o.current.paused&&I(!0)},3e3)},[]),j=()=>{o.current&&(h(!1),o.current.play(),w(!0),tt())},nt=()=>{o.current&&(h(!0),o.current.pause(),w(!0),tt())},it=()=>{d?j():nt()},at=ot=>{o.current&&(ot=Math.max(ot,0),ot=Math.min(ot,g),o.current.currentTime=ot,p(ot))},Et=ot=>{o.current&&(ot=Math.max(ot,0),ot=Math.min(ot,1),o.current.volume=ot,f(ot),o.current.muted&&ot!==0&&(o.current.muted=!1))},Q=ot=>{o.current&&(o.current.playbackRate=ot),L(ot)},K=()=>{o.current&&(o.current.muted?(o.current.muted=!1,Et(.5)):(o.current.muted=!0,Et(0)))},_t=()=>{x(!b)},pt=()=>{var ot;return m(((ot=o.current)==null?void 0:ot.duration)||0)},yt=()=>{var ot;return p(((ot=o.current)==null?void 0:ot.currentTime)||0)},W=()=>{b?(at(0),j()):nt()},F=()=>{o.current&&o.current.buffered.length&&_(o.current.buffered.end(o.current.buffered.length-1))},q=()=>M(!0),Z=ot=>ot.getBoundingClientRect().left,lt=O.useCallback(ot=>{if(!o.current||!s.current)return;let Te=(("clientX"in ot?ot.clientX:ot.changedTouches[0].clientX)-Z(s.current))/s.current.clientWidth;Te=Math.max(Te,0),Te=Math.min(Te,1);const cn=Te*g;o.current.currentTime=cn,p(cn)},[g]),ft=O.useCallback(ot=>{lt(ot),document.removeEventListener("mousemove",lt),document.removeEventListener("touchmove",lt),document.removeEventListener("mouseup",ft),document.removeEventListener("touchend",ft)},[lt]),ht=()=>{document.addEventListener("mousemove",lt),document.addEventListener("touchmove",lt),document.addEventListener("mouseup",ft),document.addEventListener("touchend",ft)},Yt=ot=>{if(g&&s.current){const er=s.current.getBoundingClientRect().left,Te=ot.clientX-er;if(Te<0||Te>s.current.offsetWidth)return;const cn=g*(Te/s.current.offsetWidth);N(`${Te-(cn>=3600?25:20)}px`),B(H(cn)),E(!0)}},Qt=O.useCallback(ot=>{if(!l.current)return;const Te=(("clientX"in ot?ot.clientX:ot.changedTouches[0].clientX)-Z(l.current))/45;Et(Te)},[]),zt=O.useCallback(()=>{document.removeEventListener("mousemove",Qt),document.removeEventListener("touchmove",Qt),document.removeEventListener("mouseup",zt),document.removeEventListener("touchend",zt)},[Qt]),we=()=>{document.addEventListener("mousemove",Qt),document.addEventListener("touchmove",Qt),document.addEventListener("mouseup",zt),document.addEventListener("touchend",zt)},Oe=ot=>{if(!l.current)return;const er=(ot.clientX-Z(l.current))/45;Et(er)};return O.useEffect(()=>{if(!u.current||!o.current)return;const ot=u.current.getContext("2d");if(!ot)return;const er=()=>{o.current.requestVideoFrameCallback(()=>{o.current&&u.current&&ot.drawImage(o.current,0,0,u.current.width,u.current.height)})};o.current.addEventListener("loadedmetadata",er,{once:!0})},[]),D.jsxs("div",{className:Dt(Tt.videoPlayer,{[Tt.hideController]:V}),style:{width:t*a+"px",height:e*a+"px",transform:`scale(${1/a})`},onMouseMove:tt,onClick:tt,children:[D.jsxs("div",{className:Tt.videoWrap,onClick:it,children:[C&&D.jsx("div",{className:Tt.loadError,children:"视频加载失败"}),D.jsx("canvas",{ref:u,className:Tt.bgCanvas}),D.jsx("video",{className:Tt.video,ref:o,src:r,autoPlay:i,poster:n,playsInline:!0,crossOrigin:"anonymous",onDurationChange:pt,onTimeUpdate:yt,onEnded:W,onProgress:F,onPlay:()=>{tt(),h(!1)},onPause:()=>tt(),onError:q}),D.jsx("div",{className:Tt.bezel,children:D.jsx("span",{className:Dt(Tt.bezelIcon,{[Tt.bezelTransition]:S}),onAnimationEnd:()=>w(!1),children:d?D.jsx(Le.Pause,{}):D.jsx(Le.PlayOne,{})})})]}),D.jsx("div",{className:Tt.controllerMask}),D.jsxs("div",{className:Tt.controller,children:[D.jsxs("div",{className:Tt.icons,children:[D.jsx("div",{className:Dt(Tt.icon,Tt.playIcon),onClick:ot=>{ot.stopPropagation(),it()},children:D.jsx("span",{className:Tt.iconContent,children:d?D.jsx(Le.PlayOne,{}):D.jsx(Le.Pause,{})})}),D.jsxs("div",{className:Tt.volume,children:[D.jsx("div",{className:Dt(Tt.icon,Tt.volumeIcon),onClick:ot=>{ot.stopPropagation(),K()},children:D.jsx("span",{className:Tt.iconContent,children:c===0?D.jsx(Le.VolumeMute,{}):c===1?D.jsx(Le.VolumeNotice,{}):D.jsx(Le.VolumeSmall,{})})}),D.jsx("div",{className:Tt.volumeBarWrap,onMouseDown:ot=>{ot.stopPropagation(),we()},onTouchStart:ot=>{ot.stopPropagation(),we()},onClick:ot=>{ot.stopPropagation(),Oe(ot)},children:D.jsx("div",{className:Tt.volumeBar,ref:l,children:D.jsx("div",{className:Tt.volumeBarInner,style:{width:vt},children:D.jsx("span",{className:Tt.thumb})})})})]}),D.jsxs("span",{className:Tt.time,children:[D.jsx("span",{className:Tt.ptime,children:G})," /"," ",D.jsx("span",{className:Tt.dtime,children:X})]})]}),D.jsxs("div",{className:Dt(Tt.icons,Tt.iconsRight),children:[D.jsx("div",{className:Tt.speed,children:D.jsxs("div",{className:Dt(Tt.icon,Tt.speedIcon),onMouseLeave:()=>R(!1),children:[D.jsx("span",{className:Tt.iconContent,onClick:ot=>{ot.stopPropagation(),R(!z)},children:T===1?"倍速":T+"x"}),z&&D.jsx("div",{className:Tt.speedMenu,children:U.map(ot=>D.jsx("div",{className:Dt(Tt.speedMenuItem,{[Tt.speedMenuItemActive]:ot.value===T}),onClick:er=>{er.stopPropagation(),Q(ot.value),R(!1)},children:ot.label},ot.label))})]})}),D.jsx("div",{className:Tt.loop,onClick:ot=>{ot.stopPropagation(),_t()},children:D.jsx("div",{className:Dt(Tt.icon,Tt.loopIcon,{[Tt.iconActive]:b}),children:D.jsxs("span",{className:Tt.iconContent,children:["循环",b?"开":"关"]})})})]}),D.jsxs("div",{className:Tt.barWrap,ref:s,onMouseDown:ot=>{ot.stopPropagation(),ht()},onTouchStart:ot=>{ot.stopPropagation(),ht()},onMouseMove:Yt,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onClick:ot=>ot.stopPropagation(),children:[D.jsx("div",{className:Dt(Tt.barTime,{[Tt.barTimeHidden]:!A}),style:{left:k},children:P}),D.jsxs("div",{className:Tt.bar,children:[D.jsx("div",{className:Tt.loaded,style:{width:ct}}),D.jsx("div",{className:Tt.played,style:{width:J},children:D.jsx("span",{className:Tt.thumb})})]})]})]})]})},cs={editableElementVideo:"_editableElementVideo_92vvh_1",rotateWrapper:"_rotateWrapper_92vvh_5",elementContent:"_elementContent_92vvh_10",handlerBorder:"_handlerBorder_92vvh_16",t:"_t_92vvh_21",b:"_b_92vvh_28",l:"_l_92vvh_35",r:"_r_92vvh_5"},uE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const n=t,{canvasScale:i}=St(),a=O.useRef(null),o=(s,l=!0)=>{s.stopPropagation(),e==null||e(s.nativeEvent,n,l)};return Pr(a,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:cs.editableElementVideo,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:D.jsx("div",{className:cs.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:D.jsxs("div",{className:cs.elementContent,ref:a,onMouseDown:s=>o(s,!1),onTouchStart:s=>o(s,!1),children:[D.jsx(lE,{width:n.width,height:n.height,src:n.src,poster:n.poster,scale:i}),["t","b","l","r"].map(s=>D.jsx("div",{className:`${cs.handlerBorder} ${cs[s]}`,onMouseDown:l=>o(l),onTouchStart:l=>o(l)},s))]})})})},ee={audioPlayer:"_audioPlayer_1156v_1",controller:"_controller_1156v_11",barWrap:"_barWrap_1156v_21",bar:"_bar_1156v_21",played:"_played_1156v_29",thumb:"_thumb_1156v_29",barTime:"_barTime_1156v_32",barTimeHidden:"_barTimeHidden_1156v_49",loaded:"_loaded_1156v_59",icons:"_icons_1156v_92",icon:"_icon_1156v_92",playIcon:"_playIcon_1156v_109",iconContent:"_iconContent_1156v_112",iconActive:"_iconActive_1156v_120",volume:"_volume_1156v_123",volumeBarWrap:"_volumeBarWrap_1156v_130",volumeBar:"_volumeBar_1156v_130",volumeBarInner:"_volumeBarInner_1156v_133",volumeActive:"_volumeActive_1156v_136",time:"_time_1156v_179",ptime:"_ptime_1156v_193",dtime:"_dtime_1156v_196"},cE=O.forwardRef(({src:t,loop:e=!1,autoplay:r=!1,scale:n=1,className:i,style:a,onMouseDown:o},s)=>{const l=O.useRef(null),u=O.useRef(null),c=O.useRef(null),[f,d]=O.useState(.5),[h,v]=O.useState(!0),[p,g]=O.useState(0),[m,y]=O.useState(0),[_,b]=O.useState(0),[x,S]=O.useState(!1),[w,T]=O.useState("00:00"),[L,C]=O.useState("0"),M=(K=0)=>{if(K===0||isNaN(K))return"00:00";const _t=F=>F<10?"0"+F:""+F,pt=Math.floor(K/3600),yt=Math.floor((K-pt*3600)/60),W=Math.floor(K-pt*3600-yt*60);return(pt>0?[pt,yt,W]:[yt,W]).map(_t).join(":")},A=O.useMemo(()=>M(p),[p]),E=O.useMemo(()=>M(m),[m]),P=O.useMemo(()=>(m?p/m*100:0)+"%",[p,m]),B=O.useMemo(()=>(m?_/m*100:0)+"%",[_,m]),k=O.useMemo(()=>f*100+"%",[f]),N=()=>{l.current&&(v(!1),l.current.play())},z=()=>{l.current&&(v(!0),l.current.pause())},R=()=>{h?N():z()};O.useImperativeHandle(s,()=>({toggle:R}));const V=K=>{l.current&&(K=Math.max(K,0),K=Math.min(K,m),l.current.currentTime=K,g(K))},I=K=>{l.current&&(K=Math.max(K,0),K=Math.min(K,1),l.current.volume=K,d(K),l.current.muted&&K!==0&&(l.current.muted=!1))},H=()=>{l.current&&(l.current.muted?(l.current.muted=!1,I(.5)):(l.current.muted=!0,I(0)))},G=()=>{var K;return y(((K=l.current)==null?void 0:K.duration)||0)},X=()=>{var K;return g(((K=l.current)==null?void 0:K.currentTime)||0)},J=()=>{e?(V(0),N()):z()},ct=()=>{l.current&&l.current.buffered.length&&b(l.current.buffered.end(l.current.buffered.length-1))},vt=()=>console.error("音频加载失败"),U=K=>K.getBoundingClientRect().left,Y=O.useCallback(K=>{if(!l.current||!u.current)return;let pt=(("clientX"in K?K.clientX:K.changedTouches[0].clientX)-U(u.current))/u.current.clientWidth;pt=Math.max(pt,0),pt=Math.min(pt,1);const yt=pt*m;l.current.currentTime=yt,g(yt)},[m]),tt=O.useCallback(K=>{Y(K),document.removeEventListener("mousemove",Y),document.removeEventListener("touchmove",Y),document.removeEventListener("mouseup",tt),document.removeEventListener("touchend",tt)},[Y]),j=()=>{document.addEventListener("mousemove",Y),document.addEventListener("touchmove",Y),document.addEventListener("mouseup",tt),document.addEventListener("touchend",tt)},nt=K=>{if(m&&u.current){const _t=u.current.getBoundingClientRect().left,pt=K.clientX-_t;if(pt<0||pt>u.current.offsetWidth)return;const yt=m*(pt/u.current.offsetWidth);C(`${pt-(yt>=3600?25:20)}px`),T(M(yt)),S(!0)}},it=O.useCallback(K=>{if(!c.current)return;const pt=(("clientX"in K?K.clientX:K.changedTouches[0].clientX)-U(c.current))/45;I(pt)},[]),at=O.useCallback(()=>{document.removeEventListener("mousemove",it),document.removeEventListener("touchmove",it),document.removeEventListener("mouseup",at),document.removeEventListener("touchend",at)},[it]),Et=()=>{document.addEventListener("mousemove",it),document.addEventListener("touchmove",it),document.addEventListener("mouseup",at),document.addEventListener("touchend",at)},Q=K=>{if(!c.current)return;const _t=(K.clientX-U(c.current))/45;I(_t)};return D.jsxs("div",{className:Dt(ee.audioPlayer,i),style:{transform:`scale(${1/n})`,...a},onMouseDown:o,children:[D.jsx("audio",{className:ee.audio,ref:l,src:t,autoPlay:r,onDurationChange:G,onTimeUpdate:X,onPlay:()=>v(!1),onEnded:J,onProgress:ct,onError:vt}),D.jsxs("div",{className:ee.controller,children:[D.jsxs("div",{className:ee.icons,children:[D.jsx("div",{className:Dt(ee.icon,ee.playIcon),onClick:R,children:D.jsx("span",{className:ee.iconContent,children:h?D.jsx(Le.PlayOne,{}):D.jsx(Le.Pause,{})})}),D.jsxs("div",{className:ee.volume,children:[D.jsx("div",{className:Dt(ee.icon,ee.volumeIcon),onClick:H,children:D.jsx("span",{className:ee.iconContent,children:f===0?D.jsx(Le.VolumeMute,{}):f===1?D.jsx(Le.VolumeNotice,{}):D.jsx(Le.VolumeSmall,{})})}),D.jsx("div",{className:ee.volumeBarWrap,onMouseDown:Et,onTouchStart:Et,onClick:Q,children:D.jsx("div",{className:ee.volumeBar,ref:c,children:D.jsx("div",{className:ee.volumeBarInner,style:{width:k},children:D.jsx("span",{className:ee.thumb})})})})]})]}),D.jsxs("span",{className:ee.time,children:[D.jsx("span",{className:ee.ptime,children:A})," /"," ",D.jsx("span",{className:ee.dtime,children:E})]}),D.jsxs("div",{className:ee.barWrap,ref:u,onMouseDown:j,onTouchStart:j,onMouseMove:nt,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:[D.jsx("div",{className:Dt(ee.barTime,{[ee.barTimeHidden]:!x}),style:{left:L},children:w}),D.jsxs("div",{className:ee.bar,children:[D.jsx("div",{className:ee.loaded,style:{width:B}}),D.jsx("div",{className:ee.played,style:{width:P},children:D.jsx("span",{className:ee.thumb})})]})]})]})]})}),fs={editableElementAudio:"_editableElementAudio_nmvrn_1",rotateWrapper:"_rotateWrapper_nmvrn_5",elementContent:"_elementContent_nmvrn_10",audioIcon:"_audioIcon_nmvrn_18",audioPlayer:"_audioPlayer_nmvrn_22"},fE=({elementInfo:t,selectElement:e,contextmenus:r})=>{const{canvasScale:n,handleElementId:i}=St(),{viewportRatio:a,viewportSize:o}=kt(),s=O.useRef(null),l=O.useMemo(()=>Math.min(t.width,t.height)+"px",[t.width,t.height]),u=O.useMemo(()=>{const f=o,d=o*a,h=280/n,v=50/n,p=t.width,g=t.height,m=t.left,y=t.top;let _=0,b=g;return m+h>=f&&(_=p-h),y+g+v>=d&&(b=-v),{left:_+"px",top:b+"px"}},[o,a,n,t.width,t.height,t.left,t.top]),c=f=>{f.stopPropagation(),e==null||e(f.nativeEvent,t)};return Pr(s,()=>(r==null?void 0:r())||[]),D.jsx("div",{className:fs.editableElementAudio,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:fs.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{ref:s,className:fs.elementContent,onMouseDown:f=>c(f),onTouchStart:f=>c(f),children:[D.jsx(Le.VolumeNotice,{className:fs.audioIcon,style:{fontSize:l,color:t.color}}),i===t.id&&D.jsx(cE,{className:fs.audioPlayer,style:{...u},src:t.src,loop:t.loop,scale:n,onMouseDown:f=>f.stopPropagation()})]})})})},hE=({elementInfo:t,elementIndex:e,isMultiSelect:r,selectElement:n})=>{const{orderElement:i}=k_(),{alignElementToCanvas:a}=O_(),{deleteElement:o}=Vd(),{copyElement:s,pasteElement:l,cutElement:u}=I_(),c=O.useRef(null),f=O.useMemo(()=>({[Ft.IMAGE]:W_,[Ft.TEXT]:P3,[Ft.SHAPE]:N3,[Ft.LINE]:k3,[Ft.CHART]:eE,[Ft.TABLE]:aE,[Ft.LATEX]:oE,[Ft.VIDEO]:uE,[Ft.AUDIO]:fE})[t.type]||null,[t.type]),d=()=>[{text:"剪切",subText:"Ctrl + X",handler:u},{text:"复制",subText:"Ctrl + C",handler:s},{text:"粘贴",subText:"Ctrl + V",handler:l},{divider:!0},{text:"水平居中",handler:()=>a(pe.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>a(pe.CENTER)},{text:"水平居中",handler:()=>a(pe.HORIZONTAL)},{text:"左对齐",handler:()=>a(pe.LEFT)},{text:"右对齐",handler:()=>a(pe.RIGHT)}]},{text:"垂直居中",handler:()=>a(pe.VERTICAL),children:[{text:"水平垂直居中",handler:()=>a(pe.CENTER)},{text:"垂直居中",handler:()=>a(pe.VERTICAL)},{text:"顶部对齐",handler:()=>a(pe.TOP)},{text:"底部对齐",handler:()=>a(pe.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:r&&!t.groupId,handler:()=>i(t,_r.TOP),children:[{text:"置于顶层",handler:()=>i(t,_r.TOP)},{text:"上移一层",handler:()=>i(t,_r.UP)}]},{text:"置于底层",disable:r&&!t.groupId,handler:()=>i(t,_r.BOTTOM),children:[{text:"置于底层",handler:()=>i(t,_r.BOTTOM)},{text:"下移一层",handler:()=>i(t,_r.DOWN)}]},{divider:!0},{text:"删除",subText:"Delete",handler:o}];return Pr(c,d),f?D.jsx("div",{ref:c,className:"editable-element",id:`editable-element-${t.id}`,style:{zIndex:e},children:D.jsx(f,{elementInfo:t,selectElement:n,contextmenus:d})}):null},dE=()=>{const{updateElement:t,removeElementProps:e}=kt(),{addHistorySnapshot:r}=Me();return{setLink:(a,o)=>{const s=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(o.type==="web"&&!s.test(o.target))return console.error("不是正确的网页链接地址"),!1;if(o.type==="slide"&&!o.target)return console.error("请先选择链接目标"),!1;const l={link:o};return t({id:a.id,props:l}),r(),!0},removeLink:a=>{e({id:a.id,propName:"link"}),r()}}},hs={baseElementImage:"_baseElementImage_1yw1u_1",rotateWrapper:"_rotateWrapper_1yw1u_5",elementContent:"_elementContent_1yw1u_10",imageContent:"_imageContent_1yw1u_15",colorMask:"_colorMask_1yw1u_24"},vE=({elementInfo:t})=>{const{shadowStyle:e}=hn(t.shadow),{flipStyle:r}=Ls(t.flipH,t.flipV),{clipShape:n,imgPosition:i}=Ku(t),{filter:a}=Xd(t.filters);return D.jsx("div",{className:hs.baseElementImage,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:hs.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:hs.elementContent,style:{filter:e?`drop-shadow(${e})`:"",transform:r},children:[D.jsx(Yd,{elementInfo:t}),D.jsxs("div",{className:hs.imageContent,style:{clipPath:n.style},children:[D.jsx("img",{src:t.src,draggable:!1,style:{top:i.top,left:i.left,width:i.width,height:i.height,filter:a},alt:""}),t.colorMask&&D.jsx("div",{className:hs.colorMask,style:{backgroundColor:t.colorMask}})]})]})})})},ds={baseElementText:"_baseElementText_emqg1_1",rotateWrapper:"_rotateWrapper_emqg1_5",elementContent:"_elementContent_emqg1_10",text:"_text_emqg1_16",thumbnail:"_thumbnail_emqg1_19"},pE=({elementInfo:t,target:e})=>{const{shadowStyle:r}=hn(t.shadow);return D.jsx("div",{className:ds.baseElementText,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:ds.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:ds.elementContent,style:{width:t.vertical?"auto":t.width+"px",height:t.vertical?t.height+"px":"auto",backgroundColor:t.fill,opacity:t.opacity,textShadow:r,lineHeight:t.lineHeight,letterSpacing:(t.wordSpace||0)+"px",color:t.defaultColor,fontFamily:t.defaultFontName,writingMode:t.vertical?"vertical-rl":"horizontal-tb"},children:[D.jsx(Ms,{width:t.width,height:t.height,outline:t.outline}),D.jsx("div",{className:Dt(ds.text,"ProseMirror-static",{[ds.thumbnail]:e==="thumbnail"}),style:{"--paragraphSpace":`${t.paragraphSpace===void 0?5:t.paragraphSpace}px`},dangerouslySetInnerHTML:{__html:t.content}})]})})})},vs={baseElementShape:"_baseElementShape_16w80_1",rotateWrapper:"_rotateWrapper_16w80_5",elementContent:"_elementContent_16w80_10",shapeText:"_shapeText_16w80_21",top:"_top_16w80_34",middle:"_middle_16w80_38",bottom:"_bottom_16w80_42"},gE=({elementInfo:t})=>{const{theme:e}=kt(),{fill:r}=Jd(t,"base"),{outlineWidth:n,outlineColor:i,strokeDashArray:a}=zi(t.outline),{shadowStyle:o}=hn(t.shadow),{flipStyle:s}=Ls(t.flipH,t.flipV),l=O.useMemo(()=>{const u={content:"",align:"middle",defaultFontName:e.fontName,defaultColor:e.fontColor};return t.text?t.text:u},[t.text,e]);return D.jsx("div",{className:vs.baseElementShape,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:vs.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:vs.elementContent,style:{opacity:t.opacity,filter:o?`drop-shadow(${o})`:"",transform:s,color:l.defaultColor,fontFamily:l.defaultFontName},children:[D.jsxs("svg",{overflow:"visible",width:t.width,height:t.height,children:[D.jsx("defs",{children:t.pattern?D.jsx(ev,{id:`base-pattern-${t.id}`,src:t.pattern}):t.gradient?D.jsx(tv,{id:`base-gradient-${t.id}`,type:t.gradient.type,colors:t.gradient.colors,rotate:t.gradient.rotate}):null}),D.jsx("g",{transform:`scale(${t.width/t.viewBox[0]}, ${t.height/t.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:t.path,fill:r,stroke:i,strokeWidth:n,strokeDasharray:a})})]}),D.jsx("div",{className:Dt(vs.shapeText,vs[l.align]),children:D.jsx("div",{className:"ProseMirror-static",dangerouslySetInnerHTML:{__html:l.content}})})]})})})},_4={baseElementLine:"_baseElementLine_135s9_1",elementContent:"_elementContent_135s9_5"},mE=({elementInfo:t})=>{const{shadowStyle:e}=hn(t.shadow),r=O.useMemo(()=>{const l=Math.abs(t.start[0]-t.end[0]);return l<24?24:l},[t.start,t.end]),n=O.useMemo(()=>{const l=Math.abs(t.start[1]-t.end[1]);return l<24?24:l},[t.start,t.end]),i=O.useMemo(()=>{const l=t.width;return t.style==="dashed"?l<=8?`${l*5} ${l*2.5}`:`${l*5} ${l*1.5}`:t.style==="dotted"?l<=8?`${l*1.8} ${l*1.6}`:`${l*1.5} ${l*1.2}`:"0 0"},[t.width,t.style]),a=O.useMemo(()=>Ed(t),[t]),o=t.points[0],s=t.points[1];return D.jsx("div",{className:_4.baseElementLine,style:{top:t.top+"px",left:t.left+"px"},children:D.jsx("div",{className:_4.elementContent,style:{filter:e?`drop-shadow(${e})`:""},children:D.jsxs("svg",{overflow:"visible",width:r,height:n,children:[D.jsxs("defs",{children:[o&&D.jsx(Cs,{id:t.id,position:"start",type:o,color:t.color,baseSize:t.width}),s&&D.jsx(Cs,{id:t.id,position:"end",type:s,color:t.color,baseSize:t.width})]}),D.jsx("path",{d:a,stroke:t.color,strokeWidth:t.width,strokeDasharray:i,fill:"none",markerStart:o?`url(#${t.id}-${o}-start)`:"",markerEnd:s?`url(#${t.id}-${s}-end)`:""})]})})})},sd={baseElementChart:"_baseElementChart_1cqxu_1",isThumbnail:"_isThumbnail_1cqxu_4",rotateWrapper:"_rotateWrapper_1cqxu_8",elementContent:"_elementContent_1cqxu_13"},yE=({elementInfo:t})=>D.jsx("div",{className:sd.baseElementChart,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:sd.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsxs("div",{className:sd.elementContent,style:{backgroundColor:t.fill},children:[D.jsx(Ms,{width:t.width,height:t.height,outline:t.outline}),D.jsx(v4,{width:t.width,height:t.height,type:t.chartType,data:t.data,themeColors:t.themeColors,textColor:t.textColor,lineColor:t.lineColor,options:t.options})]})})}),Yn={staticTable:"_staticTable_1ew9n_1",theme:"_theme_1ew9n_19",cell:"_cell_1ew9n_22",rowHeader:"_rowHeader_1ew9n_28",rowFooter:"_rowFooter_1ew9n_31",colHeader:"_colHeader_1ew9n_34",colFooter:"_colFooter_1ew9n_37",cellText:"_cellText_1ew9n_47"},_E=({data:t,width:e,cellMinHeight:r,colWidths:n,outline:i,theme:a,editable:o=!0})=>{const[s,l]=O.useState([]);O.useEffect(()=>{l(n.map(h=>h*e))},[n,e]);const u=O.useMemo(()=>s.reduce((h,v)=>h+v,0),[s]),{hideCells:c}=m4(t),{subThemeColor:f}=y4(a),d=O.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":f[0],"--subThemeColor2":f[1]}:{},[a,f]);return D.jsx("div",{className:Yn.staticTable,style:{width:u+"px"},children:D.jsxs("table",{className:Dt({[Yn.theme]:a,[Yn.rowHeader]:a==null?void 0:a.rowHeader,[Yn.rowFooter]:a==null?void 0:a.rowFooter,[Yn.colHeader]:a==null?void 0:a.colHeader,[Yn.colFooter]:a==null?void 0:a.colFooter}),style:d,children:[D.jsx("colgroup",{children:s.map((h,v)=>D.jsx("col",{span:1,width:h},v))}),D.jsx("tbody",{children:t.map((h,v)=>D.jsx("tr",{style:{height:r+"px"},children:h.map((p,g)=>c.includes(`${v}_${g}`)?null:D.jsx("td",{className:Yn.cell,style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...p4(p.style)},rowSpan:p.rowspan,colSpan:p.colspan,children:D.jsx("div",{className:Yn.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:g4(p.text)}})},p.id))},v))})]})})},ld={baseElementTable:"_baseElementTable_uo3vw_1",rotateWrapper:"_rotateWrapper_uo3vw_5",elementContent:"_elementContent_uo3vw_10"},bE=({elementInfo:t})=>D.jsx("div",{className:ld.baseElementTable,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px"},children:D.jsx("div",{className:ld.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:ld.elementContent,children:D.jsx(_E,{data:t.data,width:t.width,cellMinHeight:t.cellMinHeight,colWidths:t.colWidths,outline:t.outline,theme:t.theme})})})}),ud={baseElementLatex:"_baseElementLatex_ybsi7_1",rotateWrapper:"_rotateWrapper_ybsi7_5",elementContent:"_elementContent_ybsi7_10"},SE=({elementInfo:t})=>D.jsx("div",{className:ud.baseElementLatex,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:ud.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:ud.elementContent,children:D.jsx("svg",{overflow:"visible",width:t.width,height:t.height,stroke:t.color,strokeWidth:t.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:D.jsx("g",{transform:`scale(${t.width/t.viewBox[0]}, ${t.height/t.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:D.jsx("path",{d:t.path})})})})})}),Hu={baseElementVideo:"_baseElementVideo_vw6yo_1",rotateWrapper:"_rotateWrapper_vw6yo_5",elementContent:"_elementContent_vw6yo_10",icon:"_icon_vw6yo_22"},xE=({elementInfo:t})=>D.jsx("div",{className:Hu.baseElementVideo,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Hu.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:Hu.elementContent,style:{backgroundImage:t.poster?`url(${t.poster})`:""},children:D.jsx("div",{className:Hu.icon,children:D.jsx(Le.PlayOne,{})})})})}),Gu={baseElementAudio:"_baseElementAudio_1jxzq_1",rotateWrapper:"_rotateWrapper_1jxzq_5",elementContent:"_elementContent_1jxzq_10",audioIcon:"_audioIcon_1jxzq_18"},wE=({elementInfo:t})=>{const e=O.useMemo(()=>Math.min(t.width,t.height)+"px",[t.width,t.height]);return D.jsx("div",{className:Gu.baseElementAudio,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:D.jsx("div",{className:Gu.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:D.jsx("div",{className:Gu.elementContent,style:{color:t.color},children:D.jsx(Le.VolumeNotice,{className:Gu.audioIcon,style:{fontSize:e,color:t.color}})})})})},TE=({elementInfo:t,elementIndex:e})=>{const r=O.useMemo(()=>({[Ft.IMAGE]:vE,[Ft.TEXT]:pE,[Ft.SHAPE]:gE,[Ft.LINE]:mE,[Ft.CHART]:yE,[Ft.TABLE]:bE,[Ft.LATEX]:SE,[Ft.VIDEO]:xE,[Ft.AUDIO]:wE})[t.type]||null,[t.type]);return D.jsx("div",{className:Dt("thumbnail-element",`base-element-${t.id}`),style:{zIndex:e},children:D.jsx(r,{elementInfo:t})})},LE=({slide:t,size:e,visible:r=!0,className:n})=>{const{viewportRatio:i,viewportSize:a}=kt(),{backgroundStyle:o}=Od(t.background),s=O.useMemo(()=>e/a,[e,a]);return D.jsx("div",{className:Dt("thumbnail-slide",n),style:{width:e,height:e*i},children:r?D.jsxs("div",{className:"elements",style:{width:a,height:a*i,transform:`scale(${s})`},children:[D.jsx("div",{className:"background",style:o}),t.elements.map((l,u)=>D.jsx(TE,{elementInfo:l,elementIndex:u+1},l.id))]}):D.jsx("div",{className:"placeholder",children:"加载中 ..."})})},ke={linkDialogMask:"_linkDialogMask_p3ytk_1",linkDialog:"_linkDialog_p3ytk_1",tabs:"_tabs_p3ytk_26",tab:"_tab_p3ytk_26",active:"_active_p3ytk_38",content:"_content_p3ytk_44",input:"_input_p3ytk_50",preview:"_preview_p3ytk_60",thumbnail:"_thumbnail_p3ytk_64",btns:"_btns_p3ytk_75",btn:"_btn_p3ytk_75",primary:"_primary_p3ytk_91"},ME=({onClose:t})=>{const{handleElementId:e,setDisableHotkeysState:r}=St(),{slides:n,currentSlide:i}=kt(),[a,o]=O.useState("web"),[s,l]=O.useState(""),[u,c]=O.useState(""),{setLink:f}=dE(),d=O.useRef(null),h=O.useMemo(()=>n.map((g,m)=>({label:`幻灯片 ${m+1}`,value:g.id,disabled:(i==null?void 0:i.id)===g.id})),[n,i]),v=O.useMemo(()=>u&&n.find(g=>g.id===u)||null,[u,n]);O.useEffect(()=>{r(!0);const g=n.find(y=>y.id!==(i==null?void 0:i.id));g&&c(g.id);const m=(i==null?void 0:i.elements.find(y=>y.id===e))||null;return m!=null&&m.link&&(o(m.link.type),m.link.type==="web"?l(m.link.target):m.link.type==="slide"&&c(m.link.target)),a==="web"&&setTimeout(()=>{var y;return(y=d.current)==null?void 0:y.focus()},0),()=>{r(!1)}},[]);const p=()=>{const g={type:a,target:a==="web"?s:u},m=(i==null?void 0:i.elements.find(y=>y.id===e))||null;m&&(f(m,g)?t():l(""))};return D.jsx("div",{className:ke.linkDialogMask,onClick:t,children:D.jsxs("div",{className:ke.linkDialog,onClick:g=>g.stopPropagation(),children:[D.jsxs("div",{className:ke.tabs,children:[D.jsx("div",{className:Dt(ke.tab,{[ke.active]:a==="web"}),onClick:()=>o("web"),children:"网页链接"}),D.jsx("div",{className:Dt(ke.tab,{[ke.active]:a==="slide"}),onClick:()=>o("slide"),children:"幻灯片页面"})]}),D.jsx("div",{className:ke.content,children:a==="web"?D.jsx("input",{ref:d,className:ke.input,type:"text",value:s,onChange:g=>l(g.target.value),onKeyDown:g=>g.key==="Enter"&&p(),placeholder:"请输入网页链接地址"}):D.jsxs(D.Fragment,{children:[D.jsx("select",{className:ke.input,value:u,onChange:g=>c(g.target.value),children:h.map(g=>D.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))}),v&&D.jsxs("div",{className:ke.preview,children:[D.jsx("div",{children:"预览:"}),D.jsx(LE,{className:ke.thumbnail,slide:v,size:500})]})]})}),D.jsxs("div",{className:ke.btns,children:[D.jsx("button",{className:ke.btn,onClick:t,children:"取消"}),D.jsx("button",{className:Dt(ke.btn,ke.primary),onClick:p,children:"确认"})]})]})})},cd={canvas:"_canvas_r5284_1",dragMask:"_dragMask_r5284_9",viewportWrapper:"_viewportWrapper_r5284_18",viewport:"_viewport_r5284_18"},CE=()=>{const{canvasScale:t,activeElementIdList:e,handleElementId:r,activeGroupElementId:n,hiddenElementIdList:i,creatingElement:a,creatingCustomShape:o,setActiveElementIdList:s,setActiveGroupElementId:l,editorAreaFocus:u,textFormatPainter:c,setEditorareaFocus:f,setTextFormatPainter:d}=St(),{currentSlide:h}=kt(),{spaceKeyState:v}=nr(),{createCustomShapeElement:p,createTextElement:g}=$a(),{updateSlideIndex:m}=Q4(),y=O.useRef(null),_=O.useRef(null),[b,x]=O.useState(!1),S=(h==null?void 0:h.elements)||[],[w,T]=O.useState([]),L=Q=>{const K=kt.getState().currentSlide;if(!K)return;const _t=typeof Q=="function"?Q(K.elements):Q;kt.getState().updateSlide({elements:_t})},{dragElement:C}=a_(S,L,T),{scaleElement:M,scaleMultiElement:A}=c_(S,L,T),{rotateElement:E}=l_(S,L,_),{dragLineElement:P}=f_(S,L),{moveShapeKeypoint:B}=h_(S,L),{viewportStyles:k,dragViewport:N}=t_(y),{selectionState:z,mouseSelectionVisible:R,updateMouseSelection:V}=e_(S,_);n_(y);const{insertElementFromCreateSelection:I}=i_(_),{selectElement:H}=o_(S,C);K4(y,()=>{const Q=St.getState();Q.editorAreaFocus&&Q.setEditorareaFocus(!1)}),O.useEffect(()=>{l("")},[r,l]);const X=(Q,K,_t=!0)=>{Q.stopPropagation();const pt=Q.nativeEvent||Q;H(pt,K,_t)},J=Q=>{e.length&&s([]),v?N(Q.nativeEvent):V(Q),u||f(!0),c&&d(null),J4()},ct=Q=>{if(e.length||a||o||!_.current)return;const{pageX:K,pageY:_t}=Q,{x:pt,y:yt}=_.current.getBoundingClientRect(),W=(K-pt)/t,F=(_t-yt)/t;g({left:W,top:F,width:200/t,height:0})};O.useEffect(()=>{e.length&&s([])},[]),O.useEffect(()=>()=>{const{textFormatPainter:Q}=St.getState();Q&&d(null)},[d]);const vt=O.useRef(m);O.useEffect(()=>{vt.current=m},[m]);const U=O.useMemo(()=>mr.throttle(Q=>{vt.current(Q)},300,{leading:!0,trailing:!1}),[]),Y=Q=>{Q.preventDefault(),Q.deltaY>0?U(se.DOWN):Q.deltaY<0&&U(se.UP)};O.useEffect(()=>{const Q=y.current;if(Q)return Q.addEventListener("wheel",Y,{passive:!1}),()=>Q.removeEventListener("wheel",Y)},[U]);const tt=()=>x(!0),j=(Q,K)=>{E(Q.nativeEvent,K)},nt=(Q,K,_t)=>{M(Q.nativeEvent,K,_t)},it=(Q,K,_t)=>{P(Q.nativeEvent,K,_t)},at=(Q,K,_t)=>{B(Q.nativeEvent,K,_t)},Et=(Q,K,_t)=>{A(Q.nativeEvent,K,_t)};return D.jsxs("div",{className:cd.canvas,ref:y,onMouseDown:J,onDoubleClick:ct,onDragOver:Q=>Q.preventDefault(),children:[b&&D.jsx(ME,{onClose:()=>x(!1)}),a&&D.jsx(C_,{onCreated:I}),o&&D.jsx(D_,{onClose:()=>St.getState().setCreatingCustomShapeState(!1),onCreated:p}),D.jsxs("div",{className:cd.viewportWrapper,style:{width:k.width*t,height:k.height*t,left:k.left,top:k.top},children:[D.jsxs("div",{className:"operates",children:[w.map((Q,K)=>D.jsx(M_,{type:Q.type,axis:Q.axis,length:Q.length,canvasScale:t},K)),e.length>1&&D.jsx(N_,{elementList:(h==null?void 0:h.elements)||[],scaleMultiElement:Et}),h==null?void 0:h.elements.filter(Q=>!i.includes(Q.id)).map(Q=>D.jsx(L_,{elementInfo:Q,isSelected:e.includes(Q.id),isActive:r===Q.id,isActiveGroupElement:n===Q.id,isMultiSelect:e.length>1,rotateElement:j,scaleElement:nt,dragLineElement:it,moveShapeKeypoint:at,openLinkDialog:tt},Q.id)),D.jsx(g_,{})]}),D.jsxs("div",{className:cd.viewport,ref:_,style:{transform:`scale(${t})`},children:[R&&z&&D.jsx(A_,{top:z.top,left:z.left,width:z.width,height:z.height,quadrant:z.quadrant}),h==null?void 0:h.elements.filter(Q=>!i.includes(Q.id)).map((Q,K)=>D.jsx(hE,{elementInfo:Q,elementIndex:K+1,isMultiSelect:e.length>1,selectElement:X,openLinkDialog:tt},Q.id))]})]})]})},b4=t=>{try{const e=new E4.SVGPathData(t),r=[],n=[];for(const i of e.commands){const a="x"in i?i.x:0,o="y"in i?i.y:0;r.push(a),n.push(o)}return{minX:Math.min(...r),minY:Math.min(...n),maxX:Math.max(...r),maxY:Math.max(...n)}}catch{return{minX:0,minY:0,maxX:0,maxY:0}}},fd=(t,e)=>t.replace(/font-size:\s*([\d.]+)pt/g,(r,n)=>`font-size: ${(parseFloat(n)*e).toFixed(1)}px`),EE=(t,e)=>{const{start:r,end:n}=t,i=e*Math.PI/180,a=(r[0]+n[0])/2,o=(r[1]+n[1])/2,s=r[0]-a,l=r[1]-o,u=n[0]-a,c=n[1]-o,f=Math.cos(i),d=Math.sin(i),h=s*f-l*d,v=s*d+l*f,p=u*f-c*d,g=u*d+c*f,m=h+a,y=v+o,_=p+a,b=g+o,x=Math.min(r[0],n[0]),S=Math.min(r[1],n[1]),w=Math.min(m,_),T=Math.min(y,b),L=m-w,C=y-T,M=_-w,A=b-T,E=[L,C],P=[M,A],B=[w-x,T-S];return{start:E,end:P,offset:B}},DE=(t,e)=>{let r=[0,0],n=[0,0];!t.isFlipV&&!t.isFlipH?(r=[0,0],n=[t.width,t.height]):t.isFlipV&&t.isFlipH?(r=[t.width,t.height],n=[0,0]):t.isFlipV&&!t.isFlipH?(r=[0,t.height],n=[t.width,0]):(r=[t.width,0],n=[0,t.height]);const i={type:"line",id:Rt.nanoid(10),width:+((t.borderWidth||1)*e).toFixed(2),left:t.left,top:t.top,start:r,end:n,style:t.borderType||"solid",color:t.borderColor||"#000",points:["",/straightConnector/.test(t.shapType||"")?"arrow":""]};if(t.rotate){const{start:a,end:o,offset:s}=EE(i,t.rotate);i.start=a,i.end=o,i.left=i.left+s[0],i.top=i.top+s[1]}if(/bentConnector/.test(t.shapType||"")&&(i.broken2=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2]),/curvedConnector/.test(t.shapType||"")){const a=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2];i.cubic=[a,a]}return i},AE=t=>{var l;const e=[];for(const u of H4)e.push(...u.children);const r=96/72,i=t.size.width*r,a=t.size.height/t.size.width,o={themeColors:t.themeColors,fontColor:"#333",fontName:"微软雅黑",backgroundColor:"#fff"},s=[];for(const u of t.slides){let c;const f=u.fill;let d="solid",h="#fff";typeof f=="string"?h=f:f&&(d=f.type,h=f.value),d==="image"?c={type:"image",image:{src:h.picBase64,size:"cover"}}:d==="gradient"?c={type:"gradient",gradient:{type:h.path==="line"?"linear":"radial",colors:h.colors.map(g=>({...g,pos:parseInt(g.pos)})),rotate:h.rot+90}}:d==="pattern"?c={type:"solid",color:"#fff"}:c={type:"solid",color:h||"#fff"};const v={id:Rt.nanoid(10),elements:[],background:c,remark:u.note||""},p=u.elements.sort((g,m)=>g.order-m.order);for(const g of p){const m=g.width||1,y=g.height||1,_={...g};if(_.width=_.width*r,_.height=_.height*r,_.left=_.left*r,_.top=_.top*r,_.type==="text"||_.type==="shape"&&_.shapType==="rect"&&_.content,_.type==="text"){const b={type:"text",id:Rt.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,rotate:_.rotate||0,defaultFontName:o.fontName,defaultColor:o.fontColor,content:fd(_.content||"",r),lineHeight:1,outline:{color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"},fill:((l=_.fill)==null?void 0:l.type)==="color"?_.fill.value:"",vertical:_.isVertical};_.shadow&&(b.shadow={h:_.shadow.h*r,v:_.shadow.v*r,blur:_.shadow.blur*r,color:_.shadow.color}),v.elements.push(b)}else if(_.type==="image"){const b={type:"image",id:Rt.nanoid(10),src:_.src||"",width:_.width,height:_.height,left:_.left,top:_.top,fixedRatio:!0,rotate:_.rotate||0,flipH:_.isFlipH,flipV:_.isFlipV};_.borderWidth&&(b.outline={color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"});const x=["roundRect","ellipse","triangle","rhombus","pentagon","hexagon","heptagon","octagon","parallelogram","trapezoid"];_.rect?b.clip={shape:_.geom&&x.includes(_.geom)?_.geom:"rect",range:[[_.rect.l||0,_.rect.t||0],[100-(_.rect.r||0),100-(_.rect.b||0)]]}:_.geom&&x.includes(_.geom)&&(b.clip={shape:_.geom,range:[[0,0],[100,100]]}),v.elements.push(b)}else if(_.type==="math")v.elements.push({type:"image",id:Rt.nanoid(10),src:_.picBase64||"",width:_.width,height:_.height,left:_.left,top:_.top,fixedRatio:!0,rotate:0});else if(_.type==="audio")v.elements.push({type:"audio",id:Rt.nanoid(10),src:_.blob||"",width:_.width,height:_.height,left:_.left,top:_.top,rotate:0,fixedRatio:!1,color:o.themeColors[0],loop:!1,autoplay:!1});else if(_.type==="video")v.elements.push({type:"video",id:Rt.nanoid(10),src:_.blob||_.src,width:_.width,height:_.height,left:_.left,top:_.top,rotate:0,autoplay:!1});else if(_.type==="shape")if(_.shapType==="line"||/Connector/.test(_.shapType||"")){const b=DE(_,r);v.elements.push(b)}else{const b=e.find(M=>M.pptxShapeType===_.shapType),x={mid:"middle",down:"bottom",up:"top"},S=_.fill,w=(S==null?void 0:S.type)==="gradient"?{type:S.value.path==="line"?"linear":"radial",colors:S.value.colors.map(M=>({...M,pos:parseInt(M.pos)})),rotate:S.value.rot}:void 0,T=(S==null?void 0:S.type)==="image"?S.value.picBase64:void 0,L=(S==null?void 0:S.type)==="color"?S.value:"",C={type:"shape",id:Rt.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:L,gradient:w,pattern:T,fixedRatio:!1,rotate:_.rotate||0,outline:{color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"},text:{content:fd(_.content||"",r),defaultFontName:o.fontName,defaultColor:o.fontColor,align:x[_.vAlign||"mid"]||"middle"},flipH:_.isFlipH,flipV:_.isFlipV};if(_.shadow&&(C.shadow={h:_.shadow.h*r,v:_.shadow.v*r,blur:_.shadow.blur*r,color:_.shadow.color}),b){if(C.path=b.path,C.viewBox=b.viewBox,b.pathFormula){C.pathFormula=b.pathFormula,C.viewBox=[_.width,_.height];const M=Ra[b.pathFormula];"editable"in M&&M.editable?(C.path=M.formula(_.width,_.height,M.defaultValue),C.keypoints=M.defaultValue):C.path=M.formula(_.width,_.height)}}else if(_.path&&_.path.indexOf("NaN")===-1){const{maxX:M,maxY:A}=b4(_.path);C.path=_.path,M/A>m/y?C.viewBox=[M,M*y/m]:C.viewBox=[A*m/y,A]}if(_.shapType==="custom"){_.path.indexOf("NaN")!==-1?(C.width===0&&(C.width=.1),C.height===0&&(C.height=.1),C.path=_.path.replace(/NaN/g,"0")):(C.special=!0,C.path=_.path);const{maxX:M,maxY:A}=b4(C.path);M/A>m/y?C.viewBox=[M,M*y/m]:C.viewBox=[A*m/y,A]}C.path&&v.elements.push(C)}else if(_.type==="table"){const b=_.data.length,x=_.data[0].length,S={fontname:o.fontName,color:o.fontColor},w=[];for(let T=0;T<b;T++){const L=[];for(let C=0;C<x;C++){const M=_.data[T][C];let A=null;typeof document<"u"&&(A=document.createElement("div"),A.innerHTML=M.text);let E="left",P="14px";if(A){const B=A.querySelector("p");E=(B==null?void 0:B.style.textAlign)||"left";const k=A.querySelector("span");P=(k==null?void 0:k.style.fontSize)||"14px"}L.push({id:Rt.nanoid(10),colspan:1,rowspan:1,text:fd(M.text,r),style:{...S,align:E,fontsize:P}})}w.push(L)}v.elements.push({type:"table",id:Rt.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,colWidths:new Array(x).fill(1/x),data:w,theme:{color:o.themeColors[0],rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},outline:{width:2,style:"solid",color:"#eeece1"},cellMinHeight:36,rotate:0})}}s.push(v)}return{slides:s,theme:{themeColors:o.themeColors,fontColor:o.fontColor,fontName:o.fontName,backgroundColor:o.backgroundColor},viewportRatio:a,viewportSize:i}},PE=({initialSlidesData:t,onDataUpdate:e})=>{const{setSlides:r,setTheme:n,setViewportRatio:i,setViewportSize:a}=kt.getState();return O.useEffect(()=>{if(t){const{slides:o,theme:s,viewportRatio:l,viewportSize:u}=AE(t);console.log("initialSlidesData",o,s,l,u),r(o),n(s),i(l),a(u)}},[]),O.useEffect(()=>{const o=kt.subscribe(s=>{const l={slides:s.slides,title:s.title,theme:s.theme,viewportRatio:s.viewportRatio};e(l)});return()=>o()},[e]),D.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:D.jsx(CE,{})})};$t.ElementTypes=Ft,$t.PPTCanvas=PE,$t.ShapePathFormulasKeys=At,Object.defineProperty($t,Symbol.toStringTag,{value:"Module"})});
|