@8btc/wujie-ppt 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -5
- package/dist/PPTCanvas.d.ts +9 -14
- package/dist/PPTCanvas.test.d.ts +1 -0
- package/dist/mocks/import.ts +848 -0
- package/dist/mocks/slides2.json +316 -0
- package/dist/utils/import-parser.d.ts +92 -0
- package/dist/wujie-ppt.es.js +6741 -5572
- package/dist/wujie-ppt.umd.js +26 -26
- package/package.json +3 -2
package/dist/wujie-ppt.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Xt,
|
|
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
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
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
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
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
|
|
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
19
|
`),Ke=At.stack.split(`
|
|
20
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=
|
|
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
22
|
|
|
23
|
-
Check the render method of \``+V+"`."}return""}}function
|
|
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
24
|
|
|
25
|
-
Check the top-level render call using <`+pt+">.")}return rt}}function
|
|
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
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Ov,Ki,vD,Ki),K_[Ki+Ov]=!0}}return V===n?lD(be):sD(be),be}}function uD(V,rt,pt){return Q_(V,rt,pt,!0)}function cD(V,rt,pt){return Q_(V,rt,pt,!1)}var fD=cD,hD=uD;to.Fragment=n,to.jsx=fD,to.jsxs=hD}()),to}process.env.NODE_ENV==="production"?vc.exports=i4():vc.exports=a4();var E=vc.exports;const Is=(t,e)=>t.type===e.nodes.bullet_list||t.type===e.nodes.ordered_list,dr=t=>{const{empty:e}=t.state.selection;e&&te.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))}},o4=(t,e,r,n)=>{let i=e;const a=v=>v.type===n;let o=null,s=null,l=null;for(;i<=r;){const v=t.nodeAt(i);if(!v||!v.marks)return null;const h=v.marks.find(a);if(!h||o&&h!==o)return null;s=s||v,o=o||h,l=v,i++}let u=e,c=r,f=0;for(i=e-1;i>f;){const v=t.nodeAt(i),h=v&&v.marks.find(a);if(!h||h!==o)break;u=i,s=v,i--}for(i=r+1,f=t.nodeSize-2;i<f;){const v=t.nodeAt(i),h=v&&v.marks.find(a);if(!h||h!==o)break;c=i,l=v,i++}return{mark:o,from:{node:s,pos:u},to:{node:l,pos:c}}},s4=(t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t,l4=(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}}},Hv=t=>e=>l4(e.$from,t),u4=t=>e=>Hv(r=>s4(t,r))(e),Bs=(t,e)=>{const r=e.schema.nodes[t];return!!u4(r)(e.selection)},Gv=t=>t?t.type.name==="text"?t:t.lastChild?Gv(t.lastChild):null:null,Wv=t=>{const{selection:e,doc:r}=t.state,{from:n}=e;let i=r.nodeAt(n)||r.nodeAt(n-1);return i=Gv(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},c4=(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)},f4=(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},jv={color:"#000000",backcolor:"",fontsize:"16px",fontname:"",align:"left"},h4=(t,e={})=>{const r={...jv,...e},n=Wv(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,v=Qi(n,"backcolor","backcolor")||r.backcolor,h=Qi(n,"fontsize","fontsize")||r.fontsize,d=Qi(n,"fontname","fontname")||r.fontname,p=Qi(n,"link","href")||"",g=f4(t,"align")||r.align,m=Bs("bullet_list",t.state),y=Bs("ordered_list",t.state),_=Bs("blockquote",t.state);return{bold:i,em:a,underline:o,strikethrough:s,superscript:l,subscript:u,code:c,color:f,backcolor:v,fontsize:h,fontname:d,link:p,align:g,bulletList:m,orderedList:y,blockquote:_}},$v=t=>{const e=Wv(t),r=Qi(e,"fontsize","fontsize")||jv.fontsize;return parseInt(r)},v4={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=Ns.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 v=a[f].sectionTag;if(v){const h=a[f+1];h&&!h.sectionTag&&(delete a[f].sectionTag,a[f+1].sectionTag=v)}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 v={...n,slides:f};return{...v,...Pr(v)}}),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(v=>v.id===i?Ar.omit(v,o):v),c=[...n.slides];c[s]={...l,elements:u};const f={...n,slides:c};return{...f,...Pr(f)}})})),d4=ue.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")(10),Tt=Ns.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:v4,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],databaseId:d4,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})})),p4=Ns.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(),v=s>l.length-1?l.length-1:s;u(l),c(v),t({snapshotCursor:a}),f([])}})),pr=Ns.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 g4=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}}),Xv=t=>new Promise(e=>{const r=new FileReader;r.addEventListener("load",()=>{e(r.result)}),r.readAsDataURL(t)}),m4=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}},y4=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||{}),Ut=(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))(Ut||{});const Vs={[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`}}};Nt.ROUND_RECT,Nt.CUT_RECT_SINGLE,Nt.CUT_RECT_SAMESIDE,Nt.CUT_RECT_DIAGONAL,Nt.CUT_ROUND_RECT,Nt.ROUND_RECT_SINGLE,Nt.ROUND_RECT_SAMESIDE,Nt.ROUND_RECT_DIAGONAL,Nt.TRIANGLE,Nt.PARALLELOGRAM_LEFT,Nt.PARALLELOGRAM_RIGHT,Nt.TRAPEZOID,Nt.BULLET,Nt.INDICATOR,Nt.L,Nt.RING_RECT,Nt.PLUS,Nt.MESSAGE,Nt.ROUND_MESSAGE;const _4={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}=p4(),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}},eo=()=>{const{creatingElement:t,setCreatingElement:e,setActiveElementIdList:r,setEditorareaFocus:n}=Tt(),{theme:i,viewportRatio:a,viewportSize:o,addElement:s}=Bt(),{addHistorySnapshot:l}=Be(),u=(x,b)=>{s(x),r([x.id]),t&&e(null),setTimeout(()=>{n(!0)},0),b&&b(),l()};return{createElement:u,createImageElement:x=>{g4(x).then(({width:b,height:S})=>{const w=S/b;w<a&&b>o?(b=o,S=b*w):S>o*a&&(S=o*a,b=S/w),u({type:"image",id:ue.nanoid(10),src:x,width:b,height:S,left:(o-b)/2,top:(o*a-S)/2,fixedRatio:!0,rotate:0})})},createChartElement:x=>{u({type:"chart",id:ue.nanoid(10),chartType:x,left:300,top:81.25,width:400,height:400,rotate:0,themeColors:i.themeColors,textColor:i.fontColor,data:_4[x]})},createTableElement:(x,b)=>{const S={fontname:i.fontName,color:i.fontColor},w=[];for(let M=0;M<x;M++){const P=[];for(let B=0;B<b;B++)P.push({id:ue.nanoid(10),colspan:1,rowspan:1,text:"",style:S});w.push(P)}const T=100,L=36,D=new Array(b).fill(1/b),C=b*T,A=x*L;u({type:"table",id:ue.nanoid(10),width:C,height:A,colWidths:D,rotate:0,data:w,left:(o-C)/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,b)=>{const{left:S,top:w,width:T,height:L}=x,D=(b==null?void 0:b.content)||"",C=(b==null?void 0:b.vertical)||!1,A=ue.nanoid(10);u({type:"text",id:A,left:S,top:w,width:T,height:L,content:D,rotate:0,defaultFontName:i.fontName,defaultColor:i.fontColor,vertical:C},()=>{setTimeout(()=>{const M=document.querySelector(`#editable-element-${A} .ProseMirror`);M&&M.focus()},0)})},createShapeElement:(x,b,S={})=>{const{left:w,top:T,width:L,height:D}=x,C={type:"shape",id:ue.nanoid(10),left:w,top:T,width:L,height:D,viewBox:b.viewBox,path:b.path,fill:i.themeColors[0],fixedRatio:!1,rotate:0,...S};if(b.withborder&&(C.outline=i.outline),b.special&&(C.special=!0),b.pathFormula){C.pathFormula=b.pathFormula,C.viewBox=[L,D];const A=Vs[b.pathFormula];"editable"in A&&A.editable?(C.path=A.formula(L,D,A.defaultValue),C.keypoints=A.defaultValue):C.path=A.formula(L,D)}u(C)},createCustomShapeElement:x=>{const{start:b,viewBox:S,path:w,fill:T,outline:L}=x;u({type:"shape",id:ue.nanoid(10),left:b[0],top:b[1],width:S[0],height:S[1],viewBox:S,path:w,fill:T||i.themeColors[0],rotate:0,outline:L,fixedRatio:!1})},createLineElement:(x,b)=>{const{left:S,top:w,start:T,end:L}=x,D={type:"line",id:ue.nanoid(10),left:S,top:w,start:T,end:L,points:b.points,color:i.themeColors[0],style:b.style,width:2};b.isBroken&&(D.broken=[(T[0]+L[0])/2,(T[1]+L[1])/2]),b.isBroken2&&(D.broken2=[(T[0]+L[0])/2,(T[1]+L[1])/2]),b.isCurve&&(D.curve=[(T[0]+L[0])/2,(T[1]+L[1])/2]),b.isCubic&&(D.cubic=[[(T[0]+L[0])/2,(T[1]+L[1])/2],[(T[0]+L[0])/2,(T[1]+L[1])/2]]),u(D)},createLatexElement:x=>{u({type:"latex",id:ue.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,b)=>{const S={type:"video",id:ue.nanoid(10),width:500,height:300,rotate:0,left:(o-500)/2,top:(o*a-300)/2,src:x,autoplay:!1};b&&(S.ext=b),u(S)},createAudioElement:(x,b)=>{const S={type:"audio",id:ue.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};b&&(S.ext=b),u(S)}}},Uv="pptist",Yv=t=>cc.AES.encrypt(t,Uv).toString(),x4=t=>cc.AES.decrypt(t,Uv).toString(cc.enc.Utf8),Zv=t=>new Promise((e,r)=>{const n=document.createElement("button"),i=new J_(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)}),Kv=()=>new Promise((t,e)=>{var r;(r=navigator.clipboard)!=null&&r.readText?navigator.clipboard.readText().then(n=>(n||e("剪贴板为空或者不包含文本"),t(n))):e("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),Qv=t=>{let e;try{e=JSON.parse(x4(t))}catch{e=t}return e},b4=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},S4=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 v=0;v<f;v++)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,v=[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(...v),Math.max(...v)],yRange:[Math.min(...h),Math.max(...h)]}},ro=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}},Jv=t=>{const e=[],r=[],n=[],i=[];t.forEach(u=>{const{minX:c,maxX:f,minY:v,maxY:h}=ro(u);e.push(c),r.push(v),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},w4=t=>{const e={};for(const r of t)e[r.id]=ue.nanoid(10);return e},dc=t=>{const e={},r={};for(const n of t){const i=n.groupId;i&&!e[i]&&(e[i]=ue.nanoid(10)),r[n.id]=ue.nanoid(10)}return{groupIdMap:e,elIdMap:r}},T4=t=>{const e=Os(t);return[e.setAlpha(.3).toRgbString(),e.setAlpha(.1).toRgbString()]},qv=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}=ro(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},L4=t=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(t),td=()=>{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}=dc(s),c=s[0];let f=0,v;do v=e.elements.find(h=>{if(h.type!==c.type)return!1;const{minX:d,maxX:p,minY:g,maxY:m}=ro(h),{minX:y,maxX:_,minY:x,maxY:b}=ro({...c,left:c.left+f,top:c.top+f});return d===y&&p===_&&g===x&&m===b}),v&&(f+=10);while(v);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=w4(s),u=s.map(c=>{const{groupIdMap:f,elIdMap:v}=dc(c.elements);for(const h of c.elements)h.id=v[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=ue.nanoid(10),h.elId=v[h.elId];return{...c,id:l[c.id]}});n(u),i()}}},M4=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},ed=()=>{const{shiftKeyState:t}=pr(),{createTextElement:e,createImageElement:r}=eo(),{addElementsFromData:n,addSlidesFromData:i}=td(),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=Qv(s);if(typeof f=="object"){const{type:v,data:h}=f;v==="elements"&&!u?n(h):v==="slides"&&!c&&i(h)}else if(!c&&!u)if(t){const v=pc(f);a(v)}else if(M4(f))r(f);else if(L4(f))a(`<a href="${f}" title="${f}" target="_blank">${f}</a>`);else if(m4(f)){const v=y4(f);Xv(v).then(h=>r(h))}else{const v=pc(f);a(v)}}}},C4=()=>{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:v,setSlides:h}=Bt(),d=N.useMemo(()=>[...t,l],[t,l]),p=N.useMemo(()=>o.filter((R,k)=>d.includes(k)),[o,d]),g=N.useMemo(()=>p.map(R=>R.id),[p]),{pasteTextClipboardData:m}=ed(),{addSlidesFromData:y}=td(),{addHistorySnapshot:_}=Be(),x=()=>{const R={id:ue.nanoid(10),elements:[],background:{type:"solid",color:s.backgroundColor}};u(0),r([]),h([R])},b=R=>{R===me.UP&&l>0?(e.length&&r([]),u(l-1)):R===me.DOWN&&l<o.length-1&&(e.length&&r([]),u(l+1))},S=()=>{const R=Yv(JSON.stringify({type:"slides",data:p}));Zv(R).then(()=>{n(!0)})},w=()=>{Kv().then(R=>{m(R,{onlySlide:!0})}).catch(R=>console.warn(R))},T=()=>{const R={id:ue.nanoid(10),elements:[],background:{type:"solid",color:s.backgroundColor}};r([]),c(R),_()},L=R=>{const{groupIdMap:k,elIdMap:H}=dc(R.elements);for(const F of R.elements)F.id=H[F.id],F.groupId&&(F.groupId=k[F.groupId]);const I={...R,id:ue.nanoid(10)};r([]),c(I),_()},D=()=>{const R=JSON.parse(JSON.stringify(a));y([R])},C=(R=g)=>{o.length===R.length?x():f(R),i([]),_()},A=()=>{const R=[...g];S(),C(R)},M=()=>{const R=Array.from(Array(o.length),(k,H)=>H);r([]),i(R)},P=(R,k)=>{if(k===R)return;const H=JSON.parse(JSON.stringify(o)),I=H[k],F=I.sectionTag;if(F){const W=H[k+1];delete I.sectionTag,W&&!W.sectionTag&&(W.sectionTag=F)}if(R===0){const W=H[0].sectionTag;W&&(delete H[0].sectionTag,I.sectionTag=W)}const O=H[k];H.splice(k,1),H.splice(R,0,O),h(H),u(R)},B=N.useMemo(()=>!(o.length>1||o[0].elements.length>0),[o]);return{resetSlides:x,updateSlideIndex:b,copySlide:S,pasteSlide:w,createSlide:T,createSlideByTemplate:L,copyAndPasteSlide:D,deleteSlide:C,cutSlide:A,selectAllSlide:M,sortSlides:P,isEmptySlide:B}};function E4(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 D4=()=>{const t=window.getSelection();t&&t.removeAllRanges()},A4=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),v=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),b=_*u,S=x*u;s(_/c),r(w=>w-(_-x)/2),i(w=>w-(b-S)/2)}else{const _=y*(g/100),x=y*(p/100),b=_/u,S=x/u;s(_/(c*u)),r(w=>w-(b-S)/2),i(w=>w-(_-x)/2)}},[a,u,c,s,t]),N.useEffect(()=>{v()},[v]),N.useEffect(()=>{o||v()},[o,v]),N.useEffect(()=>{const p=t.current;if(!p)return;v();const g=new ResizeObserver(()=>{v()});return g.observe(p),()=>{g.disconnect()}},[t,v]),{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,b=w=>{if(!g)return;const T=w.pageX,L=w.pageY;r(_+(T-m)),i(x+(L-y))},S=()=>{g=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",S),l(!0)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",S)}}},P4=(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:v,setActiveElementIdList:h}=Tt.getState(),d=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 _=b=>{if(!u)return;const S=b.pageX,w=b.pageY,T=(S-p)/f,L=(w-g)/f,D=Math.abs(T),C=Math.abs(L);if(D<d||C<d)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:D,height:C,quadrant:A},a({...o.current}),n(!0)},x=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",x),u=!1;const{ctrlOrShiftKeyActive:b}=pr.getState(),S=o.current,w=S.left,T=S.top,L=S.width,D=S.height,C=S.quadrant;let A=[];for(let P=0;P<t.length;P++){const B=t[P],{minX:R,maxX:k,minY:H,maxY:I}=ro(B);let F=!1;b?C===4?F=k>w&&R<w+L&&I>T&&H<T+D:C===2?F=k>w-L&&R<w-L+L&&I>T-D&&H<T-D+D:C===1?F=k>w&&R<w+L&&I>T-D&&H<T-D+D:C===3&&(F=k>w-L&&R<w-L+L&&I>T&&H<T+D):C===4?F=R>w&&k<w+L&&H>T&&I<T+D:C===2?F=R>w-L&&k<w-L+L&&H>T-D&&I<T-D+D:C===1?F=R>w&&k<w+L&&H>T-D&&I<T-D+D:C===3&&(F=R>w-L&&k<w-L+L&&H>T&&I<T+D),F&&!v.includes(B.id)&&A.push(B)}A=A.filter(P=>{if(P.groupId){const B=A.map(k=>k.id);return t.filter(k=>k.groupId===P.groupId).every(k=>B.includes(k.id))}return!0});const M=A.map(P=>P.id);h(M),n(!1)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",x)}}},rd={"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"},k4=()=>{const{createImageElement:t,createVideoElement:e,createAudioElement:r}=eo();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&&(Xv(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=rd[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=rd[u.type]||"";r(c,f),s=!0}}}return{isFile:s,dataTransferFirstItem:o}}}},R4=t=>{const{createTextElement:e}=eo(),{pasteDataTransfer:r}=k4();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])},N4=t=>{const{canvasScale:e,creatingElement:r,setCreatingElement:n}=Tt(),{createTextElement:i,createShapeElement:a,createLineElement:o}=eo(),s=c=>{const{start:f,end:v}=c;if(!t.current)return;const h=t.current.getBoundingClientRect(),[d,p]=f,[g,m]=v,y=Math.min(d,g),_=Math.max(d,g),x=Math.min(p,m),b=Math.max(p,m),S=(y-h.x)/e,w=(x-h.y)/e,T=(_-y)/e,L=(b-x)/e;return{left:S,top:w,width:T,height:L}},l=c=>{const{start:f,end:v}=c;if(!t.current)return;const h=t.current.getBoundingClientRect(),[d,p]=f,[g,m]=v,y=Math.min(d,g),_=Math.max(d,g),x=Math.min(p,m),b=Math.max(p,m),S=(y-h.x)/e,w=(x-h.y)/e,T=(_-y)/e,L=(b-x)/e;return{left:S,top:w,start:[d===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 v=s(c);v&&i(v,{vertical:r.vertical})}else if(f==="shape"){const v=s(c);v&&a(v,r.data)}else if(f==="line"){const v=l(c);v&&o(v,r.data)}n(null)}}},O4=(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:v}=Bt.getState(),h=v,d=v*f,p=5,m=JSON.parse(JSON.stringify(t)).filter(j=>l.includes(j.id)),y=o.left,_=o.top,x=o.width,b="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=Tt.getState().canvasScale,D=pr.getState().shiftKeyState;let C=null;const A=o.id===u;let M=[],P=[];for(const j of t){if(j.type==="line"||A&&j.id===o.id||!A&&l.includes(j.id))continue;let X,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});X=_t[0],et=mt[0],ft=_t[1]-_t[0],gt=mt[1]-mt[0]}else X=j.left,et=j.top,ft=j.width,gt=j.height;const Y=X+ft,U=et+gt,q=et+gt/2,tt=X+ft/2,nt={value:et,range:[X,Y]},at={value:U,range:[X,Y]},st={value:q,range:[X,Y]},Et={value:X,range:[et,U]},K={value:Y,range:[et,U]},J={value:tt,range:[et,U]};M.push(nt,at,st),P.push(Et,K,J)}const B={value:0,range:[0,h]},R={value:d,range:[0,h]},k={value:d/2,range:[0,h]},H={value:0,range:[0,d]},I={value:h,range:[0,d]},F={value:h/2,range:[0,d]};M.push(B,R,k),P.push(H,I,F),M=Fs(M),P=Fs(P);const O=j=>{const X=j instanceof MouseEvent?j.pageX:j.changedTouches[0].pageX,et=j instanceof MouseEvent?j.pageY:j.changedTouches[0].pageY;if(C!==!1&&(C=Math.abs(w-X)<p&&Math.abs(T-et)<p),!c||C)return;let ft=(X-w)/L,gt=(et-T)/L;D&&(Math.abs(ft)>Math.abs(gt)&&(gt=0),Math.abs(ft)<Math.abs(gt)&&(ft=0));let Y=y+ft,U=_+gt,q,tt,nt,at;if(l.length===1||A)if(S){const{xRange:mt,yRange:xt}=zs({left:Y,top:U,width:x,height:b,rotate:S});q=mt[0],tt=mt[1],nt=xt[0],at=xt[1]}else o.type==="line"?(q=Y,tt=Y+Math.max(o.start[0],o.end[0]),nt=U,at=U+Math.max(o.start[1],o.end[1])):(q=Y,tt=Y+x,nt=U,at=U+b);else{const mt=[],xt=[],$=[],G=[];for(let Q=0;Q<m.length;Q++){const Z=m[Q],ut=Z.left+ft,vt=Z.top+gt,ct=Z.width,$t="height"in Z&&Z.height?Z.height:0,Kt="rotate"in Z&&Z.rotate?Z.rotate:0;if("rotate"in Z&&Z.rotate){const{xRange:Gt,yRange:pe}=zs({left:ut,top:vt,width:ct,height:$t,rotate:Kt});mt.push(Gt[0]),xt.push(pe[0]),$.push(Gt[1]),G.push(pe[1])}else Z.type==="line"?(mt.push(ut),xt.push(vt),$.push(ut+Math.max(Z.start[0],Z.end[0])),G.push(vt+Math.max(Z.start[1],Z.end[1]))):(mt.push(ut),xt.push(vt),$.push(ut+ct),G.push(vt+$t))}q=Math.min(...mt),tt=Math.max(...$),nt=Math.min(...xt),at=Math.max(...G)}const st=q+(tt-q)/2,Et=nt+(at-nt)/2,K=[];let J=!1,_t=!1;for(let mt=0;mt<M.length;mt++){const{value:xt,range:$}=M[mt],G=Math.min(...$,q,tt),Q=Math.max(...$,q,tt);Math.abs(nt-xt)<p&&!_t&&(U=U-(nt-xt),_t=!0,K.push({type:"horizontal",axis:{x:G-50,y:xt},length:Q-G+100})),Math.abs(at-xt)<p&&!_t&&(U=U-(at-xt),_t=!0,K.push({type:"horizontal",axis:{x:G-50,y:xt},length:Q-G+100})),Math.abs(Et-xt)<p&&!_t&&(U=U-(Et-xt),_t=!0,K.push({type:"horizontal",axis:{x:G-50,y:xt},length:Q-G+100}))}for(let mt=0;mt<P.length;mt++){const{value:xt,range:$}=P[mt],G=Math.min(...$,nt,at),Q=Math.max(...$,nt,at);Math.abs(q-xt)<p&&!J&&(Y=Y-(q-xt),J=!0,K.push({type:"vertical",axis:{x:xt,y:G-50},length:Q-G+100})),Math.abs(tt-xt)<p&&!J&&(Y=Y-(tt-xt),J=!0,K.push({type:"vertical",axis:{x:xt,y:G-50},length:Q-G+100})),Math.abs(st-xt)<p&&!J&&(Y=Y-(st-xt),J=!0,K.push({type:"vertical",axis:{x:xt,y:G-50},length:Q-G+100}))}if(r(K),l.length===1||A)e(mt=>mt.map(xt=>xt.id===o.id?{...xt,left:Y,top:U}:xt));else{const mt=t.find(xt=>xt.id===o.id);if(!mt)return;e(xt=>xt.map($=>l.includes($.id)?$.id===o.id?{...$,left:Y,top:U}:{...$,left:$.left+(Y-mt.left),top:$.top+(U-mt.top)}:$))}},W=j=>{c=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,r([]);const X=j instanceof MouseEvent?j.pageX:j.changedTouches[0].pageX,et=j instanceof MouseEvent?j.pageY:j.changedTouches[0].pageY;w===X&&T===et||n()};s?(document.ontouchmove=O,document.ontouchend=W):(document.onmousemove=O,document.onmouseup=W)}}},I4=(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 v=[];if(a.groupId){const h=[];t.forEach(d=>{d.groupId===a.groupId&&h.push(d.id)}),v=s.filter(d=>!h.includes(d))}else v=s.filter(h=>h!==a.id);v.length>0&&r.setActiveElementIdList(v)}else if(u!==a.id)r.setHandleElementId(a.id);else if(l!==a.id){let v=0,h=0;if(i instanceof MouseEvent?(v=i.pageX,h=i.pageY):"changedTouches"in i&&i.changedTouches&&i.changedTouches.length>0&&(v=i.changedTouches[0].pageX,h=i.changedTouches[0].pageY),v||h){const d=i.target;d.onmouseup=p=>{const g=p.pageX,m=p.pageY;v===g&&h===m&&(r.setActiveGroupElementId(a.id),d.onmouseup=null)}}}}else{let v=[];if(f?v=[...s,a.id]:v=[a.id],a.groupId){const h=[];t.forEach(d=>{d.groupId===a.groupId&&h.push(d.id)}),v=[...v,...h]}r.setActiveElementIdList(Ar.uniq(v)),r.setHandleElementId(a.id)}o&&e(i,a)}}},B4=(t,e)=>{const r=Math.atan2(t,e);return 180/Math.PI*r},V4=(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,v=o.top,h=o.width,d=o.height,p=Tt.getState().canvasScale,g=f+h/2,m=v+d/2;if(!r.current)return;const y=r.current.getBoundingClientRect(),_=b=>{if(!l)return;const S=b instanceof MouseEvent?b.pageX:b.changedTouches[0].pageX,w=b instanceof MouseEvent?b.pageY:b.changedTouches[0].pageY,T=(S-y.left)/p,L=(w-y.top)/p,D=T-g,C=m-L;u=B4(D,C);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(M=>M.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 kr=(t=>(t.UP="up",t.DOWN="down",t.TOP="top",t.BOTTOM="bottom",t))(kr||{}),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||{}),no=(t=>(t.T="top",t.B="bottom",t.L="left",t.R="right",t))(no||{}),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 z4={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,v=i/2,h=a/2,d=r+v,p=n+h,g={left:d+o*Math.cos(l),top:p-o*Math.sin(l)},m={left:d+h*Math.cos(c),top:p-h*Math.sin(c)},y={left:d+o*Math.cos(u),top:p-o*Math.sin(u)},_={left:d+v*Math.cos(f),top:p+v*Math.sin(f)},x={left:d-o*Math.cos(l),top:p+o*Math.sin(l)},b={left:d-h*Math.sin(f),top:p+h*Math.cos(f)},S={left:d-o*Math.cos(u),top:p+o*Math.sin(u)},w={left:d-v*Math.cos(f),top:p-v*Math.sin(f)};return{leftTopPoint:g,topPoint:m,rightTopPoint:y,rightPoint:_,rightBottomPoint:x,bottomPoint:b,leftBottomPoint:S,leftPoint:w}},id=(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],F4=(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 v=l.left,h=l.top,d=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,b=d/p,S=c?s.changedTouches[0].pageX:s.pageX,w=c?s.changedTouches[0].pageY:s.pageY,T=Tt.getState().canvasScale,L=z4[l.type]||20,D=(I,F)=>{if(!x)return I<L?L:I;let O=L,W=L;const j=l.width/l.height;return j<1&&(W=L/j),j>1&&(O=L*j),F==="width"?I<O?O:I:I<W?W:I};let C,A=0,M=0,P=[],B=[];if("rotate"in l&&l.rotate){const{left:I,top:F,width:O,height:W}=l;C=nd({left:I,top:F,width:O,height:W},m);const j=id(u,C);A=j.left,M=j.top}else{const{viewportRatio:I,viewportSize:F}=Bt.getState(),{activeElementIdList:O,activeGroupElementId:W}=Tt.getState(),j=F,X=F*I,et=l.id===W;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]},$={value:at,range:[st,_t]},G={value:J,range:[st,_t]};P.push(mt,xt),B.push($,G)}const ft={value:0,range:[0,j]},gt={value:X,range:[0,j]},Y={value:X/2,range:[0,j]},U={value:0,range:[0,X]},q={value:j,range:[0,X]},tt={value:j/2,range:[0,X]};P.push(ft,gt,Y),B.push(U,q,tt),P=Fs(P),B=Fs(B)}const R=(I,F)=>{const W=[];let j=!1,X=!1;const et={offsetX:0,offsetY:0};if(F||F===0)for(let ft=0;ft<P.length;ft++){const{value:gt,range:Y}=P[ft],U=Math.min(...Y,I||0),q=Math.max(...Y,I||0);Math.abs(F-gt)<5&&!X&&(et.offsetY=F-gt,X=!0,W.push({type:"horizontal",axis:{x:U-50,y:gt},length:q-U+100}))}if(I||I===0)for(let ft=0;ft<B.length;ft++){const{value:gt,range:Y}=B[ft],U=Math.min(...Y,F||0),q=Math.max(...Y,F||0);Math.abs(I-gt)<5&&!j&&(et.offsetX=I-gt,j=!0,W.push({type:"vertical",axis:{x:gt,y:U-50},length:q-U+100}))}return r(W),et},k=I=>{if(!f)return;const F=I instanceof MouseEvent?I.pageX:I.changedTouches[0].pageX,O=I instanceof MouseEvent?I.pageY:I.changedTouches[0].pageY,W=F-S,j=O-w;let X=d,et=p,ft=v,gt=h;if(m){const Y=(Math.cos(y)*W+Math.sin(y)*j)/T;let U=(Math.cos(y)*j-Math.sin(y)*W)/T;x&&((u===it.RIGHT_BOTTOM||u===it.LEFT_TOP)&&(U=Y/b),(u===it.LEFT_BOTTOM||u===it.RIGHT_TOP)&&(U=-Y/b)),u===it.RIGHT_BOTTOM?(X=D(d+Y,"width"),et=D(p+U,"height")):u===it.LEFT_BOTTOM?(X=D(d-Y,"width"),et=D(p+U,"height"),ft=v-(X-d)):u===it.LEFT_TOP?(X=D(d-Y,"width"),et=D(p-U,"height"),ft=v-(X-d),gt=h-(et-p)):u===it.RIGHT_TOP?(X=D(d+Y,"width"),et=D(p-U,"height"),gt=h-(et-p)):u===it.TOP?(et=D(p-U,"height"),gt=h-(et-p)):u===it.BOTTOM?et=D(p+U,"height"):u===it.LEFT?(X=D(d-Y,"width"),ft=v-(X-d)):u===it.RIGHT&&(X=D(d+Y,"width"));const q=nd({width:X,height:et,left:ft,top:gt},m),tt=id(u,q),nt=tt.left,at=tt.top,st=nt-A,Et=at-M;ft=ft-st,gt=gt-Et}else{let Y=W/T,U=j/T;if(x&&((u===it.RIGHT_BOTTOM||u===it.LEFT_TOP)&&(U=Y/b),(u===it.LEFT_BOTTOM||u===it.RIGHT_TOP)&&(U=-Y/b)),u===it.RIGHT_BOTTOM){const{offsetX:q,offsetY:tt}=R(v+d+Y,h+p+U);Y=Y-q,U=U-tt,x&&(tt?Y=U*b:U=Y/b),X=D(d+Y,"width"),et=D(p+U,"height")}else if(u===it.LEFT_BOTTOM){const{offsetX:q,offsetY:tt}=R(v+Y,h+p+U);Y=Y-q,U=U-tt,x&&(tt?Y=-U*b:U=-Y/b),X=D(d-Y,"width"),et=D(p+U,"height"),ft=v-(X-d)}else if(u===it.LEFT_TOP){const{offsetX:q,offsetY:tt}=R(v+Y,h+U);Y=Y-q,U=U-tt,x&&(tt?Y=U*b:U=Y/b),X=D(d-Y,"width"),et=D(p-U,"height"),ft=v-(X-d),gt=h-(et-p)}else if(u===it.RIGHT_TOP){const{offsetX:q,offsetY:tt}=R(v+d+Y,h+U);Y=Y-q,U=U-tt,x&&(tt?Y=-U*b:U=-Y/b),X=D(d+Y,"width"),et=D(p-U,"height"),gt=h-(et-p)}else if(u===it.LEFT){const{offsetX:q}=R(v+Y,null);Y=Y-q,X=D(d-Y,"width"),ft=v-(X-d)}else if(u===it.RIGHT){const{offsetX:q}=R(v+d+Y,null);Y=Y-q,X=D(d+Y,"width")}else if(u===it.TOP){const{offsetY:q}=R(null,h+U);U=U-q,et=D(p-U,"height"),gt=h-(et-p)}else if(u===it.BOTTOM){const{offsetY:q}=R(null,h+p+U);U=U-q,et=D(p+U,"height")}}e(Y=>Y.map(U=>{if(l.id!==U.id)return U;if(U.type==="shape"&&"pathFormula"in U&&U.pathFormula){const q=Vs[U.pathFormula];let tt="";return"editable"in q?tt=q.formula(X,et,U.keypoints):tt=q.formula(X,et),{...U,left:ft,top:gt,width:X,height:et,viewBox:[X,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:X}:{...U,left:ft,top:gt,width:X,height:et,cellMinHeight:q<36?36:q}}return{...U,left:ft,top:gt,width:X,height:et}}))},H=I=>{f=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,r([]);const F=I instanceof MouseEvent?I.pageX:I.changedTouches[0].pageX,O=I instanceof MouseEvent?I.pageY:I.changedTouches[0].pageY;S===F&&w===O||(i(),n.setScalingState(!1))};c?(document.ontouchmove=k,document.ontouchend=H):(document.onmousemove=k,document.onmouseup=H)},scaleMultiElement:(s,l,u)=>{let c=!0;const{minX:f,maxX:v,minY:h,maxY:d}=l,p=v-f,g=d-h,m=p/g,y=s.pageX,_=s.pageY,x=Tt.getState().canvasScale,{activeElementIdList:b}=Tt.getState(),{ctrlOrShiftKeyActive:S}=pr.getState(),w=JSON.parse(JSON.stringify(t));document.onmousemove=T=>{if(!c)return;const L=T.pageX,D=T.pageY,C=(L-y)/x;let A=(D-_)/x;S&&((u===it.RIGHT_BOTTOM||u===it.LEFT_TOP)&&(A=C/m),(u===it.LEFT_BOTTOM||u===it.RIGHT_TOP)&&(A=-C/m));let M=f,P=v,B=h,R=d;u===it.RIGHT_BOTTOM?(P=v+C,R=d+A):u===it.LEFT_BOTTOM?(M=f+C,R=d+A):u===it.LEFT_TOP?(M=f+C,B=h+A):u===it.RIGHT_TOP?(P=v+C,B=h+A):u===it.TOP?B=h+A:u===it.BOTTOM?R=d+A:u===it.LEFT?M=f+C:u===it.RIGHT&&(P=v+C);const k=P-M,H=R-B;let I=k/p,F=H/g;I<=0&&(I=0),F<=0&&(F=0),e(O=>O.map(W=>{if((W.type==="image"||W.type==="shape")&&b.includes(W.id)){const j=w.find(X=>X.id===W.id);return j?{...W,width:j.width*I,height:j.height*F,left:M+(j.left-f)*I,top:B+(j.top-h)*F}:W}return W}))},document.onmouseup=T=>{c=!1,document.onmousemove=null,document.onmouseup=null,!(y===T.pageX&&_===T.pageY)&&i()}}}},H4=(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,v=pr.getState().ctrlOrShiftKeyActive,h=[];for(let d=0;d<t.length;d++){const p=t[d];if(p.type==="line"||p.rotate)continue;const g=p.left,m=p.top,y=p.width,_=p.height,x=g+y,b=m+_,S=m+_/2,w=g+y/2,T={x:w,y:m},L={x:w,y:b},D={x:g,y:S},C={x,y:S},A={x:g,y:m},M={x,y:m},P={x:g,y:b},B={x,y:b};h.push(T,L,D,C,A,M,P,B)}document.onmousemove=d=>{if(!s)return;const p=d.pageX,g=d.pageY,m=(p-u)/f,y=(g-c)/f;let _=a.left+a.start[0],x=a.top+a.start[1],b=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[D,C]=a.cubic||[[0,0],[0,0]];let A=a.left+D[0],M=a.top+D[1],P=a.left+C[0],B=a.top+C[1];if(o===Qe.START){_=_+m,x=x+y,Math.abs(_-b)<l&&(_=b),Math.abs(x-S)<l&&(x=S);for(const W of h){const{x:j,y:X}=W;if(Math.abs(j-_)<l&&Math.abs(X-x)<l){_=j,x=X;break}}}else if(o===Qe.END){b=b+m,S=S+y,Math.abs(_-b)<l&&(b=_),Math.abs(x-S)<l&&(S=x);for(const W of h){const{x:j,y:X}=W;if(Math.abs(j-b)<l&&Math.abs(X-S)<l){b=j,S=X;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-b)<l&&(T=b),Math.abs(L-S)<l&&(L=S),Math.abs(T-(_+b)/2)<l&&Math.abs(L-(x+S)/2)<l&&(T=(_+b)/2,L=(x+S)/2)):o===Qe.C1?(A=A+m,M=M+y,Math.abs(A-_)<l&&(A=_),Math.abs(M-x)<l&&(M=x),Math.abs(A-b)<l&&(A=b),Math.abs(M-S)<l&&(M=S)):o===Qe.C2&&(P=P+m,B=B+y,Math.abs(P-_)<l&&(P=_),Math.abs(B-x)<l&&(B=x),Math.abs(P-b)<l&&(P=b),Math.abs(B-S)<l&&(B=S));const R=Math.min(_,b),k=Math.min(x,S),H=Math.max(_,b),I=Math.max(x,S),F=[0,0],O=[H-R,I-k];_>b&&(F[0]=H-R,O[0]=0),x>S&&(F[1]=I-k,O[1]=0),e(W=>W.map(j=>{if(j.id===a.id){const X={...j,left:R,top:k,start:F,end:O};return o===Qe.START||o===Qe.END?(v?(a.broken&&(X.broken=[T-R,L-k]),a.curve&&(X.curve=[T-R,L-k]),a.cubic&&(X.cubic=[[A-R,M-k],[P-R,B-k]])):(a.broken&&(X.broken=[(F[0]+O[0])/2,(F[1]+O[1])/2]),a.curve&&(X.curve=[(F[0]+O[0])/2,(F[1]+O[1])/2]),a.cubic&&(X.cubic=[[(F[0]+O[0])/2,(F[1]+O[1])/2],[(F[0]+O[0])/2,(F[1]+O[1])/2]])),a.broken2&&(X.broken2=[(F[0]+O[0])/2,(F[1]+O[1])/2])):o===Qe.C?(a.broken&&(X.broken=[T-R,L-k]),a.curve&&(X.curve=[T-R,L-k]),a.broken2&&(H-R>=I-k?X.broken2=[T-R,X.broken2[1]]:X.broken2=[X.broken2[0],L-k])):a.cubic&&(X.cubic=[[A-R,M-k],[P-R,B-k]]),X}return j}))},document.onmouseup=d=>{s=!1,document.onmousemove=null,document.onmouseup=null;const p=d.pageX,g=d.pageY;u===p&&c===g||r()}}}},G4=(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,v=a.keypoints,h=Vs[a.pathFormula];let d=null;if("editable"in h&&h.editable){const m=h.getBaseSize[o],y=h.range[o],_=h.relative[o],x=v[o],b=m(a.width,a.height),S=b*x,[w,T]=y;d={baseSize:b,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,x=(y-c)/u,b=(_-f)/u;e(S=>S.map(w=>{if(w.id===a.id&&d){const{baseSize:T,originPos:L,min:D,max:C,relative:A}=d,M=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+b)/T:A==="bottom"?P=(L-b)/T:A==="left_bottom"?P=(L+x)/T:A==="right_bottom"?P=(L-x)/T:A==="top_right"?P=(L+b)/T:A==="bottom_right"&&(P=(L-b)/T),P<D&&(P=D),P>C&&(P=C);let B=[];return Array.isArray(v)?(B=[...v],B[o]=P):B=[P],{...w,keypoints:B,path:h.formula(M.width,M.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)}}},W4={gridLines:"_gridLines_fow0c_1"},j4=()=>{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 Os.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 E.jsx("svg",{className:W4.gridLines,children:E.jsx("path",{style:{transform:`scale(${t})`},d:s,fill:"none",stroke:o,strokeWidth:"0.3",strokeDasharray:"5"})})},ad=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])}),$4={viewportBackground:"_viewportBackground_19tuy_1"},X4=()=>{const{gridLineSize:t}=Tt(),{currentSlide:e}=Bt(),r=e==null?void 0:e.background,{backgroundStyle:n}=ad(r);return E.jsx("div",{className:$4.viewportBackground,style:n,children:t>0&&E.jsx(j4,{})})},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:no.T,style:{width:t+"px"}},{type:no.B,style:{top:e+"px",width:t+"px"}},{type:no.L,style:{height:e+"px"}},{type:no.R,style:{left:t+"px",height:e+"px"}}],[t,e]);return{resizeHandlers:r,textElementResizeHandlers:n,verticalTextElementResizeHandlers:i,borderLines:a}},U4={rotateHandler:"_rotateHandler_1pyuz_1"},io=({style:t,onMouseDown:e})=>E.jsx("div",{className:U4.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 E.jsx("div",{className:Rt(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})=>E.jsx("div",{className:Rt(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 E.jsxs("div",{className:"common-element-operate",children:[l.map(c=>E.jsx(qi,{type:c.type,style:c.style},c.type)),e&&E.jsxs(E.Fragment,{children:[s.map(c=>E.jsx(li,{type:c.direction,rotate:t.rotate,style:c.style,onMouseDown:f=>{f.stopPropagation(),n(f,t,c.direction)}},c.direction)),!u&&E.jsx(io,{style:{left:a/2+"px"},onMouseDown:c=>{c.stopPropagation(),r(c,t)}})]})]})},od={imageElementOperate:"_imageElementOperate_170vc_1",cliping:"_cliping_170vc_1"},Y4=({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 E.jsxs("div",{className:Rt(od.imageElementOperate,{[od.cliping]:o}),children:[c.map(f=>E.jsx(qi,{type:f.type,style:f.style},f.type)),e&&E.jsxs(E.Fragment,{children:[u.map(f=>E.jsx(li,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:v=>{v.stopPropagation(),n(v,t,f.direction)}},f.direction)),E.jsx(io,{style:{left:s/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}})]})]})},Z4=({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 E.jsxs("div",{className:"text-element-operate",children:[u.map(f=>E.jsx(qi,{type:f.type,style:f.style},f.type)),e&&E.jsxs(E.Fragment,{children:[c.map(f=>E.jsx(li,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:v=>{v.stopPropagation(),n(v,t,f.direction)}},f.direction)),E.jsx(io,{style:{left:a/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}})]})]})},sd={operateKeypointHandler:"_operateKeypointHandler_6ci2w_1"},K4=({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=Vs[t.pathFormula];return f?t.keypoints.map((v,h)=>{const d=f.getBaseSize[h],p=f.relative[h],g=d(t.width,t.height)*v;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:v,styles:m}}):[]},[t,a]);return E.jsxs("div",{className:sd.shapeElementOperate,children:[u.map(f=>E.jsx(qi,{type:f.type,style:f.style},f.type)),e&&E.jsxs(E.Fragment,{children:[l.map(f=>E.jsx(li,{type:f.direction,rotate:t.rotate,style:f.style,onMouseDown:v=>{v.stopPropagation(),n(v,t,f.direction)}},f.direction)),E.jsx(io,{style:{left:o/2+"px"},onMouseDown:f=>{f.stopPropagation(),r(f,t)}}),c.map((f,v)=>E.jsx("div",{className:sd.operateKeypointHandler,style:f.styles,onMouseDown:h=>{h.stopPropagation(),i==null||i(h,t,v)}},v))]})]})},ao={lineElementOperate:"_lineElementOperate_1300m_1",anchorLine:"_anchorLine_1300m_8"},Q4=({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 E.jsx("div",{className:ao.lineElementOperate,children:e&&E.jsxs(E.Fragment,{children:[o.map(s=>E.jsx(li,{type:s.handler,style:s.style,onMouseDown:l=>{l.stopPropagation(),r==null||r(l,t,s.handler)}},s.handler)),E.jsxs("svg",{width:i||1,height:a||1,stroke:t.color,overflow:"visible",style:{transform:`scale(${n})`},children:[t.curve&&E.jsxs("g",{children:[E.jsx("line",{className:ao.anchorLine,x1:t.start[0],y1:t.start[1],x2:t.curve[0],y2:t.curve[1]}),E.jsx("line",{className:ao.anchorLine,x1:t.end[0],y1:t.end[1],x2:t.curve[0],y2:t.curve[1]})]}),t.cubic&&t.cubic.map((s,l)=>E.jsxs("g",{children:[l===0&&E.jsx("line",{className:ao.anchorLine,x1:t.start[0],y1:t.start[1],x2:s[0],y2:s[1]}),l===1&&E.jsx("line",{className:ao.anchorLine,x1:t.end[0],y1:t.end[1],x2:s[0],y2:s[1]})]},l))]})]})})},J4=({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 E.jsxs("div",{className:"table-element-operate",children:[u.map(c=>E.jsx(qi,{type:c.type,style:c.style},c.type)),e&&E.jsxs(E.Fragment,{children:[l.map(c=>E.jsx(li,{type:c.direction,rotate:t.rotate,style:c.style,onMouseDown:f=>{f.stopPropagation(),n(f,t,c.direction)}},c.direction)),E.jsx(io,{style:{left:o/2+"px"},onMouseDown:c=>{c.stopPropagation(),r(c,t)}})]})]})},q4={linkHandler:"_linkHandler_1yjax_1",link:"_link_1yjax_1",btns:"_btns_1yjax_25",btn:"_btn_1yjax_25"},t3=({elementInfo:t,openLinkDialog:e})=>E.jsx("div",{className:q4.linkHandler,style:{left:t.width/2+"px"},onClick:e,children:E.jsx(Ie.LinkOne,{size:14,fill:"#666"})}),ld={operate:"_operate_5txtx_1",multiSelect:"_multiSelect_5txtx_7",animationIndex:"_animationIndex_5txtx_11",indexItem:"_indexItem_5txtx_17"},e3=({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:v}=Bt();N.useMemo(()=>{const m=[];for(let y=0;y<v.length;y++)v[y].animations.map(x=>x.elId).includes(t.id)&&m.push(y+1);return m},[v,t.id]);const h="height"in t&&t.height||0,d=N.useMemo(()=>({[Ut.IMAGE]:Y4,[Ut.TEXT]:Z4,[Ut.SHAPE]:K4,[Ut.LINE]:Q4,[Ut.TABLE]:J4,[Ut.CHART]:Hs,[Ut.LATEX]:Hs,[Ut.VIDEO]:Hs,[Ut.AUDIO]:Hs})[t.type]||null,[t.type]);if(!d)return null;const p=h===0&&t.type===Ut.TEXT?20:h,g=d;return E.jsxs("div",{className:Rt(ld.operate,{[ld.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&&E.jsx(g,{elementInfo:{...t,height:p},handlerVisible:n||!i,rotateElement:a,scaleElement:o,dragLineElement:s,moveShapeKeypoint:l}),r&&t.link&&E.jsx(t3,{elementInfo:t,link:t.link,openLinkDialog:u})]})},r3=({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),E.jsx("div",{className:"alignment-line",style:i})},yc={elementCreateSelection:"_elementCreateSelection_dvlwf_1",selection:"_selection_dvlwf_14",line:"_line_dvlwf_18"},n3=({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:d}=l.current.getBoundingClientRect();u.current={x:h,y:d}},[]);const c=N.useMemo(()=>{if(!i||!o||!e||e.type!=="line")return null;const[h,d]=i,[p,g]=o,m=Math.min(h,p),y=Math.max(h,p),_=Math.min(d,g),x=Math.max(d,g),b=y-m>=24?y-m:24,S=x-_>=24?x-_:24,w=h===m?0:y-m,T=d===_?0:x-_,L=p===m?0:y-m,D=g===_?0:x-_,C=`M${w}, ${T} L${L}, ${D}`;return{svgWidth:b,svgHeight:S,path:C}},[i,o,e]),f=N.useMemo(()=>{if(!i||!o)return{};const[h,d]=i,[p,g]=o,m=Math.min(h,p),y=Math.max(h,p),_=Math.min(d,g),x=Math.max(d,g),b=y-m,S=x-_;return{left:m-u.current.x+"px",top:_-u.current.y+"px",width:b+"px",height:S+"px"}},[i,o]),v=h=>{h.stopPropagation();let d=!0;const p=h.pageX,g=h.pageY;a([p,g]);const m=_=>{if(!e||!d)return;let x=_.pageX,b=_.pageY;if(n){const S=x-p,w=b-g,T=Math.abs(S),L=Math.abs(w);if(e.type==="shape"){const D=w>0&&S<0||w<0&&S>0;T>L?b=D?g-S:g+S:x=D?p-w:p+w}else e.type==="line"&&(T>L?b=g:x=p)}s([x,b])},y=_=>{if(document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),_.button===2){setTimeout(()=>r(null),0);return}d=!1;const x=_.pageX,b=_.pageY,S=30;let w=x,T=b;if(n&&e){const L=x-p,D=b-g,C=Math.abs(L),A=Math.abs(D);if(e.type==="shape"){const M=D>0&&L<0||D<0&&L>0;C>A?T=M?g-L:g+L:w=M?p-D:p+D}else e.type==="line"&&(C>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 D=Math.min(w,p),C=Math.min(T,g),A=Math.max(w,p),M=Math.max(T,g),P=A-D>=S?A-D:200,B=M-C>=S?M-C:200;t({start:[D,C],end:[D+P,C+B]})}};document.addEventListener("mousemove",m),document.addEventListener("mouseup",y)};return E.jsx("div",{className:yc.elementCreateSelection,ref:l,onMouseDown:v,onContextMenu:h=>{h.stopPropagation(),h.preventDefault()},children:i&&o&&E.jsx("div",{className:Rt(yc.selection,{[yc.line]:(e==null?void 0:e.type)==="line"}),style:f,children:(e==null?void 0:e.type)==="line"&&c&&E.jsx("svg",{overflow:"visible",width:c.svgWidth,height:c.svgHeight,children:E.jsx("path",{d:c.path,stroke:"#d14424",fill:"none",strokeWidth:"2"})})})})},i3={shapeCreateCanvas:"_shapeCreateCanvas_112bd_1"},a3=({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,v]=N.useState(!1);N.useEffect(()=>{if(!i.current)return;const{x,y:b}=i.current.getBoundingClientRect();o.current={x,y:b}},[]);const h=(x,b=!1)=>{let S=x.pageX-o.current.x,w=x.pageY-o.current.y;if(b)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}},d=x=>{if(a.current){const{pageX:w,pageY:T}=h(x,!0);c(L=>[...L,[w,T]]),l(null);return}const{pageX:b,pageY:S}=h(x);if(l([b,S]),u.length>=2){const[w,T]=u[0];Math.abs(w-b)<5&&Math.abs(T-S)<5?v(!0):v(!1)}else v(!1)},p=N.useMemo(()=>{let x="";for(let b=0;b<u.length;b++){const S=u[b];b===0?x+=`M ${S[0]} ${S[1]} `:x+=`L ${S[0]} ${S[1]} `}return u.length&&s&&(x+=`L ${s[0]} ${s[1]}`),x},[u,s]),g=(x=!0)=>{const b=u.map(R=>R[0]),S=u.map(R=>R[1]),w=Math.min(...b),T=Math.min(...S),L=Math.max(...b),D=Math.max(...S),C=u.map(R=>[R[0]-w,R[1]-T]);let A="";for(let R=0;R<C.length;R++){const k=C[R];R===0?A+=`M ${k[0]} ${k[1]} `:A+=`L ${k[0]} ${k[1]} `}x&&(A+="Z");const M=[w+o.current.x,T+o.current.y],P=[L+o.current.x,D+o.current.y],B=[L-w,D-T];return{start:M,end:P,path:A,viewBox:B}},m=x=>{const{pageX:b,pageY:S}=h(x);a.current=!0,f?t(g()):c(T=>[...T,[b,S]]);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=b=>{const S=b.key.toUpperCase();S===me.ESC&&y(),S===me.ENTER&&_()};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[_]),E.jsx("div",{className:i3.shapeCreateCanvas,ref:i,onMouseDown:x=>{x.stopPropagation(),m(x)},onMouseMove:x=>d(x),onContextMenu:x=>{x.stopPropagation(),x.preventDefault(),y()},children:E.jsx("svg",{overflow:"visible",children:E.jsx("path",{d:p,stroke:"#d14424",fill:f?"rgba(226, 83, 77, 0.15)":"none",strokeWidth:"2"})})})},ud={mouseSelection:"_mouseSelection_13fbu_1",quadrant1:"_quadrant1_13fbu_8",quadrant2:"_quadrant2_13fbu_13",quadrant3:"_quadrant3_13fbu_18",quadrant4:"_quadrant4_13fbu_23"},o3=({top:t,left:e,width:r,height:n,quadrant:i})=>E.jsx("div",{className:Rt(ud.mouseSelection,ud[`quadrant${i}`]),style:{top:t+"px",left:e+"px",width:r+"px",height:n+"px"}}),s3={multiSelectOperate:"_multiSelectOperate_17xs4_1",borderLine:"_borderLine_17xs4_5",top:"_top_17xs4_13",bottom:"_bottom_17xs4_16",left:"_left_17xs4_19",right:"_right_17xs4_22"},l3=({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:v,minY:h,maxY:d}=Jv(i);return{minX:f,maxX:v,minY:h,maxY:d}},[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 E.jsxs("div",{className:s3.multiSelectOperate,style:{left:a.minX*n+"px",top:a.minY*n+"px"},children:[u.map(f=>E.jsx(qi,{type:f.type,style:f.style},f.type)),!c&&l.map(f=>E.jsx(li,{type:f.direction,style:f.style,onMouseDown:v=>{v.stopPropagation(),e==null||e(v,a,f.direction)}},f.direction))]})},cd=()=>{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())}}},u3=()=>{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 v=f.filter(m=>m.groupId===c.groupId),{minLevel:h,maxLevel:d}=n(u,v);if(d===u.length-1)return;const p=f[d+1],g=f.splice(h,v.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 v=u.findIndex(p=>p.id===c.id);if(v===u.length-1)return;const h=f[v+1],d=f.splice(v,1)[0];if(h.groupId){const p=f.filter(g=>g.groupId===h.groupId);f.splice(v+p.length,0,d)}else f.splice(v+1,0,d)}return f},a=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const v=f.filter(g=>g.groupId===c.groupId),{minLevel:h}=n(u,v);if(h===0)return;const d=f[h-1],p=f.splice(h,v.length);if(d.groupId){const g=f.filter(m=>m.groupId===d.groupId);f.splice(h-g.length,0,...p)}else f.splice(h-1,0,...p)}else{const v=u.findIndex(p=>p.id===c.id);if(v===0)return;const h=f[v-1],d=f.splice(v,1)[0];if(h.groupId){const p=f.filter(g=>g.groupId===h.groupId);f.splice(v-p.length,0,d)}else f.splice(v-1,0,d)}return f},o=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const v=f.filter(g=>g.groupId===c.groupId),{minLevel:h,maxLevel:d}=n(u,v);if(d===u.length-1)return null;const p=f.splice(h,v.length);f.push(...p)}else{const v=u.findIndex(h=>h.id===c.id);if(v===u.length-1)return null;f.splice(v,1),f.push(c)}return f},s=(u,c)=>{const f=JSON.parse(JSON.stringify(u));if(c.groupId){const v=f.filter(p=>p.groupId===c.groupId),{minLevel:h}=n(u,v);if(h===0)return;const d=f.splice(h,v.length);f.unshift(...d)}else{const v=u.findIndex(h=>h.id===c.id);if(v===0)return;f.splice(v,1),f.unshift(c)}return f};return{orderElement:(u,c)=>{if(!t)return;let f;c===kr.UP?f=i(t.elements,u):c===kr.DOWN?f=a(t.elements,u):c===kr.TOP?f=o(t.elements,u):c===kr.BOTTOM&&(f=s(t.elements,u)),f&&(e({elements:f}),r())}}},c3=()=>{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:v,minY:h,maxY:d}=Jv(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+(d-h)/2-c/2,y=f+(v-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+(d-h)/2-c/2;g.top=g.top-m}else if(l===Ce.BOTTOM){const m=d-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+(v-f)/2-u/2;g.left=g.left-m}else if(l===Ce.RIGHT){const m=v-u;g.left=g.left-m}}i({elements:p}),o()}}},f3=()=>{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}=ed(),{deleteElement:a}=cd(),o=()=>{if(!t.length)return;const c=Yv(JSON.stringify({type:"elements",data:n}));Zv(c).then(()=>{e(!0)})},s=()=>{o(),a()},l=()=>{Kv().then(c=>{i(c)}).catch(c=>console.warn(c))};return{copyElement:o,cutElement:s,pasteElement:l,quickCopyElement:()=>{o(),l()}}};var Gs,Ws=q_;if(process.env.NODE_ENV==="production")Gs=Ws.createRoot,Ws.hydrateRoot;else{var fd=Ws.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Gs=function(t,e){fd.usingClientEntryPoint=!0;try{return Ws.createRoot(t,e)}finally{fd.usingClientEntryPoint=!1}}}const hd=({menus:t,handleClickMenuItem:e})=>E.jsx("ul",{className:"menu-content",children:t.map((r,n)=>r.hide?null:E.jsx("li",{className:Rt("menu-item",{divider:r.divider,disable:r.disable}),onClick:i=>{i.stopPropagation(),e(r)},children:!r.divider&&E.jsxs("div",{className:Rt("menu-item-content",{"has-children":r.children&&r.children.length>0,"has-handler":!!r.handler}),children:[E.jsx("span",{className:"text",children:r.text}),r.subText&&(!r.children||r.children.length===0)&&E.jsx("span",{className:"sub-text",children:r.subText}),r.children&&r.children.length>0&&E.jsx("div",{className:"sub-menu",children:E.jsx(hd,{menus:r.children,handleClickMenuItem:e})})]})},r.text||n))}),vd=({axis:t,el:e,menus:r,removeContextmenu:n})=>{const i=N.useMemo(()=>{const{x:c,y:f}=t,v=r.filter(y=>!(y.divider||y.hide)).length,h=r.filter(y=>y.divider).length,d=180,p=v*30+h*11+5*2,g=document.body.clientWidth,m=document.body.clientHeight;return{left:g<=c+d?c-d: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 E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"contextmenu-mask",onContextMenu:o=>{o.preventDefault(),n()},onMouseDown:o=>{o.button===0&&n()}}),E.jsx("div",{className:"contextmenu",style:{left:i.left,top:i.top},onContextMenu:o=>o.preventDefault(),children:E.jsx(hd,{menus:r,handleClickMenuItem:a})})]})};function $r(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=Gs(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(E.jsx(vd,{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 dd=(t=>(t.RECT="rect",t.ELLIPSE="ellipse",t.POLYGON="polygon",t))(dd||{});const pd={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=pd.rect;if(t.clip){const i=t.clip.shape||dd.RECT;n=pd[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}},gd=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}},h3={imageRectOutlineSvg:"_imageRectOutlineSvg_y1xie_1"},v3=({width:t,height:e,outline:r,radius:n="0"})=>{const{outlineWidth:i,outlineColor:a,strokeDashArray:o}=ta(r);return r?E.jsx("svg",{className:h3.imageRectOutlineSvg,width:t,height:e,overflow:"visible",children:E.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},d3={imageEllipseOutlineSvg:"_imageEllipseOutlineSvg_qmj4q_1"},p3=({width:t,height:e,outline:r})=>{const{outlineWidth:n,outlineColor:i,strokeDashArray:a}=ta(r);return r?E.jsx("svg",{className:d3.imageEllipseOutlineSvg,width:t,height:e,overflow:"visible",children:E.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},g3={imagePolygonOutlineSvg:"_imagePolygonOutlineSvg_1jxdb_1"},m3=({width:t,height:e,createPath:r,outline:n})=>{const{outlineWidth:i,outlineColor:a,strokeDashArray:o}=ta(n);return n?E.jsx("svg",{className:g3.imagePolygonOutlineSvg,width:t,height:e,overflow:"visible",children:E.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",fill:"transparent",d:r(t,e),stroke:a,strokeWidth:i,strokeDasharray:o})}):null},md=({elementInfo:t})=>{const{clipShape:e}=_c(t);return e.type==="rect"?E.jsx(v3,{width:t.width,height:t.height,radius:e.radius,outline:t.outline}):e.type==="ellipse"?E.jsx(p3,{width:t.width,height:t.height,outline:t.outline}):e.type==="polygon"&&e.createPath?E.jsx(m3,{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"},y3=(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])},_3=({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),v=N.useRef(null),h=N.useRef(null),d=N.useCallback(()=>{const[M,P]=a?a.range:[[0,0],[100,100]],B=(P[0]-M[0])/100,R=(P[1]-M[1])/100,k=M[0]/B,H=M[1]/R;return{widthScale:B,heightScale:R,left:k,top:H}},[a]),p=N.useMemo(()=>{const{widthScale:M,heightScale:P,left:B,top:R}=d();return{left:-B,top:-R,width:100/M,height:100/P}},[d]),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:M,left:P,width:B,height:R}=m;return{top:M+"%",left:P+"%",width:B+"%",height:R+"%"}},[m]),x=N.useMemo(()=>{const M=p.width,P=p.height,{top:B,left:R,width:k,height:H}=m;return k===0||H===0?{}:{left:-R*(100/k)+"%",top:-B*(100/H)+"%",width:M/k*100+"%",height:P/H*100+"%"}},[p,m]);N.useEffect(()=>{const{left:M,top:P}=d();y({left:M,top:P,width:100,height:100}),c({top:-P+"%",left:-M+"%"})},[d]);const b=N.useCallback(()=>{const M=p.width,P=p.height,{top:B,left:R,width:k,height:H}=m;if(k===0||H===0)return;const I=-R*(100/k),F=-B*(100/H),O=M/k*100,W=P/H*100,j={left:I,top:F,width:O,height:W},X=100/j.width,et=100/j.height,ft=[-j.left*X,-j.top*et],gt=[X*100+ft[0],et*100+ft[1]];v.current=[ft,gt]},[p,m]),S=N.useCallback(()=>{if(f.current)return;if(v.current||b(),!v.current){o(null);return}const{left:M,top:P}=d(),B={left:(m.left-M)/100*r,top:(m.top-P)/100*n,width:(m.width-100)/100*r,height:(m.height-100)/100*n},R={range:v.current,position:B};o(R)},[d,m,r,n,o,b]);y3(h,S),N.useEffect(()=>{const M=P=>{P.key.toUpperCase()===me.ENTER&&S()};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[S]);const w=M=>{M.stopPropagation(),f.current=!0;let P=!0;const B=M.pageX,R=M.pageY,k=p,H={...m},I=O=>{if(!P)return;const W=O.pageX,j=O.pageY,X=(W-B)/s,et=(j-R)/s,ft=Math.sqrt(X*X+et*et),Y=Math.atan2(et,X)-i/180*Math.PI,U=ft*Math.cos(Y)/r*100,q=ft*Math.sin(Y)/n*100;let tt=H.left+U,nt=H.top+q;tt<0?tt=0:tt+H.width>k.width&&(tt=k.width-H.width),nt<0?nt=0:nt+H.height>k.height&&(nt=k.height-H.height),y({...H,left:tt,top:nt,width:H.width,height:H.height})},F=()=>{P=!1,document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",F),b(),setTimeout(()=>{f.current=!1},0)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",F)},T=(M,P)=>{M.stopPropagation(),f.current=!0;let B=!0;const R=50/r*100,k=50/n*100,H=M.pageX,I=M.pageY,F=p,O={...m},W=m.width/m.height,j=et=>{if(!B)return;const ft=et.pageX,gt=et.pageY,Y=(ft-H)/s,U=(gt-I)/s,q=Math.sqrt(Y*Y+U*U),nt=Math.atan2(U,Y)-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/W),(P===it.LEFT_BOTTOM||P===it.RIGHT_TOP)&&(st=-at/W));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<R&&(at=O.width-R),O.height-st<k&&(st=O.height-k),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<R&&(at=R-O.width),O.height-st<k&&(st=O.height-k),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<R&&(at=O.width-R),O.height+st<k&&(st=k-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<R&&(at=R-O.width),O.height+st<k&&(st=k-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<k&&(st=O.height-k),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<k&&(st=k-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<R&&(at=O.width-R),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<R&&(at=R-O.width),_t=O.height,J=O.width+at,Et=O.left,K=O.top),y({left:Et,top:K,width:J,height:_t})},X=()=>{B=!1,document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",X),b(),setTimeout(()=>f.current=!1,0)};document.addEventListener("mousemove",j),document.addEventListener("mouseup",X)},L=N.useMemo(()=>{const M="rotate",P=i;return P>-22.5&&P<=22.5?M+0:P>22.5&&P<=67.5?M+45:P>67.5&&P<=112.5?M+90:P>112.5&&P<=157.5?M+135:P>157.5||P<=-157.5?M+0:P>-157.5&&P<=-112.5?M+45:P>-112.5&&P<=-67.5?M+90:P>-67.5&&P<=-22.5?M+135:M+0},[i]),D=[it.LEFT_TOP,it.RIGHT_TOP,it.LEFT_BOTTOM,it.RIGHT_BOTTOM],C=[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 E.jsxs("div",{className:Pe.imageClipHandler,style:u,ref:h,children:[E.jsx("img",{className:Pe.bottomImg,src:t,draggable:!1,alt:"",style:g}),E.jsx("div",{className:Pe.topImageContent,style:{..._,clipPath:e},children:E.jsx("img",{className:Pe.topImg,src:t,draggable:!1,alt:"",style:x})}),E.jsxs("div",{className:Pe.operate,style:_,onMouseDown:w,children:[D.map(M=>E.jsx("div",{className:Rt(Pe.clipPoint,A[M],Pe[L]),onMouseDown:P=>T(P,M),children:E.jsx("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333",children:E.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"})})},M)),C.map(M=>E.jsx("div",{className:Rt(Pe.clipPoint,A[M],Pe[L]),onMouseDown:P=>T(P,M),children:E.jsx("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333",children:E.jsx("path",{strokeWidth:"0.3",shapeRendering:"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})})},M))]})]})},oo={editableElementImage:"_editableElementImage_1jzf6_1",rotateWrapper:"_rotateWrapper_1jzf6_5",elementContent:"_elementContent_1jzf6_10",imageContent:"_imageContent_1jzf6_16",colorMask:"_colorMask_1jzf6_26"},x3=({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:v}=_c(t),{filter:h}=gd(t.filters),d=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,b=t.top+y.top,S=t.width+y.width,w=t.height+y.height;let T=0,L=0;if(t.rotate){const C=x+S/2-(t.left+t.width/2),A=-(b+w/2-(t.top+t.height/2)),M=-t.rotate*Math.PI/180,P=C*Math.cos(M)-A*Math.sin(M),B=C*Math.sin(M)+A*Math.cos(M);T=P-C,L=-(B-A)}const D={clip:{..._,range:m},left:x+T,top:b+L,width:S,height:w};o({id:t.id,props:D}),s()};return $r(n,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:oo.editableElementImage,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:oo.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:l?E.jsx(_3,{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)}):E.jsxs("div",{ref:n,className:oo.elementContent,style:{filter:u?`drop-shadow(${u})`:"",transform:c},onMouseDown:d,onTouchStart:d,children:[E.jsx(md,{elementInfo:t}),E.jsxs("div",{className:oo.imageContent,style:{clipPath:f.style},children:[E.jsx("img",{src:t.src,draggable:!1,style:{top:v.top,left:v.left,width:v.width,height:v.height,filter:h},onDragStart:g=>g.preventDefault(),alt:""}),t.colorMask&&E.jsx("div",{className:oo.colorMask,style:{backgroundColor:t.colorMask}})]})]})})})},b3={elementOutlineSvg:"_elementOutlineSvg_1jkv6_1"},$s=({width:t,height:e,outline:r})=>{const{outlineWidth:n,outlineColor:i,strokeDashArray:a}=ta(r);return r?E.jsx("svg",{className:b3.elementOutlineSvg,width:t,height:e,overflow:"visible",children:E.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},S3=t=>{const e={},r=(n,i)=>e[n]=i;return r("Alt-ArrowUp",te.joinUp),r("Alt-ArrowDown",te.joinDown),r("Mod-z",hc.undo),r("Mod-y",hc.redo),r("Backspace",jr.undoInputRule),r("Escape",te.selectParentNode),r("Mod-b",te.toggleMark(t.marks.strong)),r("Mod-i",te.toggleMark(t.marks.em)),r("Mod-u",te.toggleMark(t.marks.underline)),r("Mod-d",te.toggleMark(t.marks.strikethrough)),r("Mod-e",te.toggleMark(t.marks.code)),r("Mod-;",te.toggleMark(t.marks.superscript)),r("Mod-'",te.toggleMark(t.marks.subscript)),r("Enter",te.chainCommands(oi.splitListItem(t.nodes.list_item),te.newlineInCode,te.createParagraphNear,te.liftEmptyBlock,te.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},w3=t=>jr.wrappingInputRule(/^\s*>\s$/,t),T3=t=>jr.wrappingInputRule(/^(\d+)\.\s$/,t,e=>({order:+e[1]}),(e,r)=>r.childCount+r.attrs.order===+e[1]),L3=t=>jr.wrappingInputRule(/^\s*([-+*])\s$/,t),M3=()=>{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)})},C3=()=>{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)})},E3=t=>{const e=[...jr.smartQuotes,jr.ellipsis,jr.emDash];return e.push(w3(t.nodes.blockquote)),e.push(T3(t.nodes.ordered_list)),e.push(L3(t.nodes.bullet_list)),e.push(M3()),e.push(C3()),jr.inputRules({rules:e})},D3=(t,e)=>[E3(t),Bv.keymap(S3(t)),Bv.keymap(te.baseKeymap),e4.dropCursor(),r4.gapCursor(),hc.history()],A3={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]}},P3={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]}},k3={...oi.listItem,content:"paragraph block*",group:"block"},R3={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:N3,blockquote:O3,text:I3}=Vv.nodes,B3={doc:N3,paragraph:R3,blockquote:O3,text:I3,ordered_list:A3,bullet_list:P3,list_item:k3},V3={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:t=>t==="sub"&&null}],toDOM:()=>["sub",0]},z3={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:t=>t==="super"&&null}],toDOM:()=>["sup",0]},F3={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]},H3={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]},G3={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]}},W3={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]}},j3={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]}},$3={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]}},X3={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]},U3={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:Z3,code:K3}=Vv.marks,Q3={em:Y3,strong:Z3,fontsize:j3,fontname:$3,code:K3,forecolor:G3,backcolor:W3,subscript:V3,superscript:z3,strikethrough:F3,underline:H3,link:X3,mark:U3},J3=B3,q3=Q3,yd=new Iv.Schema({nodes:J3,marks:q3}),_d=t=>{const e=`<div>${t}</div>`,n=new window.DOMParser().parseFromString(e,"text/html").body.firstElementChild;return Iv.DOMParser.fromSchema(yd).parse(n)},t7=(t,e,r,n)=>new t4.EditorView(t,{state:fc.EditorState.create({doc:_d(e),plugins:D3(yd)}),...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=n4(),e7=(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 v=new Set([l,u,c]);return i.nodesBetween(a,o,(h,d)=>{const p=h.type;return(h.attrs.align||"")!==r&&v.has(p)&&f.push({node:h,pos:d,nodeType:p}),!0}),f.length&&f.forEach(h=>{const{node:d,pos:p,nodeType:g}=h;let{attrs:m}=d;r?m={...m,align:r}:m={...m,align:null},t=t.setNodeMarkup(p,g,m,d.marks)}),t},r7=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=e7(r.tr.setSelection(i),n,e);t.dispatch(a)};function n7(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 xd=(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=n7(t,u,r,n),!1):!Is(l,e)}),t},i7=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=xd(r.tr.setSelection(i),n,e,"indent");return a.docChanged?(t.dispatch(a),!0):!1},a7=(t,e)=>{const{state:r}=t,{schema:n,selection:i}=r,a=xd(r.tr.setSelection(i),n,e,"textIndent");return a.docChanged?(t.dispatch(a),!0):!1},bd=(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=Hv(h=>Is(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(Is(f.node,o)&&t.validContent(f.node.content)){const{tr:h}=i,d={...f.node.attrs,...n};return r&&(d.listStyleType=r),h.setNodeMarkup(f.pos,t,d),a&&a(h),!1}}const v={...n};return r&&(v.listStyleType=r),oi.wrapInList(t,v)(i,a)},so=(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(Is(u,n)&&s-3<=c&&l+3>=c+u.nodeSize){const f=Array.isArray(e)?e:[e];for(const v of f)a.setNodeAttribute(c,v.key,v.value)}return!1}),t.dispatch(a)},o7=(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)},Sd={prosemirrorEditor:"_prosemirrorEditor_461xq_1",formatPainter:"_formatPainter_461xq_5"},wd=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},v)=>{const h=N.useRef(null),d=N.useRef(null),{handleElementId:p,textFormatPainter:g,richTextAttrs:m,activeElementIdList:y,setDisableHotkeysState:_,setRichtextAttrs:x,setTextFormatPainter:b}=Tt(),{ctrlOrShiftKeyActive:S}=pr();N.useImperativeHandle(v,()=>({focus:()=>{var B;return(B=d.current)==null?void 0:B.focus()}}));const w=N.useCallback(Ar.debounce((B=!1)=>{if(!d.current)return;const R=d.current.dom.innerHTML;n.replace(/ style=""/g,"")!==R.replace(/ style=""/g,"")&&(s==null||s({value:R,ignore:B}))},300,{trailing:!0}),[n,s]),T=N.useCallback(()=>{(!S||y.length<=1)&&_(!0),l==null||l()},[S,y,_,l]),L=N.useCallback(()=>{_(!1),u==null||u()},[_,u]),D=N.useCallback(Ar.debounce(()=>{if(!d.current)return;const B=h4(d.current,{color:e,fontname:r});x(B)},30,{trailing:!0}),[e,r,x]),C=N.useCallback((B,R)=>{const{ctrlKey:k,shiftKey:H,metaKey:I}=R,F=k||H||I,O=R.key.toUpperCase(),W=F&&(O===me.Z||O===me.Y);w(W),D()},[w,D]),A=N.useCallback(()=>{if(!g)return;const{keep:B,...R}=g,k=[{command:"clear"}];for(const H of Object.keys(R)){const I=H,F=g[H];F===!0?k.push({command:I}):F&&k.push({command:I,value:F})}M({action:k}),B||b(null)},[g,b]);N.useEffect(()=>{if(!h.current)return;const B=t7(h.current,n,{handleDOMEvents:{focus:T,blur:L,keydown:C,click:D,mouseup:A},editable:()=>i});return d.current=B,a&&B.focus(),()=>{B.destroy(),d.current=null}},[]),N.useEffect(()=>{if(!d.current||d.current.hasFocus())return;const{doc:B,tr:R}=d.current.state;d.current.dispatch(R.replaceRangeWith(0,B.content.size,_d(n)))},[n]),N.useEffect(()=>{d.current&&d.current.setProps({editable:()=>i})},[i]);const M=N.useCallback(({target:B,action:R})=>{const k=d.current;if(!k||!B&&p!==t||B&&B!==t)return;const H="command"in R?[R]:R;for(const I of H)if(I.command==="fontname"&&I.value!==void 0){const F=k.state.schema.marks.fontname.create({fontname:I.value});dr(k),Tn(k,F),I.value&&!document.fonts.check(`16px ${I.value}`)&&console.warn("字体需要等待加载下载后生效,请稍等")}else if(I.command==="fontsize"&&I.value){const F=k.state.schema.marks.fontsize.create({fontsize:I.value});dr(k),Tn(k,F),so(k,{key:"fontsize",value:I.value})}else if(I.command==="fontsize-add"){const F=I.value?+I.value:2;dr(k);const O=$v(k)+F+"px",W=k.state.schema.marks.fontsize.create({fontsize:O});Tn(k,W),so(k,{key:"fontsize",value:O})}else if(I.command==="fontsize-reduce"){const F=I.value?+I.value:2;dr(k);let O=$v(k)-F;O<12&&(O=12);const W=k.state.schema.marks.fontsize.create({fontsize:O+"px"});Tn(k,W),so(k,{key:"fontsize",value:O+"px"})}else if(I.command==="color"&&I.value){const F=k.state.schema.marks.forecolor.create({color:I.value});dr(k),Tn(k,F),so(k,{key:"color",value:I.value})}else if(I.command==="backcolor"&&I.value){const F=k.state.schema.marks.backcolor.create({backcolor:I.value});dr(k),Tn(k,F)}else if(I.command==="bold")dr(k),te.toggleMark(k.state.schema.marks.strong)(k.state,k.dispatch);else if(I.command==="em")dr(k),te.toggleMark(k.state.schema.marks.em)(k.state,k.dispatch);else if(I.command==="underline")dr(k),te.toggleMark(k.state.schema.marks.underline)(k.state,k.dispatch);else if(I.command==="strikethrough")dr(k),te.toggleMark(k.state.schema.marks.strikethrough)(k.state,k.dispatch);else if(I.command==="subscript")te.toggleMark(k.state.schema.marks.subscript)(k.state,k.dispatch);else if(I.command==="superscript")te.toggleMark(k.state.schema.marks.superscript)(k.state,k.dispatch);else if(I.command==="blockquote")Bs("blockquote",k.state)?te.lift(k.state,k.dispatch):te.wrapIn(k.state.schema.nodes.blockquote)(k.state,k.dispatch);else if(I.command==="code")te.toggleMark(k.state.schema.marks.code)(k.state,k.dispatch);else if(I.command==="align"&&I.value)r7(k,I.value);else if(I.command==="indent"&&I.value)i7(k,+I.value);else if(I.command==="textIndent"&&I.value)a7(k,+I.value);else if(I.command==="bulletList"){const F=I.value||"",{bullet_list:O,list_item:W}=k.state.schema.nodes,j={color:m.color,fontsize:m.fontsize};bd(O,W,F,j)(k.state,k.dispatch)}else if(I.command==="orderedList"){const F=I.value||"",{ordered_list:O,list_item:W}=k.state.schema.nodes,j={color:m.color,fontsize:m.fontsize};bd(O,W,F,j)(k.state,k.dispatch)}else if(I.command==="clear"){dr(k);const{$from:F,$to:O}=k.state.selection;k.dispatch(k.state.tr.removeMark(F.pos,O.pos)),so(k,[{key:"fontsize",value:""},{key:"color",value:""}])}else if(I.command==="link"){const F=k.state.schema.marks.link,{from:O,to:W}=k.state.selection,j=o4(k.state.doc,O,W,F);if(j)if(I.value){const X=k.state.schema.marks.link.create({href:I.value,title:I.value});Tn(k,X,{from:j.from.pos,to:j.to.pos+1})}else k.dispatch(k.state.tr.removeMark(j.from.pos,j.to.pos+1,F));else if(c4(k.state,F))if(I.value){const X=k.state.schema.marks.link.create({href:I.value,title:I.value});Tn(k,X)}else te.toggleMark(F)(k.state,k.dispatch);else I.value&&(dr(k),te.toggleMark(F,{href:I.value,title:I.value})(k.state,k.dispatch))}else I.command==="insert"&&I.value?k.dispatch(k.state.tr.insertText(I.value)):I.command==="replace"&&I.value&&o7(k,I.value);k.focus(),w(),D()},[p,t,m,w,D]),P=N.useCallback(()=>{p===t&&D()},[p,t,D]);return N.useEffect(()=>(ea.on(ui.RICH_TEXT_COMMAND,M),ea.on(ui.SYNC_RICH_TEXT_ATTRS_TO_STORE,P),()=>{ea.off(ui.RICH_TEXT_COMMAND,M),ea.off(ui.SYNC_RICH_TEXT_ATTRS_TO_STORE,P)}),[M,P]),E.jsx("div",{className:Rt(Sd.prosemirrorEditor,{[Sd.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"},s7=({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,_)},v=N.useRef(-1),h=N.useRef(-1);N.useEffect(()=>{!a&&i===n.id&&(!n.vertical&&v.current!==-1&&(o({id:n.id,props:{height:v.current}}),v.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 d=N.useCallback(y=>{const _=y[0].contentRect;if(!u.current)return;const x=_.height+20,b=_.width+20;!n.vertical&&n.height!==x&&(a?v.current=x:o({id:n.id,props:{height:x}})),n.vertical&&n.width!==b&&(a?h.current=b:o({id:n.id,props:{width:b}}))},[n.vertical,n.height,n.width,n.id,a,o]);N.useEffect(()=>{const y=new ResizeObserver(d);return u.current&&y.observe(u.current),()=>{u.current&&y.unobserve(u.current),y.disconnect()}},[d]);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]),$r(u,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Mn.editableElementText,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:E.jsx("div",{className:Mn.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:E.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:[E.jsx($s,{width:n.width,height:n.height,outline:n.outline}),E.jsx(wd,{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)}),E.jsx("div",{className:Rt(Mn.dragHandler,Mn.top)}),E.jsx("div",{className:Rt(Mn.dragHandler,Mn.bottom)})]})})})},Td=(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])}),Ld=({id:t,type:e,colors:r,rotate:n=0})=>E.jsx(E.Fragment,{children:e==="linear"?E.jsx("linearGradient",{id:t,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${n},0.5,0.5)`,children:r.map((i,a)=>E.jsx("stop",{offset:`${i.pos}%`,stopColor:i.color},a))}):E.jsx("radialGradient",{id:t,children:r.map((i,a)=>E.jsx("stop",{offset:`${i.pos}%`,stopColor:i.color},a))})}),Md=({id:t,src:e})=>E.jsx("pattern",{id:t,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",height:"1",children:E.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"},l7=({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:v}=Td(n,"editable"),{outlineWidth:h,outlineColor:d,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),b=N.useMemo(()=>{const C={content:"",align:"middle",defaultFontName:l.fontName,defaultColor:l.fontColor};return n.text?n.text:C},[n.text,l]),S=(C,A=!0)=>{C.stopPropagation(),e==null||e(C.nativeEvent,n,A)},w=()=>{if(!o)return;const{keep:C,...A}=o;u({id:n.id,props:A}),f(),C||s(null)};N.useEffect(()=>{a!==n.id&&y&&_(!1)},[a,n.id,y]);const T=(C,A=!1)=>{const M={...b,content:C};u({id:n.id,props:{text:M}}),A||f()},L=()=>{if(!n.text)return;n.text.content.replace(/<[^>]+>/g,"")||(c({id:n.id,propName:"text"}),f())},D=()=>{_(!0),setTimeout(()=>{var C;return(C=x.current)==null?void 0:C.focus()},0)};return $r(i,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Rt(Cn.editableElementShape,{[Cn.formatPainter]:o}),style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:E.jsx("div",{className:Cn.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:E.jsxs("div",{className:Cn.elementContent,style:{opacity:n.opacity,filter:g?`drop-shadow(${g})`:"",transform:m,color:b.defaultColor,fontFamily:b.defaultFontName},ref:i,onMouseDown:S,onMouseUp:w,onTouchStart:S,onDoubleClick:D,children:[E.jsxs("svg",{overflow:"visible",width:n.width,height:n.height,children:[E.jsx("defs",{children:n.pattern?E.jsx(Md,{id:`editable-pattern-${n.id}`,src:n.pattern}):n.gradient?E.jsx(Ld,{id:`editable-gradient-${n.id}`,type:n.gradient.type,colors:n.gradient.colors,rotate:n.gradient.rotate}):null}),E.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:E.jsx("path",{className:Cn.shapePath,vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:n.path,fill:v,stroke:d,strokeWidth:h,strokeDasharray:p})})]}),E.jsx("div",{className:Rt(Cn.shapeText,Cn[b.align],{[Cn.editable]:y||b.content}),children:(y||b.content)&&E.jsx(wd,{ref:x,elementId:n.id,defaultColor:b.defaultColor,defaultFontName:b.defaultFontName,editable:!0,value:b.content,onUpdate:({value:C,ignore:A})=>T(C,A),onBlur:L,onMouseDown:C=>S(C,!1)})})]})})})},Xs=({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 E.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:E.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"},u7=({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(()=>qv(i),[i]),f=i.points[0],v=i.points[1];return $r(n,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Us.editableElementLine,style:{top:i.top+"px",left:i.left+"px"},children:E.jsx("div",{className:Us.elementContent,style:{filter:a?`drop-shadow(${a})`:""},onMouseDown:o,onTouchStart:o,children:E.jsxs("svg",{overflow:"visible",width:s,height:l,children:[E.jsxs("defs",{children:[f&&E.jsx(Xs,{id:i.id,position:"start",type:f,color:i.color,baseSize:i.width}),v&&E.jsx(Xs,{id:i.id,position:"end",type:v,color:i.color,baseSize:i.width})]}),E.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:v?`url(#${i.id}-${v}-end)`:""}),E.jsx("path",{className:Us.linePath,d:c,stroke:"transparent",strokeWidth:"20",fill:"none",ref:n})]})})})};/*! *****************************************************************************
|
|
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})]})})})};/*! *****************************************************************************
|
|
33
33
|
Copyright (c) Microsoft Corporation.
|
|
34
34
|
|
|
35
35
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -42,8 +42,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
42
42
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
43
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
44
|
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 c7=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),f7=function(){function t(){this.browser=new c7,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}(),Yt=new f7;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Yt.wxa=!0,Yt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Yt.worker=!0:!Yt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Yt.node=!0,Yt.svgSupported=!0):h7(navigator.userAgent,Yt);function h7(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,Cd="sans-serif",un=bc+"px "+Cd,v7=20,d7=100,p7="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function g7(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)-v7)/d7;e[n]=i}return e}var m7=g7(p7),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=m7[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}},Ed=Dn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),Dd=Dn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),ra=Object.prototype.toString,Ys=Array.prototype,y7=Ys.forEach,_7=Ys.filter,Sc=Ys.slice,x7=Ys.map,Ad=(function(){}).constructor,Zs=Ad?Ad.prototype:null,wc="__proto__",b7=2311;function Pd(){return b7++}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(!lo(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=zt(t[n])}}else if(Dd[r]){if(!lo(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(!Ed[r]&&!lo(t)&&!Ks(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==wc&&(e[o]=zt(t[o]))}return e}function ee(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)&&!Nd(a)&&!Nd(i)&&!lo(a)&&!lo(i)?ee(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 re(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 S7(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 Rr(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===y7)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===x7)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===_7)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 kd(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 w7(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):w7;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 Rd(t){return ra.call(t)==="[object String]"}function ne(t){return typeof t=="number"}function Mt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function Nd(t){return!!Ed[ra.call(t)]}function $e(t){return!!Dd[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 T7(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 Od="__ec_primitive__";function Cc(t){t[Od]=!0}function lo(t){return t[Od]}var L7=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}(),Id=typeof Map=="function";function M7(){return Id?new Map:new L7}var C7=function(){function t(e){var r=bt(e);this.data=M7();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 Id?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t}();function Ot(t){return new C7(t)}function E7(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 Xr(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 D7(t){return[t[0],t[1]]}function Bd(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function A7(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function P7(t){return Math.sqrt(k7(t))}function k7(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 R7(t,e){var r=P7(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 N7(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var sa=N7;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}(),O7=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}(),I7=Math.log(2);function kc(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)/I7);return t[r][l]}for(var u=n|1<<r,c=r+1;n&1<<c;)c++;for(var f=0,v=0,h=0;v<s;v++){var d=1<<v;d&i||(f+=(h%2?-1:1)*t[r][v]*kc(t,e-1,c,u,i|d,a),h++)}return a[o]=f,f}function B7(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=kc(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)*kc(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 Vd="___zrEVENTSAVED";function V7(t,e,r,n,i){if(e.getBoundingClientRect&&Yt.domSupported&&!zd(e)){var a=e[Vd]||(e[Vd]={}),o=z7(e,a),s=F7(o,a);if(s)return s(t,r,n),!0}return!1}function z7(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 F7(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,v=c.left,h=c.top;o.push(v,h),l=l&&a&&v===a[f]&&h===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=B7(o,s))}function zd(t){return t.nodeName.toUpperCase()==="CANVAS"}var H7=/([&<>"'])/g,G7={"&":"&","<":"<",">":">",'"':""","'":"'"};function W7(t){return t==null?"":(t+"").replace(H7,function(e,r){return G7[r]})}var j7=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Rc=[],$7=Yt.browser.firefox&&+Yt.browser.version.split(".")[0]<39;function Nc(t,e,r,n){return r=r||{},n?Fd(t,e,r):$7&&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):Fd(t,e,r),r}function Fd(t,e,r){if(Yt.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(zd(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(V7(Rc,t,n,i)){r.zrX=Rc[0],r.zrY=Rc[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=X7(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&j7.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function X7(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 U7(t,e,r,n){t.addEventListener(e,r,n)}function Y7(t,e,r,n){t.removeEventListener(e,r,n)}var Z7=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},K7=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 Hd(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function Q7(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=Hd(n)/Hd(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Q7(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 Gd(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 uo(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 Wd(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 jd(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 J7(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 co(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,$d=["x","y"],q7=["width","height"],fi=new Pt,hi=new Pt,vi=new Pt,di=new Pt,lr=Ud(),fo=lr.minTv,zc=lr.maxTv,ho=[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 Wd(a,a,[-r.x,-r.y]),J7(a,a,[n,i]),Wd(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(t6,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(e6,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,v=e.y+e.height-l,h=r.x+l,d=r.x+r.width-l,p=r.y+l,g=r.y+r.height-l;if(u>c||f>v||h>d||p>g)return!1;var m=!(c<h||d<u||v<p||g<f);return(s||a)&&(ho[0]=1/0,ho[1]=0,Xd(u,c,h,d,0,s,a,o),Xd(f,v,p,g,1,s,a,o),s&&Pt.copy(n,m?lr.useDir?lr.dirMinTv:fo: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=vi.x=r.x,fi.y=di.y=r.y,hi.x=di.x=r.x+r.width,hi.y=vi.y=r.y+r.height,fi.transform(n),di.transform(n),hi.transform(n),vi.transform(n),e.x=ci(fi.x,hi.x,vi.x,di.x),e.y=ci(fi.y,hi.y,vi.y,di.y);var l=fa(fi.x,hi.x,vi.x,di.x),u=fa(fi.y,hi.y,vi.y,di.y);e.width=l-e.x,e.height=u-e.y},t}(),t6=new It(0,0,0,0),e6=new It(0,0,0,0);function Xd(t,e,r,n,i,a,o,s){var l=Vc(e-r),u=Vc(n-t),c=ci(l,u),f=$d[i],v=$d[1-i],h=q7[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<ho[0]||lr.useDir)&&(ho[0]=ci(c,ho[0]),(l<u||!lr.bidirectional)&&(fo[f]=l,fo[v]=0,lr.useDir&&lr.calcDirMTV()),(l>=u||!lr.bidirectional)&&(fo[f]=-u,fo[v]=0,lr.useDir&&lr.calcDirMTV())))}function Ud(){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 Yd="silent";function r6(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:n6}}function n6(){Z7(this.event)}var i6=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),vo=function(){function t(e,r){this.x=e,this.y=r}return t}(),a6=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Fc=new It(0,0,0,0),Zd=function(t){ht(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new vo(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new i6,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new O7(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(z(a6,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=Qd(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 vo(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 vo(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=r6(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 vo(r,n);if(Kd(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 v=a[f];v!==i&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Fc.copy(v.getBoundingRect()),v.transform&&Fc.applyTransform(v.transform),Fc.intersect(c)&&s.push(v))}if(s.length)for(var h=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=h)for(var m=0;m<p;m+=d){var y=r+g*Math.cos(m),_=n+g*Math.sin(m);if(Kd(s,o,y,_,i),o.target)return o}}return o},e.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new K7);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 vo;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(fn);z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Zd.prototype[t]=function(e){var r=e.zrX,n=e.zrY,i=Qd(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 o6(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?Yd:!0}return!1}function Kd(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=o6(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==Yd)){e.target=o;break}}}function Qd(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var Jd=32,po=7;function s6(t){for(var e=0;t>=Jd;)e|=t&1,t>>=1;return t+e}function qd(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++;l6(t,e,i)}else for(;i<r&&n(t[i],t[i-1])>=0;)i++;return i-e}function l6(t,e,r){for(r--;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}function tp(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 Gc(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 u6(t,e){var r=po,n,i,a=0,o=[];n=[],i=[];function s(h,d){n[a]=h,i[a]=d,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 d=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=Gc(t[g],t,d,p,0,e);d+=y,p-=y,p!==0&&(m=Hc(t[d+p-1],t,g,m,m-1,e),m!==0&&(p<=m?f(d,p,g,m):v(d,p,g,m)))}function f(h,d,p,g){var m=0;for(m=0;m<d;m++)o[m]=t[h+m];var y=0,_=p,x=h;if(t[x++]=t[_++],--g===0){for(m=0;m<d;m++)t[x+m]=o[y+m];return}if(d===1){for(m=0;m<g;m++)t[x+m]=t[_+m];t[x+g]=o[y];return}for(var b=r,S,w,T;;){S=0,w=0,T=!1;do if(e(t[_],o[y])<0){if(t[x++]=t[_++],w++,S=0,--g===0){T=!0;break}}else if(t[x++]=o[y++],S++,w=0,--d===1){T=!0;break}while((S|w)<b);if(T)break;do{if(S=Gc(t[_],o,y,d,0,e),S!==0){for(m=0;m<S;m++)t[x+m]=o[y+m];if(x+=S,y+=S,d-=S,d<=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++],--d===1){T=!0;break}b--}while(S>=po||w>=po);if(T)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),d===1){for(m=0;m<g;m++)t[x+m]=t[_+m];t[x+g]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)t[x+m]=o[y+m]}}function v(h,d,p,g){var m=0;for(m=0;m<g;m++)o[m]=t[p+m];var y=h+d-1,_=g-1,x=p+g-1,b=0,S=0;if(t[x--]=t[y--],--d===0){for(b=x-(g-1),m=0;m<g;m++)t[b+m]=o[m];return}if(g===1){for(x-=d,y-=d,S=x+1,b=y+1,m=d-1;m>=0;m--)t[S+m]=t[b+m];t[x]=o[_];return}for(var w=r;;){var T=0,L=0,D=!1;do if(e(o[_],t[y])<0){if(t[x--]=t[y--],T++,L=0,--d===0){D=!0;break}}else if(t[x--]=o[_--],L++,T=0,--g===1){D=!0;break}while((T|L)<w);if(D)break;do{if(T=d-Gc(o[_],t,h,d,d-1,e),T!==0){for(x-=T,y-=T,d-=T,S=x+1,b=y+1,m=T-1;m>=0;m--)t[S+m]=t[b+m];if(d===0){D=!0;break}}if(t[x--]=o[_--],--g===1){D=!0;break}if(L=g-Hc(t[y],o,0,g,g-1,e),L!==0){for(x-=L,_-=L,g-=L,S=x+1,b=_+1,m=0;m<L;m++)t[S+m]=o[b+m];if(g<=1){D=!0;break}}if(t[x--]=t[y--],--d===0){D=!0;break}w--}while(T>=po||L>=po);if(D)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),g===1){for(x-=d,y-=d,S=x+1,b=y+1,m=d-1;m>=0;m--)t[S+m]=t[b+m];t[x]=o[_]}else{if(g===0)throw new Error;for(b=x-(g-1),m=0;m<g;m++)t[b+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<Jd){a=qd(t,r,n,e),tp(t,r,n,r+a,e);return}var o=u6(t,e),s=s6(i);do{if(a=qd(t,r,n,e),a<s){var l=i;l>s&&(l=s),tp(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,go=2,ha=4,ep=!1;function Wc(){ep||(ep=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function rp(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var c6=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=rp}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,rp)},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(),v=0;v<f.length;v++){var h=f[v];e.__dirty&&(h.__dirty|=Ur),this._updateAndAddDisplayable(h,s,n)}e.__dirty=0}else{var d=e;isNaN(d.z)&&(Wc(),d.z=0),isNaN(d.z2)&&(Wc(),d.z2=0),isNaN(d.zlevel)&&(Wc(),d.zlevel=0),this._displayList[this._displayListLen++]=d}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=re(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=Yt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var mo={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-mo.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?mo.bounceIn(t*2)*.5:mo.bounceOut(t*2-1)*.5+.5}},tl=Math.pow,kn=Math.sqrt,el=1e-8,np=1e-4,ip=kn(3),rl=1/3,Yr=oa(),mr=oa(),va=oa();function Rn(t){return t>-el&&t<el}function ap(t){return t>el||t<-el}function ke(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 op(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,v=l*l-3*s*u,h=0;if(Rn(c)&&Rn(f))if(Rn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[h++]=d)}else{var p=f*f-4*c*v;if(Rn(p)){var g=f/c,d=-s/o+g,m=-g/2;d>=0&&d<=1&&(a[h++]=d),m>=0&&m<=1&&(a[h++]=m)}else if(p>0){var y=kn(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 d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(a[h++]=d)}else{var b=(2*c*s-3*o*f)/(2*kn(c*c*c)),S=Math.acos(b)/3,w=kn(c),T=Math.cos(S),d=(-s-2*w*T)/(3*o),m=(-s+w*(T+ip*Math.sin(S)))/(3*o),L=(-s+w*(T-ip*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[h++]=d),m>=0&&m<=1&&(a[h++]=m),L>=0&&L<=1&&(a[h++]=L)}}return h}function sp(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(Rn(o)){if(ap(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Rn(c))i[0]=-a/(2*o);else if(c>0){var f=kn(c),u=(-a+f)/(2*o),v=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}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 f6(t,e,r,n,i,a,o,s,l,u,c){var f,v=.005,h=1/0,d,p,g,m;Yr[0]=l,Yr[1]=u;for(var y=0;y<1;y+=.05)mr[0]=ke(t,r,i,o,y),mr[1]=ke(e,n,a,s,y),g=sa(Yr,mr),g<h&&(f=y,h=g);h=1/0;for(var _=0;_<32&&!(v<np);_++)d=f-v,p=f+v,mr[0]=ke(t,r,i,o,d),mr[1]=ke(e,n,a,s,d),g=sa(mr,Yr),d>=0&&g<h?(f=d,h=g):(va[0]=ke(t,r,i,o,p),va[1]=ke(e,n,a,s,p),m=sa(va,Yr),p<=1&&m<h?(f=p,h=m):v*=.5);return kn(h)}function h6(t,e,r,n,i,a,o,s,l){for(var u=t,c=e,f=0,v=1/l,h=1;h<=l;h++){var d=h*v,p=ke(t,r,i,o,d),g=ke(e,n,a,s,d),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 lp(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))}function v6(t,e,r,n,i){var a=t-2*e+r,o=2*(e-t),s=t-n,l=0;if(Rn(a)){if(ap(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Rn(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=kn(c),u=(-o+f)/(2*a),v=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function up(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 d6(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;Yr[0]=o,Yr[1]=s;for(var v=0;v<1;v+=.05){mr[0]=qe(t,r,i,v),mr[1]=qe(e,n,a,v);var h=sa(Yr,mr);h<f&&(u=v,f=h)}f=1/0;for(var d=0;d<32&&!(c<np);d++){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,Yr);if(p>=0&&h<f)u=p,f=h;else{va[0]=qe(t,r,i,g),va[1]=qe(e,n,a,g);var m=sa(va,Yr);g<=1&&m<f?(u=g,f=m):c*=.5}}return kn(f)}function p6(t,e,r,n,i,a,o){for(var s=t,l=e,u=0,c=1/o,f=1;f<=o;f++){var v=f*c,h=qe(t,r,i,v),d=qe(e,n,a,v),p=h-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=h,l=d}return u}var g6=/cubic-bezier\(([0-9,\.e ]+)\)/;function $c(t){var e=t&&g6.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)&&ke(0,i,o,1,s[0])}}}var m6=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:mo[e]||$c(e)},t}(),cp=function(){function t(e){this.value=e}return t}(),y6=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new cp(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}(),da=function(){function t(e){this._list=new y6,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 cp(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}(),fp={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 Xc(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)==="%"?Xc(parseFloat(e)/100):Xc(parseFloat(e))}function Yc(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 hp=new da(20),sl=null;function pa(t,e){sl&&Zc(sl,e),sl=hp.put(t,sl||e.slice())}function Or(t,e){if(t){e=e||[];var r=hp.get(t);if(r)return Zc(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in fp)return Zc(e,fp[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(Yc(o,a,r+1/3)*255),Nn(Yc(o,a,r)*255),Nn(Yc(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function _6(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,v=((a-n)/6+o/2)/o;e===a?l=v-f:r===a?l=1/3+c-v: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 yo(r,r.length===4?"rgba":"rgb")}}function x6(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=yo([Nn(ol(o[0],s[0],l)),Nn(ol(o[1],s[1],l)),Nn(ol(o[2],s[2],l)),Xc(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=_6(i),r!=null&&(i[1]=pi(Dt(r)?r(i[1]):r)),n!=null&&(i[2]=pi(Dt(n)?n(i[2]):n)),yo(Kc(i),"rgba")}function yo(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 dp=new da(100);function Jc(t){if(Lt(t)){var e=dp.get(t);return e||(e=vp(t,-.1),dp.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 _o(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 pp=1e-4;function On(t){return t<pp&&t>-pp}function cl(t){return ul(t*1e3)/1e3}function qc(t){return ul(t*1e4)/1e4}function b6(t){return"matrix("+cl(t[0])+","+cl(t[1])+","+cl(t[2])+","+cl(t[3])+","+qc(t[4])+","+qc(t[5])+")"}var S6={left:"start",right:"end",center:"middle",middle:"middle"};function w6(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function T6(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function L6(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 gp(t){return t&&!!t.image}function M6(t){return t&&!!t.svgElement}function tf(t){return gp(t)||M6(t)}function mp(t){return t.type==="linear"}function yp(t){return t.type==="radial"}function _p(t){return t&&(t.type==="linear"||t.type==="radial")}function fl(t){return"url(#"+t+")"}function xp(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 bp(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 C6=function(){return Yt.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 E6(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 Sp(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 D6(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 A6(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 vl(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 dl(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 P6(t){return Je(t&&t[0])?2:1}var pl=0,gl=1,wp=2,xo=3,nf=4,af=5,Tp=6;function Lp(t){return t===nf||t===af}function ml(t){return t===gl||t===wp}var bo=[0,0,0,0],k6=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=Tp,l=r;if(Je(r)){var u=P6(r);s=u,(u===1&&!ne(r[0])||u===2&&!ne(r[0][0]))&&(o=!0)}else if(ne(r)&&!ia(r))s=pl;else if(Lt(r))if(!isNaN(+r))s=pl;else{var c=Or(r);c&&(l=c,s=xo)}else if(Tc(r)){var f=ot({},l);f.colorStops=yt(r.colorStops,function(h){return{offset:h.offset,color:Or(h.color)}}),mp(r)?s=nf:yp(r)&&(s=af),l=f}a===0?this.valType=s:(s!==this.valType||s===Tp)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:r,percent:0};return n&&(v.easing=n,v.easingFunc=Dt(n)?n:mo[n]||$c(n)),i.push(v),v},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=Lp(i),c=0;c<a;c++){var f=n[c],v=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==a-1?A6(v,h,i):u&&D6(v.colorStops,h.colorStops))}if(!s&&i!==af&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var d=n[0].value,c=0;c<a;c++)i===pl?n[c].additiveValue=n[c].value-d:i===xo?n[c].additiveValue=hl([],n[c].value,d,-1):ml(i)&&(n[c].additiveValue=i===gl?hl([],n[c].value,d,-1):Sp([],n[c].value,d,-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===xo,c,f=this._lastFr,v=Math.min,h,d;if(s===1)h=d=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var p=v(f+1,s-1);for(c=p;c>=0&&!(o[c].percent<=r);c--);c=v(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>r);c++);c=v(c-1,s-2)}d=o[c+1],h=o[c]}if(h&&d){this._lastFr=c,this._lastFrP=r;var g=d.percent-h.percent,m=g===0?1:v((r-h.percent)/g,1);d.easingFunc&&(m=d.easingFunc(m));var y=n?this._additiveValue:u?bo:e[l];if((ml(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?h.rawValue:d.rawValue;else if(ml(a))a===gl?rf(y,h[i],d[i],m):E6(y,h[i],d[i],m);else if(Lp(a)){var _=h[i],x=d[i],b=a===nf;e[l]={type:b?"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:dl(rf([],w.color,L.color,m))}}),global:x.global},b?(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],d[i],m),n||(e[l]=dl(y));else{var S=hn(h[i],d[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===pl?e[n]=e[n]+i:r===xo?(Or(e[n],bo),hl(bo,bo,i,1),e[n]=dl(bo)):r===gl?hl(e[n],e[n],i,1):r===wp&&Sp(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 k6(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,v=f[f.length-1];u=v&&v.value,c.valType===xo&&u&&(u=dl(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,vl(u),i),this._trackKeys.push(s)}l.addKeyframe(e,vl(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 v=new m6({life:i,loop:this._loop,delay:this._delay||0,onframe:function(h){r._started=2;var d=r._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[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=v,this.animation&&this.animation.addClip(v),e&&v.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]=vl(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 R6=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),N6=300,sf=Yt.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}}(),Mp={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Cp=!1;function uf(t){var e=t.pointerType;return e==="pen"||e==="touch"}function O6(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 I6(t,e){return Nr(t.dom,new B6(t,e),!0)}function Ep(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 B6=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;Ep(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Cp=!0,t=Nr(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Cp||(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<N6&&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 V6(t,e){var r=e.domHandlers;Yt.pointerEventsSupported?z(lf.pointer,function(n){yl(e,n,function(i){r[n].call(t,i)})}):(Yt.touchEventsSupported&&z(lf.touch,function(n){yl(e,n,function(i){r[n].call(t,i),O6(e)})}),z(lf.mouse,function(n){yl(e,n,function(i){i=Oc(i),e.touching||r[n].call(t,i)})}))}function z6(t,e){Yt.pointerEventsSupported?z(Mp.pointer,r):Yt.touchEventsSupported||z(Mp.mouse,r);function r(n){function i(a){a=Oc(a),Ep(t,a.target)||(a=I6(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,U7(t.domTarget,e,r,n)}function hf(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 Dp=function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t}(),F6=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 Dp(r,Ir),sf&&(i._globalHandlerScope=new Dp(document,ff)),V6(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?z6(this,n):hf(n)}},e}(fn),Ap=1;Yt.hasGlobalWindow&&(Ap=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Pp=Ap,vf=.4,df="#333",pf="#ccc",H6="#eee",kp=Bc,Rp=5e-5;function gi(t){return t>Rp||t<-Rp}var mi=[],ma=[],gf=Pn(),mf=Math.abs,G6=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?uo(n,e,n):Gd(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(),co(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(),uo(ma,e.invTransform,r),r=ma);var n=this.originX,i=this.originY;(n||i)&&(gf[4]=n,gf[5]=i,uo(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,v=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var d=n+s,p=i+l;r[4]=-d*a-v*p*o,r[5]=-p*o-h*d*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=v*o,u&&jd(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}(),So=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function _l(t,e){for(var r=0;r<So.length;r++){var n=So[r];t[n]=e[n]}}const yf=G6;function Zr(t){xl||(xl=new da(100)),t=t||un;var e=xl.get(t);return e||(e={font:t,strWidthCache:new da(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:En.measureText("国",t).width,asciiCharWidth:En.measureText("a",t).width},xl.put(t,e)),e}var xl;function W6(t){if(!(_f>=Np)){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=Np:i>2&&_f++,e}}var _f=0,Np=5;function Op(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=W6(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 Ip(t,e,r,n){var i=Kr(Zr(e),t),a=wo(e),o=ya(0,i,r),s=yi(0,a,n),l=new It(o,s,i,a);return l}function j6(t,e,r,n){var i=((t||"")+"").split(`
|
|
46
|
-
`),a=i.length;if(a===1)return Ip(i[0],e,r,n);for(var o=new It(0,0,0,0),s=0;s<i.length;s++){var l=Ip(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 wo(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=So.concat(["ignore"]),$6=Dn(So,function(t,e){return t[e]=!0,t},{ignore:!1}),_a={},X6=new It(0,0,0,0),Sl=[],wl=function(){function t(e){this.id=Pd(),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,v=void 0;if((f||c)&&(v=X6,n.layoutRect?v.copy(n.layoutRect):v.copy(this.getBoundingRect()),i||v.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(_a,n,v):bl(_a,n,v),a.x=_a.x,a.y=_a.y,o=_a.align,s=_a.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var d=void 0,p=void 0;h==="center"?(d=v.width*.5,p=v.height*.5):(d=In(h[0],v.width),p=In(h[1],v.height)),u=!0,a.originX=-a.x+d+(i?0:v.x),a.originY=-a.y+p+(i?0:v.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),co(Sl,Sl),It.copy(y,v),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,b=void 0,S=void 0;_&&this.canBeInsideText()?(x=n.insideFill,b=n.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(x),S=!0)):(x=n.outsideFill,b=n.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(x),S=!0)),x=x||"#000",(x!==m.fill||b!==m.stroke||S!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=x,m.stroke=b,m.autoStroke=S,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:df},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,yo(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(!(re(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,v=this._textGuide;return f&&f.useState(e,r,n,c),v&&v.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],v=!!(f&&f.hoverLayer||n);v&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!r&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,r,v),g&&g.useStates(e,r,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&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=re(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=re(i,e),o=re(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],v=a&&$6[f];r&&r[f]!=null?v?(u=!0,l[f]=r[f]):this[f]=r[f]:s&&n[f]!=null&&(v?(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],d=h.targetName;h.getLoop()||h.__changeFinalValue(d?(r||n)[d]: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=re(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(v){c[s]=v}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(v){c[l]=v}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();Rr(wl,fn),Rr(wl,yf);function Sf(t,e,r,n,i){r=r||{};var a=[];Bp(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(d,p){r.during(p)});for(var v=0;v<a.length;v++){var h=a[v];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 U6(t){return Je(t[0])}function Y6(t,e,r){if(Je(e[r]))if(Je(t[r])||(t[r]=[]),$e(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(U6(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 Z6(t,e){return t===e||Je(t)&&Je(e)&&K6(t,e)}function K6(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 Bp(t,e,r,n,i,a,o,s){for(var l=Ht(n),u=i.duration,c=i.delay,f=i.additive,v=i.setToFinal,h=!Mt(a),d=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}Bp(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<d.length;x++){var b=d[x];if(b.targetName===e){var S=b.stopTracks(p);if(S){var w=re(d,b);d.splice(w,1)}}}if(i.force||(p=Se(p,function(C){return!Z6(n[C],r[C])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,L=void 0,D=void 0;if(s){L={},v&&(T={});for(var x=0;x<_;x++){var m=p[x];L[m]=r[m],v?T[m]=n[m]:r[m]=n[m]}}else if(v){D={};for(var x=0;x<_;x++){var m=p[x];D[m]=vl(r[m]),Y6(r,n,m)}}var b=new of(r,!1,!1,f?Se(d,function(A){return A.targetName===e}):null);b.targetName=e,i.scope&&(b.scope=i.scope),v&&T&&b.whenWithKeys(0,T,p),D&&b.whenWithKeys(0,D,p),b.whenWithKeys(u??500,s?L:n,p).delay(c||0),t.addAnimator(b,e),o.push(b)}}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=re(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=re(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";/*!
|
|
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";/*!
|
|
47
47
|
* ZRender, a high performance 2d drawing library.
|
|
48
48
|
*
|
|
49
49
|
* Copyright (c) 2013, Baidu Inc.
|
|
@@ -51,20 +51,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
51
51
|
*
|
|
52
52
|
* LICENSE
|
|
53
53
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
54
|
-
*/var To={},Vp={};function Q6(t){delete Vp[t]}function J6(t){if(!t)return!1;if(typeof t=="string")return ll(t,1)<vf;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<vf}return!1}var q6=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 c6,o=n.renderer||"canvas";if(To[o]||(o=Ht(To)[0]),process.env.NODE_ENV!=="production"&&!To[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new To[o](r,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Yt.node&&!Yt.worker&&!l?new F6(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?Yt.touchEventsSupported:!!c,v=44,h;f&&(h=St(n.pointerSize,v)),this.handler=new Zd(a,s,u,s.root,h),this.animation=new R6({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=J6(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,Q6(this.id))},t}();function zp(t,e){var r=new q6(Pd(),t,e);return Vp[r.id]=r,r}function t8(t,e){To[t]=e}var Tf;function e8(t){if(typeof Tf=="function")return Tf(t)}function r8(t){Tf=t}var Fp=1e-4,Hp=20;function n8(t){return t.replace(/^\s+|\s+$/g,"")}var Lo=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 ae=i8;function i8(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)?n8(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Re(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),Hp),t=(+t).toFixed(e),r?t:+t}function vn(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 a8(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 o8(t,e){var r=Dn(t,function(h,d){return h+(isNaN(d)?0:d)},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,d){return h+d},0),l=yt(i,function(h,d){return h-o[d]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,v=l.length;f<v;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return yt(o,function(h){return h/n})}function s8(t,e){var r=Math.max(vn(t),vn(e)),n=t+e;return r>Hp?n:Re(n,r)}function Gp(t){var e=Math.PI*2;return(t%e+e)%e}function Tl(t){return t>-Fp&&t<Fp}var l8=/^(?:(\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 Mo(t){if(t instanceof Date)return t;if(Lt(t)){var e=l8.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 u8(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 Wp(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 c8(t){var e=parseFloat(t);return e==t&&(e!==0||!Lt(t)||t.indexOf("x")<=0)?e:NaN}function jp(t){return!isNaN(c8(t))}function f8(){return Math.round(Math.random()*9)}function $p(t,e){return e===0?t:$p(e,t%e)}function Xp(t,e){return t==null?e:e==null?t:t*e/$p(t,e)}var h8="[ECharts] ",Up={},v8=typeof console<"u"&&console.warn&&console.log;function Ml(t,e,r){if(v8){if(r){if(Up[e])return;Up[e]=!0}console[t](h8+e)}}function Yp(t,e){Ml("log",t,e)}function Ve(t,e){Ml("warn",t,e)}function Jt(t,e){Ml("error",t,e)}function dn(t){process.env.NODE_ENV!=="production"&&Ml("warn","DEPRECATED: "+t,!0)}function we(t,e,r){process.env.NODE_ENV!=="production"&&dn((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 () { ... }":T7(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 Zp(t,e,r){return(e-t)*r+t}var Kp="series\0",d8="\0_ec_\0";function Xe(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 Qp=["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 Co(t){return Mt(t)&&!bt(t)&&!(t instanceof Date)?t.value:t}function p8(t){return Mt(t)&&!(t instanceof Array)}function g8(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&&!t1(l.id)&&qp(l.id),l.name!=null&&!t1(l.name)&&qp(l.name))});var s=m8(t,o,r);return(n||i)&&y8(s,t,o,e),n&&_8(s,e),n||i?x8(s,e,i):a&&b8(s,e),S8(s),s}function m8(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 y8(t,e,r,n){z(n,function(i,a){if(!(!i||i.id==null)){var o=Eo(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 _8(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)&&Jp("name",a,r)){t[i].newOption=r,e[n]=null;return}}})}function x8(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&&!Jp("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):t.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function b8(t,e){z(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function S8(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?Eo(a.name):i?i.name:Kp+n,i)o.id=Eo(i.id);else if(a.id!=null)o.id=Eo(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 Jp(t,e,r){var n=Jr(e[t],null),i=Jr(r[t],null);return n!=null&&i!=null&&n===i}function Eo(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:ne(t)||Rd(t)?t+"":e}function qp(t){process.env.NODE_ENV!=="production"&&Ve("`"+t+"` is invalid id or name. Must be a string or number.")}function t1(t){return Rd(t)||jp(t)}function Af(t){var e=t.name;return!!(e&&e.indexOf(Kp))}function xa(t){return t&&t.id!=null&&Eo(t.id).indexOf(d8)===0}function w8(t,e,r){z(t,function(n){var i=n.newOption;Mt(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=T8(e,i,n.existing,r))})}function T8(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 ve(){var t="__ec_inner_"+L8++;return function(e){return e[t]||(e[t]={})}}var L8=f8();function Pf(t,e,r){var n=e1(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 e1(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&&re(e.includeMainTypes,c)<0)){o=o||!!c;var v=i.get(c)||i.set(c,{});v[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"&&Jt('`"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"&&Jt('`"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 r1(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function M8(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function C8(t,e,r,n,i){var a=e==null||e==="auto";if(n==null)return n;if(ne(n)){var o=Zp(r||0,n,i);return Re(o,a?Math.max(vn(r||0),vn(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 v=t.getDimensionInfo(f);if(v&&v.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,d=u[f],o=Zp(h,d,i);s[f]=Re(o,a?Math.max(vn(h),vn(d)):e)}}return s}}var E8=".",_i="___EC__COMPONENT__CONTAINER___",n1="___EC__EXTENDED_CLASS___";function qr(t){var e={main:"",sub:""};if(t){var r=t.split(E8);e.main=r[0]||"",e.sub=r[1]||""}return e}function D8(t){wt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function A8(t){return!!(t&&t[n1])}function kf(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 P8(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)},S7(i,this)),ot(i.prototype,r),i[n1]=!0,i.extend=this.extend,i.superCall=N8,i.superApply=O8,i.superClass=n,i}}function P8(t){return Dt(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function i1(t,e){t.extend=e.extend}var k8=Math.round(Math.random()*10);function R8(t){var e=["__\0is_clz",k8++].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 N8(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 O8(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){D8(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 Do(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&&re(i,l)>=0||a&&re(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var I8=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],B8=Do(I8),V8=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return B8(this,e,r)},t}(),Rf=new da(50);function z8(t){if(typeof t=="string"){var e=Rf.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=Rf.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!Dl(e)&&a.pending.push(o)):(e=En.loadImage(t,a1,a1),e.__zrImageSrc=t,Rf.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function a1(){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 F8(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*
|
|
58
|
-
`),u=!0),n.accumWidth=
|
|
59
|
-
`));for(var g=Zr(l),m=0;m<c.length;m++){var y=c[m],_=new
|
|
60
|
-
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=Op(f,h.charCodeAt(0)),p=n?!1:!Y8(h);if(a.length?c+d>r:i+c+d>r){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=d)):p?(a.push(l),o.push(u),l=h,u=d):(a.push(h),o.push(d));continue}c+=d,p?(l+=h,u+=d):(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 c1(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(f1,ya(r,o,i),yi(n,s,a),o,s),It.intersect(e,f1,null,h1);var l=h1.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 f1=new It(0,0,0,0),h1={outIntersectRect:{},clamp:!0};function Bf(t){return t!=null?t+="":t=""}function Z8(t){var e=Bf(t.text),r=t.font,n=Kr(Zr(r),e),i=wo(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 d1=["z","z2","invisible"],K8=["invisible"],Q8=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&&J8(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|=go,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&go)},e.prototype.styleUpdated=function(){this.__dirty&=~go},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,d1)},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),v=0;v<f.length;v++){var h=f[v];h in u&&(u[h]=u[h],this.style[h]=c[h])}for(var d=Ht(u),v=0;v<d.length;v++){var h=d[v];this.style[h]=this.style[h]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?K8:d1,v=0;v<p.length;v++){var h=p[v];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|go}(),e}(wl),Ff=new It(0,0,0,0),Hf=new It(0,0,0,0);function J8(t,e,r){return Ff.copy(t.getBoundingRect()),t.transform&&Ff.applyTransform(t.transform),Hf.width=e,Hf.height=r,!Ff.intersect(Hf)}const Ao=Q8;var xr=Math.min,br=Math.max,Gf=Math.sin,Wf=Math.cos,bi=Math.PI*2,Pl=oa(),kl=oa(),Rl=oa();function p1(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 g1=[],m1=[];function q8(t,e,r,n,i,a,o,s,l,u){var c=sp,f=ke,v=c(t,r,i,o,g1);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<v;h++){var d=f(t,r,i,o,g1[h]);l[0]=xr(d,l[0]),u[0]=br(d,u[0])}v=c(e,n,a,s,m1);for(var h=0;h<v;h++){var p=f(e,n,a,s,m1[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 t9(t,e,r,n,i,a,o,s){var l=up,u=qe,c=br(xr(l(t,r,i),1),0),f=br(xr(l(e,n,a),1),0),v=u(t,r,i,c),h=u(e,n,a,f);o[0]=xr(t,i,v),o[1]=xr(e,a,h),s[0]=br(t,i,v),s[1]=br(e,a,h)}function e9(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]=Wf(i)*r+t,Pl[1]=Gf(i)*n+e,kl[0]=Wf(a)*r+t,kl[1]=Gf(a)*n+e,u(s,Pl,kl),c(l,Pl,kl),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 v=a;a=i,i=v}for(var h=0;h<a;h+=Math.PI/2)h>i&&(Rl[0]=Wf(h)*r+t,Rl[1]=Gf(h)*n+e,u(s,Rl,s),c(l,Rl,l))}var Zt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Si=[],wi=[],tn=[],Bn=[],en=[],rn=[],jf=Math.min,$f=Math.max,Ti=Math.cos,Li=Math.sin,pn=Math.abs,Xf=Math.PI,Vn=Xf*2,Uf=typeof Float32Array<"u",Po=[];function Yf(t){var e=Math.round(t/Xf*1e8)/1e8;return e%2*Xf}function y1(t,e){var r=Yf(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-Yf(r-i)):e&&r<i&&(i=r-(Vn-Yf(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/Pp/e)||0,this._uy=pn(n/Pp/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(Zt.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(Zt.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(Zt.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(Zt.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(),Po[0]=i,Po[1]=a,y1(Po,o),i=Po[0],a=Po[1];var s=a-i;return this.addData(Zt.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(Zt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Zt.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 Zt.M:r=i=e[o++],n=a=e[o++],en[0]=i,en[1]=a,rn[0]=i,rn[1]=a;break;case Zt.L:p1(r,n,e[o],e[o+1],en,rn),r=e[o++],n=e[o++];break;case Zt.C:q8(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 Zt.Q:t9(r,n,e[o++],e[o++],e[o],e[o+1],en,rn),r=e[o++],n=e[o++];break;case Zt.A:var u=e[o++],c=e[o++],f=e[o++],v=e[o++],h=e[o++],d=e[o++]+h;o+=1;var p=!e[o++];l&&(i=Ti(h)*f+u,a=Li(h)*v+c),e9(u,c,f,v,h,d,p,en,rn),r=Ti(d)*f+u,n=Li(d)*v+c;break;case Zt.R:i=r=e[o++],a=n=e[o++];var g=e[o++],m=e[o++];p1(i,a,i+g,a+m,en,rn);break;case Zt.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,v=0;v<r;){var h=e[v++],d=v===1;d&&(a=e[v],o=e[v+1],s=a,l=o);var p=-1;switch(h){case Zt.M:a=s=e[v++],o=l=e[v++];break;case Zt.L:{var g=e[v++],m=e[v++],y=g-a,_=m-o;(pn(y)>n||pn(_)>i||v===r-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case Zt.C:{var x=e[v++],b=e[v++],g=e[v++],m=e[v++],S=e[v++],w=e[v++];p=h6(a,o,x,b,g,m,S,w,10),a=S,o=w;break}case Zt.Q:{var x=e[v++],b=e[v++],g=e[v++],m=e[v++];p=p6(a,o,x,b,g,m,10),a=g,o=m;break}case Zt.A:var T=e[v++],L=e[v++],D=e[v++],C=e[v++],A=e[v++],M=e[v++],P=M+A;v+=1,d&&(s=Ti(A)*D+T,l=Li(A)*C+L),p=$f(D,C)*jf(Vn,Math.abs(M)),a=Ti(P)*D+T,o=Li(P)*C+L;break;case Zt.R:{s=a=e[v++],l=o=e[v++];var B=e[v++],R=e[v++];p=B*2+R*2;break}case Zt.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,v,h=r<1,d,p,g=0,m=0,y,_=0,x,b;if(!(h&&(this._pathSegLen||this._calculateLength(),d=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!==Zt.L&&_>0&&(e.lineTo(x,b),_=0),w){case Zt.M:s=u=n[S++],l=c=n[S++],e.moveTo(u,c);break;case Zt.L:{f=n[S++],v=n[S++];var L=pn(f-u),D=pn(v-c);if(L>i||D>a){if(h){var C=d[m++];if(g+C>y){var A=(y-g)/C;e.lineTo(u*(1-A)+f*A,c*(1-A)+v*A);break t}g+=C}e.lineTo(f,v),u=f,c=v,_=0}else{var M=L*L+D*D;M>_&&(x=f,b=v,_=M)}break}case Zt.C:{var P=n[S++],B=n[S++],R=n[S++],k=n[S++],H=n[S++],I=n[S++];if(h){var C=d[m++];if(g+C>y){var A=(y-g)/C;il(u,P,R,H,A,Si),il(c,B,k,I,A,wi),e.bezierCurveTo(Si[1],wi[1],Si[2],wi[2],Si[3],wi[3]);break t}g+=C}e.bezierCurveTo(P,B,R,k,H,I),u=H,c=I;break}case Zt.Q:{var P=n[S++],B=n[S++],R=n[S++],k=n[S++];if(h){var C=d[m++];if(g+C>y){var A=(y-g)/C;al(u,P,R,A,Si),al(c,B,k,A,wi),e.quadraticCurveTo(Si[1],wi[1],Si[2],wi[2]);break t}g+=C}e.quadraticCurveTo(P,B,R,k),u=R,c=k;break}case Zt.A:var F=n[S++],O=n[S++],W=n[S++],j=n[S++],X=n[S++],et=n[S++],ft=n[S++],gt=!n[S++],Y=W>j?W:j,U=pn(W-j)>.001,q=X+et,tt=!1;if(h){var C=d[m++];g+C>y&&(q=X+et*(y-g)/C,tt=!0),g+=C}if(U&&e.ellipse?e.ellipse(F,O,W,j,ft,X,q,gt):e.arc(F,O,Y,X,q,gt),tt)break t;T&&(s=Ti(X)*W+F,l=Li(X)*j+O),u=Ti(q)*W+F,c=Li(q)*j+O;break;case Zt.R:s=u=n[S],l=c=n[S+1],f=n[S++],v=n[S++];var nt=n[S++],at=n[S++];if(h){var C=d[m++];if(g+C>y){var st=y-g;e.moveTo(f,v),e.lineTo(f+jf(st,nt),v),st-=nt,st>0&&e.lineTo(f+nt,v+jf(st,at)),st-=at,st>0&&e.lineTo(f+$f(nt-st,0),v+at),st-=nt,st>0&&e.lineTo(f,v+$f(at-st,0));break t}g+=C}e.rect(f,v,nt,at);break;case Zt.Z:if(h){var C=d[m++];if(g+C>y){var A=(y-g)/C;e.lineTo(u*(1-A)+s*A,c*(1-A)+l*A);break t}g+=C}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=Zt,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 r9(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 v=f6(t,e,r,n,i,a,o,s,u,c);return v<=f/2}function n9(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=d6(t,e,r,n,i,a,s,l);return c<=u/2}var _1=Math.PI*2;function Nl(t){return t%=_1,t<0&&(t+=_1),t}var ko=Math.PI*2;function i9(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 v=Math.atan2(l,s);return v<0&&(v+=ko),v>=n&&v<=i||v+ko>=n&&v+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,a9=1e-4;function o9(t,e){return Math.abs(t-e)<a9}var Ue=[-1,-1,-1],Sr=[-1,-1];function s9(){var t=Sr[0];Sr[0]=Sr[1],Sr[1]=t}function l9(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,v=-1,h=void 0,d=void 0,p=0;p<c;p++){var g=Ue[p],m=g===0||g===1?.5:1,y=ke(t,r,i,o,g);y<l||(v<0&&(v=sp(e,n,a,s,Sr),Sr[1]<Sr[0]&&v>1&&s9(),h=ke(e,n,a,s,Sr[0]),v>1&&(d=ke(e,n,a,s,Sr[1]))),v===2?g<Sr[0]?f+=h<e?m:-m:g<Sr[1]?f+=d<h?m:-m:f+=s<d?m:-m:g<Sr[0]?f+=h<e?m:-m:f+=s<h?m:-m)}return f}function u9(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=v6(e,n,a,s,Ue);if(l===0)return 0;var u=up(e,n,a);if(u>=0&&u<=1){for(var c=0,f=qe(e,n,a,u),v=0;v<l;v++){var h=Ue[v]===0||Ue[v]===1?.5:1,d=qe(t,r,i,Ue[v]);d<o||(Ue[v]<u?c+=f<e?h:-h:c+=a<f?h:-h)}return c}else{var h=Ue[0]===0||Ue[0]===1?.5:1,d=qe(t,r,i,Ue[0]);return d<o?0:a<e?h:-h}}function c9(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 v=0,h=0;h<2;h++){var d=Ue[h];if(d+t>o){var p=Math.atan2(s,d),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),v+=c)}}return v}function x1(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,l=0,u=0,c=0,f=0,v,h,d=0;d<o;){var p=a[d++],g=d===1;switch(p===Fn.M&&d>1&&(r||(s+=Mi(l,u,c,f,n,i))),g&&(l=a[d],u=a[d+1],c=l,f=u),p){case Fn.M:c=a[d++],f=a[d++],l=c,u=f;break;case Fn.L:if(r){if(Sa(l,u,a[d],a[d+1],e,n,i))return!0}else s+=Mi(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Fn.C:if(r){if(r9(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,n,i))return!0}else s+=l9(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Fn.Q:if(r){if(n9(l,u,a[d++],a[d++],a[d],a[d+1],e,n,i))return!0}else s+=u9(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Fn.A:var m=a[d++],y=a[d++],_=a[d++],x=a[d++],b=a[d++],S=a[d++];d+=1;var w=!!(1-a[d++]);v=Math.cos(b)*_+m,h=Math.sin(b)*x+y,g?(c=v,f=h):s+=Mi(l,u,v,h,n,i);var T=(n-m)*x/_+m;if(r){if(i9(m,y,x,b,b+S,w,e,T,i))return!0}else s+=c9(m,y,x,b,b+S,w,T,i);l=Math.cos(b+S)*_+m,u=Math.sin(b+S)*x+y;break;case Fn.R:c=l=a[d++],f=u=a[d++];var L=a[d++],D=a[d++];if(v=c+L,h=f+D,r){if(Sa(c,f,v,f,e,n,i)||Sa(v,f,v,h,e,n,i)||Sa(v,h,c,h,e,n,i)||Sa(c,h,c,f,e,n,i))return!0}else s+=Mi(v,f,v,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&&!o9(u,f)&&(s+=Mi(l,u,c,f,n,i)||0),s!==0}function f9(t,e,r){return x1(t,0,!1,e,r)}function h9(t,e,r,n){return x1(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),v9={style:Ft({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Al.style)},Zf=So.concat(["invisible","culling","z","z2","zlevel","parent"]),jt=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?df:n>.2?H6:pf}else if(r)return pf}return df},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)<vf;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)),h9(s,l/u,r,n)))return!0}if(this.hasFill())return f9(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),v=0;v<f.length;v++){var h=f[v];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 v9},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|go|ha}(),e}(Ao),d9=Ft({strokeFirst:!0,font:un,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Ol),Ro=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(d9,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=Z8(this.style)),this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(Ao);Ro.prototype.type="tspan";var p9=Ft({x:0,y:0},xi),g9={style:Ft({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Al.style)};function m9(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(p9,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=m9(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 g9},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}(Ao);Br.prototype.type="image";function y9(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 b1(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 S1(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 _9=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),x9={},_e=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new _9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=S1(x9,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?y9(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(jt);_e.prototype.type="rect";var w1={fill:"#000"},T1=2,nn={},b9={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=w1,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,T9(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||w1},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 b9},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";c1(nn,a.overflowRect,o,s,l,u),o=nn.baseX,s=nn.baseY;var c=R1(r),f=G8(c,r,nn.outerWidth,nn.outerHeight),v=Kf(r),h=!!r.backgroundColor,d=f.outerHeight,p=f.outerWidth,g=f.lines,m=f.lineHeight;this.isTruncated=!!f.isTruncated;var y=o,_=yi(s,f.contentHeight,u);if(v||i){var x=ya(o,p,l),b=yi(s,d,u);v&&this._renderBackground(r,r,x,b,p,d)}_+=m/2,i&&(y=k1(o,l,i),u==="top"?_+=i[0]:u==="bottom"&&(_-=i[2]));for(var S=0,w=!1,T=!1,L=P1("fill"in r?r.fill:(T=!0,a.fill)),D=A1("stroke"in r?r.stroke:!h&&(!a.autoStroke||T)?(S=T1,w=!0,a.stroke):null),C=r.textShadowBlur>0,A=0;A<g.length;A++){var M=this._getOrCreateChild(Ro),P=M.createStyle();M.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,C&&(P.shadowBlur=r.textShadowBlur||0,P.shadowColor=r.textShadowColor||"transparent",P.shadowOffsetX=r.textShadowOffsetX||0,P.shadowOffsetY=r.textShadowOffsetY||0),P.stroke=D,P.fill=L,D&&(P.lineWidth=r.lineWidth||S,P.lineDash=r.lineDash,P.lineDashOffset=r.lineDashOffset||0),P.font=n,C1(P,r),_+=m,M.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;c1(nn,n.overflowRect,o,s,i,a),o=nn.baseX,s=nn.baseY;var l=R1(r),u=$8(l,r,nn.outerWidth,nn.outerHeight,i),c=u.width,f=u.outerWidth,v=u.outerHeight,h=r.padding;this.isTruncated=!!u.isTruncated;var d=ya(o,f,i),p=yi(s,v,a),g=d,m=p;h&&(g+=h[3],m+=h[0]);var y=g+c;Kf(r)&&this._renderBackground(r,r,d,p,f,v);for(var _=!!r.backgroundColor,x=0;x<u.lines.length;x++){for(var b=u.lines[x],S=b.tokens,w=S.length,T=b.lineHeight,L=b.width,D=0,C=g,A=y,M=w-1,P=void 0;D<w&&(P=S[D],!P.align||P.align==="left");)this._placeToken(P,r,T,m,C,"left",_),L-=P.width,C+=P.width,D++;for(;M>=0&&(P=S[M],P.align==="right");)this._placeToken(P,r,T,m,A,"right",_),L-=P.width,A-=P.width,M--;for(C+=(c-(C-g)-(y-A)-L)/2;D<=M;)P=S[D],this._placeToken(P,r,T,m,C+P.width/2,"center",_),C+=P.width,D++;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 v=!r.isLineHolder&&Kf(u);v&&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,d=r.textPadding;d&&(o=k1(o,s,d),f-=r.height/2-d[0]-r.innerHeight/2);var p=this._getOrCreateChild(Ro),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,x=!1,b=P1("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)?(_=T1,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),C1(g,u),S&&(g.lineWidth=cn(u.lineWidth,n.lineWidth,_),g.lineDash=St(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=S),b&&(g.fill=b),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,v=l&&!f,h=r.borderRadius,d=this,p,g;if(v||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(v){var y=p.style;y.fill=l||null,y.fillOpacity=St(r.fillOpacity,1)}else if(f){g=this._getOrCreateChild(Br),g.onload=function(){d.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 E1(r)&&(n=[r.fontStyle,r.fontWeight,M1(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&An(n)||r.textFont||r.font},e}(Ao),S9={left:!0,right:1,center:1},w9={top:1,bottom:1,middle:1},L1=["fontStyle","fontWeight","fontSize","fontFamily"];function M1(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 C1(t,e){for(var r=0;r<L1.length;r++){var n=L1[r],i=e[n];i!=null&&(t[n]=i)}}function E1(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function T9(t){return D1(t),z(t.rich,D1),t}function D1(t){if(t){t.font=fr.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||S9[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||w9[r]?r:"top";var n=t.padding;n&&(t.padding=Mc(t.padding))}}function A1(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function P1(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 R1(t){var e=t.text;return e!=null&&(e+=""),e}function Kf(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var oe=ve(),L9=function(t,e,r,n){if(n){var i=oe(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=oe(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},N1=1,O1={},I1=ve(),Qf=ve(),Jf=0,Il=1,Bl=2,wr=["emphasis","blur","select"],Vl=["normal","emphasis","blur","select"],M9=10,C9=9,Di="highlight",zl="downplay",Fl="select",qf="unselect",Hl="toggleSelect",th="selectchanged";function Ta(t){return t!=null&&t!=="none"}function Gl(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function B1(t){Gl(t,"emphasis",Bl)}function V1(t){t.hoverState===Bl&&Gl(t,"normal",Jf)}function eh(t){Gl(t,"blur",Il)}function z1(t){t.hoverState===Il&&Gl(t,"normal",Jf)}function E9(t){t.selected=!0}function D9(t){t.selected=!1}function F1(t,e,r){e(t,r)}function gn(t,e,r){F1(t,e,r),t.isGroup&&t.traverse(function(n){F1(n,e,r)})}function H1(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 A9(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 P9(t,e,r,n){var i=r&&re(r,"select")>=0,a=!1;if(t instanceof jt){var o=I1(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??M9)}return n}function k9(t,e,r){if(r&&r.z2==null){r=ot({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??C9)}return r}function R9(t,e,r){var n=re(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:A9(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 P9(this,t,e,r);if(t==="blur")return R9(this,t,r);if(t==="select")return k9(this,t,r)}return r}function N9(t){t.stateProxy=rh;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=rh),r&&(r.stateProxy=rh)}function G1(t,e){!U1(t,e)&&!t.__highByOuter&&gn(t,B1)}function W1(t,e){!U1(t,e)&&!t.__highByOuter&&gn(t,V1)}function Wl(t,e){t.__highByOuter|=1<<(e||0),gn(t,B1)}function jl(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&gn(t,V1)}function O9(t){gn(t,eh)}function j1(t){gn(t,z1)}function $1(t){gn(t,E9)}function X1(t){gn(t,D9)}function U1(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Y1(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){z1(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 v=u.getItemGraphicEl(c[f]);v&&j1(v)}}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 v=f&&s?f===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!v||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 d=Ht(e),p=0;p<d.length;p++)a(u.getData(d[p]),e[d[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 I9(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(!i){process.env.NODE_ENV!=="production"&&Jt("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=oe(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])&&Jt("param should be highDownDispatcher"),oe(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function B9(t,e,r){process.env.NODE_ENV!=="production"&&!Ca(t)&&Jt("param should be highDownDispatcher");var n=oe(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 V9(t,e,r){process.env.NODE_ENV!=="production"&&!Ca(t)&&Jt("param should be highDownDispatcher"),Y1(r);var n=oe(t),i=ah(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?z(i,function(a){return W1(a,e)}):W1(t,e)}function z9(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 Z1(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)?$1(a):X1(a)})})}function F9(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){Q1(t,!0),gn(t,N9),G9(t,e,r)}function H9(t){Q1(t,!1)}function La(t,e,r,n){n?H9(t):oh(t,e,r)}function G9(t,e,r){var n=oe(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var K1=["emphasis","blur","select"],W9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ma(t,e,r,n){r=r||"itemStyle";for(var i=0;i<K1.length;i++){var a=K1[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=o[W9[r]]()}}function Q1(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 j9(t){var e=O1[t];return e==null&&N1<=32&&(e=O1[t]=N1++),e}function sh(t){var e=t.type;return e===Fl||e===qf||e===Hl}function J1(t){var e=t.type;return e===Di||e===zl}function $9(t){var e=I1(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,X9=[[],[],[]],q1=Math.sqrt,U9=Math.atan2;function Y9(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,l,u,c=Ea.M,f=Ea.C,v=Ea.L,h=Ea.R,d=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 v:a=1;break;case f:a=3;break;case p:a=2;break;case d:var g=e[4],m=e[5],y=q1(e[0]*e[0]+e[1]*e[1]),_=q1(e[2]*e[2]+e[3]*e[3]),x=U9(-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 b=X9[l];b[0]=r[o++],b[1]=r[o++],gr(b,b,e),r[s++]=b[0],r[s++]=b[1]}}t.increaseVersion()}}var lh=Math.sqrt,$l=Math.sin,Xl=Math.cos,No=Math.PI;function tg(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])/(tg(t)*tg(e))}function eg(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(uh(t,e))}function rg(t,e,r,n,i,a,o,s,l,u,c){var f=l*(No/180),v=Xl(f)*(t-r)/2+$l(f)*(e-n)/2,h=-1*$l(f)*(t-r)/2+Xl(f)*(e-n)/2,d=v*v/(o*o)+h*h/(s*s);d>1&&(o*=lh(d),s*=lh(d));var p=(i===a?-1:1)*lh((o*o*(s*s)-o*o*(h*h)-s*s*(v*v))/(o*o*(h*h)+s*s*(v*v)))||0,g=p*o*h/s,m=p*-s*v/o,y=(t+r)/2+Xl(f)*g-$l(f)*m,_=(e+n)/2+$l(f)*g+Xl(f)*m,x=eg([1,0],[(v-g)/o,(h-m)/s]),b=[(v-g)/o,(h-m)/s],S=[(-1*v-g)/o,(-1*h-m)/s],w=eg(b,S);if(uh(b,S)<=-1&&(w=No),uh(b,S)>=1&&(w=0),w<0){var T=Math.round(w/No*1e6)/1e6;w=No*2+T%2*No}c.addData(u,y,_,o,s,x,w,f,a)}var Z9=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,K9=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Q9(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(Z9);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),v=void 0,h=c.match(K9)||[],d=h.length,p=0;p<d;p++)h[p]=parseFloat(h[p]);for(var g=0;g<d;){var m=void 0,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=r,L=n,D=void 0,C=void 0;switch(f){case"l":r+=h[g++],n+=h[g++],v=s.L,e.addData(v,r,n);break;case"L":r=h[g++],n=h[g++],v=s.L,e.addData(v,r,n);break;case"m":r+=h[g++],n+=h[g++],v=s.M,e.addData(v,r,n),i=r,a=n,f="l";break;case"M":r=h[g++],n=h[g++],v=s.M,e.addData(v,r,n),i=r,a=n,f="L";break;case"h":r+=h[g++],v=s.L,e.addData(v,r,n);break;case"H":r=h[g++],v=s.L,e.addData(v,r,n);break;case"v":n+=h[g++],v=s.L,e.addData(v,r,n);break;case"V":n=h[g++],v=s.L,e.addData(v,r,n);break;case"C":v=s.C,e.addData(v,h[g++],h[g++],h[g++],h[g++],h[g++],h[g++]),r=h[g-2],n=h[g-1];break;case"c":v=s.C,e.addData(v,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,D=e.len(),C=e.data,o===s.C&&(m+=r-C[D-4],y+=n-C[D-3]),v=s.C,T=h[g++],L=h[g++],r=h[g++],n=h[g++],e.addData(v,m,y,T,L,r,n);break;case"s":m=r,y=n,D=e.len(),C=e.data,o===s.C&&(m+=r-C[D-4],y+=n-C[D-3]),v=s.C,T=r+h[g++],L=n+h[g++],r+=h[g++],n+=h[g++],e.addData(v,m,y,T,L,r,n);break;case"Q":T=h[g++],L=h[g++],r=h[g++],n=h[g++],v=s.Q,e.addData(v,T,L,r,n);break;case"q":T=h[g++]+r,L=h[g++]+n,r+=h[g++],n+=h[g++],v=s.Q,e.addData(v,T,L,r,n);break;case"T":m=r,y=n,D=e.len(),C=e.data,o===s.Q&&(m+=r-C[D-4],y+=n-C[D-3]),r=h[g++],n=h[g++],v=s.Q,e.addData(v,m,y,r,n);break;case"t":m=r,y=n,D=e.len(),C=e.data,o===s.Q&&(m+=r-C[D-4],y+=n-C[D-3]),r+=h[g++],n+=h[g++],v=s.Q,e.addData(v,m,y,r,n);break;case"A":_=h[g++],x=h[g++],b=h[g++],S=h[g++],w=h[g++],T=r,L=n,r=h[g++],n=h[g++],v=s.A,rg(T,L,r,n,S,w,_,x,b,v,e);break;case"a":_=h[g++],x=h[g++],b=h[g++],S=h[g++],w=h[g++],T=r,L=n,r+=h[g++],n+=h[g++],v=s.A,rg(T,L,r,n,S,w,_,x,b,v,e);break}}(f==="z"||f==="Z")&&(v=s.Z,e.addData(v),r=i,n=a),o=v}return e.toStatic(),e}var ng=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(jt);function ig(t){return t.setData!=null}function ag(t,e){var r=Q9(t),n=ot({},e);return n.buildPath=function(i){var a=ig(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 J9(t,e){return new ng(ag(t,e))}function q9(t,e){var r=ag(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}(ng);return n}function tx(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 jt(e);return o.createPathProxy(),o.buildPath=function(s){if(ig(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var ex=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),Oo=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new ex},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}(jt);Oo.prototype.type="circle";var rx=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 rx},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}(jt);ch.prototype.type="ellipse";var og=Math.PI,fh=og*2,Ai=Math.sin,Da=Math.cos,nx=Math.acos,ze=Math.atan2,sg=Math.abs,Io=Math.sqrt,Bo=Math.max,an=Math.min,Vr=1e-4;function ix(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,f=s-a,v=f*l-c*u;if(!(v*v<Vr))return v=(c*(e-a)-f*(t-i))/v,[t+v*l,e+v*u]}function Ul(t,e,r,n,i,a,o){var s=t-r,l=e-n,u=(o?a:-a)/Io(s*s+l*l),c=u*l,f=-u*s,v=t+c,h=e+f,d=r+c,p=n+f,g=(v+d)/2,m=(h+p)/2,y=d-v,_=p-h,x=y*y+_*_,b=i-a,S=v*p-d*h,w=(_<0?-1:1)*Io(Bo(0,b*b*x-S*S)),T=(S*_-y*w)/x,L=(-S*y-_*w)/x,D=(S*_+y*w)/x,C=(-S*y+_*w)/x,A=T-g,M=L-m,P=D-g,B=C-m;return A*A+M*M>P*P+B*B&&(T=D,L=C),{cx:T,cy:L,x0:-c,y0:-f,x1:T*(i/b-1),y1:L*(i/b-1)}}function ax(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 ox(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,v=!!e.clockwise,h=sg(u-l),d=h>fh&&h%fh;if(d>Vr&&(h=d),!(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,!v),i>Vr&&(t.moveTo(c+i*Da(u),f+i*Ai(u)),t.arc(c,f,i,u,l,v));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=void 0,L=void 0,D=void 0,C=void 0,A=void 0,M=void 0,P=void 0,B=n*Da(l),R=n*Ai(l),k=i*Da(u),H=i*Ai(u),I=h>Vr;if(I){var F=e.cornerRadius;F&&(r=ax(F),p=r[0],g=r[1],m=r[2],y=r[3]);var O=sg(n-i)/2;if(_=an(O,m),x=an(O,y),b=an(O,p),S=an(O,g),L=w=Bo(_,x),D=T=Bo(b,S),(w>Vr||T>Vr)&&(C=n*Da(u),A=n*Ai(u),M=i*Da(l),P=i*Ai(l),h<og)){var W=ix(B,R,M,P,C,A,k,H);if(W){var j=B-W[0],X=R-W[1],et=C-W[0],ft=A-W[1],gt=1/Ai(nx((j*et+X*ft)/(Io(j*j+X*X)*Io(et*et+ft*ft)))/2),Y=Io(W[0]*W[0]+W[1]*W[1]);L=an(w,(n-Y)/(gt+1)),D=an(T,(i-Y)/(gt-1))}}}if(!I)t.moveTo(c+B,f+R);else if(L>Vr){var U=an(m,L),q=an(y,L),tt=Ul(M,P,B,R,n,U,v),nt=Ul(C,A,k,H,n,q,v);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),!v):(U>0&&t.arc(c+tt.cx,f+tt.cy,U,ze(tt.y0,tt.x0),ze(tt.y1,tt.x1),!v),t.arc(c,f,n,ze(tt.cy+tt.y1,tt.cx+tt.x1),ze(nt.cy+nt.y1,nt.cx+nt.x1),!v),q>0&&t.arc(c+nt.cx,f+nt.cy,q,ze(nt.y1,nt.x1),ze(nt.y0,nt.x0),!v))}else t.moveTo(c+B,f+R),t.arc(c,f,n,l,u,!v);if(!(i>Vr)||!I)t.lineTo(c+k,f+H);else if(D>Vr){var U=an(p,D),q=an(g,D),tt=Ul(k,H,C,A,i,-q,v),nt=Ul(B,R,M,P,i,-U,v);t.lineTo(c+tt.cx+tt.x0,f+tt.cy+tt.y0),D<T&&U===q?t.arc(c+tt.cx,f+tt.cy,D,ze(tt.y0,tt.x0),ze(nt.y0,nt.x0),!v):(q>0&&t.arc(c+tt.cx,f+tt.cy,q,ze(tt.y0,tt.x0),ze(tt.y1,tt.x1),!v),t.arc(c,f,i,ze(tt.cy+tt.y1,tt.cx+tt.x1),ze(nt.cy+nt.y1,nt.cx+nt.x1),v),U>0&&t.arc(c+nt.cx,f+nt.cy,U,ze(nt.y1,nt.x1),ze(nt.y0,nt.x0),!v))}else t.lineTo(c+k,f+H),t.arc(c,f,i,u,l,v)}t.closePath()}}}var sx=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 sx},e.prototype.buildPath=function(r,n){ox(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(jt);Hn.prototype.type="sector";var lx=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Yl=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new lx},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}(jt);Yl.prototype.type="ring";function ux(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 v=0,h=t.length;v<h;v++)la(c,c,t[v]),ua(f,f,t[v]);la(c,c,n[0]),ua(f,f,n[1])}for(var v=0,h=t.length;v<h;v++){var d=t[v];if(r)l=t[v?v-1:h-1],u=t[(v+1)%h];else if(v===0||v===h-1){i.push(D7(t[v]));continue}else l=t[v-1],u=t[v+1];A7(a,u,l),Ec(a,a,e);var p=Dc(d,l),g=Dc(d,u),m=p+g;m!==0&&(p/=m,g/=m),Ec(o,a,-p),Ec(s,a,g);var y=Bd([],d,o),_=Bd([],d,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 lg(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=ux(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 cx=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),Vo=function(t){ht(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new cx},e.prototype.buildPath=function(r,n){lg(r,n,!0)},e}(jt);Vo.prototype.type="polygon";var fx=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 fx},e.prototype.buildPath=function(r,n){lg(r,n,!1)},e}(jt);Pi.prototype.type="polyline";var hx={},vx=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Gn=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 vx},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=b1(hx,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}(jt);Gn.prototype.type="line";var tr=[],dx=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 ug(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?op:ke)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?op:ke)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?lp:qe)(t.x1,t.cpx1,t.x2,e),(r?lp: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 dx},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,v=n.percent;v!==0&&(r.moveTo(i,a),c==null||f==null?(v<1&&(al(i,l,o,v,tr),l=tr[1],o=tr[2],al(a,u,s,v,tr),u=tr[1],s=tr[2]),r.quadraticCurveTo(l,u,o,s)):(v<1&&(il(i,l,c,o,v,tr),l=tr[1],c=tr[2],o=tr[3],il(a,u,f,s,v,tr),u=tr[1],f=tr[2],s=tr[3]),r.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(r){return ug(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=ug(this.shape,r,!0);return R7(n,n)},e}(jt);hh.prototype.type="bezier-curve";var px=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 px},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}(jt);Zl.prototype.type="arc";var gx=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),jt.prototype.getBoundingRect.call(this)},e}(jt);const cg=gx;var fg=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),hg=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}(fg),mx=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}(fg);const yx=mx;var vh=Math.min,_x=Math.max,Kl=Math.abs,ki=[0,0],Ri=[0,0],Ee=Ud(),Ql=Ee.minTv,Jl=Ee.maxTv,xx=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,ki),e._getProjMinMaxOnAxis(o,r._corners,Ri),Ee.negativeSize||ki[1]<Ri[0]||ki[0]>Ri[1]){if(a=!1,Ee.negativeSize||n)return a;var l=Kl(Ri[0]-ki[1]),u=Kl(ki[0]-Ri[1]);vh(l,u)>Jl.len()&&(l<u?Pt.scale(Jl,s,-l*i):Pt.scale(Jl,s,u*i))}else if(!n){var l=Kl(Ri[0]-ki[1]),u=Kl(ki[0]-Ri[1]);(Ee.useDir||vh(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=vh(c,s),l=_x(c,l)}n[0]=s+Ee.touchThreshold,n[1]=l-Ee.touchThreshold,Ee.negativeSize=n[1]<n[0]},t}();const vg=xx;var bx=[],Sx=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(bx)),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}(Ao);const Tx=Sx;var Lx=ve();function Mx(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 v={duration:u||0,delay:f,easing:c};return v}else return null}function dh(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=Mx(t,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var f=c.duration,v=c.delay,h=c.easing,d={duration:f,delay:v||0,easing:h,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,d):e.animateTo(r,d)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Fe(t,e,r,n,i,a){dh("update",t,e,r,n,i,a)}function er(t,e,r,n,i,a){dh("enter",t,e,r,n,i,a)}function zo(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){zo(t)||dh("leave",t,e,r,n,i,a)}function dg(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),ql(t,{style:{opacity:0}},e,r,n)}function Fo(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||dg(i,e,r,n)}):dg(t,e,r,n)}function Ho(t){Lx(t).oldStyle=t.style}var ph={},Wn=["x","y"],Aa=["width","height"];function Cx(t){return jt.extend(t)}var Ex=q9;function Dx(t,e){return Ex(t,e)}function zr(t,e){ph[t]=e}function Ax(t){if(ph.hasOwnProperty(t))return ph[t]}function gh(t,e,r,n){var i=J9(t,e);return r&&(n==="center"&&(r=gg(r,i.getBoundingRect())),mg(i,r)),i}function pg(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(gg(e,a))}}});return n}function gg(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=tx;function mg(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function Go(t,e){return b1(t,t,{lineWidth:e}),t}function Px(t,e){return S1(t,t,e),t}var kx=Ei;function Rx(t,e){for(var r=Bc([]);t&&t!==e;)uo(r,t.getLocalTransform(),r),t=t.parent;return r}function yg(t,e,r){return e&&!Je(e)&&(e=yf.getLocalTransform(e)),r&&(e=co([],e)),gr([],t,e)}function Nx(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=yg(a,e,r),Qr(a[0])>Qr(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function _g(t){return!t.isGroup}function Ox(t){return t.shape!=null}function xg(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){_g(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Ox(o)&&(s.shape=zt(o.shape)),s}var a=n(t);e.traverse(function(o){if(_g(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Fe(o,l,r,oe(o).dataIndex)}}})}function Ix(t,e){return yt(t,function(r){var n=r[0];n=ur(n,e.x),n=Lo(n,e.x+e.width);var i=r[1];return i=ur(i,e.y),i=Lo(i,e.y+e.height),[n,i]})}function Bx(t,e){var r=ur(t.x,e.x),n=Lo(t.x+t.width,e.x+e.width),i=ur(t.y,e.y),a=Lo(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 bg(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 Vx(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Sg(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Sg(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,f=s-a,v=yh(c,f,l,u);if(zx(v))return!1;var h=t-i,d=e-a,p=yh(h,d,l,u)/v;if(p<0||p>1)return!1;var g=yh(h,d,c,f)/v;return!(g<0||g>1)}function yh(t,e,r,n){return t*n-r*e}function zx(t){return t<=1e-6&&t>=-1e-6}function tu(t,e,r,n,i){return e==null||(ne(e)?se[0]=se[1]=se[2]=se[3]=e:(process.env.NODE_ENV!=="production"&&wt(e.length===4),se[0]=e[0],se[1]=e[1],se[2]=e[2],se[3]=e[3]),n&&(se[0]=ur(0,se[0]),se[1]=ur(0,se[1]),se[2]=ur(0,se[2]),se[3]=ur(0,se[3])),r&&(se[0]=-se[0],se[1]=-se[1],se[2]=-se[2],se[3]=-se[3]),wg(t,se,"x","width",3,1,i&&i[0]||0),wg(t,se,"y","height",0,2,i&&i[1]||0)),t}var se=[0,0,0,0];function wg(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=ur(0,Lo(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){Xr(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=oe(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 Wo(t,e){return t?It.copy(t,e):e.clone()}function bh(t,e){return e?Gd(t||Pn(),e):void 0}function Tg(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function Fx(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 Lg(t,e,r){Mg(t,e,r,-1/0)}function Mg(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(Mg(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",Oo),zr("ellipse",ch),zr("sector",Hn),zr("ring",Yl),zr("polygon",Vo),zr("polyline",Pi),zr("rect",_e),zr("line",Gn),zr("bezierCurve",hh),zr("arc",Zl);const Hx=Object.freeze(Object.defineProperty({__proto__:null,Arc:Zl,BezierCurve:hh,BoundingRect:It,Circle:Oo,CompoundPath:cg,Ellipse:ch,Group:ye,Image:Br,IncrementalDisplayable:Tx,Line:Gn,LinearGradient:hg,OrientedBoundingRect:vg,Path:jt,Point:Pt,Polygon:Vo,Polyline:Pi,RadialGradient:yx,Rect:_e,Ring:Yl,Sector:Hn,Text:fr,WH:Aa,XY:Wn,applyTransform:yg,calcZ2Range:Fx,clipPointsByRect:Ix,clipRectByRect:Bx,createIcon:bg,ensureCopyRect:Wo,ensureCopyTransform:bh,expandOrShrinkRect:tu,extendPath:Dx,extendShape:Cx,getShapeClass:Ax,getTransform:Rx,groupTransition:xg,initProps:er,isBoundingRectAxisAligned:xh,isElementRemoved:zo,lineLineIntersect:Sg,linePolygonIntersect:Vx,makeImage:pg,makePath:gh,mergePath:mh,registerShape:zr,removeElement:ql,removeElementWithFadeOut:Fo,resizePath:mg,retrieveZInfo:Tg,setTooltipConfig:eu,subPixelOptimize:kx,subPixelOptimizeLine:Go,subPixelOptimizeRect:Px,transformDirection:Nx,traverseElements:ru,traverseUpdateZ:Lg,updateProps:Fe},Symbol.toStringTag,{value:"Module"}));var iu={};function Gx(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 Cg(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=Cg(r,e),c=e.normal,f=!!c.getShallow("show"),v=jo(c,n&&n.normal,r,!1,!i);v.text=u.normal,i||t.setTextConfig(Eg(c,r,!1));for(var o=0;o<wr.length;o++){var h=wr[o],s=e[h];if(s){var d=l.ensureState(h),p=!!St(s.getShallow("show"),f);if(p!==f&&(d.ignore=!p),d.style=jo(s,n&&n[h],r,!0,!i),d.style.text=u[h],!i){var g=t.ensureState(h);g.textConfig=Eg(s,r,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(v.x=l.style.x),l.style.y!=null&&(v.y=l.style.y),l.ignore=!f,l.useStyle(v),l.dirty(),r.enableTextSetter&&(au(l).setLabelText=function(m){var y=Cg(r,e,m);Gx(l,y)})}else l&&(l.ignore=!0);t.dirty()}function ka(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 jo(t,e,r,n,i){var a={};return Wx(a,t,r,n,i),e&&ot(a,e),a}function Eg(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 Wx(t,e,r,n,i){r=r||iu;var a=e.ecModel,o=a&&a.option.textStyle,s=jx(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 v=e.getModel(["rich",f]);kg(l[f]={},v,o,e,c,r,n,i,!1,!0)}}l&&(t.rich=l);var h=e.get("overflow");h&&(t.overflow=h);var d=e.get("lineOverflow");d&&(t.lineOverflow=d);var p=t,g=e.get("minMargin");if(g!=null)g=ne(g)?g/2:0,p.margin=[g,g,g,g],p.__marginType=Ra.minMargin;else{var m=e.get("textMargin");m!=null&&(p.margin=Mc(m),p.__marginType=Ra.textMargin)}kg(t,e,o,null,null,r,n,i,!0,!1)}function jx(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 Dg=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ag=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Pg=["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"),v=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),(v==="inherit"||v==="auto")&&(process.env.NODE_ENV!=="production"&&v==="auto"&&we("color: 'auto'","color: 'inherit'"),c?v=c:v=null),s||(f=f||r.color,v=v||r.textBorderColor),f!=null&&(t.fill=f),v!=null&&(t.stroke=v);var d=St(e.getShallow("textBorderWidth"),r.textBorderWidth);d!=null&&(t.lineWidth=d);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<Dg.length;m++){var y=Dg[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<Ag.length;m++){var y=Ag[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<Pg.length;m++){var y=Pg[m],_=e.getShallow(y);_!=null&&(t[y]=_)}var b=e.getShallow("borderType");b!=null&&(t.borderDash=b),(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 $x(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=ve();function Xx(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 Ra={minMargin:1,textMargin:2},Ux=["textStyle","color"],Sh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],wh=new fr,Yx=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(Ux):null)},t.prototype.getFont=function(){return $x({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}(),Rg=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Zx=Do(Rg),Kx=function(){function t(){}return t.prototype.getLineStyle=function(e){return Zx(this,e)},t}(),Ng=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Qx=Do(Ng),Jx=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return Qx(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){ee(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(!Yt.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}();kf(Te),R8(Te),Rr(Te,Kx),Rr(Te,Jx),Rr(Te,V8),Rr(Te,Yx);var qx=Math.round(Math.random()*10);function ou(t){return[t||"",qx++].join("_")}function tb(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 eb(t,e){t.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),c=u.graph,f=u.noEntryList,v={};for(z(a,function(y){v[y]=!0});f.length;){var h=f.pop(),d=c[h],p=!!v[h];p&&(s.call(l,h,d.originalDeps.slice()),delete v[h]),z(d.successor,p?m:g)}z(v,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=Ef("Circular dependency may exists: ",v,a,o)),new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function m(y){v[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(v){re(u.predecessor,v)<0&&u.predecessor.push(v);var h=n(o,v);re(h.successor,v)<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){re(o,l)>=0&&s.push(l)}),s}}function Og(t,e){return ee(ee({},t,!0),e,!0)}const rb={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:". "}}}},nb={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={},Ig=Yt.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Na).toUpperCase();return t.indexOf(su)>-1?su:Na}():Na;function Bg(t,e){t=t.toUpperCase(),Lh[t]=new Te(e),lu[t]=e}function ib(t){if(Lt(t)){var e=lu[t.toUpperCase()]||{};return t===su||t===Th?zt(e):ee(zt(e),zt(lu[Na]),!1)}else return ee(zt(t),zt(lu[Na]),!1)}function ab(t){return Lh[t]}function ob(){return Lh[Na]}Bg(Th,rb),Bg(su,nb);var sb=null;function uu(){return sb}var Mh=1e3,Ch=Mh*60,$o=Ch*60,Tr=$o*24,Vg=Tr*365,lb={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}"},ub="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",fu="{yyyy}-{MM}-{dd}",zg={year:"{yyyy}",month:"{yyyy}-{MM}",day:fu,hour:fu+" "+cu.hour,minute:fu+" "+cu.minute,second:fu+" "+cu.second,millisecond:ub},Ni=["year","month","day","hour","minute","second","millisecond"],cb=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function fb(t){return!Lt(t)&&!Dt(t)?hb(t):t}function hb(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]:lb[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 Xo(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 vb(t){return t===Xo(t)}function db(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Fg(t,e,r,n){var i=Mo(t),a=i[Hg(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,v=i[kh(r)](),h=i[Rh(r)](),d=i[Nh(r)](),p=c>=12?"pm":"am",g=p.toUpperCase(),m=n instanceof Te?n:ab(n||Ig)||ob(),y=m.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=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,b[u]).replace(/{ee}/g,S[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(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,jn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,jn(d,3)).replace(/{S}/g,d+"")}function pb(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 Fg(new Date(t.value),a,i,n)}function hu(t,e){var r=Mo(t),n=r[Dh(e)]()+1,i=r[Ah(e)](),a=r[Ph(e)](),o=r[kh(e)](),s=r[Rh(e)](),l=r[Nh(e)](),u=l===0,c=u&&s===0,f=c&&o===0,v=f&&a===0,h=v&&i===1,d=h&&n===1;return d?"year":h?"month":v?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Eh(t,e,r){switch(e){case"year":t[Gg(r)](0);case"month":t[Wg(r)](1);case"day":t[jg(r)](0);case"hour":t[$g(r)](0);case"minute":t[Xg(r)](0);case"second":t[Ug(r)](0)}return t}function Hg(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 kh(t){return t?"getUTCMinutes":"getMinutes"}function Rh(t){return t?"getUTCSeconds":"getSeconds"}function Nh(t){return t?"getUTCMilliseconds":"getMilliseconds"}function gb(t){return t?"setUTCFullYear":"setFullYear"}function Gg(t){return t?"setUTCMonth":"setMonth"}function Wg(t){return t?"setUTCDate":"setDate"}function jg(t){return t?"setUTCHours":"setHours"}function $g(t){return t?"setUTCMinutes":"setMinutes"}function Xg(t){return t?"setUTCSeconds":"setSeconds"}function Ug(t){return t?"setUTCMilliseconds":"setMilliseconds"}function mb(t){if(!jp(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 Yg=Mc,Zg=["a","b","c","d","e","f","g"],Oh=function(t,e){return"{"+t+(e??"")+"}"};function yb(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=Zg[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(Zg[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 vu={},Bh={},Vh=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(vu,!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"){vu[e]=r;return}Bh[e]=r},t.get=function(e){return Bh[e]||vu[e]},t}();function _b(t){return!!vu[t]}var zh={coord:1,coord2:2};function xb(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 bb(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 Sb(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&&Jt('coordinateSystemUsage "data" is not supported in non-series components.'),a=mn.none)):n==="box"&&(a=mn.boxCoordSys,!o&&!_b(r)&&(process.env.NODE_ENV!=="production"&&i&&e&&Jt('coordinateSystem "'+r+'" cannot be used'+(' as coordinateSystemUsage "box" for "'+t.type+'" yet.')),a=mn.none))}return{coordSysType:r,kind:a}}function wb(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=Sb(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||Jt(r+" cannot be found for"+(" "+e.type+" (index: "+e.componentIndex+")."))),!1)}var du=z,Tb=["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),v=f&&f.getBoundingRect(),h,d;if(t==="horizontal"){var p=c.width+(v?-v.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+(v?-v.y+c.y:0);d=o+g,d>i||l.newline?(a+=s+r,o=0,d=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=d+r)})}var Uo=Hh;or(Hh,"vertical"),or(Hh,"horizontal");function Lb(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 Mb(t,e){var r=gu(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Yo.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:[ae(s[0],i.width)+i.x,ae(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function Cb(t,e){var r=Mb(t,e),n=r.viewRect,i=r.center,a=t.get("radius");bt(a)||(a=[0,a]);var o=ae(n.width,e.getWidth()),s=ae(n.height,e.getHeight()),l=Math.min(o,s),u=ae(a[0],l/2),c=ae(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function Oa(t,e,r){r=Yg(r||0);var n=e.width,i=e.height,a=ae(t.left,n),o=ae(t.top,i),s=ae(t.right,n),l=ae(t.bottom,i),u=ae(t.width,n),c=ae(t.height,i),f=r[2]+r[0],v=r[1]+r[3],h=t.aspect;switch(isNaN(u)&&(u=n-s-v-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-v),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-v;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-v-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var d=new It((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return d.margin=r,d}var Yo={rect:1,point:2};function gu(t,e,r){var n,i,a,o=t.boxCoordinateSystem,s;if(o){var l=bb(t),u=l.coord,c=l.from;if(o.dataToLayout){a=Yo.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint?(a=Yo.point,s=c,i=o.dataToPoint(u)):process.env.NODE_ENV!=="production"&&Jt(t.type+"["+t.componentIndex+"]"+(" layout based on "+o.type+" is not supported."))}return a==null&&(a=Yo.rect),a===Yo.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 Zo(t){var e=t.layoutMode||t.constructor.layoutMode;return Mt(e)?e:e?{type:e}:null}function $n(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={},v=0,h={},d=0,p=2;if(du(u,function(y){h[y]=t[y]}),du(u,function(y){Xr(e,y)&&(f[y]=h[y]=e[y]),s(f,y)&&v++,s(h,y)&&d++}),n[c])return s(e,u[1])?h[u[2]]=null:s(e,u[2])&&(h[u[1]]=null),h;if(d===p||!v)return h;if(v>=p)return f;for(var g=0;g<u.length;g++){var m=u[g];if(!Xr(f,m)&&Xr(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){du(u,function(v){c[v]=f[v]})}}function Ko(t){return Eb({},t)}function Eb(t,e){return e&&t&&du(Tb,function(r){Xr(e,r)&&(t[r]=e[r])}),t}var Db=ve(),qt=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=Zo(this),a=i?Ko(r):{},o=n.getTheme();ee(r,o.get(this.mainType)),ee(r,this.getDefaultOption()),i&&$n(r,a,i)},e.prototype.mergeOption=function(r,n){ee(this.option,r,!0);var i=Zo(this);i&&$n(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!A8(r))return r.defaultOption;var n=Db(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=ee(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 Lb(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);i1(qt,Te),El(qt),tb(qt),eb(qt,Ab);function Ab(t){var e=[];return z(qt.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=yt(e,function(r){return qr(r).main}),t!=="dataset"&&re(e,"dataset")<=0&&e.unshift("dataset"),e}var kt={color:{},darkColor:{},size:{}},fe=kt.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 Kg=fe[Oi];Oi==="theme"?kt.darkColor.theme=fe.theme.slice():Oi==="highlight"?kt.darkColor.highlight="rgba(255,231,130,0.4)":Oi.indexOf("accent")===0?kt.darkColor[Oi]=Qc(Kg,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):kt.darkColor[Oi]=Qc(Kg,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}kt.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Qg="";typeof navigator<"u"&&(Qg=navigator.platform||"");var Ia="rgba(0, 0, 0, 0.2)",Jg=kt.color.theme[0],Pb=Qc(Jg,null,null,.9);const kb={darkMode:"auto",colorBy:"series",color:kt.color.theme,gradientColor:[Pb,Jg],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:Qg.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 Gh=Ot(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),hr="original",He="arrayRows",Lr="objectRows",Fr="keyedColumns",yn="typedArray",qg="unknown",on="column",Ii="row",Ne={Must:1,Might:2,Not:3},t2=ve();function Rb(t){t2(t).datasetMap=Ot()}function Nb(t,e,r){var n={},i=Wh(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=t2(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=d(m)),n[m.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});z(t,function(p,g){var m=p.name,y=d(p);if(c==null){var _=v.valueWayDim;h(n[m],_,y),h(o,_,y),v.valueWayDim+=y}else if(c===g)h(n[m],0,y),h(a,0,y);else{var _=v.categoryWayDim;h(n[m],_,y),h(o,_,y),v.categoryWayDim+=y}});function h(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function d(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function Ob(t,e,r){var n={},i=Wh(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={},v=[],h=0,d=Math.min(5,r);h<d;h++){var p=r2(e.data,a,e.seriesLayoutBy,o,e.startIndex,h);v.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&&v[c.n]===Ne.Not)&&(c.n=h),m(c)&&v[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 Wh(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 Ib(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 e2(t,e){return r2(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function r2(t,e,r,n,i,a){var o,s=5;if($e(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 v=f[a],h=0;h<(v||[]).length&&h<s;h++)if((o=x(v[i+h]))!=null)return o}else for(var h=0;h<f.length&&h<s;h++){var d=f[i+h];if(d&&(o=x(d[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 v=m[l];if(!v||$e(v))return Ne.Not;for(var h=0;h<v.length&&h<s;h++)if((o=x(v[h]))!=null)return o}else if(e===hr)for(var y=t,h=0;h<y.length&&h<s;h++){var g=y[h],_=Co(g);if(!bt(_))return Ne.Not;if((o=x(_[a]))!=null)return o}function x(b){var S=Lt(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return S?Ne.Might:Ne.Not;if(S&&b!=="-")return Ne.Must}return Ne.Not}var Bb=Ot();function Vb(t,e,r){var n=Bb.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 n2=ve();ve();var jh=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=Xe(this.get("color",!0)),a=this.get("colorLayer",!0);return Fb(this,n2,i,a,e,r,n)},t.prototype.clearColorPalette=function(){Hb(this,n2)},t}();function zb(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 Fb(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:zb(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 Hb(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var mu,Qo,i2,$h="\0_ec_inner",a2=1,Gb={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"},Wb={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 jb(t){z(t,function(e,r){if(!qt.hasClass(r)){var n=Gb[r];n&&!yu[n]&&(Jt("Component "+r+` is used but not imported.
|
|
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=s1(r,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)l1(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;t.text=o.join(`
|
|
56
|
+
`),t.isTruncated=s}function s1(t,e,r,n){n=n||{};var i=ot({},n);r=St(r,"..."),i.maxIterations=St(n.maxIterations,2);var a=i.minChar=St(n.minChar,0),o=i.fontMeasureInfo=Zr(e),s=o.asciiCharWidth;i.placeholder=St(n.placeholder,"");for(var l=t=Math.max(0,t-1),u=0;u<a&&l>=s;u++)l-=s;var c=Kr(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 l1(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=Kr(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?X8(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=Kr(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function X8(t,e,r){for(var n=0,i=0,a=t.length;i<a&&n<e;i++)n+=Ip(r,t.charCodeAt(i));return i}function Y8(t,e,r,n){var i=Bf(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=To(u),d=St(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?c1(i,e.font,p,a==="breakAll",0).lines:[]:m=i?i.split(`
|
|
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 x=s1(p,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),S={},b=0;b<m.length;b++)l1(S,m[b],x),m[b]=S.textLine,v=v||S.isTruncated;for(var w=g,T=0,L=Zr(u),b=0;b<m.length;b++)T=Math.max(Kr(L,m[b]),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 U8=function(){function t(){}return t}(),u1=function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t}(),$8=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 Z8(t,e,r,n,i){var a=new $8,o=Bf(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=Of.lastIndex=0,p;(p=Of.exec(o))!=null;){var g=p.index;g>v&&If(a,o.substring(v,g),e,h),If(a,p[2],e,h,p[1]),v=Of.lastIndex}v<o.length&&If(a,o.substring(v,o.length),e,h);var m=[],y=0,_=0,x=d==="truncate",S=e.lineOverflow==="truncate",b={};function w(ft,gt,$){ft.width=gt,ft.lineHeight=$,y+=$,_=Math.max(_,gt)}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]||{},I=E.textPadding=P.padding,k=I?I[1]+I[3]:0,R=E.font=P.font||e.font;E.contentHeight=To(R);var H=St(P.height,E.contentHeight);if(E.innerHeight=H,I&&(H+=I[0]+I[2]),E.height=H,E.lineHeight=cn(P.lineHeight,e.lineHeight,H),E.align=P&&P.align||i,E.verticalAlign=P&&P.verticalAlign||"middle",S&&f!=null&&y+E.lineHeight>f){var B=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<B;break t}var F=P.width,O=F==null||F==="auto";if(typeof F=="string"&&F.charAt(F.length-1)==="%")E.percentWidth=F,m.push(E),E.contentWidth=Kr(Zr(R),E.text);else{if(O){var G=P.backgroundColor,j=G&&G.image;j&&(j=G8(j),Dl(j)&&(E.width=Math.max(E.width,j.width*H/j.height)))}var Y=x&&c!=null?c-M:null;Y!=null&&Y<E.width?!O||Y<k?(E.text="",E.width=E.contentWidth=0):(j8(b,E.text,Y-k,R,e.ellipsis,{minChar:e.truncateMinChar}),E.text=b.text,a.isTruncated=a.isTruncated||b.isTruncated,E.width=E.contentWidth=Kr(Zr(R),E.text)):E.contentWidth=Kr(Zr(R),E.text)}E.width+=k,M+=E.width,P&&(C=Math.max(C,E.lineHeight))}w(L,M,C)}a.outerWidth=a.width=St(c,_),a.outerHeight=a.height=St(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],et=E.percentWidth;E.width=parseInt(et,10)/100*a.width}return a}function If(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=In(o.width,n.width)+h;s.length>0&&v+n.accumWidth>n.width&&(c=e.split(`
|
|
58
|
+
`),u=!0),n.accumWidth=v}else{var p=c1(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+h,f=p.linesWidths,c=p.lines}}c||(c=e.split(`
|
|
59
|
+
`));for(var g=Zr(l),m=0;m<c.length;m++){var y=c[m],_=new U8;if(_.styleName=i,_.text=y,_.isLineHolder=!y&&!a,typeof o.width=="number"?_.width=o.width:_.width=f?f[m]:Kr(g,y),!m&&!u){var x=(s[s.length-1]||(s[0]=new u1)).tokens,S=x.length;S===1&&x[0].isLineHolder?x[0]=_:(y||!S||a)&&x.push(_)}else s.push(new u1([_]))}}function K8(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Q8=Dn(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function J8(t){return K8(t)?!!Q8[t]:!0}function c1(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=Zr(e),d=0;d<t.length;d++){var h=t.charAt(d);if(h===`
|
|
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.
|
|
61
61
|
import { `+n+` } from 'echarts/components';
|
|
62
|
-
echarts.use([`+n+"]);"),yu[n]=!0)}})}var
|
|
62
|
+
echarts.use([`+n+"]);"),yu[n]=!0)}})}var Yh=function(t){ht(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 Te(a),this._locale=new Te(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){process.env.NODE_ENV!=="production"&&(wt(r!=null,"option is null/undefined"),wt(r[Xh]!==o2,"please use chart.getOption()"));var a=u2(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,u2(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"&&$b(o),!this.option||r==="recreate"?a2(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&&z(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=Ot(),u=n&&n.replaceMergeMainTypeMap;Bb(this),z(r,function(f,d){f!=null&&(te.hasClass(d)?d&&(s.push(d),l.set(d,!0)):i[d]=i[d]==null?zt(f):re(i[d],f,!0))}),u&&u.each(function(f,d){te.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),te.topologicalTravel(s,te.getAllClassMainTypes(),c,this);function c(f){var d=Wb(this,f,Ye(r[f])),h=a.get(f),v=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=x8(h,d,v);C8(p,f,te),i[f]=null,a.set(f,null),o.set(f,0);var g=[],m=[],y=0,_,x;z(p,function(S,b){var w=S.existing,T=S.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var L=f==="series",C=te.getClass(f,S.keyInfo.subType,!L);if(!C){if(process.env.NODE_ENV!=="production"){var M=S.keyInfo.subType,A=Ub[M];yu[M]||(yu[M]=!0,qt(A?"Series "+M+` is used but not imported.
|
|
63
63
|
import { `+A+` } from 'echarts/charts';
|
|
64
|
-
echarts.use([`+A+"]);":"Unknown series "+C))}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===D)w.name=b.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var M=ot({componentIndex:S},b.keyInfo);w=new D(T,this,this,M),ot(w,M),b.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(qt.hasClass(i)){for(var a=Xe(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[$h],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(Xe(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=o2("id",a,s):o!=null?l=o2("name",o,s):l=Se(s,function(u){return!!u}),s2(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(s2(o,r));function s(u){var c=i+"Index",f=i+"Id",v=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[v]!=null)?{mainType:i,index:u[c],id:u[f],name:u[v]}: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,v){for(var h=0;f&&h<f.length;h++){var d=f[h];d&&s.call(o,v,d,d.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){Qo(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){Qo(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 Qo(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){Qo(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){qt.hasClass(o)&&i.push(o)}),qt.topologicalTravel(i,qt.getAllClassMainTypes(),function(a){z(n.get(a),function(o){o&&(a!=="series"||!$b(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)},Qo=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},i2=function(r,n){r.option={},r.option[$h]=a2,r._componentsMap=Ot({series:[]}),r._componentsCount=Ot();var i=n.aria;Mt(i)&&i.enabled==null&&(i.enabled=!0),Xb(n,r._theme.option),ee(n,kb,!1),r._mergeOption(n,null)}}(),e}(Te);function $b(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 Xb(t,e){var r=t.color&&!t.colorLayer;z(e,function(n,i){i==="colorLayer"&&r||i==="color"&&t.color||qt.hasClass(i)||(typeof n=="object"?t[i]=t[i]?ee(t[i],n,!1):zt(n):t[i]==null&&(t[i]=n))})}function o2(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 s2(t,e){return e.hasOwnProperty("subType")?Se(t,function(r){return r&&r.subType===e.subType}):t}function l2(t){var e=Ot();return t&&z(Xe(t.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&wt(qt.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),e.set(r,!0)}),{replaceMergeMainTypeMap:e}}Rr(Xh,jh);var Ub=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],u2=function(){function t(e){z(Ub,function(r){this[r]=ce(e[r],e)},this)}return t}(),Yb=/^(min|max)?(.+)$/,Zb=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(z(Xe(e.series),function(o){o&&o.data&&$e(o.data)&&Cc(o.data)}),z(Xe(e.dataset),function(o){o&&o.source&&$e(o.source)&&Cc(o.source)})),e=zt(e);var i=this._optionBackup,a=Kb(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++)Qb(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!qb(o,this._currentMediaIndices)&&(s=yt(o,function(c){return zt(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},t}();function Kb(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)&&Jt("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"&&Jt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),v(a),z(l,function(h){return v(h)}),z(n,function(h){return v(h.option)});function v(h){z(e,function(d){d(h,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function Qb(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return z(t,function(a,o){var s=o.match(Yb);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();Jb(n[u],a,l)||(i=!1)}}),i}function Jb(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function qb(t,e){return t.join(",")===e.join(",")}var Mr=z,Jo=Mt,c2=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Uh(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=c2.length;r<n;r++){var i=c2[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?ee(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?ee(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Ge(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"&&dn("'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"&&dn(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 qo(t){Ge(t,"itemStyle"),Ge(t,"lineStyle"),Ge(t,"areaStyle"),Ge(t,"label"),Ge(t,"labelLine"),Ge(t,"upperLabel"),Ge(t,"edgeLabel")}function de(t,e){var r=Jo(t)&&t[e],n=Jo(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&dn("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var i=0,a=Qp.length;i<a;i++){var o=Qp[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function Cr(t){t&&(qo(t),de(t,"label"),t.emphasis&&de(t.emphasis,"label"))}function tS(t){if(Jo(t)){Uh(t),qo(t),de(t,"label"),de(t,"upperLabel"),de(t,"edgeLabel"),t.emphasis&&(de(t.emphasis,"label"),de(t.emphasis,"upperLabel"),de(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&&!$e(a))for(var o=0;o<a.length;o++)Cr(a[o]);z(t.categories,function(u){qo(u)})}if(i&&!$e(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"?(de(t,"axisLabel"),de(t,"title"),de(t,"detail")):t.type==="treemap"?(Ge(t.breadcrumb,"itemStyle"),z(t.levels,function(u){qo(u)})):t.type==="tree"&&qo(t.leaves)}}function _n(t){return bt(t)?t:t?[t]:[]}function f2(t){return(bt(t)?t[0]:t)||{}}function eS(t,e){Mr(_n(t.series),function(n){Jo(n)&&tS(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&&(de(i,"axisLabel"),de(i.axisPointer,"label"))})}),Mr(_n(t.parallel),function(n){var i=n&&n.parallelAxisDefault;de(i,"axisLabel"),de(i&&i.axisPointer,"label")}),Mr(_n(t.calendar),function(n){Ge(n,"itemStyle"),de(n,"dayLabel"),de(n,"monthLabel"),de(n,"yearLabel")}),Mr(_n(t.radar),function(n){de(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&dn("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"&&dn("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){Jo(n)&&(Cr(n),Mr(_n(n.regions),function(i){Cr(i)}))}),Mr(_n(t.timeline),function(n){Cr(n),Ge(n,"label"),Ge(n,"itemStyle"),Ge(n,"controlStyle",!0);var i=n.data;bt(i)&&z(i,function(a){Mt(a)&&(Ge(a,"label"),Ge(a,"itemStyle"))})}),Mr(_n(t.toolbox),function(n){Ge(n,"iconStyle"),Mr(n.feature,function(i){Ge(i,"iconStyle")})}),de(f2(t.axisPointer),"label"),de(f2(t.tooltip).axisPointer,"label")}function rS(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 nS(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 h2(t){t&&z(iS,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var iS=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],aS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Yh=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ts(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<Yh.length;r++){var n=Yh[r][1],i=Yh[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 d2(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,process.env.NODE_ENV!=="production"&&we("downplay","blur","sunburst"))}function oS(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 p2(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&p2(t[r].children,e)}function g2(t,e){eS(t,e),t.series=Xe(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&&!$e(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=rS(r,"pointer.color");o!=null&&nS(r,"itemStyle.color",o)}else if(n==="bar"){ts(r),ts(r.backgroundStyle),ts(r.emphasis);var i=r.data;if(i&&!$e(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(ts(i[a]),ts(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"))),d2(r),p2(r.data,d2)}else n==="graph"||n==="sankey"?oS(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"&&dn("`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)),h2(r)}}),t.dataRange&&(t.visualMap=t.dataRange),z(aS,function(r){var n=t[r];n&&(bt(n)||(n=[n]),z(n,function(i){h2(i)}))})}function sS(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)}),lS(r)}})}function lS(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 v=o.get(e.stackedDimension,f);if(isNaN(v))return i;var h,d;s?d=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||(d=m.data.rawIndexOf(m.stackedByDimension,h)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&v>=0&&y>0||l==="samesign"&&v<=0&&y<0){v=s8(v,y),p=y;break}}}return n[0]=v,n[1]=p,n})})}var _u=function(){function t(e){this.data=e.data||(e.sourceFormat===Fr?{}:[]),this.sourceFormat=e.sourceFormat||qg,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&&e2(this,n)===Ne.Must&&(i.type="ordinal")}}return t}();function Zh(t){return t instanceof _u}function Kh(t,e,r){r=r||y2(t);var n=e.seriesLayoutBy,i=cS(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 m2(t){return new _u({data:t,sourceFormat:$e(t)?yn:hr})}function uS(t){return new _u({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:zt(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function y2(t){var e=qg;if($e(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)||$e(i)){e=He;break}else if(Mt(i)){e=Lr;break}}}}else if(Mt(t)){for(var a in t)if(Xr(t,a)&&Je(t[a])){e=Fr;break}}return e}function cS(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:_2(i),startIndex:o,dimensionsDetectedCount:a};if(e===He){var s=t;n==="auto"||n==null?x2(function(u){u!=null&&u!=="-"&&(Lt(u)?o==null&&(o=1):o=0)},r,s,10):o=ne(n)?n:n?1:0,!i&&o===1&&(i=[],x2(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=fS(t));else if(e===Fr)i||(i=[],z(t,function(u,c){i.push(c)}));else if(e===hr){var l=Co(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:_2(i),dimensionsDetectedCount:a}}function fS(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Ht(r)}function _2(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 x2(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 b2(t){var e=t.sourceFormat;return e===Lr||e===Fr}var Bi,Vi,zi,Fi,S2,w2,T2=function(){function t(e,r){var n=Zh(e)?e:m2(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=hS[bu(a,o)];s&&s(i,n.dimensionsDefine)}w2(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;w2=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,v=l.dimensionsDefine,h=S2[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 d=M2(u,c);o.getItem=ce(d,null,s,f,v);var p=E2(u,c);o.count=ce(p,null,s,f,v)}};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,v=0;v<f;v++){for(var h=u[v],d=h[0]==null?1/0:h[0],p=h[1]==null?-1/0:h[1],g=s-o,m=l[v],y=0;y<g;y++){var _=c[y*f+v];m[o+y]=_,_<d&&(d=_),_>p&&(p=_)}h[0]=d,h[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};S2=(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($e(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)||Jt("series.data or dataset.source must be an array.")},hS=(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&&Jt("dimension name must not be null/undefined.")}},Bi[hr]=xu,Bi),L2=function(t,e,r,n){return t[n]},vS=(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]=L2,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]=L2,Vi);function M2(t,e){var r=vS[bu(t,e)];return process.env.NODE_ENV!=="production"&&wt(r,'Do not support get item on "'+t+'", "'+e+'".'),r}var C2=function(t,e,r){return t.length},dS=(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]=C2,zi[Fr]=function(t,e,r){var n=r[0].name,i=n!=null?t[n]:null;return i?i.length:0},zi[hr]=C2,zi);function E2(t,e){var r=dS[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]},pS=(Fi={},Fi[He]=Qh,Fi[Lr]=function(t,e,r){return t[r]},Fi[Fr]=Qh,Fi[hr]=function(t,e,r){var n=Co(t);return n instanceof Array?n[e]:n},Fi[yn]=Qh,Fi);function D2(t){var e=pS[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 D2(a)(n,o,s)}else{var l=n;return a===hr&&(l=Co(n)),l}}}}var gS=/\{@(.+?)\}/g,mS=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,v=f==="series",h=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?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=yb(a,l);return c.replace(gS,function(f,v){var h=v.length,d=v;d.charAt(0)==="["&&d.charAt(h-1)==="]"&&(d=+d.slice(1,h-1),process.env.NODE_ENV!=="production"&&isNaN(d)&&Jt("Invalide label formatter: @"+v+", only support @[0], @[1], @[2], ..."));var p=Ba(s,e,d);if(o&&bt(o.interpolatedValue)){var g=s.getDimensionIndex(d);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 es(t){return new yS(t)}var yS=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 v=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,d=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!n&&(f||h<d)){var p=this._progress;if(bt(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],h,d,l,u);else this._doProgress(p,h,d,l,u)}this._dueIndex=d;var m=this._settedOutputEnd!=null?this._settedOutputEnd:d;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){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),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}(),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 Su(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!ne(t)&&t!=null&&t!=="-"&&(t=+Mo(t)),t==null||t===""?NaN:Number(t))}Ot({number:function(t){return parseFloat(t)},time:function(t){return+Mo(t)},trim:function(t){return Lt(t)?An(t):t}});var _S=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 xS(t,e){var r=new _S,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 _="";Xr(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=M2(i,on);e.__isBuiltIn&&(r.getRawDataItem=function(p){return f(n,a,s,p)},r.getRawData=ce(bS,null,t)),r.cloneRawData=ce(SS,null,t);var v=E2(i,on);r.count=ce(v,null,n,a,s);var h=D2(i);r.retrieveValue=function(p,g){var m=f(n,a,s,p);return d(m,g)};var d=r.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return h(p,g,m.name)}};return r.getDimensionInfo=ce(wS,null,s,l),r.cloneAllDimensionInfo=ce(TS,null,s),r}function bS(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 SS(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 wS(t,e,r){if(r!=null){if(ne(r)||!isNaN(r)&&!Xr(e,r))return t[r];if(Xr(e,r))return e[r]}}function TS(t){return zt(t)}var P2=Ot();function LS(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,P2.set(e,t)}function MS(t,e,r){var n=Xe(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=CS(l,e,r,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function CS(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=P2.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 xS(c,o)}),l=Xe(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(`
|
|
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(`
|
|
65
65
|
`)}).join(`
|
|
66
|
-
`);Yp(u)}return yt(l,function(c,f){var v="";Mt(c)||(process.env.NODE_ENV!=="production"&&(v="A transform should not return some empty results."),cr(v)),c.data||(process.env.NODE_ENV!=="production"&&(v="Transform result data should be not be null or undefined"),cr(v));var h=y2(c.data);Jh(h)||(process.env.NODE_ENV!=="production"&&(v="Transform result data should be array rows or object rows."),cr(v));var d,p=e[0];if(p&&f===0&&!c.dimensions){var g=p.startIndex;g&&(c.data=p.data.slice(0,g).concat(c.data)),d={seriesLayoutBy:on,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:on,sourceHeader:0,dimensions:c.dimensions};return Kh(c.data,d,null)})}function Jh(t){return t===He||t===Lr}var wu="undefined",ES=typeof Uint32Array===wu?Array:Uint32Array,DS=typeof Uint16Array===wu?Array:Uint16Array,k2=typeof Int32Array===wu?Array:Int32Array,R2=typeof Float64Array===wu?Array:Float64Array,N2={float:R2,int:k2,ordinal:Array,number:Array,time:R2},qh;function Va(t){return t>65535?ES:DS}function za(){return[1/0,-1/0]}function AS(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function O2(t,e,r,n,i){var a=N2[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=b2(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 N2[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];O2(n,u,c.type,l,!0)}for(var f=[],v=s;v<l;v++)for(var h=v-s,d=0;d<a;d++){var c=i[d],p=qh.arrayRows.call(this,e[h]||f,c.property,h,d);n[d][v]=p;var g=o[d];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()),O2(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,l);else for(var v=[],h=e;h<r;h++){v=i.getItem(h,v);for(var d=0;d<s;d++){var p=a[d],g=this._dimValueGetter(v,u[d],h,d);p[h]=g;var m=l[d];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,v=0;v<i;v++){var h=void 0,d=n.getRawIndex(v);if(l===0)h=r(v);else if(l===1){var p=f[c][d];h=r(p,v)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][d];s[g]=v,h=r.apply(null,s)}h&&(o[u++]=d)}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],v=e[c][1],h=r._chunks,d=!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<=v||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],x=e[i[1]][0],b=e[i[1]][1],m=0;m<n;m++){var y=g[m],S=_[m];(y>=f&&y<=v||isNaN(y))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var m=0;m<o;m++){var w=r.getRawIndex(m),y=h[i[0]][w];(y>=f&&y<=v||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 D=i[L],y=h[D][w];(y<e[D][0]||y>e[D][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 v=e.getRawIndex(f),h=0;h<o;h++)l[h]=i[r[h]][v];l[o]=f;var d=n&&n.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var c=0;c<d.length;c++){var p=r[c],g=d[c],m=u[p],y=i[p];y&&(y[v]=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,v,h=new(Va(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var x=this.getRawIndex(_),b=a[x];isNaN(b)||(y+=b)}y/=g-p;var S=d,w=Math.min(d+l,o),T=d-1,L=a[u];c=-1,v=S;for(var D=-1,C=0,_=S;_<w;_++){var x=this.getRawIndex(_),b=a[x];if(isNaN(b)){C++,D<0&&(D=x);continue}f=Math.abs((T-m)*(b-L)-(T-_)*(y-L)),f>c&&(c=f,v=x)}C>0&&C<w-S&&(h[s++]=Math.min(D,v),v=Math.max(D,v)),h[s++]=v,u=v}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,v=o[this.getRawIndex(f)],h=c,d=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<v&&(v=y,f=c+g),y>d&&(d=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(),v=new(Va(this._rawCount))(Math.ceil(c/l)),h=0,d=0;d<c;d+=l){l>c-d&&(l=c-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(d+i(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),v[h++]=y}return a._count=h,a._indices=v,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]?AS(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}(),PS=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(rs(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=$e(s)?yn:hr,a=[];var f=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},h=St(f.seriesLayoutBy,v.seriesLayoutBy)||null,d=St(f.sourceHeader,v.sourceHeader),p=St(f.dimensions,v.dimensions),g=h!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;i=g?[Kh(s,{seriesLayoutBy:h,sourceHeader:d,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"),I2(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),I2(f)),s.push(c),l.push(u._getVersionSign())}),n?o=MS(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[uS(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(rs(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];rs(this._sourceHost)&&l?s=l._innerGetDataStore(e,r,n):(s=new t0,s.initData(new T2(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(rs(e)){var r=Wh(e);return r?[r.getSourceManager()]:[]}else return yt(Ib(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(rs(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 rs(t){return t.mainType==="series"}function I2(t){throw new Error(t)}function ns(t,e){return e.type=t,e}function B2(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ih(n)}function kS(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=B2(e,r),c,f,v,h;if(o>1||l&&!o){var d=RS(s,e,r,a,u);c=d.inlineValues,f=d.inlineValueTypes,v=d.blocks,h=d.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 ns("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[ns("nameValue",{markerType:"item",markerColor:u,name:_,noName:!An(_),value:c,valueType:f,dataIndex:r})].concat(v||[])})}function RS(t,e,r,n,i){var a=e.getData(),o=Dn(t,function(f,v,h){var d=a.getDimensionInfo(h);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?z(n,function(f){c(Ba(a,r,f),f)}):z(t,c);function c(f,v){var h=a.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(ns("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 Xn=ve();function Tu(t,e){return t.getName(e)||t.getId(e)}var NS="__universalTransitionEnabled",vr=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=es({count:IS,reset:BS}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Xn(this).sourceManager=new PS(this);a.prepareSource();var o=this.getInitialData(r,i);z2(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&wt(o,"getInitialData returned invalid data."),Xn(this).dataBeforeProcessed=o,V2(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Zo(this),a=i?Ko(r):{},o=this.subType;qt.hasClass(o)&&(o+="Series"),ee(r,n.getTheme().get(this.subType)),ee(r,this.getDefaultOption()),Df(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&$n(r,a,i)},e.prototype.mergeOption=function(r,n){r=ee(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Zo(this);i&&$n(this.option,r,i);var a=Xn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);z2(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Xn(this).dataBeforeProcessed=o,V2(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!$e(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 Xn(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)}Xn(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ot(r)},e.prototype.getSourceManager=function(){return Xn(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Xn(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,v=-1,h=0;return o.each(n,function(d,p){var g=l.dataToCoord(d),m=u-g,y=Math.abs(m);y<=a&&((y<f||y===f&&m>=0&&v<0)&&(f=y,v=m,h=0),m===v&&(c[h++]=p))}),c.length=h,c},e.prototype.formatTooltip=function(r,n,i){return kS({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Yt.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[NS])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],v=Tu(r,f);u[v]=!0,this._selectedDataIndicesMap[v]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],v=Tu(r,h);o.selectedMap=(i={},i[v]=!0,i),this._selectedDataIndicesMap=(a={},a[v]=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 qt.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}(qt);Rr(vr,mS),Rr(vr,jh),i1(vr,qt);function V2(t){var e=t.name;Af(t)||(t.name=OS(t)||e)}function OS(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 IS(t){return t.model.getRawData().count()}function BS(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),VS}function VS(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function z2(t,e){z(E7(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,or(zS,e))})}function zS(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}();kf(xn),El(xn);function r0(){var t=ve();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 F2=ve(),FS=r0(),rr=function(){function t(){this.group=new ye,this.uid=ou("viewChart"),this.renderTask=es({plan:HS,reset:GS}),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"&&Jt("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"&&Jt("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){F2(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function H2(t,e,r){t&&Ca(t)&&(e==="emphasis"?Wl:jl)(t,r)}function G2(t,e,r){var n=ba(t,e),i=e&&e.highlightKey!=null?j9(e.highlightKey):null;n!=null?z(Xe(n),function(a){H2(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){H2(a,r,i)})}kf(rr,["dispose"]),El(rr);function HS(t){return FS(t.model)}function GS(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&F2(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),WS[l]}var WS={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 W2(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 v=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];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 v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(h){c=h},v}var j2=ve(),$2={itemStyle:Do(Ng,!0),lineStyle:Do(Rg,!0)},jS={lineStyle:"stroke",itemStyle:"fill"};function X2(t,e){var r=t.visualStyleMapper||$2[e];return r||(console.warn("Unknown style type '"+e+"'."),$2.itemStyle)}function U2(t,e){var r=t.visualDrawType||jS[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var $S={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=X2(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=U2(t,n),u=o[l],c=Dt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var v=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=v,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Dt(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||Dt(o.stroke)?v:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var p=t.getDataParams(d),g=ot({},o);g[l]=c(p),h.setItemVisual(d,"style",g)}}}},is=new Te,XS={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=X2(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){is.option=l[n];var u=i(is),c=o.ensureUniqueItemVisual(s,"style");ot(c,u),is.option.decal&&(o.setItemVisual(s,"decal",is.option.decal),is.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},US={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)),j2(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=j2(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=U2(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 v=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",d=n.count();v[l]=r.getColorFromPalette(h,o,d)}})}})}},Lu=Math.PI;function YS(t,e){e=e||{},Ft(e,{text:"loading",textColor:kt.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:kt.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 Y2=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,v=c.overallTask;if(v){var h,d=v.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),h=!0)}),h&&v.dirty(),o.updatePayload(v,n);var p=o.getPerformArgs(v,i.block);d.each(function(g){g.perform(p)}),v.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 v=f.uid,h=s.set(v,o&&o.get(v)||es({plan:qS,reset:tw,count:rw}));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||es({reset:ZS});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,v=!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,d):c?c(n,i).each(d):(f=!1,z(n.getSeries(),d));function d(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(v=!0,es({reset:KS,onDirty:JS})));m.context={model:p,overallProgress:f},m.agent=o,m.__block=f,a._pipe(p,m)}v&&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:nw(e)}),e.uid=ou("stageHandler"),r&&(e.visualType=r),e},t}();function ZS(t){t.overallReset(t.ecModel,t.api,t.payload)}function KS(t){return t.overallProgress&&QS}function QS(){this.agent.dirty(),this.getDownstream().dirty()}function JS(){this.agent&&this.agent.dirty()}function qS(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function tw(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Xe(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?yt(e,function(r,n){return Z2(n)}):ew}var ew=Z2(0);function Z2(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 rw(t){return t.data.count()}function nw(t){Mu=null;try{t(as,K2)}catch{}return Mu}var as={},K2={},Mu;Q2(as,Xh),Q2(K2,u2),as.eachSeriesByType=as.eachRawSeriesByType=function(t){Mu=t},as.eachComponent=function(t){t.mainType==="series"&&t.subType&&(Mu=t.subType)};function Q2(t,e){for(var r in e.prototype)t[r]=sr}var dt=kt.darkColor,iw=dt.background,os=function(){return{axisLine:{lineStyle:{color:dt.axisLine}},splitLine:{lineStyle:{color:dt.axisSplitLine}},splitArea:{areaStyle:{color:[dt.backgroundTint,dt.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:dt.axisMinorSplitLine}},axisLabel:{color:dt.axisLabel},axisName:{}}},J2={label:{color:dt.secondary},itemStyle:{borderColor:dt.borderTint},dividerLineStyle:{color:dt.border}},q2={darkMode:!0,color:dt.theme,backgroundColor:iw,axisPointer:{lineStyle:{color:dt.border},crossStyle:{color:dt.borderShade},label:{color:dt.tertiary}},legend:{textStyle:{color:dt.secondary},pageTextStyle:{color:dt.tertiary}},textStyle:{color:dt.secondary},title:{textStyle:{color:dt.primary},subtextStyle:{color:dt.quaternary}},toolbox:{iconStyle:{borderColor:dt.accent50}},tooltip:{backgroundColor:dt.neutral20,defaultBorderColor:dt.border,textStyle:{color:dt.tertiary}},dataZoom:{borderColor:dt.accent10,textStyle:{color:dt.tertiary},brushStyle:{color:dt.backgroundTint},handleStyle:{color:dt.neutral00,borderColor:dt.accent20},moveHandleStyle:{color:dt.accent40},emphasis:{handleStyle:{borderColor:dt.accent50}},dataBackground:{lineStyle:{color:dt.accent30},areaStyle:{color:dt.accent20}},selectedDataBackground:{lineStyle:{color:dt.accent50},areaStyle:{color:dt.accent30}}},visualMap:{textStyle:{color:dt.secondary},handleStyle:{borderColor:dt.neutral30}},timeline:{lineStyle:{color:dt.accent10},label:{color:dt.tertiary},controlStyle:{color:dt.accent30,borderColor:dt.accent30}},calendar:{itemStyle:{color:dt.neutral00,borderColor:dt.neutral20},dayLabel:{color:dt.tertiary},monthLabel:{color:dt.secondary},yearLabel:{color:dt.secondary}},matrix:{x:J2,y:J2,backgroundColor:{borderColor:dt.axisLine},body:{itemStyle:{borderColor:dt.borderTint}}},timeAxis:os(),logAxis:os(),valueAxis:os(),categoryAxis:os(),line:{symbol:"circle"},graph:{color:dt.theme},gauge:{title:{color:dt.secondary},axisLine:{lineStyle:{color:[[1,dt.neutral05]]}},axisLabel:{color:dt.axisLabel},detail:{color:dt.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:dt.background}},radar:function(){var t=os();return t.axisName={color:dt.axisLabel},t.axisLine.lineStyle.color=dt.neutral20,t}(),treemap:{breadcrumb:{itemStyle:{color:dt.neutral20,textStyle:{color:dt.secondary}},emphasis:{itemStyle:{color:dt.neutral30}}}},sunburst:{itemStyle:{borderColor:dt.background}},map:{itemStyle:{borderColor:dt.border,areaColor:dt.neutral10},label:{color:dt.tertiary},emphasis:{label:{color:dt.primary},itemStyle:{areaColor:dt.highlight}},select:{label:{color:dt.primary},itemStyle:{areaColor:dt.highlight}}},geo:{itemStyle:{borderColor:dt.border,areaColor:dt.neutral10},emphasis:{label:{color:dt.primary},itemStyle:{areaColor:dt.highlight}},select:{label:{color:dt.primary},itemStyle:{color:dt.highlight}}}};q2.categoryAxis.splitLine.show=!1;var aw=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 v=o[f],h=u.lastIndexOf(v);if(h>0&&h===u.length-v.length){var d=u.slice(0,h);d!=="data"&&(r.mainType=d,r[v.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,v,h,d){return f[h]==null||v[d||h]===f[h]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),n0=["symbol","symbolSize","symbolRotate","symbolOffset"],tm=n0.concat(["symbolKeepAspect"]),ow={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,v){for(var h=t.getRawValue(v),d=t.getDataParams(v),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(v,g,i[g](h,d))}}return{dataEach:a?c:null}}},sw={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<tm.length;s++){var l=tm[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function lw(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 uw(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 cw(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"&&dn("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(),v=ba(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:bt(v)?f.getName(v[0]):f.getName(v),selected:Lt(l)?l:ot({},l)})}}))}function fw(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 hw=Math.round(Math.random()*9),vw=typeof Object.defineProperty=="function",dw=function(){function t(){this._id="__ec_inner_"+hw++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return vw?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}(),pw=jt.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()}}),gw=jt.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()}}),mw=jt.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),v=Math.cos(u),h=o*.6,d=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+v*h,r,n-d,r,n),t.bezierCurveTo(r,n-d,r-c+f*h,l+s+v*h,r-c,l+s),t.closePath()}}),yw=jt.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()}}),_w={line:Gn,rect:_e,roundRect:_e,square:_e,circle:Oo,diamond:gw,pin:mw,arrow:yw,triangle:pw},xw={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(_w,function(t,e){i0[e]=new t});var bw=jt.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]),xw[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function Sw(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||kt.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=pg(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 bw({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=Sw,a&&l.setColor(a),l}function em(t){return bt(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function rm(t,e){if(t!=null)return bt(t)||(t=[t,t]),[ae(t[0],e[0])||0,ae(St(t[1],t[0]),e[1])||0]}function Hi(t){return isFinite(t)}function ww(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 Tw(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 nm(t,e,r){for(var n=e.type==="radial"?Tw(t,e,r):ww(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Lw(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 im(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 Mw(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:ne(t)?[t]:bt(t)?t:null}function a0(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Mw(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 Cw=new zn(!0);function Du(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function am(t){return typeof t=="string"&&t!=="none"}function Au(t){var e=t.fill;return e!=null&&e!=="none"}function om(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 sm(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 lm(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 Ew(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||Cw,f=e.__dirty;if(!n){var v=r.fill,h=r.stroke,d=o&&!!v.colorStops,p=a&&!!h.colorStops,g=o&&!!v.image,m=a&&!!h.image,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0;(d||p)&&(S=e.getBoundingRect()),d&&(y=f?nm(t,v,S):e.__canvasFillGradient,e.__canvasFillGradient=y),p&&(_=f?nm(t,h,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(x=f||!e.__canvasFillPattern?lm(t,v,e):e.__canvasFillPattern,e.__canvasFillPattern=x),m&&(b=f||!e.__canvasStrokePattern?lm(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?t.fillStyle=y:g&&(x?t.fillStyle=x:o=!1),p?t.strokeStyle=_:m&&(b?t.strokeStyle=b: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 D=!0;(u||f&ha)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(t,l?s:1),T&&(t.setLineDash(T),t.lineDashOffset=L),n||(r.strokeFirst?(a&&sm(t,r),o&&om(t,r)):(o&&om(t,r),a&&sm(t,r))),T&&t.setLineDash([])}function Dw(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,v=s-c;t.drawImage(n,u,c,f,v,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function Aw(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 um=["shadowBlur","shadowOffsetX","shadowOffsetY"],cm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fm(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<um.length;s++){var l=um[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 hm(t,e,r,n,i){var a=ss(e,i.inHover),o=n?null:r&&ss(r,i.inHover)||{};if(a===o)return!1;var s=fm(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(nr(t,i),s=!0),am(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(nr(t,i),s=!0),am(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<cm.length;c++){var f=cm[c],v=f[0];(n||a[v]!==o[v])&&(s||(nr(t,i),s=!0),t[v]=a[v]||f[1])}return s}function Pw(t,e,r,n,i){return fm(t,ss(e,i.inHover),r&&ss(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 kw(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 Rw(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 dm=1,pm=2,gm=3,mm=4;function Nw(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 ss(t,e){return e&&t.__hoverStyle||t.style}function Ow(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||Lw(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(),kw(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 jt&&e.autoBatch&&Nw(e.style);s||Rw(i,u.transform)?(nr(t,r),vm(t,e)):c||nr(t,r);var f=ss(e,r.inHover);e instanceof jt?(r.lastDrawType!==dm&&(l=!0,r.lastDrawType=dm),hm(t,e,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&t.beginPath(),Ew(t,e,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):e instanceof Ro?(r.lastDrawType!==gm&&(l=!0,r.lastDrawType=gm),hm(t,e,u,l,r),Aw(t,e,f)):e instanceof Br?(r.lastDrawType!==pm&&(l=!0,r.lastDrawType=pm),Pw(t,e,u,l,r),Dw(t,e,f)):e.getTemporalDisplayables&&(r.lastDrawType!==mm&&(l=!0,r.lastDrawType=mm),Iw(t,e,r)),c&&n&&nr(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function Iw(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 dw,ym=new da(100),_m=["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,v=0;v<_m.length;++v){var h=o[_m[v]];if(h!=null&&!bt(h)&&!Lt(h)&&!ne(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var d;if(f){d=c.join(",")+(i?"-svg":"");var p=ym.get(d);p&&(i?u.svgElement=p:u.image=p)}var g=bm(o.dashArrayX),m=Bw(o.dashArrayY),y=xm(o.symbol),_=Vw(g),x=Sm(m),b=!i&&En.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=L(),T;b&&(b.width=w.width*r,b.height=w.height*r,T=b.getContext("2d")),D(),f&&ym.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=w.width,u.svgHeight=w.height;function L(){for(var C=1,A=0,M=_.length;A<M;++A)C=Xp(C,_[A]);for(var P=1,A=0,M=y.length;A<M;++A)P=Xp(P,y[A].length);C*=P;var B=x*_.length*y.length;if(process.env.NODE_ENV!=="production"){var R=function(k){console.warn("Calculated decal size is greater than "+k+" due to decal option settings so "+k+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+k+" to be larger to avoid incontinuity.")};C>o.maxTileWidth&&R("maxTileWidth"),B>o.maxTileHeight&&R("maxTileHeight")}return{width:Math.max(1,Math.min(C,o.maxTileWidth)),height:Math.max(1,Math.min(B,o.maxTileHeight))}}function D(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var C=0,A=0;A<m.length;++A)C+=m[A];if(C<=0)return;for(var M=-x,P=0,B=0,R=0;M<w.height;){if(P%2===0){for(var k=B/2%y.length,H=0,I=0,F=0;H<w.width*2;){for(var O=0,A=0;A<g[R].length;++A)O+=g[R][A];if(O<=0)break;if(I%2===0){var W=(1-o.symbolSize)*.5,j=H+g[R][I]*W,X=M+m[P]*W,et=g[R][I]*o.symbolSize,ft=m[P]*o.symbolSize,gt=F/2%y[k].length;Y(j,X,et,ft,y[k][gt])}H+=g[R][I],++F,++I,I===g[R].length&&(I=0)}++R,R===g.length&&(R=0)}M+=m[P],++B,++P,P===m.length&&(P=0)}function Y(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&&S.children.push(K)}else Ow(T,Et)}}}}function xm(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 xm([t]);for(var n=[],r=0;r<t.length;++r)Lt(t[r])?n.push([t[r]]):n.push(t[r]);return n}function bm(t){if(!t||t.length===0)return[[0,0]];if(ne(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!ne(t[n])){r=!1;break}if(r)return bm([t]);for(var i=[],n=0;n<t.length;++n)if(ne(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 Bw(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(ne(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 Vw(t){return yt(t,function(e){return Sm(e)})}function Sm(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function zw(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 Fw(t,e){process.env.NODE_ENV!=="production"&&Pu[t]&&Jt("Already has an implementation of "+t+"."),Pu[t]=e}function Hw(t){return process.env.NODE_ENV!=="production"&&(Pu[t]||Jt("Implementation of "+t+" doesn't exists.")),Pu[t]}var Gw=1,Ww=800,jw=900,$w=1e3,Xw=2e3,Uw=5e3,wm=1e3,Yw=1100,u0=2e3,Tm=3e3,Zw=4e3,ku=4500,Kw=4600,Qw=5e3,Jw=6e3,Lm=7e3,qw={PROCESSOR:{FILTER:$w,SERIES_FILTER:Ww,STATISTIC:Uw},VISUAL:{LAYOUT:wm,PROGRESSIVE_LAYOUT:Yw,GLOBAL:u0,CHART:Tm,POST_CHART_LAYOUT:Kw,COMPONENT:Zw,BRUSH:Qw,CHART_ITEM:ku,ARIA:Jw,DECAL:Lm}},xe="__flagInMainProcess",Ru="__mainProcessVersion",De="__pendingUpdate",c0="__needsUpdateStatus",Mm=/^[a-zA-Z0-9_]+$/,f0="__connectUpdateStatus",Cm=0,tT=1,eT=2;function Em(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){ir(this.id);return}return Am(this,t,e)}}function Dm(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(),fn.prototype[e].apply(t,r)}var Pm=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(fn),km=Pm.prototype;km.on=Dm("on"),km.off=Dm("off");var Gi,h0,Nu,bn,Ou,v0,d0,Ha,Ga,Rm,Nm,p0,Om,Iu,Im,Bm,Er,Vm,Wa,zm=function(t){ht(e,t);function e(r,n,i){var a=t.call(this,new aw)||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[Ru]=1,process.env.NODE_ENV!=="production"){var u=Yt.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&&r8(function(h){var d=oe(h),p=d.dataIndex;if(p!=null){var g=Ot();return g.set("series_index",d.seriesIndex),g.set("data_index",p),d.ssrType&&g.set("ssr_type",d.ssrType),g}});var c=a._zr=zp(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=W2(ce(c.flush,c),17),a._updateTheme(n),a._locale=ib(i.locale||Ig),a._coordSysMgr=new Vh;var f=a._api=Im(a);function v(h,d){return h.__prio-d.__prio}return qs(zu,v),qs(y0,v),a._scheduler=new Y2(a,f,y0,zu),a._messageCenter=new Pm,a._initEvents(),a.resize=ce(a.resize,a),c.animation.on("frame",a._onframe,a),Rm(c,a),Nm(c,a),Cc(a),a}return e.prototype._onframe=function(){if(!this._disposed){Vm(this);var r=this._scheduler;if(this[De]){var n=this[De].silent;this[xe]=!0,Wa(this);try{Gi(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),Ga.call(this,n)}else if(r.unfinished){var i=Gw,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),v0(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"&&Jt("`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,Wa(this),!this._model||n){var l=new Zb(this._api),u=this._theme,c=this._model=new Xh;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{Gi(this),bn.update.call(this,null,f)}catch(v){throw this[De]=null,this[xe]=!1,v}this._ssr||this._zr.flush(),this[De]=null,this[xe]=!1,Ha.call(this,a),Ga.call(this,a)}},e.prototype.setTheme=function(r,n){if(this[xe]){process.env.NODE_ENV!=="production"&&Jt("`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,Wa(this);try{this._updateTheme(r),i.setTheme(this._theme),Gi(this),bn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[xe]=!1,s}this[xe]=!1,Ha.call(this,a),Ga.call(this,a)}},e.prototype._updateTheme=function(r){Lt(r)&&(r=Fm[r]),r&&(r=zt(r),r&&g2(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||Yt.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(Hm[i]){var l=s,u=s,c=-s,f=-s,v=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();z(ls,function(_,x){if(_.group===i){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(zt(r)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),v.push({dom:b,left:S.left,top:S.top})}}),l*=h,u*=h,c*=h,f*=h;var d=c-l,p=f-u,g=En.createCanvas(),m=zp(g,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:p}),n){var y="";return z(v,function(_){var x=_.left-l,b=_.top-u;y+='<g transform="translate('+x+","+b+')">'+_.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:d,height:p},style:{fill:r.connectedBackgroundColor}})),z(v,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?lw(s,l,n):uw(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(rT,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=oe(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,v=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",v=u.seriesIndex);var h=f&&v!=null&&s.getComponent(f,v),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(h&&d)&&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:d},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)})}),fw(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&&r1(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 ls[n.id]},e.prototype.resize=function(r){if(this[xe]){process.env.NODE_ENV!=="production"&&Jt("`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,Wa(this);try{i&&Gi(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),Ga.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;d0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Yt.browser.weChat&&this._throttledZrFlush(),Ha.call(this,i),Ga.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(){Gi=function(f){var v=f._scheduler;v.restorePipelines(f._model),v.prepareStageTasks(),h0(f,!0),h0(f,!1),v.plan()},h0=function(f,v){for(var h=f._model,d=f._scheduler,p=v?f._componentsViews:f._chartsViews,g=v?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<p.length;_++)p[_].__alive=!1;v?h.eachComponent(function(S,w){S!=="series"&&x(w)}):h.eachSeries(x);function x(S){var w=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,L=!w&&g[T];if(!L){var D=qr(S.type),C=v?xn.getClass(D.main,D.sub):rr.getClass(D.sub);process.env.NODE_ENV!=="production"&&wt(C,D.sub+" does not exist."),L=new C,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},!v&&d.prepareView(L,S,h,y)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!v&&b.renderTask.dispose(),m.remove(b.group),b.dispose(h,y),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},Nu=function(f,v,h,d,p){var g=f._model;if(g.setUpdatePayload(h),!d){z([].concat(f._componentsViews).concat(f._chartsViews),b);return}var m={};m[d+"Id"]=h[d+"Id"],m[d+"Index"]=h[d+"Index"],m[d+"Name"]=h[d+"Name"];var y={mainType:d,query:m};p&&(y.subType=p);var _=h.excludeSeriesId,x;_!=null&&(x=Ot(),z(Xe(_),function(S){var w=Jr(S,null);w!=null&&x.set(w,!0)})),g&&g.eachComponent(y,function(S){var w=x&&x.get(S.id)!=null;if(!w)if(J1(h))if(S instanceof vr)h.type===Di&&!h.notBlur&&!S.get(["emphasis","disabled"])&&I9(S,h,f._api);else{var T=ah(S.mainType,S.componentIndex,h.name,f._api),L=T.focusSelf,D=T.dispatchers;h.type===Di&&L&&!h.notBlur&&ih(S.mainType,S.componentIndex,f._api),D&&z(D,function(C){h.type===Di?Wl(C):jl(C)})}else sh(h)&&S instanceof vr&&(z9(S,h,f._api),Z1(S),Er(f))},f),g&&g.eachComponent(y,function(S){var w=x&&x.get(S.id)!=null;w||b(f[d==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},f);function b(S){S&&S.__alive&&S[v]&&S[v](S.__model,g,f._api,h)}},bn={prepareAndUpdate:function(f){Gi(this),bn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,v){var h=this._model,d=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,d),m.performDataProcessorTasks(h,f),v0(this,h),g.update(h,d),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,d,f,v),Hr.trigger("afterupdate",h,d)}},updateTransform:function(f){var v=this,h=this._model,d=this._api;if(h){h.setUpdatePayload(f);var p=[];h.eachComponent(function(m,y){if(m!=="series"){var _=v.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,h,d,f);x&&x.update&&p.push(_)}else p.push(_)}});var g=Ot();h.eachSeries(function(m){var y=v._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,h,d,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,d,f,{},g),Hr.trigger("afterupdate",h,d)}},updateView:function(f){var v=this._model;v&&(v.setUpdatePayload(f),rr.markUpdateMethod(f,"updateView"),n(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0}),p0(this,v,this._api,f,{}),Hr.trigger("afterupdate",v,this._api))},updateVisual:function(f){var v=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(d){d.getData().clearAllVisual()}),rr.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(d,p){if(d!=="series"){var g=v.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,h,v._api,f)}}),h.eachSeries(function(d){var p=v._chartsMap[d.__viewId];p.updateVisual(d,h,v._api,f)}),Hr.trigger("afterupdate",h,this._api))},updateLayout:function(f){bn.update.call(this,f)}};function r(f,v,h,d,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 b=m[x];if(b[v]&&(y=b[v](g,_,d,p))!=null)return y}process.env.NODE_ENV!=="production"&&Ve("No coordinate system that supports "+v+" found by the given finder.")}Ou=r,v0=function(f,v){var h=f._chartsMap,d=f._scheduler;v.eachSeries(function(p){d.updateStreamModes(p,h[p.__viewId])})},d0=function(f,v){var h=this,d=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,Wa(this);var b=[f],S=!1;f.batch&&(S=!0,b=yt(f.batch,function(R){return R=Ft(ot({},R),f),R.batch=null,R}));var w=[],T,L=[],D=m.nonRefinedEventType,C=sh(f),A=J1(f);if(A&&Y1(this._api),z(b,function(R){var k=m.action(R,d,h._api);if(m.refineEvent?L.push(k):T=k,T=T||ot({},R),T.type=D,w.push(T),A){var H=e1(f),I=H.queryOptionMap,F=H.mainTypeSpecified,O=F?I.keys()[0]:"series";Nu(h,_,R,O),Er(h)}else C?(Nu(h,_,R,"series"),Er(h)):x&&Nu(h,_,R,x.main,x.sub)}),_!=="none"&&!A&&!C&&!x)try{this[De]?(Gi(this),bn.update.call(this,f),this[De]=null):bn[_].call(this,f)}catch(R){throw this[xe]=!1,R}if(S?T={type:D,escapeConnect:g,batch:w}:T=w[0],this[xe]=!1,!v){var M=void 0;if(m.refineEvent){var P=m.refineEvent(L,f,d,this._api).eventContent;wt(Mt(P)),M=Ft({type:m.refinedEventType},P),M.fromAction=f.type,M.fromActionPayload=f,M.escapeConnect=!0}var B=this._messageCenter;B.trigger(T.type,T),M&&B.trigger(M.type,M)}},Ha=function(f){for(var v=this._pendingActions;v.length;){var h=v.shift();d0.call(this,h,f)}},Ga=function(f){!f&&this.trigger("updated")},Rm=function(f,v){f.on("rendered",function(h){v.trigger("rendered",h),f.animation.isFinished()&&!v[De]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},Nm=function(f,v){f.on("mouseover",function(h){var d=h.target,p=Cu(d,Ca);p&&(B9(p,h,v._api),Er(v))}).on("mouseout",function(h){var d=h.target,p=Cu(d,Ca);p&&(V9(p,h,v._api),Er(v))}).on("click",function(h){var d=h.target,p=Cu(d,function(y){return oe(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=oe(p);v._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(v){v.clearColorPalette()})}function i(f){var v=[],h=[],d=!1;if(f.eachComponent(function(y,_){var x=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(y==="series"?h:v).push({zlevel:x,z:b,idx:_.componentIndex,type:y,key:S})}),d){var p=v.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,b=y.key;g!=null&&(x=Math.max(g,x)),b?(x===g&&b!==m&&x++,m=b):m&&(x===g&&x++,m=""),g=x,_.setZLevel(x)})}}p0=function(f,v,h,d,p){i(v),Om(f,v,h,d,p),z(f._chartsViews,function(g){g.__alive=!1}),Iu(f,v,h,d,p),z(f._chartsViews,function(g){g.__alive||g.remove(v,h)})},Om=function(f,v,h,d,p,g){z(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,v,h,d),l(y,m),c(y,m)})},Iu=function(f,v,h,d,p,g){var m=f._scheduler;p=ot(p||{},{updatedSeries:v.getSeries()}),Hr.trigger("series:beforeupdate",v,h,p);var y=!1;v.eachSeries(function(_){var x=f._chartsMap[_.__viewId];x.__alive=!0;var b=x.renderTask;m.updatePayload(b,d),u(_,x),g&&g.get(_.uid)&&b.dirty(),b.perform(m.getPerformArgs(b))&&(y=!0),x.group.silent=!!_.get("silent"),s(_,x),Z1(_)}),m.unfinished=y||m.unfinished,Hr.trigger("series:layoutlabels",v,h,p),Hr.trigger("series:transition",v,h,p),v.eachSeries(function(_){var x=f._chartsMap[_.__viewId];l(_,x),c(_,x)}),o(f,v),Hr.trigger("series:afterupdate",v,h,p)},Er=function(f){f[c0]=!0,f.getZr().wakeUp()},Wa=function(f){f[Ru]=(f[Ru]+1)%1e3},Vm=function(f){f[c0]&&(f.getZr().storage.traverse(function(v){zo(v)||a(v)}),f[c0]=!1)};function a(f){for(var v=[],h=f.currentStates,d=0;d<h.length;d++){var p=h[d];p==="emphasis"||p==="blur"||p==="select"||v.push(p)}f.selected&&f.states.select&&v.push("select"),f.hoverState===Bl&&f.states.emphasis?v.push("emphasis"):f.hoverState===Il&&f.states.blur&&v.push("blur"),f.useStates(v)}function o(f,v){var h=f._zr,d=h.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>v.get("hoverLayerThreshold")&&!Yt.node&&!Yt.worker&&v.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,v){var h=f.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function l(f,v){if(!f.preventAutoZ){var h=Tg(f);v.eachRendered(function(d){return Lg(d,h.z,h.zlevel),!0})}}function u(f,v){v.eachRendered(function(h){if(!zo(h)){var d=h.getTextContent(),p=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,v){var h=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=h.get("duration"),g=p>0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;v.eachRendered(function(m){if(m.states&&m.states.emphasis){if(zo(m))return;if(m instanceof jt&&$9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=g;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}m.__dirty&&a(m)}})}Im=function(f){return new(function(v){ht(h,v);function h(){return v!==null&&v.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},h.prototype.enterEmphasis=function(d,p){Wl(d,p),Er(f)},h.prototype.leaveEmphasis=function(d,p){jl(d,p),Er(f)},h.prototype.enterBlur=function(d){O9(d),Er(f)},h.prototype.leaveBlur=function(d){j1(d),Er(f)},h.prototype.enterSelect=function(d){$1(d),Er(f)},h.prototype.leaveSelect=function(d){X1(d),Er(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},h.prototype.getMainProcessVersion=function(){return f[Ru]},h}(u2))(f)},Bm=function(f){function v(h,d){for(var p=0;p<h.length;p++){var g=h[p];g[f0]=d}}z(Vu,function(h,d){f._messageCenter.on(d,function(p){if(Hm[f.group]&&f[f0]!==Cm){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),m=[];z(ls,function(y){y!==f&&y.group===f.group&&m.push(y)}),v(m,Cm),z(m,function(y){y[f0]!==tT&&y.dispatchAction(g)}),v(m,eT)}})})}}(),e}(fn),g0=zm.prototype;g0.on=Em("on"),g0.off=Em("off"),g0.one=function(t,e,r){var n=this;dn("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 rT=["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=[],Fm={},x0={},ls={},Hm={},nT=+new Date-0,b0="_echarts_instance_";function iT(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=aT(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 zm(t,e,r);return a.id="ec_"+nT++,ls[a.id]=a,n&&r1(t,b0,a.id),Bm(a),Hr.trigger("afterinit",a),a}function aT(t){return ls[M8(t,b0)]}function Gm(t,e){Fm[t]=e}function Wm(t){re(_0,t)<0&&_0.push(t)}function jm(t,e){w0(y0,t,e,Xw)}function oT(t){S0("afterinit",t)}function sT(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(Mm.test(n)&&Mm.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]&&Jt(u+' must not be shared; use "refineEvent" if you intend to share an event name.'),Vu[u]=n)}function lT(t,e){Vh.register(t,e)}function uT(t,e){w0(zu,t,e,wm,"layout")}function Wi(t,e){w0(zu,t,e,Tm,"visual")}var $m=[];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(!(re($m,r)>=0)){$m.push(r);var a=Y2.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function Xm(t,e){x0[t]=e}function cT(t,e,r){var n=Hw("registerMap");n&&n(t,e,r)}var fT=LS;Wi(u0,$S),Wi(ku,XS),Wi(ku,US),Wi(u0,ow),Wi(ku,sw),Wi(Lm,zw),Wm(g2),jm(jw,sS),Xm("default",YS),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:F9(r),isFromClick:e.isFromClick||!1}}}Gm("default",{}),Gm("dark",q2);function us(t){return t==null?0:t.length||1}function Um(t){return t}var hT=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||Um,this._newKeyGetter=i||Um,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=us(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=us(u),v=us(c);if(f>1&&v===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&v>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&v===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&v>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=us(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=us(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},t}(),vT=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 dT(t,e){var r={},n=r.encode={},i=Ot(),a=[],o=[],s={};z(t.dimensions,function(v){var h=t.getDimensionInfo(v),d=h.coordDim;if(d){process.env.NODE_ENV!=="production"&&wt(Gh.get(d)==null);var p=h.coordDimIndex;L0(n,d)[p]=v,h.isExtraCoord||(i.set(d,1),gT(h.type)&&(a[0]=v),L0(s,d)[p]=t.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(v)}Gh.each(function(g,m){var y=L0(n,m),_=h.otherDims[m];_!=null&&_!==!1&&(y[_]=h.name)})});var l=[],u={};i.each(function(v,h){var d=n[h];u[h]=d[0],l=l.concat(d)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=yt(l,function(v){return t.getDimensionInfo(v).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 vT(s,e),r}function L0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function pT(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function gT(t){return!(t==="ordinal"||t==="time")}var Fu=function(){function t(e){this.otherDims={},e!=null&&ot(this,e)}return t}(),mT=ve(),yT={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Ym=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=Qm(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=b2(this.source),n=!Jm(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 v=this.getSourceDimension(o);v&&(l=r?v.name:null,u=v.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+=yT[u]||"f",c&&(i+=c.uid),i+="$"}var h=this.source,d=[h.seriesLayoutBy,h.startIndex,i].join("$$");return{dimensions:a,hash:d}},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 Zm(t){return t instanceof Ym}function Km(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 Qm(t){var e=mT(t);return e.dimNameMap||(e.dimNameMap=Km(t.dimensionsDefine))}function Jm(t){return t>30}var cs=Mt,Yn=yt,_T=typeof Int32Array>"u"?Array:Int32Array,xT="e\0\0",qm=-1,bT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ST=["_approximateExtent"],ty,Hu,fs,$a,M0,hs,C0,ey=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;Zm(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],v=Lt(f)?new Fu({name:f}):f instanceof Fu?f:new Fu(f),h=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=h,v.coordDimIndex=0);var d=v.otherDims=v.otherDims||{};o.push(h),a[h]=v,u[h]!=null&&(l=!0),v.createInvertedIndices&&(s[h]=[]);var p=c;ne(v.storeDimIndex)&&(p=v.storeDimIndex),d.itemName===0&&(this._nameDimIdx=p),d.itemId===0&&(this._idDimIdx=p),process.env.NODE_ENV!=="production"&&wt(i||v.storeDimIndex>=0),i&&(v.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(ne(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 T2(e,o.length):e;a=new t0;var l=Yn(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=dT(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&&p8(f)&&(this.hasItemOption=!0),f){var v=f.name;a[c]==null&&v!=null&&(a[c]=Jr(v,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);ty(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){cs(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=fs(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(Yn(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)?qm:i},t.prototype.each=function(e,r,n){Dt(e)&&(n=r,r=e,e=[]);var i=n||this,a=Yn($a(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=Yn($a(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=Yn($a(e),this._getStoreDimIndex,this),s=hs(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($a(e),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Yn($a(e),this._getStoreDimIndex,this);this._store.modify(s,o?ce(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=hs(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.minmaxDownSample=function(e,r){var n=hs(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),r),n},t.prototype.lttbDownSample=function(e,r){var n=hs(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 hT(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||{},cs(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():cs(a)&&(a=ot({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,cs(r)?ot(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){cs(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;L9(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:Yn(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(){ty=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 _T(o.categories.length);for(var l=0;l<n.length;l++)n[l]=qm;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},fs=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=fs(e,e._idDimIdx,r)),n==null&&(n=xT+r),n},$a=function(e){return bt(e)||(e=e!=null?[e]:[]),e},hs=function(e){var r=new t(e._schema?e._schema:Yn(e.dimensions,e._getDimInfo,e),e.hostModel);return M0(r,e),r},M0=function(e,r){z(bT.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,z(ST,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=fs(e,a,r)),l==null&&o!=null&&(i[r]=l=fs(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 ry(t,e){Zh(t)||(t=m2(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ot(),a=[],o=TT(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Jm(o),l=n===t.dimensionsDefine,u=l?Qm(t):Km(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=Ot(c),v=new k2(o),h=0;h<v.length;h++)v[h]=-1;function d(L){var D=v[L];if(D<0){var C=n[L],A=Mt(C)?C:{name:C},M=new Fu,P=A.name;P!=null&&u.get(P)!=null&&(M.name=M.displayName=P),A.type!=null&&(M.type=A.type),A.displayName!=null&&(M.displayName=A.displayName);var B=a.length;return v[L]=B,M.storeDimIndex=L,a.push(M),M}return a[D]}if(!s)for(var h=0;h<o;h++)d(h);f.each(function(L,D){var C=Xe(L).slice();if(C.length===1&&!Lt(C[0])&&C[0]<0){f.set(D,!1);return}var A=f.set(D,[]);z(C,function(M,P){var B=Lt(M)?u.get(M):M;B!=null&&B<o&&(A[P]=B,g(d(B),D,P))})});var p=0;z(r,function(L){var D,C,A,M;if(Lt(L))D=L,M={};else{M=L,D=M.name;var P=M.ordinalMeta;M.ordinalMeta=null,M=ot({},M),M.ordinalMeta=P,C=M.dimsDef,A=M.otherDims,M.name=M.coordDim=M.coordDimIndex=M.dimsDef=M.otherDims=null}var B=f.get(D);if(B!==!1){if(B=Xe(B),!B.length)for(var R=0;R<(C&&C.length||1);R++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&B.push(p++)}z(B,function(k,H){var I=d(k);if(l&&M.type!=null&&(I.type=M.type),g(Ft(I,M),D,H),I.name==null&&C){var F=C[H];!Mt(F)&&(F={name:F}),I.name=I.displayName=F.name,I.defaultTooltip=F.defaultTooltip}A&&Ft(I.otherDims,A)})}});function g(L,D,C){Gh.get(D)!=null?L.otherDims[D]=C:(L.coordDim=D,L.coordDimIndex=C,i.set(D,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var x=m||"value";function b(L){L.name==null&&(L.name=L.coordDim)}if(s)z(a,function(L){b(L)}),a.sort(function(L,D){return L.storeDimIndex-D.storeDimIndex});else for(var S=0;S<o;S++){var w=d(S),T=w.coordDim;T==null&&(w.coordDim=LT(x,i,_),w.coordDimIndex=0,(!m||y<=0)&&(w.isExtraCoord=!0),y--),b(w),w.type==null&&(e2(t,S)===Ne.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return wT(a),new Ym({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function wT(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 TT(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 LT(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 MT=function(){function t(e){this.coordSysDims=[],this.axisMap=Ot(),this.categoryAxisMap=Ot(),this.coordSysName=e}return t}();function CT(t){var e=t.get("coordinateSystem"),r=new MT(e),n=ET[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var ET={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),Xa(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Xa(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),Xa(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),Xa(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Xa(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),Xa(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 Xa(t){return t.get("type")==="category"}function DT(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;AT(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,v;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,v="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,d=c.type,p=0;z(a,function(y){y.coordDim===h&&p++});var g={name:f,coordDim:h,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),m.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:v,stackResultDimension:f}}function AT(t){return!Zm(t.schema)}function Ua(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function PT(t,e){return Ua(t,e)?t.getCalculationInfo("stackResultDimension"):e}function kT(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=pT(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function RT(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 Gu(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===hr;var o=CT(e),s=kT(e,o),l=r.useEncodeDefaulter,u=Dt(l)?l:l?or(Nb,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=ry(i,c),v=RT(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),d=DT(e,{schema:f,store:h}),p=new ey(f,e);p.setCalculationInfo(d);var g=v!=null&&NT(i)?function(m,y,_,x){return x===v?_:this.defaultDimValueGetter(m,y,_,x)}:null;return p.hasItemOption=!1,p.initData(a?i:h,null,g),p}function NT(t){if(t.sourceFormat===hr){var e=OT(t.data||[]);return!bt(Co(e))}}function OT(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function IT(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 BT(t,e,r,n,i){var a={},o=a.interval=Wp(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=[Re(Math.ceil(t[0]/o)*o,s),Re(Math.floor(t[1]/o)*o,s)];return VT(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,Re(r*e)}function vs(t){return vn(t)+2}function ny(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function VT(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),ny(t,0,e),ny(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function A0(t,e){return t>=e[0]&&t<=e[1]}var zT=function(){function t(){this.normalize=iy,this.scale=ay}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ce(e.normalize,e),this.scale=ce(e.scale,e)):(this.normalize=iy,this.scale=ay)},t}();function iy(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function ay(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 zT,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 FT=0,k0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++FT,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&yt(n,HT);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 HT(t){return Mt(t)&&t.value!=null?t.value:t+""}var oy=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 k0({})),bt(i)&&(i=new k0({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(oy);var Kn=Re,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(d,p){return Math.round((p-d)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=Kn(f+n,o),this._brkCtx){var v=this._brkCtx.calcNiceTickMultiple(f,c);v>=0&&(f=Kn(f+v*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,v=f/r,h=vs(v);u<r-1;){var d=Kn(l.value+(u+1)*v,h);d>a[0]&&d<a[1]&&c.push(d),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=vn(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Kn(r.value,i,!0);return mb(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=BT(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 sy=typeof Float32Array<"u",GT=sy?Float32Array:Array;function Sn(t){return bt(t)?sy?new Float32Array(t):t:new GT(t)}var WT="__ec_stack_";function R0(t){return t.get("stack")||WT+t.seriesIndex}function N0(t){return t.dim+t.index}function ly(t,e){var r=[];return e.eachSeriesByType(t,function(n){cy(n)&&r.push(n)}),r}function jT(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(),v=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),d=f.getStore(),p=0,g=d.count();p<g;++p){var m=d.get(h,p);e[v]?e[v].push(m):e[v]=[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 uy(t){var e=jT(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(),v=Math.abs(f[1]-f[0]);s=u?c/v*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=ae(n.get("barWidth"),s),p=ae(n.get("barMaxWidth"),s),g=ae(n.get("barMinWidth")||(fy(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,defaultBarGap:_,axisKey:N0(a),stackId:R0(n)})}),$T(r)}function $T(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 v=n.barMinWidth;v&&(l[u].minWidth=v);var h=n.barGap;h!=null&&(s.gap=h);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});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=ae(s,o),c=ae(n.gap,1),f=n.remainedWidth,v=n.autoWidthCount,h=(f-u)/(v+(v-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,v--}else{var x=h;y&&y<x&&(x=Math.min(y,f)),_&&_>x&&(x=_),x!==h&&(m.width=x,f-=x+c*x,v--)}}),h=(f-u)/(v+(v-1)*c),h=Math.max(h,0);var d=0,p;z(a,function(m,y){m.width||(m.width=h),p=m,d+=m.width*(1+c)}),p&&(d-=p.width*c);var g=-d/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 XT(t,e,r){if(t&&e){var n=t[N0(e)];return n!=null&&r!=null?n[R0(r)]:n}}function UT(t,e){var r=ly(t,e),n=uy(r);z(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=R0(i),u=n[N0(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function YT(t){return{seriesType:t,plan:r0(),reset:function(e){if(cy(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"),v=a.isHorizontal(),h=ZT(i,a),d=fy(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 b=_.count,S=d&&Sn(b*3),w=d&&l&&Sn(b*3),T=d&&Sn(b),L=n.master.getRect(),D=v?L.width:L.height,C,A=x.getStore(),M=0;(C=_.next())!=null;){var P=A.get(f?g:o,C),B=A.get(s,C),R=h,k=void 0;f&&(k=+P-A.get(o,C));var H=void 0,I=void 0,F=void 0,O=void 0;if(v){var W=n.dataToPoint([P,B]);if(f){var j=n.dataToPoint([k,B]);R=j[0]}H=R,I=W[1]+y,F=W[0]-R,O=m,Math.abs(F)<p&&(F=(F<0?-1:1)*p)}else{var W=n.dataToPoint([B,P]);if(f){var j=n.dataToPoint([B,k]);R=j[1]}H=W[0]+y,I=R,F=m,O=W[1]-R,Math.abs(O)<p&&(O=(O<=0?-1:1)*p)}d?(S[M]=H,S[M+1]=I,S[M+2]=v?F:O,w&&(w[M]=v?L.x:H,w[M+1]=v?I:L.y,w[M+2]=D),T[C]=C):x.setItemLayout(C,{x:H,y:I,width:F,height:O}),M+=3}d&&x.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:v})}}}}}}function cy(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function fy(t){return t.pipelineContext&&t.pipelineContext.large}function ZT(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 KT=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},hy=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 Fg(r.value,zg[db(Xo(this._minLevelUnit))]||zg.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return pb(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=iL(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(v){c=Math.min(c,re(Ni,v.time.upperTimeUnit)),f=Math.max(f,v.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=Wu.length,s=Math.min(KT(Wu,this._approxInterval,0,o),o-1);this._interval=Wu[s][1],this._intervalPrecision=vs(this._interval),this._minLevelUnit=Wu[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return ne(r)?r:+Mo(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),Wu=[["second",Mh],["minute",Ch],["hour",$o],["quarter-day",$o*6],["half-day",$o*12],["day",Tr*1.2],["half-week",Tr*3.5],["week",Tr*7],["month",Tr*31],["quarter",Tr*95],["half-year",Vg/2],["year",Vg]];function QT(t,e,r,n){return Eh(new Date(e),t,n).getTime()===Eh(new Date(r),t,n).getTime()}function JT(t,e){return t/=Tr,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function qT(t){var e=30*Tr;return t/=e,t>6?6:t>3?3:t>2?2:1}function tL(t){return t/=$o,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 eL(t){return Wp(t)}function rL(t,e,r){var n=Math.max(0,re(Ni,e)-1);return Eh(new Date(t),Ni[n],r).getTime()}function nL(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 iL(t,e,r,n,i,a){var o=1e4,s=cb,l=0;function u(M,P,B,R,k,H,I){for(var F=nL(k,M),O=P,W=new Date(O);O<B&&O<=n[1];){if(I.push({value:O}),l++>o){process.env.NODE_ENV!=="production"&&Ve("Exceed safe limit in time scale.");break}if(W[k](W[R]()+M),O=W.getTime(),a){var j=a.calcNiceTickMultiple(O,F);j>0&&(W[k](W[R]()+j*M),O=W.getTime())}}I.push({value:O,notAdd:!0})}function c(M,P,B){var R=[],k=!P.length;if(!QT(Xo(M),n[0],n[1],r)){k&&(P=[{value:rL(n[0],M,r)},{value:n[1]}]);for(var H=0;H<P.length-1;H++){var I=P[H].value,F=P[H+1].value;if(I!==F){var O=void 0,W=void 0,j=void 0,X=!1;switch(M){case"year":O=Math.max(1,Math.round(e/Tr/365)),W=Hg(r),j=gb(r);break;case"half-year":case"quarter":case"month":O=qT(e),W=Dh(r),j=Gg(r);break;case"week":case"half-week":case"day":O=JT(e),W=Ah(r),j=Wg(r),X=!0;break;case"half-day":case"quarter-day":case"hour":O=tL(e),W=Ph(r),j=jg(r);break;case"minute":O=vy(e,!0),W=kh(r),j=$g(r);break;case"second":O=vy(e,!1),W=Rh(r),j=Xg(r);break;case"millisecond":O=eL(e),W=Nh(r),j=Ug(r);break}F>=n[0]&&I<=n[1]&&u(O,I,F,W,j,X,R),M==="year"&&B.length>1&&H===0&&B.unshift({value:B[0].value-O})}}for(var H=0;H<R.length;H++)B.push(R[H])}}for(var f=[],v=[],h=0,d=0,p=0;p<s.length;++p){var g=Xo(s[p]);if(vb(s[p])){c(s[p],f[f.length-1]||[],v);var m=s[p+1]?Xo(s[p+1]):null;if(g!==m){if(v.length){d=h,v.sort(function(M,P){return M.value-P.value});for(var y=[],_=0;_<v.length;++_){var x=v[_].value;(_===0||v[_-1].value!==x)&&(y.push(v[_]),x>=n[0]&&x<=n[1]&&h++)}var b=i/e;if(h>b*1.5&&d>b/1.5||(f.push(y),h>b||t===s[p]))break}v=[]}}}for(var S=Se(yt(f,function(M){return Se(M,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(M){return M.length>0}),w=[],T=S.length-1,p=0;p<S.length;++p)for(var L=S[p],D=0;D<L.length;++D){var C=hu(L[D].value,r);w.push({value:L[D].value,time:{level:T-p,upperTimeUnit:C,lowerTimeUnit:C}})}w.sort(function(M,P){return M.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(hy);var O0=Re,aL=Math.floor,oL=Math.ceil,ju=Math.pow,$u=Math.log,dy=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=u8(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(oL(n[0]/a)*a),O0(aL(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=$u(r)/$u(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=$u(r)/$u(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,vn(e))}Zn.registerClass(dy);var sL=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=Xu(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Xu(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(Dt(s)?this._modelMaxNum=Xu(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Xu(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 v=this._determinedMin,h=this._determinedMax;return v!=null&&(s=v,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[uL[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=lL[e];process.env.NODE_ENV!=="production"&&wt(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),lL={min:"_determinedMin",max:"_determinedMax"},uL={min:"_dataMin",max:"_dataMax"};function cL(t,e,r){var n=t.rawExtentInfo;return n||(n=new sL(t,e,r),t.rawExtentInfo=n,n)}function Xu(t,e){return e==null?null:ia(e)?NaN:t.parse(e)}function py(t,e){var r=t.type,n=cL(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=ly("bar",o),l=!1;if(z(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=uy(s),c=fL(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function fL(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=XT(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,v=c/f-c;return e+=v*(l/u),t-=v*(s/u),{min:t,max:e}}function gy(t,e){var r=e,n=py(t,r),i=n.extent,a=r.get("splitNumber");t instanceof dy&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(_y(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 hL(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new oy({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new hy({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Zn.getClass(e)||Qn)}}function vL(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function ds(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=fb(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(my(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(my(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function my(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function B0(t){var e=t.get("interval");return e??"auto"}function yy(t){return t.type==="category"&&B0(t.getLabelModel())===0}function dL(t,e){var r={};return z(t.mapDimensionsAll(e),function(n){r[PT(t,n)]=!0}),Ht(r)}function Ya(t){return t==="middle"||t==="center"}function ps(t){return t.getShallow("show")}function _y(t){var e=t.get("breaks",!0);if(e!=null){process.env.NODE_ENV!=="production"&&Jt('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var xy=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),by=[],pL={registerPreprocessor:Wm,registerProcessor:jm,registerPostInit:oT,registerPostUpdate:sT,registerUpdateLifecycle:S0,registerAction:ja,registerCoordinateSystem:lT,registerLayout:uT,registerVisual:Wi,registerTransform:fT,registerLoading:Xm,registerMap:cT,registerImpl:Fw,PRIORITY:qw,ComponentModel:qt,ComponentView:xn,SeriesModel:vr,ChartView:rr,registerComponentModel:function(t){qt.registerClass(t)},registerComponentView:function(t){xn.registerClass(t)},registerSeriesModel:function(t){vr.registerClass(t)},registerChartView:function(t){rr.registerClass(t)},registerCustomSeries:function(t,e){},registerSubTypeDefaulter:function(t,e){qt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){t8(t,e)}};function ji(t){if(bt(t)){z(t,function(e){ji(e)});return}re(by,t)>=0||(by.push(t),Dt(t)&&(t={install:t}),t.install(pL))}var gL=ve(),gs=ve(),Gr={estimate:1,determine:2};function Uu(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Sy(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 mL(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=ds(t),i=t.scale.getExtent(),a=Sy(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"?_L(t,e):bL(t)}function yL(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=Sy(t,n);return{ticks:Se(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?xL(t,e):{ticks:yt(t.scale.getTicks(r),function(o){return o.value})}}function _L(t,e){var r=t.getLabelModel(),n=wy(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function wy(t,e,r){var n=wL(t),i=B0(e),a=r.kind===Gr.estimate;if(!a){var o=Ly(n,i);if(o)return o}var s,l;Dt(i)?s=Ey(t,i):(l=i==="auto"?TL(t,r):i,s=Cy(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 xL(t,e){var r=SL(t),n=B0(e),i=Ly(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),Dt(n))a=Ey(t,n,!0);else if(n==="auto"){var s=wy(t,t.getLabelModel(),Uu(Gr.determine));o=s.labelCategoryInterval,a=yt(s.labels,function(l){return l.tickValue})}else o=n,a=Cy(t,o,!0);return V0(r,n,{ticks:a,tickCategoryInterval:o})}function bL(t){var e=t.scale.getTicks(),r=ds(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 SL=Ty("axisTick"),wL=Ty("axisLabel");function Ty(t){return function(r){return gs(r)[t]||(gs(r)[t]={list:[]})}}function Ly(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 TL(t,e){if(e.kind===Gr.estimate){var r=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return gs(t).autoInterval=r,!0}),r}var n=gs(t).autoInterval;return n??(gs(t).autoInterval=t.calculateCategoryInterval(e))}function LL(t,e){var r=e.kind,n=CL(t),i=ds(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],v=t.dataToCoord(f+1)-t.dataToCoord(f),h=Math.abs(v*Math.cos(a)),d=Math.abs(v*Math.sin(a)),p=0,g=0;f<=s[1];f+=u){var m=0,y=0,_=j6(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,b=g/d;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(r===Gr.estimate)return e.out.noPxChangeTryDetermine.push(ce(ML,null,t,S,l)),S;var w=My(t,S,l);return w??S}function ML(t,e,r){return My(t,e,r)==null}function My(t,e,r){var n=gL(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 CL(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 Cy(t,e,r){var n=ds(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=yy(t),v=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;v&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);h&&d-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 Ey(t,e,r){var n=t.scale,i=ds(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 Dy=[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 a8(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(),Py(n,i.count())),Lf(e,Dy,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Py(n,i.count()));var a=Lf(e,n,Dy,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=yL(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 EL(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(Gr.determine),mL(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(Gr.determine),LL(this,e)},t}();function Py(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function EL(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];v(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&v(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),v(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&v(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function v(h,d){return h=Re(h),d=Re(d),f?h>d:h<d}}function ky(t,e,r,n,i,a,o,s){var l=i-t,u=a-e,c=r-t,f=n-e,v=Math.sqrt(c*c+f*f);c/=v,f/=v;var h=l*c+u*f,d=h/v;d*=v;var p=o[0]=t+d*c,g=o[1]=e+d*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,Yu=[],Ye=new Pt;function DL(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,Yu);Ye.fromArray(Yu),Ye.scaleAndAdd(sn,o/Math.tan(Math.PI-e));var s=Oe.x!==he.x?(Ye.x-he.x)/(Oe.x-he.x):(Ye.y-he.y)/(Oe.y-he.y);if(isNaN(s))return;s<0?Pt.copy(Ye,he):s>1&&Pt.copy(Ye,Oe),Ye.toArray(t[1])}}}}function AL(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,Yu);Ye.fromArray(Yu);var l=Math.PI/2,u=Math.acos(sn.dot(e)),c=l+u-r;if(c>=l)Pt.copy(Ye,Oe);else{Ye.scaleAndAdd(sn,s/Math.tan(Math.PI/2-c));var f=Oe.x!==he.x?(Ye.x-he.x)/(Oe.x-he.x):(Ye.y-he.y)/(Oe.y-he.y);if(isNaN(f))return;f<0?Pt.copy(Ye,he):f>1&&Pt.copy(Ye,Oe)}Ye.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 PL(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 kL(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 v=c.get("show"),h=f?s:St(i.states[u]&&i.states[u].ignore,s);if(h||!St(v,o)){var d=f?n:n&&n.states[u];d&&(d.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=PL}}function RL(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 Ry=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],NL=1,Zu=2,Ny=NL|Zu;function Ku(t,e,r){r=r||Ny,e?t.dirty|=r:t.dirty&=~r}function Oy(t,e){return e=e||Ny,t.dirty==null||!!(t.dirty&e)}function ti(t){if(t)return Oy(t)&&Iy(t,t.label,t),t}function Iy(t,e,r){var n=e.getComputedTransform();t.transform=bh(t.transform,n);var i=t.localRect=Wo(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=Ra.textMargin);for(var f=0;f<4;f++)F0[f]=c===Ra.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Ra.textMargin&&tu(i,F0,!1,!1);var v=t.rect=Wo(t.rect,i);return n&&v.applyTransform(n),c===Ra.minMargin&&tu(v,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 OL(t,e,r){return t.transform=bh(t.transform,r),t.localRect=Wo(t.localRect,e),t.rect=Wo(t.rect,e),r&&t.rect.applyTransform(r),t.axisAligned=xh(r),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}function IL(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 By(t,e){for(var r=0;r<Ry.length;r++){var n=Ry[r];t[n]==null&&(t[n]=e[n])}return ti(t)}function Vy(t){var e=t.obb;return(!e||Oy(t,Zu))&&(t.obb=e=e||new vg,e.fromBoundingRect(t.localRect,t.transform),Ku(t,!1,Zu)),e}function BL(t,e,r,n,i){var a=t.length,o=Wn[e],s=Aa[e];if(a<2)return!1;t.sort(function(L,D){return L.rect[o]-D.rect[o]});for(var l=0,u,c=!1,f=0,v=0;v<a;v++){var h=t[v],d=h.rect;u=d[o]-l,u<0&&(d[o]-=u,h.label[o]-=u,c=!0);var p=Math.max(-u,0);f+=p,l=d[o]+d[s]}f>0&&i&&S(-f/a,0,a);var g=t[0],m=t[a-1],y,_;x(),y<0&&w(-y,.8),_<0&&w(_,.8),x(),b(y,_,1),b(_,y,-1),x(),y<0&&T(-y),_<0&&T(_);function x(){y=g.rect[o]-r,_=n-m.rect[o]-m.rect[s]}function b(L,D,C){if(L<0){var A=Math.min(D,-L);if(A>0){S(A*C,0,a);var M=A+L;M<0&&w(-M*C,1)}else w(-L*C,1)}}function S(L,D,C){L!==0&&(c=!0);for(var A=D;A<C;A++){var M=t[A],P=M.rect;P[o]+=L,M.label[o]+=L}}function w(L,D){for(var C=[],A=0,M=1;M<a;M++){var P=t[M-1].rect,B=Math.max(t[M].rect[o]-P[o]-P[s],0);C.push(B),A+=B}if(A){var R=Math.min(Math.abs(L)/A,D);if(L>0)for(var M=0;M<a-1;M++){var k=C[M]*R;S(k,0,M+1)}else for(var M=a-1;M>0;M--){var k=C[M-1]*R;S(-k,M,a)}}}function T(L){var D=L<0?-1:1;L=Math.abs(L);for(var C=Math.ceil(L/(a-1)),A=0;A<a-1;A++)if(D>0?S(C,0,A+1):S(-C,a-A-1,a),L-=C,L<=0)return}return c}function VL(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:Vy(t).intersect(Vy(e),r,n)}var zL=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 Gu(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=kt.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}(vr);function G0(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 zy(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 W0=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=FL,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(){Wl(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 v=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,v)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(d):Fe(h,d,s,n),Ho(h)}if(this._updateCommon(r,n,l,i,a),c){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,er(h,d,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,v,h,d,p,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,v=a.focus,h=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,d=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(),v=_.get("focus"),h=_.get("blurScope"),d=_.get("disabled"),p=ka(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var x=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=rm(r.getItemVisual(n,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var S=r.getItemVisual(n,"style"),w=S.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},S))}else s.__isEmptyBrush?s.useStyle(ot({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var L=r.getItemVisual(n,"liftZ"),D=this._z2;L!=null?D==null&&(this._z2=s.z2,s.z2+=L):D!=null&&(s.z2=D,this._z2=null);var C=o&&o.useNameLabel;Pa(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:A,inheritColor:w,defaultOpacity:S.opacity});function A(B){return C?r.getName(B):G0(r,B)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var M=s.ensureState("emphasis");M.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;M.scaleX=this._sizeX*P,M.scaleY=this._sizeY*P,this.setSymbolScale(1),La(this,v,h,d)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=oe(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 em(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(ye);function FL(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 Fy(t){return t!=null&&!Mt(t)&&(t={isIgnore:t}),t||{}}function Hy(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:ka(e),cursorStyle:e.get("cursor")}}var Gy=function(){function t(e){this.group=new ye,this._SymbolCtor=e||W0}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=Fy(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=Hy(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var v=c(f);if(j0(e,v,f,r)){var h=new o(e,f,l,u);h.setPosition(v),e.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,v){var h=a.getItemGraphicEl(v),d=c(f);if(!j0(e,d,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(d);else{h.updateData(e,f,l,u);var m={x:d[0],y:d[1]};s?h.attr(m):Fe(h,m,i)}n.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var v=a.getItemGraphicEl(f);v&&v.fadeOut(function(){n.remove(v)},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=Hy(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=Fy(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 Wy(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=HL(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(d){return e.mapDimension(d)}),v=!1,h=e.getCalculationInfo("stackResultDimension");return Ua(e,f[0])&&(v=!0,f[0]=h),Ua(e,f[1])&&(v=!0,f[1]=h),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!v,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function HL(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:ne(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function jy(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 GL(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 WL(t,e,r,n,i,a,o,s){for(var l=GL(t,e),u=[],c=[],f=[],v=[],h=[],d=[],p=[],g=Wy(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,w=void 0;switch(x.cmd){case"=":S=x.idx*2,w=x.idx1*2;var T=m[S],L=m[S+1],D=y[w],C=y[w+1];(isNaN(T)||isNaN(L))&&(T=D,L=C),u.push(T,L),c.push(D,C),f.push(r[S],r[S+1]),v.push(n[w],n[w+1]),p.push(e.getRawIndex(x.idx1));break;case"+":var A=x.idx,M=g.dataDimsForPoint,P=i.dataToPoint([e.get(M[0],A),e.get(M[1],A)]);w=A*2,u.push(P[0],P[1]),c.push(y[w],y[w+1]);var B=jy(g,i,e,A);f.push(B[0],B[1]),v.push(n[w],n[w+1]),p.push(e.getRawIndex(A));break;case"-":b=!1}b&&(h.push(x),d.push(d.length))}d.sort(function(et,ft){return p[et]-p[ft]});for(var R=u.length,k=Sn(R),H=Sn(R),I=Sn(R),F=Sn(R),O=[],_=0;_<d.length;_++){var W=d[_],j=_*2,X=W*2;k[j]=u[X],k[j+1]=u[X+1],H[j]=c[X],H[j+1]=c[X+1],I[j]=f[X],I[j+1]=f[X+1],F[j]=v[X],F[j+1]=v[X+1],O[_]=h[W]}return{current:k,next:H,stackedOnCurrent:I,stackedOnNext:F,status:O}}var ei=Math.min,ri=Math.max;function $i(t,e){return isNaN(t)||isNaN(e)}function $0(t,e,r,n,i,a,o,s,l){for(var u,c,f,v,h,d,p=r,g=0;g<n;g++){var m=e[p*2],y=e[p*2+1];if(p>=i||p<0)break;if($i(m,y)){if(l){p+=a;continue}break}if(p===r)t[a>0?"moveTo":"lineTo"](m,y),f=m,v=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){p+=a;continue}if(o>0){for(var b=p+a,S=e[b*2],w=e[b*2+1];S===m&&w===y&&g<n;)g++,b+=a,p+=a,S=e[b*2],w=e[b*2+1],m=e[p*2],y=e[p*2+1],_=m-u,x=y-c;var T=g+1;if(l)for(;$i(S,w)&&T<n;)T++,b+=a,S=e[b*2],w=e[b*2+1];var L=.5,D=0,C=0,A=void 0,M=void 0;if(T>=n||$i(S,w))h=m,d=y;else{D=S-u,C=w-c;var P=m-u,B=S-m,R=y-c,k=w-y,H=void 0,I=void 0;if(s==="x"){H=Math.abs(P),I=Math.abs(B);var F=D>0?1:-1;h=m-F*H*o,d=y,A=m+F*I*o,M=y}else if(s==="y"){H=Math.abs(R),I=Math.abs(k);var O=C>0?1:-1;h=m,d=y-O*H*o,A=m,M=y+O*I*o}else H=Math.sqrt(P*P+R*R),I=Math.sqrt(B*B+k*k),L=I/(I+H),h=m-D*o*(1-L),d=y-C*o*(1-L),A=m+D*o*L,M=y+C*o*L,A=ei(A,ri(S,m)),M=ei(M,ri(w,y)),A=ri(A,ei(S,m)),M=ri(M,ei(w,y)),D=A-m,C=M-y,h=m-D*H/I,d=y-C*H/I,h=ei(h,ri(u,m)),d=ei(d,ri(c,y)),h=ri(h,ei(u,m)),d=ri(d,ei(c,y)),D=m-h,C=y-d,A=m+D*I/H,M=y+C*I/H}t.bezierCurveTo(f,v,h,d,m,y),f=A,v=M}else t.lineTo(m,y)}u=m,c=y,p+=a}return g}var $y=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),jL=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:kt.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new $y},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&$i(i[o*2-2],i[o*2-1]);o--);for(;a<o&&$i(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=$0(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 v=a[f++],h=void 0,d=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(v){case o.M:s=a[f++],l=a[f++];break;case o.L:if(h=a[f++],d=a[f++],_=u?(r-s)/(h-s):(r-l)/(d-l),_<=1&&_>=0){var x=u?(d-l)*_+l:(h-s)*_+s;return u?[r,x]:[x,r]}s=h,l=d;break;case o.C:h=a[f++],d=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++];var b=u?nl(s,h,p,m,r,c):nl(l,d,g,y,r,c);if(b>0)for(var S=0;S<b;S++){var w=c[S];if(w<=1&&w>=0){var x=u?ke(l,d,g,y,w):ke(s,h,p,m,w);return u?[r,x]:[x,r]}}s=m,l=y;break}}},e}(jt),$L=function(t){ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}($y),XL=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 $L},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&&$i(i[s*2-2],i[s*2-1]);s--);for(;o<s&&$i(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=$0(r,i,o,s,s,1,n.smooth,l,n.connectNulls);$0(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},e}(jt);function Xy(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 v=t.getBaseAxis(),h=v.isHorizontal(),d=v.inverse;h?(d&&(f.shape.x+=l),f.shape.width=0):(d||(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 Uy(t,e,r){var n=t.getArea(),i=Re(n.r0,1),a=Re(n.r,1),o=new Hn({shape:{cx:Re(t.cx,1),cy:Re(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 UL(t,e,r,n,i){if(t){if(t.type==="polar")return Uy(t,e,r);if(t.type==="cartesian2d")return Xy(t,e,r,n,i)}else return null;return null}function X0(t,e){return t.type===e}function Yy(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function Zy(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 Ky(t,e){var r=Zy(t),n=r[0],i=r[1],a=Zy(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 Qy(t){return ne(t)?t:t?.5:0}function YL(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=Sn(n*2),a=0;a<n;a++){var o=jy(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=[],v=[];if(i){for(l=0;l<t.length;l+=2){var h=e||t;!isNaN(h[l])&&!isNaN(h[l+1])&&v.push(t[l],t[l+1])}t=v}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 d=(c[o]+f[o])/2,p=[];u[o]=p[o]=d,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 ZL(t,e){var r=[],n=t.length,i,a;function o(c,f,v){var h=c.coord,d=(v-h)/(f.coord-h),p=x6(d,[c.color,f.color]);return{coord:v,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 KL(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 v=ZL(u,i==="x"?r.getWidth():r.getHeight()),h=v.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 d=10,p=v[0].coord-d,g=v[h-1].coord+d,m=g-p;if(m<.001)return"transparent";z(v,function(_){_.offset=(_.coord-p)/m}),v.push({offset:h?v[h-1].offset:.5,color:f[1]||"transparent"}),v.unshift({offset:h?v[0].offset:.5,color:f[0]||"transparent"});var y=new hg(0,0,0,0,v,!0);return y[i]=p,y[i+"2"]=g,y}}function QL(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&JL(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 JL(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(W0.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function qL(t,e){return isNaN(t)||isNaN(e)}function tM(t){for(var e=t.length/2;e>0&&qL(t[e*2-2],t[e*2-1]);e--);return e-1}function Jy(t,e){return[t[e*2],t[e*2+1]]}function eM(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 qy(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(X0(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=qy(n)?function(h,d){t._endLabelOnDuring(h,d,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=Xy(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,v=Math.max(f.width,f.height);u?(f.y-=v,f.height+=v*2):(f.x-=v,f.width+=v*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."),Uy(e,r,n)}function rM(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 nM=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",v=this._coordSys,h=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=Wy(a,s,_),b=y&&YL(a,s,x),S=r.get("showSymbol"),w=r.get("connectNulls"),T=S&&!f&&QL(r,s,a),L=this._data;L&&L.eachItemGraphicEl(function(et,ft){et.__temp&&(o.remove(et),L.setItemGraphicEl(ft,null))}),S||h.remove(),o.add(g);var D=f?!1:r.get("step"),C;a&&a.getArea&&r.get("clip",!0)&&(C=a.getArea(),C.width!=null?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var A=KL(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&v.type===a.type&&D===this._step))S&&h.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(et){return[c[et*2],c[et*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,C),D&&(b&&(b=ni(b,c,a,D,w)),c=ni(c,null,a,D,w)),d=this._newPolyline(c),y?p=this._newPolygon(c,b):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,b):p&&!y&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,Ih(A));var M=g.getClipPath();if(M){var P=U0(this,a,!1,r);er(M,{shape:P.shape},r)}else g.setClipPath(U0(this,a,!0,r));S&&h.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(et){return[c[et*2],c[et*2+1]]}}),(!Yy(this._stackedOnPoints,b)||!Yy(this._points,c))&&(m?this._doUpdateAnimation(s,b,a,i,D,_,w):(D&&(b&&(b=ni(b,c,a,D,w)),c=ni(c,null,a,D,w)),d.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:b})))}var B=r.getModel("emphasis"),R=B.get("focus"),k=B.get("blurScope"),H=B.get("disabled");if(d.useStyle(Ft(l.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Ma(d,r,"lineStyle"),d.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var I=d.getState("emphasis").style;I.lineWidth=+d.style.lineWidth+1}oe(d).seriesIndex=r.seriesIndex,La(d,R,k,H);var F=Qy(r.get("smooth")),O=r.get("smoothMonotone");if(d.setShape({smooth:F,smoothMonotone:O,connectNulls:w}),p){var W=s.getCalculationInfo("stackedOnSeries"),j=0;p.useStyle(Ft(u.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(j=Qy(W.get("smooth"))),p.setShape({smooth:F,stackedOnSmooth:j,smoothMonotone:O,connectNulls:w}),Ma(p,r,"areaStyle"),oe(p).seriesIndex=r.seriesIndex,La(p,R,k,H)}var X=this._changePolyState;s.eachItemGraphicEl(function(et){et&&(et.onHoverStateChange=X)}),this._polyline.onHoverStateChange=X,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=c,this._step=D,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,d),p&&this.packEventData(r,p))},e.prototype.packEventData=function(r,n){oe(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 v=r.get("zlevel")||0,h=r.get("z")||0;u=new W0(o,s),u.x=c,u.y=f,u.setZ(v,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=v,d.z=h,d.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;H1(this._polyline,r),n&&H1(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new jL({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 XL({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,v=Dt(f)?f(null):f;r.eachItemGraphicEl(function(h,d){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,b=n.pointToCoord(g);a?(m=x.startAngle,y=x.endAngle,_=-b[1]/180*Math.PI):(m=x.r0,y=x.r,_=b[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=Dt(f)?f(d):c*w+v,L=p.getSymbolPath(),D=L.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:T}),L.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(qy(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=tM(l);c>=0&&(Pa(s,ka(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,v,h){return h!=null?zy(o,h):G0(o,f)},enableTextSetter:!0},rM(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"),v=i.hostModel,h=v.get("connectNulls"),d=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,b=(m?p:0)*(y?-1:1),S=(m?0:-p)*(y?-1:1),w=m?"x":"y",T=eM(f,x,w),L=T.range,D=L[1]-L[0],C=void 0;if(D>=1){if(D>1&&!h){var A=Jy(f,L[0]);u.attr({x:A[0]+b,y:A[1]+S}),o&&(C=v.getRawValue(L[0]))}else{var A=c.getPointOn(x,w);A&&u.attr({x:A[0]+b,y:A[1]+S});var M=v.getRawValue(L[0]),P=v.getRawValue(L[1]);o&&(C=C8(i,d,M,P,T.t))}a.lastFrameIndex=L[0]}else{var B=r===1||a.lastFrameIndex>0?L[0]:0,A=Jy(f,B);o&&(C=v.getRawValue(B)),u.attr({x:A[0]+b,y:A[1]+S})}if(o){var R=au(u);typeof R.setLabelText=="function"&&R.setLabelText(C)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,v=WL(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),h=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=ni(v.stackedOnCurrent,v.current,i,o,l),h=ni(v.current,null,i,o,l),g=ni(v.stackedOnNext,v.next,i,o,l),p=ni(v.next,null,i,o,l)),Ky(h,p)>3e3||c&&Ky(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=h;var m={shape:{points:p}};v.current!==h&&(m.shape.__points=v.next),u.stopAnimation(),Fe(u,m,f),c&&(c.setShape({points:h,stackedOnPoints:d}),c.stopAnimation(),Fe(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=v.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=r.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,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,D=y[T].ptIdx*2;L.x=w[D],L.y=w[D+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 Y0(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]),v=n.getDimensionIndex(s[1]);return l&&{progress:function(h,d){for(var p=h.end-h.start,g=o&&Sn(p*l),m=[],y=[],_=h.start,x=0;_<h.end;_++){var b=void 0;if(l===1){var S=c.get(f,_);b=i.dataToPoint(S,null,y)}else m[0]=c.get(f,_),m[1]=c.get(v,_),b=i.dataToPoint(m,null,y);o?(g[x++]=b[0],g[x++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var iM={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]}},aM=function(t){return Math.round(t.length/2)};function t5(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(),v=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/v);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 d=void 0;Lt(a)?d=iM[a]:Dt(a)&&(d=a),d&&e.setData(i.downSample(i.mapDimension(u.dim),1/h,d,aM))}}}}}function oM(t){t.registerChartView(nM),t.registerSeriesModel(zL),t.registerLayout(Y0("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,t5("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 Gu(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(v,h){if(v.type==="category"&&n!=null){var d=v.getTicksCoords(),p=v.getTickModel().get("alignWithLabel"),g=o[h],m=n[h]==="x1"||n[h]==="y1";if(m&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[h]=v.toGlobalCoord(v.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,b=0;b<d.length;b++){var S=d[b].coord,w=b===d.length-1?d[b-1].tickValue+x:d[b].tickValue;if(w===g){_=S;break}else if(w<g)y=S;else if(y!=null&&w>g){_=(S+y)/2;break}b===1&&(x=w-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[h]=v.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}(vr);vr.registerClass(Z0);var sM=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 Gu(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=Og(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:kt.color.primary,borderWidth:2}},realtimeSort:!1}),e}(Z0),lM=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}(),e5=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 lM},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,v=n.clockwise,h=Math.PI*2,d=v?f-c<h:c-f<h;d||(c=f-(v?h:-h));var p=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);d?(r.moveTo(p*o+i,g*o+a),r.arc(p*u+i,g*u+a,l,-Math.PI+c,c,!v)):r.moveTo(p*s+i,g*s+a),r.arc(i,a,s,c,f,!v),r.arc(m*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!v),o!==0&&r.arc(i,a,o,f,c,v)},e}(jt);function uM(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,v=u.r,h=u.r0,d=(v+h)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=r?Math.abs(v-h)/2:0,_=Math.cos,x=Math.sin,b=c+v*_(p),S=f+v*x(p),w="left",T="top";switch(s){case"startArc":b=c+(h-l)*_(m),S=f+(h-l)*x(m),w="center",T="top";break;case"insideStartArc":b=c+(h+l)*_(m),S=f+(h+l)*x(m),w="center",T="bottom";break;case"startAngle":b=c+d*_(p)+Qu(p,l+y,!1),S=f+d*x(p)+Ju(p,l+y,!1),w="right",T="middle";break;case"insideStartAngle":b=c+d*_(p)+Qu(p,-l+y,!1),S=f+d*x(p)+Ju(p,-l+y,!1),w="left",T="middle";break;case"middle":b=c+d*_(m),S=f+d*x(m),w="center",T="middle";break;case"endArc":b=c+(v+l)*_(m),S=f+(v+l)*x(m),w="center",T="bottom";break;case"insideEndArc":b=c+(v-l)*_(m),S=f+(v-l)*x(m),w="center",T="top";break;case"endAngle":b=c+d*_(g)+Qu(g,l+y,!0),S=f+d*x(g)+Ju(g,l+y,!0),w="left",T="middle";break;case"insideEndAngle":b=c+d*_(g)+Qu(g,-l+y,!0),S=f+d*x(g)+Ju(g,-l+y,!0),w="right",T="middle";break;default:return bl(n,i,a)}return n=n||{},n.x=b,n.y=S,n.align=w,n.verticalAlign=T,n}}function cM(t,e,r,n){if(ne(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 ms(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 fM(t,e){var r=t.getArea&&t.getArea();if(X0(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 hM=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 v=r.isAnimationEnabled()?r:null,h=vM(r,u);h&&this._enableRealtimeSort(h,s,i);var d=r.get("clip",!0)||h,p=fM(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],b=this._backgroundEls,S=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function T(C){var A=qu[u.type](s,C);if(!A)return null;var M=xM(u,f,A);return M.useStyle(y.getItemStyle()),u.type==="cartesian2d"?M.setShape("r",_):M.setShape("cornerRadius",_),x[C]=M,M}s.diff(l).add(function(C){var A=s.getItemModel(C),M=qu[u.type](s,C,A);if(M&&(m&&T(C),!(!s.hasValue(C)||!o5[u.type](M)))){var P=!1;d&&(P=r5[u.type](p,M));var B=n5[u.type](r,s,C,M,f,v,c.model,!1,g);h&&(B.forceLabelAnimation=!0),l5(B,s,C,A,M,r,f,u.type==="polar"),S?B.attr({shape:M}):h?i5(h,v,B,M,C,f,!1,!1):er(B,{shape:M},r,C),s.setItemGraphicEl(C,B),o.add(B),B.ignore=P}}).update(function(C,A){var M=s.getItemModel(C),P=qu[u.type](s,C,M);if(P){if(m){var B=void 0;b.length===0?B=T(A):(B=b[A],B.useStyle(y.getItemStyle()),u.type==="cartesian2d"?B.setShape("r",_):B.setShape("cornerRadius",_),x[C]=B);var R=qu[u.type](s,C),k=h5(f,R,u);Fe(B,{shape:k},v,C)}var H=l.getItemGraphicEl(A);if(!s.hasValue(C)||!o5[u.type](P)){o.remove(H);return}var I=!1;d&&(I=r5[u.type](p,P),I&&o.remove(H));var F=H&&(H.type==="sector"&&g||H.type==="sausage"&&!g);if(F&&(H&&Fo(H,r,A),H=null),H?Ho(H):H=n5[u.type](r,s,C,P,f,v,c.model,!0,g),h&&(H.forceLabelAnimation=!0),w){var O=H.getTextContent();if(O){var W=au(O);W.prevValue!=null&&(W.prevValue=W.value)}}else l5(H,s,C,M,P,r,f,u.type==="polar");S?H.attr({shape:P}):h?i5(h,v,H,P,C,f,!0,w):Fe(H,{shape:P},r,C,null),s.setItemGraphicEl(C,H),H.ignore=I,o.add(H)}}).remove(function(C){var A=l.getItemGraphicEl(C);A&&Fo(A,r,C)}).execute();var L=this._backgroundGroup||(this._backgroundGroup=new ye);L.removeAll();for(var D=0;D<x.length;++D)L.add(x[D]);o.add(L),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),c5(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),c5(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&UL(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){Fo(a,r,oe(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),r5={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}},n5={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?e5:Hn,c=new u({shape:n,z2:1});c.name="item";var f=s5(i);if(c.calculateTextPosition=uM(f,{isRoundCap:u===e5}),a){var v=c.shape,h=i?"r":"endAngle",d={};v[h]=i?n.r0:n.startAngle,d[h]=n[h],(s?Fe:er)(c,{shape:d},a)}return c}};function vM(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 i5(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 a5(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var dM=["x","y","width","height"],pM=["cx","cy","r","startAngle","endAngle"],o5={cartesian2d:function(t){return!a5(t,dM)},polar:function(t){return!a5(t,pM)}},qu={cartesian2d:function(t,e,r){var n=t.getItemLayout(e);if(!n)return null;var i=r?mM(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 gM(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function s5(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 l5(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=ms(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 v=n.getShallow("cursor");v&&t.attr("cursor",v);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",d=ka(n);Pa(t,d,{labelFetcher:a,labelDataIndex:r,defaultText:G0(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,cM(t,g==="outside"?h:g,s5(o),n.get(["label","rotate"]))}Xx(p,d,a.getRawValue(r),function(y){return zy(e,y)});var m=n.getModel(["emphasis"]);La(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ma(t,n),gM(i)&&(t.style.fill="none",t.style.stroke="none",z(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function mM(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 yM=function(){function t(){}return t}(),u5=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 yM},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}(jt);function c5(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 u5({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 u5({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,oe(f).seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",f5),f.on("mousemove",f5)),r&&r.push(f)}var f5=W2(function(t){var e=this,r=_M(e,t.offsetX,t.offsetY);oe(e).dataIndex=r>=0?r:null},30,!1);function _M(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 v=c*3;if(l[n]=u,l[i]=a[v+2],s[n]=a[v+n],s[i]=a[v+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 h5(t,e,r){if(X0(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 xM(t,e,r){var n=t.type==="polar"?Hn:_e;return new n({shape:h5(e,r,t),silent:!0,z2:0})}function bM(t){t.registerChartView(hM),t.registerSeriesModel(sM),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,or(UT,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,YT("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,t5("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 SM(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=Cb(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,v=-n.get("startAngle")*tc,h=n.get("endAngle"),d=n.get("padAngle")*tc;h=h==="auto"?v-v5:-h*tc;var p=n.get("minAngle")*tc,g=p+d,m=0;i.each(a,function(k){!isNaN(k)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,x=n.get("clockwise"),b=n.get("roseType"),S=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var T=x?1:-1,L=[v,h],D=T*d/2;y1(L,!x),v=L[0],h=L[1];var C=d5(n);C.startAngle=v,C.endAngle=h,C.clockwise=x,C.cx=s,C.cy=l,C.r=u,C.r0=c;var A=Math.abs(h-v),M=A,P=0,B=v;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(k,H){var I;if(isNaN(k)){i.setItemLayout(H,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:c,r:b?NaN:u});return}b!=="area"?I=y===0&&S?_:k*_:I=A/m,I<g?(I=g,M-=g):P+=k;var F=B+T*I,O=0,W=0;d>I?(O=B+T*I/2,W=O):(O=B+D,W=F-D),i.setItemLayout(H,{angle:I,startAngle:O,endAngle:W,clockwise:x,cx:s,cy:l,r0:c,r:b?Lf(k,w,[c,u]):u}),B=F}),M<v5&&m)if(M<=.001){var R=A/m;i.each(a,function(k,H){if(!isNaN(k)){var I=i.getItemLayout(H);I.angle=R;var F=0,O=0;R<d?(F=v+T*(H+1/2)*R,O=F):(F=v+T*H*R+D,O=v+T*(H+1)*R-D),I.startAngle=F,I.endAngle=O}})}else _=M/P,B=v,i.each(a,function(k,H){if(!isNaN(k)){var I=i.getItemLayout(H),F=I.angle===g?g:k*_,O=0,W=0;F<d?(O=B+T*F/2,W=O):(O=B+D,W=B+T*F-D),I.startAngle=O,I.endAngle=W,B+=T*F}})})}var d5=ve();function p5(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 wM=Math.PI/180;function g5(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),b=n+_.len,S=b*b,w=Math.sqrt(Math.abs((1-x*x/m)*S)),T=e+(w+_.len2)*i,L=T-_.label.x,D=_.targetTextWidth-L*i;m5(_,D,!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,b=Math.abs(_.label.y-r);if(b>=x.maxY){var S=_.label.x-e-_.len2*i,w=n+_.len,T=Math.abs(S)<w?Math.sqrt(b*b/(1-S*S/w/w)):w;x.rB=T,x.maxY=b}x.list.push(_)}c(g),c(m)}for(var v=t.length,h=0;h<v;h++)if(t[h].position==="outer"&&t[h].labelAlignTo==="labelLine"){var d=t[h].label.x-u;t[h].linePoints[1][0]+=d,t[h].label.x=u}BL(t,1,l,l+o)&&f(t)}function TM(t,e,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,v=0;v<t.length;v++){var h=t[v].label;J0(t[v])||(h.x<e?(c=Math.min(c,h.x),l.push(t[v])):(f=Math.max(f,h.x),u.push(t[v])))}for(var v=0;v<t.length;v++){var d=t[v];if(!J0(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var h=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?h.x<e?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+i-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?h.x<e?g=c-o-d.bleedMargin:g=o+i-f-d.bleedMargin:h.x<e?g=h.x-o-d.bleedMargin:g=o+i-h.x-d.bleedMargin,d.targetTextWidth=g,m5(d,g,!1)}}g5(u,e,r,n,1,i,a,o,s,f),g5(l,e,r,n,-1,i,a,o,s,c);for(var v=0;v<t.length;v++){var d=t[v];if(!J0(d)&&d.linePoints){var h=d.label,p=d.linePoints,m=d.labelAlignTo==="edge",y=h.style.padding,_=y?y[1]+y[3]:0,x=h.style.backgroundColor?0:_,b=d.rect.width+x,S=p[1][0]-p[2][0];m?h.x<e?p[2][0]=o+d.edgeDistance+b+d.labelDistance:p[2][0]=o+i-d.edgeDistance-b-d.labelDistance:(h.x<e?p[2][0]=h.x+d.labelDistance:p[2][0]=h.x-d.labelDistance,p[1][0]=p[2][0]+S),p[1][1]=p[2][1]=h.y}}}function m5(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 v=e-l,h=e<c?v:r?v>t.unconstrainedWidth?null:v:null;n.setStyle("width",h)}y5(a,n)}}}function y5(t,e){_5.rect=t,Iy(_5,e,LM)}var LM={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},_5={};function J0(t){return t.position==="center"}function MM(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*wM,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,v=s.height;function h(S){S.ignore=!0}function d(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(),D=w.getTextGuideLine(),C=e.getItemModel(S),A=C.getModel("label"),M=A.get("position")||C.get(["emphasis","label","position"]),P=A.get("distanceToLabelLine"),B=A.get("alignTo"),R=ae(A.get("edgeDistance"),u),k=A.get("bleedMargin");k==null&&(k=Math.min(u,v)>200?10:2);var H=C.getModel("labelLine"),I=H.get("length");I=ae(I,u);var F=H.get("length2");if(F=ae(F,u),Math.abs(T.endAngle-T.startAngle)<o){z(L.states,h),L.ignore=!0,D&&(z(D.states,h),D.ignore=!0);return}if(d(L)){var O=(T.startAngle+T.endAngle)/2,W=Math.cos(O),j=Math.sin(O),X,et,ft,gt;n=T.cx,i=T.cy;var Y=M==="inside"||M==="inner";if(M==="center")X=T.cx,et=T.cy,gt="center";else{var U=(Y?(T.r+T.r0)/2*W:T.r*W)+n,q=(Y?(T.r+T.r0)/2*j:T.r*j)+i;if(X=U+W*3,et=q+j*3,!Y){var tt=U+W*(I+l-T.r),nt=q+j*(I+l-T.r),at=tt+(W<0?-1:1)*F,st=nt;B==="edge"?X=W<0?c+R:c+u-R:X=at+(W<0?-P:P),et=st,ft=[[U,q],[tt,nt],[at,st]]}gt=Y?"center":B==="edge"?W>0?"right":"left":W>0?"left":"right"}var Et=Math.PI,K=0,J=A.get("rotate");if(ne(J))K=J*(Et/180);else if(M==="center")K=0;else if(J==="radial"||J===!0){var _t=W<0?-O+Et:-O;K=_t}else if(J==="tangential"&&M!=="outside"&&M!=="outer"){var mt=Math.atan2(W,j);mt<0&&(mt=Et*2+mt);var xt=j>0;xt&&(mt=Et+mt),K=mt-Et}if(a=!!K,L.x=X,L.y=et,L.rotation=K,L.setStyle({verticalAlign:"middle"}),Y){L.setStyle({align:gt});var G=L.states.select;G&&(G.x+=L.x,G.y+=L.y)}else{var $=new It(0,0,0,0);y5($,L),r.push({label:L,labelLine:D,position:M,len:I,len2:F,minTurnAngle:H.get("minTurnAngle"),maxSurfaceAngle:H.get("maxSurfaceAngle"),surfaceNormal:new Pt(W,j),linePoints:ft,textAlign:gt,labelDistance:P,labelAlignTo:B,edgeDistance:R,bleedMargin:k,rect:$,unconstrainedWidth:$.width,labelStyleWidth:L.style.width})}w.setTextConfig({inside:Y})}}),!a&&t.get("avoidLabelOverlap")&&TM(r,n,i,l,u,v,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 b=g.linePoints;_||!b?(z(y.states,h),y.ignore=!0):(DL(b,g.minTurnAngle),AL(b,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new Pt(b[0][0],b[0][1])})}}}var CM=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(ms(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var v=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):v==="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 Ho(o),Fe(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),Ma(o,l);var h=(c.startAngle+c.endAngle)/2,d=s.get("selectedOffset"),p=Math.cos(h)*d,g=Math.sin(h)*d,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)},ms(u.getModel("itemStyle"),c)),ot(o.ensureState("select"),{x:p,y:g,shape:ms(l.getModel(["select","itemStyle"]),c)}),ot(o.ensureState("blur"),{shape:ms(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,ka(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 v=o.get(["label","position"]);if(v!=="outside"&&v!=="outer")a.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new Pi,this.setTextGuideLine(h)),kL(this,RL(o),{stroke:u,opacity:cn(s.get(["lineStyle","opacity"]),c,1)})}},e}(Hn),EM=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 v=d5(r),h=new Hn({shape:zt(v)});h.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(d){var p=new CM(o,d,u);o.setItemGraphicEl(d,p),l.add(p)}).update(function(d,p){var g=s.getItemGraphicEl(p);g.updateData(o,d,u),g.off("click"),l.add(g),o.setItemGraphicEl(d,g)}).remove(function(d){var p=s.getItemGraphicEl(d);Fo(p,r,d)}).execute(),MM(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 x5(t,e,r){e=bt(e)&&{coordDimensions:e}||ot({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=ry(n,e).dimensions,a=new ey(i,t);return a.initData(n,r),a}var b5=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}(),DM=ve(),S5=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 b5(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 x5(this,{coordDimensions:["value"],encodeDefaulter:or(Ob,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=DM(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=o8(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}(vr);xb({fullType:S5.type,getCoord2:function(t){return t.getShallow("center")}});function AM(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!(ne(o)&&!isNaN(o)&&o<0)})}}}function PM(t){t.registerChartView(EM),t.registerSeriesModel(S5),cw("pie",t.registerAction),t.registerLayout(or(SM,"pie")),t.registerProcessor(p5("pie")),t.registerProcessor(AM("pie"))}var kM=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 Gu(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:kt.color.primary}},universalTransition:{divideShape:"clone"}},e}(vr),w5=4,RM=function(){function t(){}return t}(),NM=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 RM},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]<w5,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var v=i[f++],h=i[f++];isNaN(v)||isNaN(h)||c&&!c.contain(v,h)||(s.x=v-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,v=a[c+1]-l/2;if(r>=f&&n>=v&&r<=f+s&&n<=v+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,v=0;v<i.length;){var h=i[v++],d=i[v++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(d,u),f=Math.max(d,f)}r=this._rect=new It(l-o/2,u-s/2,c-l+o,f-u+s)}return r},e}(jt),OM=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 NM({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]<w5;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=oe(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}(),IM=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=Y0("").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 OM: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),T5={left:0,right:0,top:0,bottom:0},ec=["25%","25%"],BM=function(t){ht(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&&$n(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&$n(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:T5,outerBoundsContain:"all",outerBoundsClampWidth:ec[0],outerBoundsClampHeight:ec[1],backgroundColor:kt.color.transparent,borderWidth:1,borderColor:kt.color.neutral30},e}(qt),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}(qt);Rr(q0,xy);var L5={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:kt.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:kt.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:kt.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[kt.color.backgroundTint,kt.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:kt.color.neutral00,borderColor:kt.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},VM=ee({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},L5),tv=ee({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:kt.color.axisMinorSplitLine,width:1}}},L5),zM=ee({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},tv),FM=Ft({logBase:10},tv);const M5={category:VM,value:tv,time:zM,log:FM};var HM={value:1,category:1,time:1,log:1},GM=null;function C5(){return GM}function E5(t,e,r,n){z(HM,function(i,a){var o=ee(ee({},M5[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 v=Zo(this),h=v?Ko(c):{},d=f.getTheme();ee(c,d.get(a+"Axis")),ee(c,this.getDefaultOption()),c.type=D5(c),v&&$n(c,h,v)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=k0.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=C5();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",D5)}function D5(t){return t.type||(t.data?"category":"value")}var WM=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}(),ev=["x","y"];function A5(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var jM=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=ev,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,v=o[0]-i[0]*c,h=o[1]-a[0]*f,d=this._transform=[c,0,0,f,v,h];this._invTransform=co([],d)}}},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}(WM),$M=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}(Ay),XM="expandAxisBreak",ii=Math.PI,UM=[[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]],ys=ve(),P5=ve(),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 ZM(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=nv(t.axisName)&&Ya(t.nameLocation);z(n,function(d){var p=ti(d);if(!(!p||p.label.ignore)){o.push(p);var g=a.transGroup;l&&(g.transform?co(_s,g.transform):Bc(_s),p.transform&&uo(_s,_s,p.transform),It.copy(rc,p.localRect),rc.applyTransform(_s),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(d,p){return Math.abs(d.label[u]-c)-Math.abs(p.label[u]-c)}),l&&s){var f=i.getExtent(),v=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-v;s.union(new It(v,0,h,1))}a.stOccupiedRect=s,a.labelInfoList=o}var _s=Pn(),rc=new It(0,0,0,0),R5=function(t,e,r,n,i,a){if(Ya(t.nameLocation)){var o=a.stOccupiedRect;o&&N5(OL({},o,a.transGroup.transform),n,i)}else O5(a.labelInfoList,a.dirVec,n,i)};function N5(t,e,r){var n=new Pt;H0(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&IL(e,n)}function O5(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||N5(s,r,n)}}var Xi=function(){function t(e,r,n,i){this.group=new ye,this._axisModel=e,this._api=r,this._local={},this._shared=i||new k5(R5),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:nv(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(KM,function(i){e[i]&&QM[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}(),KM=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],QM={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],v=[u[1],0],h=f[0]>v[0];c&&(gr(f,f,c),gr(v,v,c));var d=ot({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())C5().buildAxisBreakLine(n,i,a,p);else{var g=new Gn(ot({shape:{x1:f[0],y1:f[1],x2:v[0],y2:v[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)||ne(y))&&(y=[y,y]);var _=rm(n.get(["axisLine","symbolOffset"])||0,y),x=y[0],b=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]-v[0])*(f[0]-v[0])+(f[1]-v[1])*(f[1]-v[1]))}],function(S,w){if(m[w]!=="none"&&m[w]!=null){var T=Un(m[w],-x/2,-b/2,x,b,d.stroke,!0),L=S.r+S.offset,D=h?v:f;T.attr({rotation:S.rotate,x:D[0]+L*Math.cos(t.rotation),y:D[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=V5(e,i,s);u&&I5(t,e,r,n,i,a,o,Gr.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=V5(e,i,s);u&&I5(t,e,r,n,i,a,o,Gr.determine);var c=eC(t,i,a,n);tC(t,e.labelLayoutList,c),rC(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(nv(c)){var f=t.nameLocation,v=t.nameDirection,h=n.getModel("nameTextStyle"),d=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*d,y.x=-g):f==="end"?(m.x=p[1]+g*d,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+v*d,y.y=v);var _=Pn();y.transform(jd(_,_,t.rotation));var x=n.get("nameRotate");x!=null&&(x=x*ii/180);var b,S;Ya(f)?b=Xi.innerTextLayout(t.rotation,x??t.rotation,v):(b=JM(t.rotation,f,x||0,p),S=t.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var w=h.getFont(),T=n.get("nameTruncate",!0)||{},L=T.ellipsis,D=aa(t.raw.nameTruncateMaxWidth,T.maxWidth,S),C=s.nameMarginLevel||0,A=new fr({x:m.x,y:m.y,rotation:b.rotation,silent:Xi.isLabelSilent(n),style:jo(h,{text:c,font:w,overflow:"truncate",width:D,ellipsis:L,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(eu({el:A,componentModel:n,itemName:c}),A.__fullText=c,A.anid="name",n.get("triggerEvent")){var M=Xi.makeAxisEventDataBase(n);M.targetType="axisName",M.name=c,oe(A).eventData=M}a.add(A),A.updateTransform(),e.nameEl=A;var P=l.nameLayout=ti({label:A,priority:A.z2,defaultAttr:{ignore:A.ignore},marginDefault:Ya(f)?UM[C]:YM[C]});if(l.nameLocation=f,i.add(A),A.decomposeTransform(),t.shouldNameMoveOverlap&&P){var B=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&wt(B.labelInfoList),r.resolveAxisNameOverlap(t,r,n,P,y,B)}}}};function I5(t,e,r,n,i,a,o,s){z5(e)||nC(t,e,i,s,n,o);var l=e.labelLayoutList;iC(t,n,l,a),t.rotation;var u=t.optionHideOverlap;qM(n,l,u),u&&VL(Se(l,function(c){return c&&!c.label.ignore})),ZM(t,r,n,l)}function JM(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 qM(t,e,r){if(yy(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){xs(c.label);return}if(f.suggestIgnore){xs(f.label);return}var v=.1;if(!r){var h=[0,0,0,0];c=By({marginForce:h},c),f=By({marginForce:h},f)}H0(c,f,null,{touchThreshold:v})&&xs(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 tC(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=P5(a),s=ys(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){xs(a);return}}})}function xs(t){t&&(t.ignore=!0)}function B5(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 Gn({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=P5(c);f.onBand=!!t[l].onBand,f.tickValue=t[l].tickValue}return a}function eC(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=B5(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 rC(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 v=B5(s[f],r.transform,u,c,"minorticks_"+f),h=0;h<v.length;h++)e.add(v[h])}}function V5(t,e,r){if(z5(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),rv(t,null,null,null))}return!0}function nC(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()){rv(e,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),v=(aa(t.raw.labelRotate,c.get("rotate"))||0)*ii/180,h=Xi.innerTextLayout(t.rotation,v,t.labelDirection),d=i.getCategories&&i.getCategories(!0),p=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;z(f,function(x,b){var S,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(x.tickValue):x.tickValue,T=x.formattedLabel,L=x.rawLabel,D=c;if(d&&d[w]){var C=d[w];Mt(C)&&C.textStyle&&(D=new Te(C.textStyle,c,i.ecModel))}var A=D.getTextColor()||i.get(["axisLine","lineStyle","color"]),M=D.getShallow("align",!0)||h.textAlign,P=St(D.getShallow("alignMinLabel",!0),M),B=St(D.getShallow("alignMaxLabel",!0),M),R=D.getShallow("verticalAlign",!0)||D.getShallow("baseline",!0)||h.textVerticalAlign,k=St(D.getShallow("verticalAlignMinLabel",!0),R),H=St(D.getShallow("verticalAlignMaxLabel",!0),R),I=10+(((S=x.time)===null||S===void 0?void 0:S.level)||0);m=Math.min(m,I),y=Math.max(y,I);var F=new fr({x:0,y:0,rotation:0,silent:Xi.isLabelSilent(i),z2:I,style:jo(D,{text:T,align:b===0?P:b===f.length-1?B:M,verticalAlign:b===0?k:b===f.length-1?H:R,fill:Dt(A)?A(o.type==="category"?L:o.type==="value"?w+"":w,b):A})});F.anid="label_"+w;var O=ys(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:b}}),g){var W=Xi.makeAxisEventDataBase(i);W.targetType="axisLabel",W.value=L,W.tickIndex=b,x.break&&(W.break={start:x.break.parsedBreak.vmin,end:x.break.parsedBreak.vmax}),o.type==="category"&&(W.dataIndex=w),oe(F).eventData=W,x.break&&oC(i,a,F,x.break)}p.push(F),l.add(F)});var _=yt(p,function(x){return{label:x,priority:ys(x).break?x.z2+(y-m+1):x.z2,defaultAttr:{ignore:x.ignore}}});rv(e,_,l,u)}function z5(t){return!!t.labelLayoutList}function rv(t,e,r,n){t.labelLayoutList=e,t.labelGroup=r,t.axisLabelsCreationContext=n}function iC(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=ys(l);s.suggestIgnore=l.ignore,l.ignore=!1,_l(wn,aC),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,aC=new _e;function nv(t){return!!t}function oC(t,e,r,n){r.on("click",function(i){var a={type:XM,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(a)})}function eP(t,e,r){}const F5=Xi;function H5(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,v=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var h=a.toGlobalCoord(a.dataToCoord(0));v[c.onZero]=Math.max(Math.min(h,v[1]),v[0])}i.position=[l==="y"?v[c[s]]:u[0],l==="x"?v[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=d[o],i.labelOffset=a?v[c[o]]-v[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 sC(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 lC(t,e,r,n,i,a){for(var o=H5(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 F5(r,n,o,i)}function uC(t,e,r){var n=H5(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 W5(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=py(t,e),c=u.extent,f=u.fixMin,v=u.fixMax;t.type==="log"&&(c=P0(t.base,c,!0)),t.setBreaksFromOption(_y(e)),t.setExtent(c[0],c[1]),t.calcNiceExtent({splitNumber:s,fixMin:f,fixMax:v});var h=i.getExtent.call(t);f&&(c[0]=h[0]),v&&(c[1]=h[1]);var d=i.getInterval.call(t),p=c[0],g=c[1];if(f&&v)d=(g-p)/s;else if(f)for(g=c[0]+d*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)d=D0(d),g=c[0]+d*s;else if(v)for(p=c[1]-d*s;p>c[0]&&isFinite(p)&&isFinite(c[0]);)d=D0(d),p=c[1]-d*s;else{var m=t.getTicks().length-1;m>s&&(d=D0(d));var y=d*s;g=Math.ceil(c[1]/d)*d,p=Re(g-y),p<0&&c[0]>=0?(p=0,g=Re(y)):g>0&&c[1]<=0&&(g=0,p=-Re(y))}var _=(a[0].value-o[0].value)/l,x=(a[s].value-o[s].value)/l;if(i.setExtent.call(t,p+d*_,g+d*x),i.setInterval.call(t,d),(_||x)&&i.setNiceExtent.call(t,p+d,g-d),process.env.NODE_ENV!=="production"){var b=i.getTicks.call(t);b[1]&&(!IT(d)||Cf(b[1].value)>Cf(d))&&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 j5=[[3,1],[0,2]],cC=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ev,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 v=+l[f],h=o[v],d=h.model,p=h.scale;E0(p)&&d.get("alignTicks")&&d.get("interval")==null?c.push(h):(gy(p,d),E0(p)&&(s=h))}c.length&&(s||(s=c.pop(),gy(s.scale,s.model)),z(c,function(g){W5(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};z(n.x,function(o){$5(n,"y",o,a)}),z(n.y,function(o){$5(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(av(o,a),!n){var u=hC(a,s,o,l,r),c=void 0;if(l)Y5?(Y5(this._axesList,a),av(o,a)):(process.env.NODE_ENV!=="production"&&Yp("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=Z5(a.clone(),"axisLabel",null,a,o,u,i));else{var f=vC(e,a,i),v=f.outerBoundsRect,h=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;v&&(c=Z5(v,h,d,a,o,u,i))}K5(a,o,Gr.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,re(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(v,h){var d="x"+f+"y"+h,p=new jM(d);p.master=i,p.model=e,i._coordsMap[d]=p,i._coordsList.push(p),p.addAxis(c),p.addAxis(v)})});function u(c){return function(f,v){if(iv(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 d=new $M(c,hL(f),[0,0],f.get("type"),h),p=d.type==="category";d.onBand=p&&f.get("boundaryGap"),d.inverse=f.get("inverse"),f.axis=d,d.model=f,d.grid=a,d.index=v,a._axesList.push(d),s[c][v]=d,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(sC(i)){var a=G5(i),o=a.xAxisModel,s=a.yAxisModel;if(!iv(o,r)||!iv(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(dL(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);re(r,a)<0&&r.push(a),re(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){wb({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=ev,t}();function iv(t,e){return t.getCoordSysModel()===e}function $5(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)X5(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&X5(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function X5(t){return t&&t.type!=="category"&&t.type!=="time"&&vL(t)}function fC(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 av(t,e){z(t.x,function(r){return U5(r,e.x,e.width)}),z(t.y,function(r){return U5(r,e.y,e.height)})}function U5(t,e,r){var n=[0,r],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),fC(t,e)}var Y5;function Z5(t,e,r,n,i,a,o){process.env.NODE_ENV!=="production"&&wt(e==="all"||e==="axisLabel"),K5(n,i,Gr.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=kd(s,function(v){return v>0})==null;return tu(n,s,!0,!0,r),av(i,n),l;function u(v){z(i[Wn[v]],function(h){if(ps(h.model)){var d=a.ensureRecord(h.model),p=d.labelInfoList;if(p)for(var g=0;g<p.length;g++){var m=p[g],y=h.scale.normalize(ys(m.label).tickValue);y=v===1?1-y:y,c(m.rect,v,y),c(m.rect,1-v,NaN)}var _=d.nameLayout;if(_){var y=Ya(d.nameLocation)?.5:NaN;c(_.rect,v,y),c(_.rect,1-v,NaN)}}})}function c(v,h,d){var p=t[Wn[h]]-v[Wn[h]],g=v[Aa[h]]+v[Wn[h]]-(t[Aa[h]]+t[Wn[h]]);p=f(p,1-d),g=f(g,d);var m=j5[h][0],y=j5[h][1];s[m]=ur(s[m],p),s[y]=ur(s[y],g)}function f(v,h){return v>0&&!ia(h)&&h>1e-4&&(v/=h),v}}function hC(t,e,r,n,i){var a=new k5(dC);return z(r,function(o){return z(o,function(s){if(ps(s.model)){var l=!n;s.axisBuilder=lC(t,e,s.model,i,a,l)}})}),a}function K5(t,e,r,n,i,a){var o=r===Gr.determine;z(e,function(u){return z(u,function(c){ps(c.model)&&(uC(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[Wn[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){ps(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function vC(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)||T5,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&Jt("Invalid grid["+t.componentIndex+"].outerBoundsMode.");var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":re(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&Jt("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 dC=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";R5(t,e,r,n,i,a),Ya(t.nameLocation)||z(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&O5(s.labelInfoList,s.dirVec,n,i)})};function pC(t){var e=Q5(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=mC(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 Q5(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[yC(t)]}function gC(t){var e=Q5(t);return e&&e.axisPointerModel}function mC(t){return!!t.get(["handle","show"])}function yC(t){return t.type+"||"+t.id}var ov={},_C=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&&pC(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=gC(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"&&ov[r])throw new Error("axisPointer "+r+" exists");ov[r]=n},e.getAxisPointerClass=function(r){return r&&ov[r]},e.type="axis",e}(xn),sv=ve();function xC(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=sv(t).splitAreaColors,v=Ot(),h=0;if(f)for(var d=0;d<u.length;d++){var p=f.get(u[d].tickValue);if(p!=null){h=(p+(c-1)*d)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=bt(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_=void 0,x=void 0,b=void 0,S=void 0;i.isHorizontal()?(_=g,x=l.y,b=y-_,S=l.height,g=_+b):(_=l.x,x=g,b=l.width,S=y-x,g=x+S);var w=u[d-1].tickValue;w!=null&&v.set(w,h),e.add(new _e({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:b,height:S},style:Ft({fill:s[h]},m),autoBatch:!0,silent:!0})),h=(h+1)%c}sv(t).splitAreaColors=v}}}function bC(t){sv(t).splitAreaColors=null}var SC=["splitArea","splitLine","minorSplitLine","breakArea"],J5=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),!!ps(r)){this._axisGroup.add(r.axis.axisBuilder.group),z(SC,function(l){r.get([l,"show"])&&wC[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||xg(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){bC(this)},e.type="cartesianAxis",e}(_C),wC={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(),v=a.isHorizontal(),h=0,d=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],m=s.getLineStyle(),y=0;y<d.length;y++){var _=a.toGlobalCoord(d[y].coord);if(!(y===0&&!u||y===d.length-1&&!c)){var x=d[y].tickValue;v?(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 b=h++%l.length,S=new Gn({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[b]},m),silent:!0});Go(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=[],v=[],h=s.getLineStyle(),d=0;d<c.length;d++)for(var p=0;p<c[d].length;p++){var g=a.toGlobalCoord(c[d][p].coord);u?(f[0]=g,f[1]=l.y,v[0]=g,v[1]=l.y+l.height):(f[0]=l.x,f[1]=g,v[0]=l.x+l.width,v[1]=g);var m=new Gn({anid:"minor_line_"+c[d][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:v[0],y2:v[1]},style:h,silent:!0});Go(m.shape,h.lineWidth),e.add(m)}},splitArea:function(t,e,r,n,i){xC(t,e,r,n)},breakArea:function(t,e,r,n,i){r.axis.scale}},q5=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}(J5),TC=function(t){ht(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=q5.type,r}return e.type="yAxis",e}(J5),LC=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),t_={offset:0};function MC(t){t.registerComponentView(LC),t.registerComponentModel(BM),t.registerCoordinateSystem("cartesian2d",cC),E5(t,"x",q0,t_),E5(t,"y",q0,t_),t.registerComponentView(q5),t.registerComponentView(TC),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function CC(t){ji(MC),t.registerSeriesModel(kM),t.registerChartView(IM),t.registerLayout(Y0("scatter"))}function EC(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]=e_(c)?c:r_(i)})}),r.each(function(o){var s=kd(n[o],function(l){return e_(l)})||r_(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function e_(t){return!isNaN(t[0])&&!isNaN(t[1])}function r_(t){return[t.cx,t.cy]}function DC(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 AC=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(v,h){var d=v.getItemVisual(h,"symbol")||"circle";if(d!=="none"){var p=em(v.getItemVisual(h,"symbolSize")),g=Un(d,-1,-1,2,2),m=v.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(v,h,d,p,g,m){d.removeAll();for(var y=0;y<h.length-1;y++){var _=u(p,g);_&&(_.__dimIdx=y,v[y]?(_.setPosition(v[y]),Hx[m?"initProps":"updateProps"](_,{x:h[y][0],y:h[y][1]},r,g)):_.setPosition(h[y]),d.add(_))}}function f(v){return yt(v,function(h){return[a.cx,a.cy]})}s.diff(l).add(function(v){var h=s.getItemLayout(v);if(h){var d=new Vo,p=new Pi,g={shape:{points:h}};d.shape.points=f(h),p.shape.points=f(h),er(d,g,r,v),er(p,g,r,v);var m=new ye,y=new ye;m.add(p),m.add(d),m.add(y),c(p.shape.points,h,y,s,v,!0),s.setItemGraphicEl(v,m)}}).update(function(v,h){var d=l.getItemGraphicEl(h),p=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y={shape:{points:s.getItemLayout(v)}};y.shape.points&&(c(p.shape.points,y.shape.points,m,s,v,!1),Ho(g),Ho(p),Fe(p,y,r),Fe(g,y,r),s.setItemGraphicEl(v,d))}).remove(function(v){o.remove(l.getItemGraphicEl(v))}).execute(),s.eachItemGraphicEl(function(v,h){var d=s.getItemModel(h),p=v.childAt(0),g=v.childAt(1),m=v.childAt(2),y=s.getItemVisual(h,"style"),_=y.fill;o.add(v),p.useStyle(Ft(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Ma(p,d,"lineStyle"),Ma(g,d,"areaStyle");var x=d.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,z(["emphasis","select","blur"],function(w){var T=d.getModel([w,"areaStyle"]),L=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(w).ignore=L&&b;var D=d.getModel([w,"lineStyle"]).getLineStyle();p.ensureState(w).style=D;var C=T.getAreaStyle();g.ensureState(w).style=C;var A=d.getModel([w,"itemStyle"]).getItemStyle();m.eachChild(function(M){M.ensureState(w).style=zt(A)})}),g.useStyle(Ft(d.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var S=d.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,ka(d),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:w.__dimIdx,defaultText:L,inheritColor:_,defaultOpacity:y.opacity})}),La(v,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}(rr),PC=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 b5(ce(this.getData,this),ce(this.getRawData,this))},e.prototype.getInitialData=function(r,n){return x5(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=B2(this,r);return ns("section",{header:u,sortBlocks:!0,blocks:yt(s,function(f){var v=a.get(a.mapDimension(f.dim),r);return ns("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:v,sortParam:v})})})},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}(vr),bs=M5.value;function nc(t,e){return Ft({show:e},t)}var kC=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"),v=this.get("triggerEvent"),h=yt(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=Ft({color:d.color},l));var g=ee(zt(d),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:v},!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 Rr(y,xy.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:kt.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ee({lineStyle:{color:kt.color.neutral20}},bs.axisLine),axisLabel:nc(bs.axisLabel,!1),axisTick:nc(bs.axisTick,!1),splitLine:nc(bs.splitLine,!0),splitArea:nc(bs.splitArea,!0),indicator:[]},e}(qt),RC=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 F5(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"),v=l.get("color"),h=u.get("color"),d=bt(v)?v:[v],p=bt(h)?h:[h],g=[],m=[];function y(B,R,k){var H=k%R.length;return B[H]=B[H]||[],H}if(a==="circle")for(var _=i[0].getTicksCoords(),x=n.cx,b=n.cy,S=0;S<_.length;S++){if(c){var w=y(g,d,S);g[w].push(new Oo({shape:{cx:x,cy:b,r:_[S].coord}}))}if(f&&S<_.length-1){var w=y(m,p,S);m[w].push(new Yl({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,L=yt(i,function(B,R){var k=B.getTicksCoords();return T=T==null?k.length-1:Math.min(k.length-1,T),yt(k,function(H){return n.coordToPoint(H.coord,R)})}),D=[],S=0;S<=T;S++){for(var C=[],A=0;A<i.length;A++)C.push(L[A][S]);if(C[0]?C.push(C[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+S),c){var w=y(g,d,S);g[w].push(new Pi({shape:{points:C}}))}if(f&&D){var w=y(m,p,S-1);m[w].push(new Vo({shape:{points:C.concat(D)}}))}D=C.slice().reverse()}var M=l.getLineStyle(),P=u.getAreaStyle();z(m,function(B,R){this.group.add(mh(B,{style:Ft({stroke:"none",fill:p[R%p.length]},P),silent:!0}))},this),z(g,function(B,R){this.group.add(mh(B,{style:Ft({fill:"none",stroke:d[R%d.length]},M),silent:!0}))},this)},e.type="radar",e}(xn),NC=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}(Ay),OC=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 NC(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=ae(i[0],n.width)+n.x,this.cy=ae(i[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(Lt(o)||ne(o))&&(o=[0,o]),this.r0=ae(o[0],a),this.r=ae(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){W5(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 IC(t){t.registerCoordinateSystem("radar",OC),t.registerComponentModel(kC),t.registerComponentView(RC),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 BC(t){ji(IC),t.registerChartView(AC),t.registerSeriesModel(PC),t.registerLayout(EC),t.registerProcessor(p5("radar")),t.registerPreprocessor(DC)}function VC(t,e){var r=Yg(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 zC=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"])}},lv=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]=ee(a,zC(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,v=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(v)),v.length?n=n.concat(v):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)||ne(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])&&re(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:kt.size.m,align:"auto",backgroundColor:kt.color.transparent,borderColor:kt.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:kt.color.disabled,inactiveBorderColor:kt.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:kt.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:kt.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:kt.color.tertiary,borderWidth:1,borderColor:kt.color.border},emphasis:{selectorLabel:{show:!0,color:kt.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(qt),Za=or,uv=z,ic=ye,n_=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(),v=r.get("padding"),h=Oa(f,c,v),d=this.layoutInner(r,o,h,a,l,u),p=Oa(Ft({width:d.width,height:d.height},f),c,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=VC(d,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"),v=n.get("triggerEvent"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),uv(n.getData(),function(d,p){var g=this,m=d.get("name");if(!this.newlineDisabled&&(m===""||m===`
|
|
67
|
-
`)){var y=new ic;y.newline=!0,u.add(y);return}var _=i.getSeriesByName(m)[0];if(!c.get(m)){if(_){var x=_.getData(),
|
|
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 _v(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function g_(t,e,r,n){return Le("svg","root",{width:t,height:e,xmlns:h_,"xmlns:xlink":v_,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var oE=0;function m_(){return oE++}var y_={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"},Yi="transform-origin";function sE(t,e,r){var n=ot({},t.shape);ot(n,e),t.buildPath(r,n);var i=new f_;return i.reset(xp(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function lE(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[Yi]=r+"px "+n+"px")}var uE={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function __(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function cE(t,e,r){var n=t.shape.paths,i={},a,o;if(z(n,function(l){var u=_v(r.zrId);u.animation=!0,ac(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,v=Ht(c),h=v.length;if(h){o=v[h-1];var d=c[o];for(var p in d){var g=d[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=__(i,r);return a.replace(o,s)}}function x_(t){return Lt(t)?y_[t]?"cubic-bezier("+y_[t]+")":$c(t)?t:"":""}function ac(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof cg){var s=cE(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"],v=x_(c.getClip().easing),h=c.getDelay();v?f.push(v):f.push("linear"),h&&f.push(h/1e3+"s"),c.getLoop()&&f.push("infinite");var d=f.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(c)}function p(y){var _=y[1],x=_.length,b={},S={},w={},T="animation-timing-function";function L(Y,U,q){for(var tt=Y.getTracks(),nt=Y.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=x_(_t.easing),$=_t.rawValue;(Lt($)||ne($))&&(U[mt]=U[mt]||{},U[mt][K]=_t.rawValue,xt&&(U[mt][T]=xt))}}}}for(var D=0;D<x;D++){var C=_[D],A=C.targetName;A?A==="shape"&&L(C,S):!n&&L(C,b)}for(var M in b){var P={};_l(P,t),ot(P,b[M]);var B=bp(P),R=b[M][T];w[M]=B?{transform:B}:{},lE(w[M],P),R&&(w[M][T]=R)}var k,H=!0;for(var M in S){w[M]=w[M]||{};var I=!k,R=S[M][T];I&&(k=new zn);var F=k.len();k.reset(),w[M].d=sE(t,S[M],k);var O=k.len();if(!I&&F!==O){H=!1;break}R&&(w[M][T]=R)}if(!H)for(var M in w)delete w[M].d;if(!n)for(var D=0;D<x;D++){var C=_[D],A=C.targetName;A==="style"&&L(C,w,function(tt){return uE[tt]})}for(var W=Ht(w),j=!0,X,D=1;D<W.length;D++){var et=W[D-1],ft=W[D];if(w[et][Yi]!==w[ft][Yi]){j=!1;break}X=w[et][Yi]}if(j&&X){for(var M in w)w[M][Yi]&&delete w[M][Yi];e[Yi]=X}if(Se(W,function(Y){return Ht(w[Y]).length>0}).length){var gt=__(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-"+m_();r.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function fE(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};b_(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),b_(n,e,r)}}function b_(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+m_(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var ws=Math.round;function S_(t){return t&&Lt(t.src)}function w_(t){return t&&Dt(t.toDataURL)}function xv(t,e,r,n){tE(function(i,a){var o=i==="fill"||i==="stroke";o&&_p(a)?D_(e,t,i,n):o&&tf(a)?A_(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),yE(r,t,n)}function bv(t,e){var r=e8(e);r&&(r.each(function(n,i){n!=null&&(t[(d_+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[d_+"silent"]="true"))}function T_(t){return On(t[0]-1)&&On(t[1])&&On(t[2])&&On(t[3]-1)}function hE(t){return On(t[4])&&On(t[5])}function Sv(t,e,r){if(e&&!(hE(e)&&T_(e))){var n=1e4;t.transform=T_(e)?"translate("+ws(e[4]*n)/n+" "+ws(e[5]*n)/n+")":b6(e)}}function L_(t,e,r){for(var n=t.points,i=[],a=0;a<n.length;a++)i.push(ws(n[a][0]*r)/r),i.push(ws(n[a][1]*r)/r);e.points=i.join(" ")}function M_(t){return!t.smooth}function vE(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]]=ws(s*i)/i)}}}var dE={circle:[vE(["cx","cy","r"])],polyline:[L_,M_],polygon:[L_,M_]};function pE(t){for(var e=t.animators,r=0;r<e.length;r++)if(e[r].targetName==="shape")return!0;return!1}function C_(t,e){var r=t.style,n=t.shape,i=dE[t.type],a={},o=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&xp(t)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&pE(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 v=t.path;f&&(v.beginPath(),t.buildPath(v,t.shape),t.pathUpdated());var h=v.getVersion(),d=t,p=d.__svgPathBuilder;(d.__svgPathVersion!==h||!p||l!==d.__svgPathStrokePercent)&&(p||(p=d.__svgPathBuilder=new f_),p.reset(u),v.rebuildPath(p,l),p.generateStr(),d.__svgPathVersion=h,d.__svgPathStrokePercent=l),a.d=p.getStr()}return Sv(a,t.transform),xv(a,r,t,e),bv(a,t),e.animation&&ac(t,a,e),e.emphasis&&fE(t,a,e),Le(s,t.id+"",a)}function gE(t,e){var r=t.style,n=r.image;if(n&&!Lt(n)&&(S_(n)?n=n.src:w_(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),Sv(l,t.transform),xv(l,r,t,e),bv(l,t),e.animation&&ac(t,l,e),Le("image",t.id+"",l)}}function mE(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=w6(r.y||0,wo(i),r.textBaseline),s=S6[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(E1(r)){var u="",c=r.fontStyle,f=M1(r.fontSize);if(!parseFloat(f))return;var v=r.fontFamily||Cd,h=r.fontWeight;u+="font-size:"+f+";font-family:"+v+";",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),Sv(l,t.transform),xv(l,r,t,e),bv(l,t),e.animation&&ac(t,l,e),Le("text",t.id+"",l,void 0,n)}}function E_(t,e){if(t instanceof jt)return C_(t,e);if(t instanceof Br)return gE(t,e);if(t instanceof Ro)return mE(t,e)}function yE(t,e,r){var n=t.style;if(T6(n)){var i=L6(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,v=n.shadowBlur,h=_o(n.shadowColor),d=h.opacity,p=h.color,g=v/2/l,m=v/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":d})]),a[i]=o}e.filter=fl(o)}}function D_(t,e,r,n){var i=t[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(mp(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(yp(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+"%",v=s[u].color,h=_o(v),d=h.color,p=h.opacity,g={offset:f};g["stop-color"]=d,p<1&&(g["stop-opacity"]=p),l.push(Le("stop",u+"",g))}var m=Le(a,"",o,l),y=yv(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 A_(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(gp(i)){var v=i.imageWidth,h=i.imageHeight,d=void 0,p=i.image;if(Lt(p)?d=p:S_(p)?d=p.src:w_(p)&&(d=p.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";wt(v,g),wt(h,g)}else if(v==null||h==null){var m=function(D,C){if(D){var A=D.elm,M=v||C.width,P=h||C.height;D.tag==="pattern"&&(u?(P=1,M/=a.width):c&&(M=1,P/=a.height)),D.attrs.width=M,D.attrs.height=P,A&&(A.setAttribute("width",M),A.setAttribute("height",P))}},y=Nf(d,null,t,function(D){l||m(S,D),m(f,D)});y&&y.width&&y.height&&(v=v||y.width,h=h||y.height)}f=Le("image","img",{href:d,width:v,height:h}),o.width=v,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 b=bp(i);b&&(o.patternTransform=b);var S=Le("pattern","",o,[f]),w=yv(S),T=n.patternCache,L=T[w];L||(L=n.zrId+"-p"+n.patternIdx++,T[w]=L,o.id=L,S=n.defs[L]=Le("pattern",L,o,[f])),e[r]=fl(L)}}function _E(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,[C_(t,r)])}e["clip-path"]=fl(a)}function P_(t){return document.createTextNode(t)}function Zi(t,e,r){t.insertBefore(e,r)}function k_(t,e){t.removeChild(e)}function R_(t,e){t.appendChild(e)}function N_(t){return t.parentNode}function O_(t){return t.nextSibling}function wv(t,e){t.textContent=e}var I_=58,xE=120,bE=Le("","");function Tv(t){return t===void 0}function ln(t){return t!==void 0}function SE(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 Ts(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(ln(n)){var i=t.elm=p_(n);if(Lv(bE,t),bt(r))for(e=0;e<r.length;++e){var a=r[e];a!=null&&R_(i,Ls(a))}else ln(t.text)&&!Mt(t.text)&&R_(i,P_(t.text))}else t.elm=P_(t.text);return t.elm}function B_(t,e,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&Zi(t,Ls(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=N_(i.elm);k_(a,i.elm)}else k_(t,i.elm)}}function Lv(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)!==xE?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(eE,r,o):r.charCodeAt(3)===I_?n.setAttributeNS(rE,r,o):r.charCodeAt(5)===I_?n.setAttributeNS(v_,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function wE(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,v,h,d;n<=a&&i<=l;)o==null?o=e[++n]:s==null?s=e[--a]:u==null?u=r[++i]:c==null?c=r[--l]:Ts(o,u)?(Ka(o,u),o=e[++n],u=r[++i]):Ts(s,c)?(Ka(s,c),s=e[--a],c=r[--l]):Ts(o,c)?(Ka(o,c),Zi(t,o.elm,O_(s.elm)),o=e[++n],c=r[--l]):Ts(s,u)?(Ka(s,u),Zi(t,s.elm,o.elm),s=e[--a],u=r[++i]):(Tv(f)&&(f=SE(e,n,a)),v=f[u.key],Tv(v)?Zi(t,Ls(u),o.elm):(h=e[v],h.tag!==u.tag?Zi(t,Ls(u),o.elm):(Ka(h,u),e[v]=void 0,Zi(t,h.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(d=r[l+1]==null?null:r[l+1].elm,B_(t,d,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&&(Lv(t,e),Tv(e.text)?ln(n)&&ln(i)?n!==i&&wE(r,n,i):ln(i)?(ln(t.text)&&wv(r,""),B_(r,null,i,0,i.length-1)):ln(n)?oc(r,n,0,n.length-1):ln(t.text)&&wv(r,""):t.text!==e.text&&(ln(n)&&oc(r,n,0,n.length-1),wv(r,e.text)))}function TE(t,e){if(Ts(t,e))Ka(t,e);else{var r=t.elm,n=N_(r);Ls(e),n!==null&&(Zi(n,e.elm,O_(r)),oc(n,[t],0,0))}return e}var LE=0,ME=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=V_("refreshHover"),this.configLayer=V_("configLayer"),this.storage=r,this._opts=n=ot({},n),this.root=e,this._id="zr"+LE++,this._oldVNode=g_(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=p_("svg");Lv(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",TE(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return E_(e,_v(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=_v(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=CE(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(v){return a.defs[v]});if(u.length&&o.push(Le("defs","defs",{},u)),e.animation){var c=aE(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Le("style","stl",{},[],c);o.push(f)}}return g_(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},yv(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 v=f.__clipPaths,h=v&&v.length||0,d=l&&l.length||0,p=void 0;for(p=Math.max(h-1,d-1);p>=0&&!(v&&l&&v[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=a[o-1];for(var m=p+1;m<h;m++){var y={};_E(v[m],y,r);var _=Le("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=v;var x=E_(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=im(i,0,n),r=im(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=C6(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},t}();function V_(t){return function(){process.env.NODE_ENV!=="production"&&na('In SVG mode painter not support method "'+t+'"')}}function CE(t,e,r,n){var i;if(r&&r!=="none")if(i=Le("rect","bg",{width:t,height:e,x:"0",y:"0"}),_p(r))D_({fill:r},i.attrs,"fill",n);else if(tf(r))A_({style:{fill:r},dirty:sr,getBoundingRect:function(){return{width:t,height:e}}},i.attrs,"fill",n);else{var a=_o(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function EE(t){t.registerPainter("svg",ME)}const DE=({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((v,h)=>{const d={data:v,name:e.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[2,2,0,0]}};return o&&(d.stack="A"),d})};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((v,h)=>{const d={data:v,name:e.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[0,2,2,0]}};return o&&(d.stack="A"),d})};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((v,h)=>{const d={data:v,name:e.legends[h],type:"line",smooth:a,label:{show:!0}};return o&&(d.stack="A"),d})};if(t==="pie")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:e.series[0].map((v,h)=>({value:v,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((v,h)=>({value:v,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((v,h)=>{const d={data:v,name:e.legends[h],type:"line",areaStyle:{},label:{show:!0}};return o&&(d.stack="A"),d})};if(t==="radar")return{color:r,textStyle:s,legend:f,radar:{indicator:e.labels.map(v=>({name:v})),splitLine:c,axisLine:i?{lineStyle:{color:i}}:void 0},series:[{data:e.series.map((v,h)=>({value:v,name:e.legends[h]})),type:"radar"}]};if(t==="scatter"){const v=[];for(let h=0;h<e.series[0].length;h++){const d=e.series[0][h],p=e.series[1]?e.series[1][h]:d;v.push([d,p])}return{color:r,textStyle:s,xAxis:{axisLine:l,axisLabel:u,splitLine:c},yAxis:{axisLine:l,axisLabel:u,splitLine:c},series:[{symbolSize:12,data:v,type:"scatter"}]}}return null},AE={chart:"_chart_1g0qq_1"};ji([bM,oM,PM,CC,BC,YC,EE]);const z_=({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 v=[];if(i.length>=10)v=i;else if(i.length===1)v=Os(i[0]).analogous(10).map(h=>h.toRgbString());else{const h=i.length,d=Os(i[h-1]).analogous(11-h).map(p=>p.toRgbString());v=[...i.slice(0,h-1),...d]}return v},[i]),f=N.useCallback(()=>{if(!u.current)return;const v=DE({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});v&&u.current.setOption(v,!0)},[r,n,c,a,o,s]);return N.useEffect(()=>{if(!l.current)return;u.current=iT(l.current,null,{renderer:"svg"}),f();const v=()=>{var d;return(d=u.current)==null?void 0:d.resize()},h=new ResizeObserver(v);return h.observe(l.current),()=>{var d;h.disconnect(),(d=u.current)==null||d.dispose(),u.current=null}},[]),N.useEffect(()=>{f()},[f]),E.jsx("div",{className:AE.chart,ref:l})},Mv={editableElementChart:"_editableElementChart_1i7hz_1",rotateWrapper:"_rotateWrapper_1i7hz_5",elementContent:"_elementContent_1i7hz_10"},PE=({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 $r(n,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Mv.editableElementChart,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Mv.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsxs("div",{ref:n,className:Mv.elementContent,style:{backgroundColor:t.fill},onMouseDown:i,onTouchStart:i,onDoubleClick:a,children:[E.jsx($s,{width:t.width,height:t.height,outline:t.outline}),E.jsx(z_,{width:t.width,height:t.height,type:t.chartType,data:t.data,themeColors:t.themeColors,textColor:t.textColor,lineColor:t.lineColor,options:t.options})]})})})},F_=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"}},H_=t=>t.replace(/\n/g,"</br>").replace(/ /g," "),G_=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])}),W_=t=>({subThemeColor:N.useMemo(()=>t?T4(t.color):["",""],[t])}),kE={customTextarea:"_customTextarea_15hzl_1"},RE=({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 v=f.clipboardData.items[0];v&&v.kind==="string"&&(v.type==="text/plain"?v.getAsString(h=>{if(typeof Qv(h)=="object")return;const p=b4(h);if(p){i(p),a.current&&(a.current.innerHTML=p[0][0]);return}document.execCommand("insertText",!1,h)}):v.type==="text/html"&&v.getAsString(h=>{const d=S4(h);d&&(i(d),a.current&&(a.current.innerHTML=d[0][0]))}))},c=()=>{o.current=!1};return E.jsx("div",{className:Rt(kE.customTextarea,e),style:r,ref:a,contentEditable:!0,onFocus:l,onBlur:c,onInput:s,onPaste:u,dangerouslySetInnerHTML:{__html:t}})},We={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"},NE=({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:v,setSelectedTableCells:h}=Tt(),[d,p]=N.useState(!1),[g,m]=N.useState([]),[y,_]=N.useState([]),[x,b]=N.useState([]);N.useEffect(()=>{b(n.map($=>$*e))},[n,e]);const S=N.useMemo(()=>x.reduce(($,G)=>$+G,0),[x]),{hideCells:w}=G_(t),{subThemeColor:T}=W_(a),L=N.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":T[0],"--subThemeColor2":T[1]}:{},[a,T]);N.useEffect(()=>{o||(m([]),_([]))},[o]);const D=N.useMemo(()=>{const $=[];for(let G=1;G<x.length+1;G++){const Q=x.slice(0,G).reduce((Z,ut)=>Z+ut,0);$.push(Q)}return $},[x]),C=N.useMemo(()=>{if(!g.length)return[];const[$,G]=g;if(!y.length)return[`${$}_${G}`];const[Q,Z]=y;if($===Q&&G===Z)return[`${$}_${G}`];const ut=[],vt=Math.min($,Q),ct=Math.min(G,Z),$t=Math.max($,Q),Kt=Math.max(G,Z);for(let Gt=0;Gt<t.length;Gt++){const pe=t[Gt];for(let Ae=0;Ae<pe.length;Ae++)Gt>=vt&&Gt<=$t&&Ae>=ct&&Ae<=Kt&&ut.push(`${Gt}_${Ae}`)}return ut},[g,y,t]);N.useEffect(()=>{u(C),h(C)},[C,u,h]);const A=N.useMemo(()=>C.length>1?null:C[0]||null,[C]),M=N.useCallback(()=>p(!1),[]);N.useEffect(()=>(document.addEventListener("mouseup",M),()=>{document.removeEventListener("mouseup",M)}),[M]);const P=($,G,Q)=>{$.button===0&&(_([]),p(!0),m([G,Q]))},B=($,G)=>{d&&_([$,G])},R=($,G)=>w.includes(`${$}_${G}`),k=$=>{const G=JSON.parse(JSON.stringify(t)),Q=[];for(let Z=0;Z<G[0].length;Z++)Q.push({colspan:1,rowspan:1,text:"",id:ue.nanoid(10)});G.splice($,0,Q),s(G)},H=$=>{const G=t.map(Z=>{const ut={colspan:1,rowspan:1,text:"",id:ue.nanoid(10)},vt=[...Z];return vt.splice($,0,ut),vt}),Q=[...x];Q.splice($,0,100),s(G),l(Q)},I=$=>{const G=JSON.parse(JSON.stringify(t)),Q=t[$],Z=[];for(let ut=0;ut<Q.length;ut++)R($,ut)&&Z.push(ut);for(const ut of Z)for(let vt=$;vt>=0;vt--)if(!R(vt,ut)){G[vt][ut].rowspan=G[vt][ut].rowspan-1;break}G.splice($,1),s(G)},F=$=>{const G=JSON.parse(JSON.stringify(t)),Q=[];for(let vt=0;vt<t.length;vt++)R(vt,$)&&Q.push(vt);for(const vt of Q)for(let ct=$;ct>=0;ct--)if(!R(vt,ct)){G[vt][ct].colspan=G[vt][ct].colspan-1;break}const Z=G.map(vt=>(vt.splice($,1),vt)),ut=[...x];ut.splice($,1),s(Z),l(ut)},O=()=>{const[$,G]=g,[Q,Z]=y,ut=Math.min($,Q),vt=Math.min(G,Z),ct=Math.max($,Q),$t=Math.max(G,Z),Kt=JSON.parse(JSON.stringify(t));Kt[ut][vt].rowspan=ct-ut+1,Kt[ut][vt].colspan=$t-vt+1,s(Kt),m([]),_([])},W=($,G)=>{const Q=JSON.parse(JSON.stringify(t));Q[$][G].rowspan=1,Q[$][G].colspan=1,s(Q),m([]),_([])},j=$=>{const G=t.length-1;m([0,$]),_([G,$])},X=$=>{const G=t[$].length-1;m([$,0]),_([$,G])},et=()=>{const $=t.length-1,G=t[$].length-1;m([0,0]),_([$,G])},ft=()=>{const $=JSON.parse(JSON.stringify(t));for(let G=0;G<$.length;G++)for(let Q=0;Q<$[G].length;Q++)C.includes(`${G}_${Q}`)&&($[G][Q].text="");s($)},gt=()=>{requestAnimationFrame(()=>{const $=document.querySelector(`.${We.cellText}.${We.active}`);$&&$.focus()})},Y=()=>{const $=(ut,vt)=>t[ut]?t[ut][vt]?R(ut,vt)?$(ut,vt+1):[ut,vt]:$(ut+1,0):null;_([]);const G=g[0],Q=g[1]+1,Z=$(G,Q);Z?m(Z):(k(G+1),m([G+1,0])),gt()},U=$=>{var Q;const G=window.getSelection();if(G&&G.rangeCount>0){const Z=G.getRangeAt(0),ut=Z.cloneRange();ut.selectNodeContents($),ut.setEnd(Z.startContainer,Z.startOffset);const vt=ut.toString().length;ut.setEnd(Z.endContainer,Z.endOffset);const ct=ut.toString().length,$t=((Q=$.textContent)==null?void 0:Q.length)||0;return{start:vt,end:ct,len:$t}}return null},q=$=>{const G=+C[0].split("_")[0],Q=+C[0].split("_")[1],Z=t.length,ut=t[0].length,vt=ct=>{if(ct[0]<0||ct[1]<0||ct[0]>Z-1||ct[1]>ut-1)return[0,0];const $t=`${ct[0]}_${ct[1]}`;return w.includes($t)?$==="UP"?vt([ct[0],ct[1]-1]):$==="DOWN"?vt([ct[0],ct[1]-1]):$==="LEFT"?vt([ct[0]-1,ct[1]]):$==="RIGHT"?vt([ct[0]-1,ct[1]]):[0,0]:ct};if($==="UP"){const ct=G-1;if(ct<0)return;_([]),m(vt([ct,Q]))}else if($==="DOWN"){const ct=G+1;if(ct>Z-1)return;_([]),m(vt([ct,Q]))}else if($==="LEFT"){const ct=Q-1;if(ct<0)return;_([]),m(vt([G,ct]))}else if($==="RIGHT"){const ct=Q+1;if(ct>ut-1)return;_([]),m(vt([G,ct]))}gt()},tt=()=>{const $=[];for(let G=0;G<t.length;G++){const Q=t[G],Z=[];for(let ut=0;ut<Q.length;ut++)R(G,ut)||Z.push(Q[ut]);Z.length&&$.push(Z)}return $},nt=()=>{const $=tt(),G=$.length>1,Q=$[0].length>1;return{canDeleteRow:G,canDeleteCol:Q}},at=($,G)=>{const Q=C.length>1,Z=t[$][G],ut=Q,vt=!Q&&(Z.rowspan>1||Z.colspan>1);return{canMerge:ut,canSplit:vt}},st=($,G,Q)=>{$.preventDefault(),$.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 vt=Gs(ut),ct=()=>{setTimeout(()=>{vt.unmount(),document.body.contains(ut)&&document.body.removeChild(ut),G.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",ct),window.removeEventListener("resize",ct)},0)};vt.render(E.jsx(vd,{axis:{x:$.clientX,y:$.clientY},el:G,menus:Q,removeContextmenu:ct})),G.classList.add("contextmenu-active"),document.body.addEventListener("scroll",ct),window.addEventListener("resize",ct)};N.useEffect(()=>{const $=G=>{if(!o||!C.length)return;const Q=G.key.toUpperCase();if(C.length<2){if(Q===me.TAB)G.preventDefault(),Y();else if(G.ctrlKey&&Q===me.UP){G.preventDefault();const Z=+C[0].split("_")[0];k(Z)}else if(G.ctrlKey&&Q===me.DOWN){G.preventDefault();const Z=+C[0].split("_")[0];k(Z+1)}else if(G.ctrlKey&&Q===me.LEFT){G.preventDefault();const Z=+C[0].split("_")[1];H(Z)}else if(G.ctrlKey&&Q===me.RIGHT){G.preventDefault();const Z=+C[0].split("_")[1];H(Z+1)}else if(Q===me.UP){const Z=U(G.target);Z&&Z.start===Z.end&&Z.start===0&&q("UP")}else if(Q===me.DOWN){const Z=U(G.target);Z&&Z.start===Z.end&&Z.start===Z.len&&q("DOWN")}else if(Q===me.LEFT){const Z=U(G.target);Z&&Z.start===Z.end&&Z.start===0&&q("LEFT")}else if(Q===me.RIGHT){const Z=U(G.target);Z&&Z.start===Z.end&&Z.start===Z.len&&q("RIGHT")}}else Q===me.DELETE&&ft()};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[o,C,t,s]);const Et=($,G)=>{$.stopPropagation(),m([]),_([]);let Q=!0;const Z=x[G],ut=$.pageX,vt=50,ct=Kt=>{if(!Q)return;const Gt=(Kt.pageX-ut)/v,pe=Z+Gt<vt?vt:Math.round(Z+Gt),Ae=[...x];Ae[G]=pe,b(Ae)},$t=()=>{Q=!1,document.removeEventListener("mousemove",ct),document.removeEventListener("mouseup",$t),l(K.current)};document.addEventListener("mousemove",ct),document.addEventListener("mouseup",$t)},K=N.useRef(x);N.useEffect(()=>{K.current=x},[x]);const J=($,G,Q)=>{const Z=JSON.parse(JSON.stringify(t));Z[G][Q].text=$,s(Z)},_t=N.useMemo(()=>Ar.debounce(J,300,{trailing:!0}),[t,s]),mt=($,G,Q)=>{const Z=$.length,ut=$[0].length;let vt=0,ct=0;if(G+Z>t.length&&(vt=G+Z-t.length),Q+ut>t[0].length&&(ct=Q+ut-t[0].length),vt||ct){let $t=JSON.parse(JSON.stringify(t));const Kt={colspan:1,rowspan:1,text:""};if(vt){const Gt=[];for(let pe=0;pe<vt;pe++){const Ae=[];for(let lt=0;lt<$t[0].length;lt++)Ae.push({...Kt,id:ue.nanoid(10)});Gt.push(Ae)}$t=[...$t,...Gt]}if(ct){$t=$t.map(pe=>{const Ae=[];for(let lt=0;lt<ct;lt++){const Ze={...Kt,id:ue.nanoid(10)};Ae.push(Ze)}return[...pe,...Ae]});const Gt=[...x,...new Array(ct).fill(100)];b(Gt),l(Gt)}s($t)}requestAnimationFrame(()=>{const $t=JSON.parse(JSON.stringify(t));for(let Kt=0;Kt<Z;Kt++)for(let Gt=0;Gt<ut;Gt++)$t[G+Kt]&&$t[G+Kt][Q+Gt]&&($t[G+Kt][Q+Gt].text=$[Kt][Gt]);s($t)})},xt=($,G,Q)=>{const Z=$.currentTarget;C.includes(`${G}_${Q}`)||(m([G,Q]),_([]));const{canMerge:ut,canSplit:vt}=at(G,Q),{canDeleteRow:ct,canDeleteCol:$t}=nt(),Kt=[{text:"插入列",children:[{text:"到左侧",handler:()=>H(Q)},{text:"到右侧",handler:()=>H(Q+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>k(G)},{text:"到下方",handler:()=>k(G+1)}]},{text:"删除列",disable:!$t,handler:()=>F(Q)},{text:"删除行",disable:!ct,handler:()=>I(G)},{divider:!0},{text:"合并单元格",disable:!ut,handler:O},{text:"取消合并单元格",disable:!vt,handler:()=>W(G,Q)},{divider:!0},{text:"选中当前列",handler:()=>j(Q)},{text:"选中当前行",handler:()=>X(G)},{text:"选中全部单元格",handler:et}],Gt=f?f(Z)||[]:[],pe=[...Kt,...Gt||[]];pe.length&&st($,Z,pe)};return E.jsxs("div",{className:We.editableTable,style:{width:S+"px"},onMouseDown:c,children:[o&&E.jsx("div",{className:We.handler,children:D.map(($,G)=>E.jsx("div",{className:We.dragLine,style:{left:$+"px"},onMouseDown:Q=>Et(Q,G)},G))}),E.jsxs("table",{className:Rt({[We.theme]:a,[We.rowHeader]:a==null?void 0:a.rowHeader,[We.rowFooter]:a==null?void 0:a.rowFooter,[We.colHeader]:a==null?void 0:a.colHeader,[We.colFooter]:a==null?void 0:a.colFooter}),style:L,children:[E.jsx("colgroup",{children:x.map(($,G)=>E.jsx("col",{span:1,width:$},G))}),E.jsx("tbody",{children:t.map(($,G)=>E.jsx("tr",{style:{height:r+"px"},children:$.map((Q,Z)=>{if(w.includes(`${G}_${Z}`))return null;const ut=C.includes(`${G}_${Z}`)&&C.length>1,vt=A===`${G}_${Z}`;return E.jsx("td",{className:Rt(We.cell,{[We.selected]:ut,[We.active]:vt}),style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...F_(Q.style)},rowSpan:Q.rowspan,colSpan:Q.colspan,"data-cell-index":`${G}_${Z}`,onMouseDown:ct=>P(ct,G,Z),onMouseEnter:()=>B(G,Z),onContextMenu:ct=>xt(ct,G,Z),children:vt?E.jsx(RE,{className:Rt(We.cellText,{[We.active]:!0}),style:{minHeight:r-4+"px"},value:Q.text,onUpdateValue:ct=>_t(ct,G,Z),onInsertExcelData:ct=>mt(ct,G,Z)}):E.jsx("div",{className:We.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:H_(Q.text)}})},Q.id)})},G))})]})]})},Ms={editableElementTable:"_editableElementTable_gxw12_1",rotateWrapper:"_rotateWrapper_gxw12_5",elementContent:"_elementContent_gxw12_10",tableMask:"_tableMask_gxw12_17",maskTip:"_maskTip_gxw12_26"},OE=({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),v=N.useRef(null),[h,d]=N.useState(!1),p=N.useRef(-1),g=(S,w=!0)=>{S.stopPropagation(),e==null||e(S.nativeEvent,n,w)};N.useEffect(()=>{a!==n.id&&d(!1)},[a,n.id]),N.useEffect(()=>{s(h)},[h,s]);const m=()=>{d(!0)};N.useEffect(()=>{a===n.id&&(o&&d(!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(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]);N.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()},x=S=>{const w=S.reduce((L,D)=>L+D),T=S.map(L=>L/w);u({id:n.id,props:{width:w,colWidths:T}}),c()},b=S=>{setTimeout(()=>l(S),0)};return $r(v,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Ms.editableElementTable,ref:f,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px"},children:E.jsx("div",{className:Ms.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:E.jsxs("div",{ref:v,className:Ms.elementContent,children:[E.jsx(NE,{data:n.data,width:n.width,cellMinHeight:n.cellMinHeight,colWidths:n.colWidths,outline:n.outline,theme:n.theme,editable:h,onChange:_,onChangeColWidths:x,onChangeSelectedCells:b,onMouseDown:S=>S.stopPropagation()}),!h&&E.jsx("div",{className:Ms.tableMask,onDoubleClick:m,onMouseDown:g,onTouchStart:g,children:a===n.id&&E.jsx("div",{className:Ms.maskTip,style:{transform:`scale(${1/i})`},children:"双击编辑"})})]})})})},Cv={editableElementLatex:"_editableElementLatex_106e3_1",rotateWrapper:"_rotateWrapper_106e3_5",elementContent:"_elementContent_106e3_10"},IE=({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 $r(n,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Cv.editableElementLatex,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Cv.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsx("div",{ref:n,className:Cv.elementContent,onMouseDown:i,onTouchStart:i,onDoubleClick:a,children:E.jsx("svg",{overflow:"visible",width:t.width,height:t.height,stroke:t.color,strokeWidth:t.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:E.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:E.jsx("path",{d:t.path})})})})})})},BE=(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"},VE=({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),[v,h]=N.useState(!0),[d,p]=N.useState(0),[g,m]=N.useState(0),[y,_]=N.useState(0),[x,b]=N.useState(!1),[S,w]=N.useState(!1),[T,L]=N.useState(1),[D,C]=N.useState(!1),[A,M]=N.useState(!1),[P,B]=N.useState("00:00"),[R,k]=N.useState("0"),[H,I]=N.useState(!1),[F,O]=N.useState(!1);BE(r,o);const W=(lt=0)=>{if(lt===0||isNaN(lt))return"00:00";const Ze=ks=>ks<10?"0"+ks:""+ks,Me=Math.floor(lt/3600),Wr=Math.floor((lt-Me*3600)/60),uc=Math.floor(lt-Me*3600-Wr*60);return(Me>0?[Me,Wr,uc]:[Wr,uc]).map(Ze).join(":")},j=N.useMemo(()=>W(d),[d]),X=N.useMemo(()=>W(g),[g]),et=N.useMemo(()=>(g?d/g*100:0)+"%",[d,g]),ft=N.useMemo(()=>(g?y/g*100:0)+"%",[y,g]),gt=N.useMemo(()=>c*100+"%",[c]),Y=[{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=()=>{v?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=()=>{b(!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?(st(0),tt()):nt()},G=()=>{o.current&&o.current.buffered.length&&_(o.current.buffered.end(o.current.buffered.length-1))},Q=()=>C(!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 Wr=Me*g;o.current.currentTime=Wr,p(Wr)},[g]),vt=N.useCallback(lt=>{ut(lt),document.removeEventListener("mousemove",ut),document.removeEventListener("touchmove",ut),document.removeEventListener("mouseup",vt),document.removeEventListener("touchend",vt)},[ut]),ct=()=>{document.addEventListener("mousemove",ut),document.addEventListener("touchmove",ut),document.addEventListener("mouseup",vt),document.addEventListener("touchend",vt)},$t=lt=>{if(g&&s.current){const Ze=s.current.getBoundingClientRect().left,Me=lt.clientX-Ze;if(Me<0||Me>s.current.offsetWidth)return;const Wr=g*(Me/s.current.offsetWidth);k(`${Me-(Wr>=3600?25:20)}px`),B(W(Wr)),M(!0)}},Kt=N.useCallback(lt=>{if(!l.current)return;const Me=(("clientX"in lt?lt.clientX:lt.changedTouches[0].clientX)-Z(l.current))/45;Et(Me)},[]),Gt=N.useCallback(()=>{document.removeEventListener("mousemove",Kt),document.removeEventListener("touchmove",Kt),document.removeEventListener("mouseup",Gt),document.removeEventListener("touchend",Gt)},[Kt]),pe=()=>{document.addEventListener("mousemove",Kt),document.addEventListener("touchmove",Kt),document.addEventListener("mouseup",Gt),document.addEventListener("touchend",Gt)},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})},[]),E.jsxs("div",{className:Rt(Ct.videoPlayer,{[Ct.hideController]:F}),style:{width:t*a+"px",height:e*a+"px",transform:`scale(${1/a})`},onMouseMove:q,onClick:q,children:[E.jsxs("div",{className:Ct.videoWrap,onClick:at,children:[D&&E.jsx("div",{className:Ct.loadError,children:"视频加载失败"}),E.jsx("canvas",{ref:u,className:Ct.bgCanvas}),E.jsx("video",{className:Ct.video,ref:o,src:r,autoPlay:i,poster:n,playsInline:!0,crossOrigin:"anonymous",onDurationChange:mt,onTimeUpdate:xt,onEnded:$,onProgress:G,onPlay:()=>{q(),h(!1)},onPause:()=>q(),onError:Q}),E.jsx("div",{className:Ct.bezel,children:E.jsx("span",{className:Rt(Ct.bezelIcon,{[Ct.bezelTransition]:S}),onAnimationEnd:()=>w(!1),children:v?E.jsx(Ie.Pause,{}):E.jsx(Ie.PlayOne,{})})})]}),E.jsx("div",{className:Ct.controllerMask}),E.jsxs("div",{className:Ct.controller,children:[E.jsxs("div",{className:Ct.icons,children:[E.jsx("div",{className:Rt(Ct.icon,Ct.playIcon),onClick:lt=>{lt.stopPropagation(),at()},children:E.jsx("span",{className:Ct.iconContent,children:v?E.jsx(Ie.PlayOne,{}):E.jsx(Ie.Pause,{})})}),E.jsxs("div",{className:Ct.volume,children:[E.jsx("div",{className:Rt(Ct.icon,Ct.volumeIcon),onClick:lt=>{lt.stopPropagation(),J()},children:E.jsx("span",{className:Ct.iconContent,children:c===0?E.jsx(Ie.VolumeMute,{}):c===1?E.jsx(Ie.VolumeNotice,{}):E.jsx(Ie.VolumeSmall,{})})}),E.jsx("div",{className:Ct.volumeBarWrap,onMouseDown:lt=>{lt.stopPropagation(),pe()},onTouchStart:lt=>{lt.stopPropagation(),pe()},onClick:lt=>{lt.stopPropagation(),Ae(lt)},children:E.jsx("div",{className:Ct.volumeBar,ref:l,children:E.jsx("div",{className:Ct.volumeBarInner,style:{width:gt},children:E.jsx("span",{className:Ct.thumb})})})})]}),E.jsxs("span",{className:Ct.time,children:[E.jsx("span",{className:Ct.ptime,children:j})," /"," ",E.jsx("span",{className:Ct.dtime,children:X})]})]}),E.jsxs("div",{className:Rt(Ct.icons,Ct.iconsRight),children:[E.jsx("div",{className:Ct.speed,children:E.jsxs("div",{className:Rt(Ct.icon,Ct.speedIcon),onMouseLeave:()=>I(!1),children:[E.jsx("span",{className:Ct.iconContent,onClick:lt=>{lt.stopPropagation(),I(!H)},children:T===1?"倍速":T+"x"}),H&&E.jsx("div",{className:Ct.speedMenu,children:Y.map(lt=>E.jsx("div",{className:Rt(Ct.speedMenuItem,{[Ct.speedMenuItemActive]:lt.value===T}),onClick:Ze=>{Ze.stopPropagation(),K(lt.value),I(!1)},children:lt.label},lt.label))})]})}),E.jsx("div",{className:Ct.loop,onClick:lt=>{lt.stopPropagation(),_t()},children:E.jsx("div",{className:Rt(Ct.icon,Ct.loopIcon,{[Ct.iconActive]:x}),children:E.jsxs("span",{className:Ct.iconContent,children:["循环",x?"开":"关"]})})})]}),E.jsxs("div",{className:Ct.barWrap,ref:s,onMouseDown:lt=>{lt.stopPropagation(),ct()},onTouchStart:lt=>{lt.stopPropagation(),ct()},onMouseMove:$t,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),onClick:lt=>lt.stopPropagation(),children:[E.jsx("div",{className:Rt(Ct.barTime,{[Ct.barTimeHidden]:!A}),style:{left:R},children:P}),E.jsxs("div",{className:Ct.bar,children:[E.jsx("div",{className:Ct.loaded,style:{width:ft}}),E.jsx("div",{className:Ct.played,style:{width:et},children:E.jsx("span",{className:Ct.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"},zE=({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 $r(a,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Cs.editableElementVideo,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"},children:E.jsx("div",{className:Cs.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`},children:E.jsxs("div",{className:Cs.elementContent,ref:a,onMouseDown:s=>o(s,!1),onTouchStart:s=>o(s,!1),children:[E.jsx(VE,{width:n.width,height:n.height,src:n.src,poster:n.poster,scale:i}),["t","b","l","r"].map(s=>E.jsx("div",{className:`${Cs.handlerBorder} ${Cs[s]}`,onMouseDown:l=>o(l),onTouchStart:l=>o(l)},s))]})})})},le={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"},FE=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,v]=N.useState(.5),[h,d]=N.useState(!0),[p,g]=N.useState(0),[m,y]=N.useState(0),[_,x]=N.useState(0),[b,S]=N.useState(!1),[w,T]=N.useState("00:00"),[L,D]=N.useState("0"),C=(J=0)=>{if(J===0||isNaN(J))return"00:00";const _t=G=>G<10?"0"+G:""+G,mt=Math.floor(J/3600),xt=Math.floor((J-mt*3600)/60),$=Math.floor(J-mt*3600-xt*60);return(mt>0?[mt,xt,$]:[xt,$]).map(_t).join(":")},A=N.useMemo(()=>C(p),[p]),M=N.useMemo(()=>C(m),[m]),P=N.useMemo(()=>(m?p/m*100:0)+"%",[p,m]),B=N.useMemo(()=>(m?_/m*100:0)+"%",[_,m]),R=N.useMemo(()=>f*100+"%",[f]),k=()=>{l.current&&(d(!1),l.current.play())},H=()=>{l.current&&(d(!0),l.current.pause())},I=()=>{h?k():H()};N.useImperativeHandle(s,()=>({toggle:I}));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,v(J),l.current.muted&&J!==0&&(l.current.muted=!1))},W=()=>{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)},X=()=>{var J;return g(((J=l.current)==null?void 0:J.currentTime)||0)},et=()=>{e?(F(0),k()):H()},ft=()=>{l.current&&l.current.buffered.length&&x(l.current.buffered.end(l.current.buffered.length-1))},gt=()=>console.error("音频加载失败"),Y=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)-Y(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);D(`${mt-(xt>=3600?25:20)}px`),T(C(xt)),S(!0)}},at=N.useCallback(J=>{if(!c.current)return;const mt=(("clientX"in J?J.clientX:J.changedTouches[0].clientX)-Y(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-Y(c.current))/45;O(_t)};return E.jsxs("div",{className:Rt(le.audioPlayer,i),style:{transform:`scale(${1/n})`,...a},onMouseDown:o,children:[E.jsx("audio",{className:le.audio,ref:l,src:t,autoPlay:r,onDurationChange:j,onTimeUpdate:X,onPlay:()=>d(!1),onEnded:et,onProgress:ft,onError:gt}),E.jsxs("div",{className:le.controller,children:[E.jsxs("div",{className:le.icons,children:[E.jsx("div",{className:Rt(le.icon,le.playIcon),onClick:I,children:E.jsx("span",{className:le.iconContent,children:h?E.jsx(Ie.PlayOne,{}):E.jsx(Ie.Pause,{})})}),E.jsxs("div",{className:le.volume,children:[E.jsx("div",{className:Rt(le.icon,le.volumeIcon),onClick:W,children:E.jsx("span",{className:le.iconContent,children:f===0?E.jsx(Ie.VolumeMute,{}):f===1?E.jsx(Ie.VolumeNotice,{}):E.jsx(Ie.VolumeSmall,{})})}),E.jsx("div",{className:le.volumeBarWrap,onMouseDown:Et,onTouchStart:Et,onClick:K,children:E.jsx("div",{className:le.volumeBar,ref:c,children:E.jsx("div",{className:le.volumeBarInner,style:{width:R},children:E.jsx("span",{className:le.thumb})})})})]})]}),E.jsxs("span",{className:le.time,children:[E.jsx("span",{className:le.ptime,children:A})," /"," ",E.jsx("span",{className:le.dtime,children:M})]}),E.jsxs("div",{className:le.barWrap,ref:u,onMouseDown:tt,onTouchStart:tt,onMouseMove:nt,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:[E.jsx("div",{className:Rt(le.barTime,{[le.barTimeHidden]:!b}),style:{left:L},children:w}),E.jsxs("div",{className:le.bar,children:[E.jsx("div",{className:le.loaded,style:{width:B}}),E.jsx("div",{className:le.played,style:{width:P},children:E.jsx("span",{className:le.thumb})})]})]})]})]})}),Es={editableElementAudio:"_editableElementAudio_nmvrn_1",rotateWrapper:"_rotateWrapper_nmvrn_5",elementContent:"_elementContent_nmvrn_10",audioIcon:"_audioIcon_nmvrn_18",audioPlayer:"_audioPlayer_nmvrn_22"},HE=({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,v=o*a,h=280/n,d=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+d>=v&&(x=-d),{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 $r(s,()=>(r==null?void 0:r())||[]),E.jsx("div",{className:Es.editableElementAudio,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Es.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsxs("div",{ref:s,className:Es.elementContent,onMouseDown:f=>c(f),onTouchStart:f=>c(f),children:[E.jsx(Ie.VolumeNotice,{className:Es.audioIcon,style:{fontSize:l,color:t.color}}),i===t.id&&E.jsx(FE,{className:Es.audioPlayer,style:{...u},src:t.src,loop:t.loop,scale:n,onMouseDown:f=>f.stopPropagation()})]})})})},GE=({elementInfo:t,elementIndex:e,isMultiSelect:r,selectElement:n})=>{const{orderElement:i}=u3(),{alignElementToCanvas:a}=c3(),{deleteElement:o}=cd(),{copyElement:s,pasteElement:l,cutElement:u}=f3(),c=N.useRef(null),f=N.useMemo(()=>({[Ut.IMAGE]:x3,[Ut.TEXT]:s7,[Ut.SHAPE]:l7,[Ut.LINE]:u7,[Ut.CHART]:PE,[Ut.TABLE]:OE,[Ut.LATEX]:IE,[Ut.VIDEO]:zE,[Ut.AUDIO]:HE})[t.type]||null,[t.type]),v=()=>[{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,kr.TOP),children:[{text:"置于顶层",handler:()=>i(t,kr.TOP)},{text:"上移一层",handler:()=>i(t,kr.UP)}]},{text:"置于底层",disable:r&&!t.groupId,handler:()=>i(t,kr.BOTTOM),children:[{text:"置于底层",handler:()=>i(t,kr.BOTTOM)},{text:"下移一层",handler:()=>i(t,kr.DOWN)}]},{divider:!0},{text:"删除",subText:"Delete",handler:o}];return $r(c,v),f?E.jsx("div",{ref:c,className:"editable-element",id:`editable-element-${t.id}`,style:{zIndex:e},children:E.jsx(f,{elementInfo:t,selectElement:n,contextmenus:v})}):null},WE=()=>{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()}}},Ds={baseElementImage:"_baseElementImage_1yw1u_1",rotateWrapper:"_rotateWrapper_1yw1u_5",elementContent:"_elementContent_1yw1u_10",imageContent:"_imageContent_1yw1u_15",colorMask:"_colorMask_1yw1u_24"},jE=({elementInfo:t})=>{const{shadowStyle:e}=Ln(t.shadow),{flipStyle:r}=js(t.flipH,t.flipV),{clipShape:n,imgPosition:i}=_c(t),{filter:a}=gd(t.filters);return E.jsx("div",{className:Ds.baseElementImage,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Ds.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsxs("div",{className:Ds.elementContent,style:{filter:e?`drop-shadow(${e})`:"",transform:r},children:[E.jsx(md,{elementInfo:t}),E.jsxs("div",{className:Ds.imageContent,style:{clipPath:n.style},children:[E.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&&E.jsx("div",{className:Ds.colorMask,style:{backgroundColor:t.colorMask}})]})]})})})},As={baseElementText:"_baseElementText_emqg1_1",rotateWrapper:"_rotateWrapper_emqg1_5",elementContent:"_elementContent_emqg1_10",text:"_text_emqg1_16",thumbnail:"_thumbnail_emqg1_19"},$E=({elementInfo:t,target:e})=>{const{shadowStyle:r}=Ln(t.shadow);return E.jsx("div",{className:As.baseElementText,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:As.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsxs("div",{className:As.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:[E.jsx($s,{width:t.width,height:t.height,outline:t.outline}),E.jsx("div",{className:Rt(As.text,"ProseMirror-static",{[As.thumbnail]:e==="thumbnail"}),style:{"--paragraphSpace":`${t.paragraphSpace===void 0?5:t.paragraphSpace}px`},dangerouslySetInnerHTML:{__html:t.content}})]})})})},Ps={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"},XE=({elementInfo:t})=>{const{theme:e}=Bt(),{fill:r}=Td(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 E.jsx("div",{className:Ps.baseElementShape,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Ps.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsxs("div",{className:Ps.elementContent,style:{opacity:t.opacity,filter:o?`drop-shadow(${o})`:"",transform:s,color:l.defaultColor,fontFamily:l.defaultFontName},children:[E.jsxs("svg",{overflow:"visible",width:t.width,height:t.height,children:[E.jsx("defs",{children:t.pattern?E.jsx(Md,{id:`base-pattern-${t.id}`,src:t.pattern}):t.gradient?E.jsx(Ld,{id:`base-gradient-${t.id}`,type:t.gradient.type,colors:t.gradient.colors,rotate:t.gradient.rotate}):null}),E.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:E.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:t.path,fill:r,stroke:i,strokeWidth:n,strokeDasharray:a})})]}),E.jsx("div",{className:Rt(Ps.shapeText,Ps[l.align]),children:E.jsx("div",{className:"ProseMirror-static",dangerouslySetInnerHTML:{__html:l.content}})})]})})})},j_={baseElementLine:"_baseElementLine_135s9_1",elementContent:"_elementContent_135s9_5"},UE=({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(()=>qv(t),[t]),o=t.points[0],s=t.points[1];return E.jsx("div",{className:j_.baseElementLine,style:{top:t.top+"px",left:t.left+"px"},children:E.jsx("div",{className:j_.elementContent,style:{filter:e?`drop-shadow(${e})`:""},children:E.jsxs("svg",{overflow:"visible",width:r,height:n,children:[E.jsxs("defs",{children:[o&&E.jsx(Xs,{id:t.id,position:"start",type:o,color:t.color,baseSize:t.width}),s&&E.jsx(Xs,{id:t.id,position:"end",type:s,color:t.color,baseSize:t.width})]}),E.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)`:""})]})})})},Ev={baseElementChart:"_baseElementChart_1cqxu_1",isThumbnail:"_isThumbnail_1cqxu_4",rotateWrapper:"_rotateWrapper_1cqxu_8",elementContent:"_elementContent_1cqxu_13"},YE=({elementInfo:t})=>E.jsx("div",{className:Ev.baseElementChart,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Ev.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsxs("div",{className:Ev.elementContent,style:{backgroundColor:t.fill},children:[E.jsx($s,{width:t.width,height:t.height,outline:t.outline}),E.jsx(z_,{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"},ZE=({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,d)=>h+d,0),[s]),{hideCells:c}=G_(t),{subThemeColor:f}=W_(a),v=N.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":f[0],"--subThemeColor2":f[1]}:{},[a,f]);return E.jsx("div",{className:ai.staticTable,style:{width:u+"px"},children:E.jsxs("table",{className:Rt({[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:v,children:[E.jsx("colgroup",{children:s.map((h,d)=>E.jsx("col",{span:1,width:h},d))}),E.jsx("tbody",{children:t.map((h,d)=>E.jsx("tr",{style:{height:r+"px"},children:h.map((p,g)=>c.includes(`${d}_${g}`)?null:E.jsx("td",{className:ai.cell,style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...F_(p.style)},rowSpan:p.rowspan,colSpan:p.colspan,children:E.jsx("div",{className:ai.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:H_(p.text)}})},p.id))},d))})]})})},Dv={baseElementTable:"_baseElementTable_uo3vw_1",rotateWrapper:"_rotateWrapper_uo3vw_5",elementContent:"_elementContent_uo3vw_10"},KE=({elementInfo:t})=>E.jsx("div",{className:Dv.baseElementTable,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px"},children:E.jsx("div",{className:Dv.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsx("div",{className:Dv.elementContent,children:E.jsx(ZE,{data:t.data,width:t.width,cellMinHeight:t.cellMinHeight,colWidths:t.colWidths,outline:t.outline,theme:t.theme})})})}),Av={baseElementLatex:"_baseElementLatex_ybsi7_1",rotateWrapper:"_rotateWrapper_ybsi7_5",elementContent:"_elementContent_ybsi7_10"},QE=({elementInfo:t})=>E.jsx("div",{className:Av.baseElementLatex,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:Av.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsx("div",{className:Av.elementContent,children:E.jsx("svg",{overflow:"visible",width:t.width,height:t.height,stroke:t.color,strokeWidth:t.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:E.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:E.jsx("path",{d:t.path})})})})})}),sc={baseElementVideo:"_baseElementVideo_vw6yo_1",rotateWrapper:"_rotateWrapper_vw6yo_5",elementContent:"_elementContent_vw6yo_10",icon:"_icon_vw6yo_22"},JE=({elementInfo:t})=>E.jsx("div",{className:sc.baseElementVideo,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:sc.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsx("div",{className:sc.elementContent,style:{backgroundImage:t.poster?`url(${t.poster})`:""},children:E.jsx("div",{className:sc.icon,children:E.jsx(Ie.PlayOne,{})})})})}),lc={baseElementAudio:"_baseElementAudio_1jxzq_1",rotateWrapper:"_rotateWrapper_1jxzq_5",elementContent:"_elementContent_1jxzq_10",audioIcon:"_audioIcon_1jxzq_18"},qE=({elementInfo:t})=>{const e=N.useMemo(()=>Math.min(t.width,t.height)+"px",[t.width,t.height]);return E.jsx("div",{className:lc.baseElementAudio,style:{top:t.top+"px",left:t.left+"px",width:t.width+"px",height:t.height+"px"},children:E.jsx("div",{className:lc.rotateWrapper,style:{transform:`rotate(${t.rotate}deg)`},children:E.jsx("div",{className:lc.elementContent,style:{color:t.color},children:E.jsx(Ie.VolumeNotice,{className:lc.audioIcon,style:{fontSize:e,color:t.color}})})})})},tD=({elementInfo:t,elementIndex:e})=>{const r=N.useMemo(()=>({[Ut.IMAGE]:jE,[Ut.TEXT]:$E,[Ut.SHAPE]:XE,[Ut.LINE]:UE,[Ut.CHART]:YE,[Ut.TABLE]:KE,[Ut.LATEX]:QE,[Ut.VIDEO]:JE,[Ut.AUDIO]:qE})[t.type]||null,[t.type]);return E.jsx("div",{className:Rt("thumbnail-element",`base-element-${t.id}`),style:{zIndex:e},children:E.jsx(r,{elementInfo:t})})},eD=({slide:t,size:e,visible:r=!0,className:n})=>{const{viewportRatio:i,viewportSize:a}=Bt(),{backgroundStyle:o}=ad(t.background),s=N.useMemo(()=>e/a,[e,a]);return E.jsx("div",{className:Rt("thumbnail-slide",n),style:{width:e,height:e*i},children:r?E.jsxs("div",{className:"elements",style:{width:a,height:a*i,transform:`scale(${s})`},children:[E.jsx("div",{className:"background",style:o}),t.elements.map((l,u)=>E.jsx(tD,{elementInfo:l,elementIndex:u+1},l.id))]}):E.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"},rD=({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}=WE(),v=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]),d=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=v.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 E.jsx("div",{className:je.linkDialogMask,onClick:t,children:E.jsxs("div",{className:je.linkDialog,onClick:g=>g.stopPropagation(),children:[E.jsxs("div",{className:je.tabs,children:[E.jsx("div",{className:Rt(je.tab,{[je.active]:a==="web"}),onClick:()=>o("web"),children:"网页链接"}),E.jsx("div",{className:Rt(je.tab,{[je.active]:a==="slide"}),onClick:()=>o("slide"),children:"幻灯片页面"})]}),E.jsx("div",{className:je.content,children:a==="web"?E.jsx("input",{ref:v,className:je.input,type:"text",value:s,onChange:g=>l(g.target.value),onKeyDown:g=>g.key==="Enter"&&p(),placeholder:"请输入网页链接地址"}):E.jsxs(E.Fragment,{children:[E.jsx("select",{className:je.input,value:u,onChange:g=>c(g.target.value),children:h.map(g=>E.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))}),d&&E.jsxs("div",{className:je.preview,children:[E.jsx("div",{children:"预览:"}),E.jsx(eD,{className:je.thumbnail,slide:d,size:500})]})]})}),E.jsxs("div",{className:je.btns,children:[E.jsx("button",{className:je.btn,onClick:t,children:"取消"}),E.jsx("button",{className:Rt(je.btn,je.primary),onClick:p,children:"确认"})]})]})})},Pv={canvas:"_canvas_r5284_1",dragMask:"_dragMask_r5284_9",viewportWrapper:"_viewportWrapper_r5284_18",viewport:"_viewport_r5284_18"},nD=()=>{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:v}=Tt(),{currentSlide:h}=Bt(),{spaceKeyState:d}=pr(),{createCustomShapeElement:p,createTextElement:g}=eo(),{updateSlideIndex:m}=C4(),y=N.useRef(null),_=N.useRef(null),[x,b]=N.useState(!1),S=(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:D}=O4(S,L,T),{scaleElement:C,scaleMultiElement:A}=F4(S,L,T),{rotateElement:M}=V4(S,L,_),{dragLineElement:P}=H4(S,L),{moveShapeKeypoint:B}=G4(S,L),{viewportStyles:R,dragViewport:k}=A4(y),{selectionState:H,mouseSelectionVisible:I,updateMouseSelection:F}=P4(S,_);R4(y);const{insertElementFromCreateSelection:O}=N4(_),{selectElement:W}=I4(S,D);E4(y,()=>{const K=Tt.getState();K.editorAreaFocus&&K.setEditorareaFocus(!1)}),N.useEffect(()=>{l("")},[r,l]);const X=(K,J,_t=!0)=>{K.stopPropagation();const mt=K.nativeEvent||K;W(mt,J,_t)},et=K=>{e.length&&s([]),d?k(K.nativeEvent):F(K),u||f(!0),c&&v(null),D4()},ft=K=>{if(e.length||a||o||!_.current)return;const{pageX:J,pageY:_t}=K,{x:mt,y:xt}=_.current.getBoundingClientRect(),$=(J-mt)/t,G=(_t-xt)/t;g({left:$,top:G,width:200/t,height:0})};N.useEffect(()=>{e.length&&s([])},[]),N.useEffect(()=>()=>{const{textFormatPainter:K}=Tt.getState();K&&v(null)},[v]);const gt=N.useRef(m);N.useEffect(()=>{gt.current=m},[m]);const Y=N.useMemo(()=>Ar.throttle(K=>{gt.current(K)},300,{leading:!0,trailing:!1}),[]),U=K=>{K.preventDefault(),K.deltaY>0?Y(me.DOWN):K.deltaY<0&&Y(me.UP)};N.useEffect(()=>{const K=y.current;if(K)return K.addEventListener("wheel",U,{passive:!1}),()=>K.removeEventListener("wheel",U)},[Y]);const q=()=>b(!0),tt=(K,J)=>{M(K.nativeEvent,J)},nt=(K,J,_t)=>{C(K.nativeEvent,J,_t)},at=(K,J,_t)=>{P(K.nativeEvent,J,_t)},st=(K,J,_t)=>{B(K.nativeEvent,J,_t)},Et=(K,J,_t)=>{A(K.nativeEvent,J,_t)};return E.jsxs("div",{className:Pv.canvas,ref:y,onMouseDown:et,onDoubleClick:ft,onDragOver:K=>K.preventDefault(),children:[x&&E.jsx(rD,{onClose:()=>b(!1)}),a&&E.jsx(n3,{onCreated:O}),o&&E.jsx(a3,{onClose:()=>Tt.getState().setCreatingCustomShapeState(!1),onCreated:p}),E.jsxs("div",{className:Pv.viewportWrapper,style:{width:R.width*t,height:R.height*t,left:R.left,top:R.top},children:[E.jsxs("div",{className:"operates",children:[w.map((K,J)=>E.jsx(r3,{type:K.type,axis:K.axis,length:K.length,canvasScale:t},J)),e.length>1&&E.jsx(l3,{elementList:(h==null?void 0:h.elements)||[],scaleMultiElement:Et}),h==null?void 0:h.elements.filter(K=>!i.includes(K.id)).map(K=>E.jsx(e3,{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)),E.jsx(X4,{})]}),E.jsxs("div",{className:Pv.viewport,ref:_,style:{transform:`scale(${t})`},children:[I&&H&&E.jsx(o3,{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)=>E.jsx(GE,{elementInfo:K,elementIndex:J+1,isMultiSelect:e.length>1,selectElement:X,openLinkDialog:q},K.id))]})]})]})},iD=({initialSlidesData:t,onDataUpdate:e})=>{const{setSlides:r,setTitle:n,setTheme:i,setViewportRatio:a}=Bt.getState();return N.useEffect(()=>{t&&(t.slides&&r(t.slides),t.title&&n(t.title),t.theme&&i(t.theme),t.viewportRatio&&a(t.viewportRatio))},[]),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]),E.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:E.jsx(nD,{})})};Xt.ElementTypes=Ut,Xt.PPTCanvas=iD,Xt.ShapePathFormulasKeys=Nt,Object.defineProperty(Xt,Symbol.toStringTag,{value:"Module"})});
|
|
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 ic;y.newline=!0,u.add(y);return}var _=i.getSeriesByName(m)[0];if(!c.get(m)){if(_){var x=_.getData(),S=x.getVisual("legendLineStyle")||{},b=x.getVisual("legendIcon"),w=x.getVisual("style"),T=this._createItem(_,m,p,v,n,r,S,w,b,f,a);T.on("click",Za(a4,m,null,a,h)).on("mouseover",Za(cd,_.name,null,a,h)).on("mouseout",Za(fd,_.name,null,a,h)),i.ssr&&T.eachChild(function(L){var C=se(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"),I=Or(E.fill);I&&I[3]===0&&(I[3]=.2,E=ot(ot({},E),{fill:_o(I,"rgba")}));var k=this._createItem(L,m,p,v,n,r,{},E,P,f,a);k.on("click",Za(a4,null,m,a,h)).on("mouseover",Za(cd,null,m,a,h)).on("mouseout",Za(fd,null,m,a,h)),i.ssr&&k.eachChild(function(R){var H=se(R);H.seriesIndex=L.seriesIndex,H.dataIndex=p,H.ssrType="legend"}),d&&k.eachChild(function(R){C.packEventData(R,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};se(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();ud(r,function(u){var c=u.type,f=new fr({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"]);Pa(f,{normal:d,emphasis:h},{defaultText:u.title}),oh(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 x=jC(c,a,l,u,h,g,d),S=new ic,b=a.getModel("textStyle");if(Dt(r.getLegendIcon)&&(!_||_==="inherit"))S.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:c,iconRotate:m,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;S.add(XC({itemWidth:v,itemHeight:p,icon:c,iconRotate:w,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?v+5:-5,L=s,C=o.get("formatter"),M=n;Lt(C)&&C?M=C.replace("{name}",n??""):Dt(C)&&(M=C(n));var A=g?b.getTextColor():a.get("inactiveColor");S.add(new fr({style:Xo(b,{text:M,x:T,y:p/2,fill:A,align:L,verticalAlign:"middle"},{inheritColor:A})}));var E=new _e({shape:S.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&eu({el:E,componentModel:o,itemName:n,itemTooltipOption:P.option}),S.add(E),S.eachChild(function(I){I.silent=!0}),E.silent=!f,this.getContentGroup().add(S),oh(S),S.__legendDataIndex=i,S},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();$o(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){$o("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}(xn);function jC(t,e,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),ud(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:l0(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 XC(t){var e=t.icon||"roundRect",r=Un(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=Rt.color.neutral00,r.style.lineWidth=2),r}function a4(t,e,r,n){fd(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),cd(t,e,r,n)}function o4(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 cd(t,e,r,n){o4(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function fd(t,e,r,n){o4(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function YC(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 ws(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),s4(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){z(i,function(l,u){s[l?"select":"unSelect"](u)}),s4(s,o)}),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function s4(t,e){var r=e||{};return z(t.getData(),function(n){var i=n.get("name");if(!(i===`
|
|
68
|
+
`||i==="")){var a=t.isSelected(i);Yr(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function UC(t){t.registerAction("legendToggleSelect","legendselectchanged",or(ws,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",or(ws,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",or(ws,"inverseSelect")),t.registerAction("legendSelect","legendselected",or(ws,"select")),t.registerAction("legendUnSelect","legendunselected",or(ws,"unSelect"))}function l4(t){t.registerComponentModel(ld),t.registerComponentView(i4),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,YC),t.registerSubTypeDefaulter("legend",function(){return"plain"}),UC(t)}var $C=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.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,i){var a=Qo(r);t.prototype.init.call(this,r,n,i),u4(this,r,a)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),u4(this,this.option,r)},e.type="legend.scroll",e.defaultOption=Ig(ld.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:Rt.color.accent50,pageIconInactiveColor:Rt.color.accent10,pageIconSize:15,pageTextStyle:{color:Rt.color.tertiary},animationDurationUpdate:800}),e}(ld);function u4(t,e,r){var n=t.getOrient(),i=[1,1];i[n.index]=0,Xn(e,r,{type:"box",ignoreSize:!!i})}var c4=ye,hd=["width","height"],dd=["x","y"],ZC=function(t){ht(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 c4),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new c4)},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=bt(f)?f:[f,f];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new fr({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=Sg(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ce(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=hd[u],f=dd[u],d=hd[1-u],h=dd[1-u];o&&$o("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=zt(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;$o(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),$o("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],_=St(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var x=r.get("pageButtonPosition",!0);x==="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 S={x:0,y:0};if(S[o]=p?i[o]:h[o],S[s]=Math.max(h[s],v[s]),S[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var b={x:0,y:0};b[o]=Math.max(i[o]-v[o]-_,0),b[s]=S[s],f.setClipPath(new _e({shape:b})),f.__rectSize=b[o]}else d.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(r);return w.pageIndex!=null&&Fe(c,{x:w.contentPosition[0],y:w.contentPosition[1]},p?r:null),this._updatePageInfoView(r,w),S},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;z(["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",Lt(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=hd[o],l=dd[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=x(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=d;++g)_=x(c[g]),(!_&&y.e>m.s+a||_&&!S(_,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)_=x(c[g]),(!_||!S(y,_.s))&&m.i<y.i&&(y=m,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=m.i),++v.pageCount,++v.pageIndex),m=_;return v;function x(b){if(b){var w=b.getBoundingRect(),T=w[l]+b[l];return{s:T,e:T+w[s],i:b.__legendDataIndex}}}function S(b,w){return b.e>=w&&b.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}(i4);function KC(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 QC(t){ji(l4),t.registerComponentModel($C),t.registerComponentView(ZC),KC(t)}function JC(t){ji(l4),ji(QC)}var vd=Math.sin,pd=Math.cos,f4=Math.PI,Ui=Math.PI*2,qC=180/f4,h4=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=On(f-Ui)||(c?u>=Ui:-u>=Ui),h=u>0?u%Ui:u%Ui+Ui,v=!1;d?v=!0:On(f)?v=!1:v=h>=f4==!!c;var p=e+n*pd(o),g=r+i*vd(o);this._start&&this._add("M",p,g);var m=Math.round(a*qC);if(d){var y=1/this._p,_=(c?1:-1)*(Ui-y);this._add("A",n,i,m,1,+c,e+n*pd(o+_),r+i*vd(o+_)),y>.01&&this._add("A",n,i,m,0,+c,p,g)}else{var x=e+n*pd(s),S=r+i*vd(s);this._add("A",n,i,m,+v,+c,x,S)}},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}(),gd="none",tE=Math.round;function eE(t){var e=t.fill;return e!=null&&e!==gd}function rE(t){var e=t.stroke;return e!=null&&e!==gd}var md=["lineCap","miterLimit","lineJoin"],nE=yt(md,function(t){return"stroke-"+t.toLowerCase()});function iE(t,e,r,n){var i=e.opacity==null?1:e.opacity;if(r instanceof Br){t("opacity",i);return}if(eE(e)){var a=xo(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",gd);if(rE(e)){var s=xo(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=a0(r),h=d[0],v=d[1];h&&(v=tE(v||0),t("stroke-dasharray",h.join(",")),(v||n)&&t("stroke-dashoffset",v))}for(var p=0;p<md.length;p++){var g=md[p];if(e[g]!==Ol[g]){var m=e[g]||Ol[g];m&&t(nE[p],m)}}}}var d4="http://www.w3.org/2000/svg",v4="http://www.w3.org/1999/xlink",aE="http://www.w3.org/2000/xmlns/",oE="http://www.w3.org/XML/1998/namespace",p4="ecmeta_";function g4(t){return document.createElementNS(d4,t)}function Le(t,e,r,n,i){return{tag:t,attrs:r||{},children:n,text:i,key:e}}function sE(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 lE(t){return"</"+t+">"}function yd(t,e){e=e||{};var r=e.newline?`
|
|
69
|
+
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return sE(o,s)+(o!=="style"?U7(l):l||"")+(a?""+r+yt(a,function(u){return n(u)}).join(r)+r:"")+lE(o)}return n(t)}function uE(t,e,r){r=r||{};var n=r.newline?`
|
|
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"})});
|